diff --git a/types/loadable__server/index.d.ts b/types/loadable__server/index.d.ts index db51e8beb5..ba13e1182c 100644 --- a/types/loadable__server/index.d.ts +++ b/types/loadable__server/index.d.ts @@ -28,6 +28,24 @@ export type ChunkExtractorOptions = { stats: object; }); +/** + * Chunk that is received by the AttrFn function. + */ +export interface Chunk { + chunk: string; + filename: string; + linkType: string; + path: string; + scriptType: string; + type: string; + url: string; +} + +/** + * Used to insert attributes in the get functions. + */ +export type AttrFn = (chunk: Chunk) => {}; + /** * Used to collect chunks server-side and get them as script tags or script elements */ @@ -52,32 +70,32 @@ export class ChunkExtractor { /** * Get scripts as a string of `