1- import { Document , Node , ParentNode , parse , serialize } from 'parse5' ;
1+ import type { DefaultTreeAdapterTypes } from 'parse5' ;
2+ type Document = DefaultTreeAdapterTypes . Document ;
3+ type Node = DefaultTreeAdapterTypes . Node ;
4+ type ParentNode = DefaultTreeAdapterTypes . ParentNode ;
5+ import { parse , serialize } from 'parse5' ;
26import {
37 findElements ,
48 getAttribute ,
@@ -9,16 +13,16 @@ import {
913 createElement ,
1014 findElement ,
1115 getTagName ,
12- Element ,
1316} from '@web/parse5-utils' ;
17+ import type { Element } from '@web/parse5-utils' ;
1418
15- import { PolyfillsLoaderConfig , PolyfillsLoader , GeneratedFile } from './types.js ' ;
16- import { createPolyfillsLoader } from './createPolyfillsLoader.js ' ;
17- import { hasFileOfType , fileTypes } from './utils.js ' ;
19+ import type { PolyfillsLoaderConfig , PolyfillsLoader , GeneratedFile } from './types.ts ' ;
20+ import { createPolyfillsLoader } from './createPolyfillsLoader.ts ' ;
21+ import { hasFileOfType , fileTypes } from './utils.ts ' ;
1822
1923function injectImportMapPolyfill ( headAst : ParentNode , originalScript : Node , type : string ) {
2024 const systemJsScript = createScript ( { type } , getTextContent ( originalScript ) ) ;
21- insertBefore ( headAst , systemJsScript , originalScript ) ;
25+ insertBefore ( headAst , systemJsScript , originalScript as any ) ;
2226}
2327
2428function findImportMapScripts ( document : Document ) {
0 commit comments