File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,11 +50,11 @@ export default class IncludeFragmentElement extends HTMLElement {
5050 this . _attached = false
5151 }
5252
53- static get observedAttributes ( ) {
53+ static get observedAttributes ( ) : string [ ] {
5454 return [ 'src' ]
5555 }
5656
57- get src ( ) {
57+ get src ( ) : string {
5858 const src = this . getAttribute ( 'src' )
5959 if ( src ) {
6060 const link = this . ownerDocument ! . createElement ( 'a' )
@@ -69,19 +69,19 @@ export default class IncludeFragmentElement extends HTMLElement {
6969 this . setAttribute ( 'src' , val )
7070 }
7171
72- get accept ( ) {
72+ get accept ( ) : string {
7373 return this . getAttribute ( 'accept' ) || ''
7474 }
7575
7676 set accept ( val : string ) {
7777 this . setAttribute ( 'accept' , val )
7878 }
7979
80- get data ( ) {
80+ get data ( ) : Promise < string > {
8181 return getData ( this )
8282 }
8383
84- attributeChangedCallback ( attribute : string ) {
84+ attributeChangedCallback ( attribute : string ) : void {
8585 if ( attribute === 'src' ) {
8686 // Source changed after attached so replace element.
8787 if ( this . _attached ) {
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
3- "module" : " esnext " ,
3+ "module" : " es2020 " ,
44 "target" : " es2017" ,
55 "strict" : true ,
66 "declaration" : true ,
You can’t perform that action at this time.
0 commit comments