Skip to content

Commit 9e16d58

Browse files
wip(core): fix CustomBlock type
1 parent 8fe3ad4 commit 9e16d58

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/types.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,20 @@ export type File = string | { content : string, extname : string };
6666
export type CustomBlockCallback = ( component : ModuleExport ) => void;
6767

6868

69+
/**
70+
* A custom block
71+
*/
72+
export interface CustomBlock {
73+
type: string,
74+
content: string,
75+
attrs: Record<string, string | true>,
76+
// loc: SourceLocation
77+
// map?: RawSourceMap
78+
// lang?: string
79+
// src?: string
80+
}
81+
82+
6983
/**
7084
* This just represents a loaded js module exports
7185
*/
@@ -310,7 +324,7 @@ export interface Options {
310324
* ...
311325
* ```
312326
*/
313-
customBlockHandler?(block : SFCBlock, filename : string, options : Options) : Promise<CustomBlockCallback | undefined>,
327+
customBlockHandler?(block : CustomBlock, filename : string, options : Options) : Promise<CustomBlockCallback | undefined>,
314328

315329
}
316330

0 commit comments

Comments
 (0)