diff --git a/README.md b/README.md index 4cc8600..be3c45e 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ interface ParseOptions { } interface SFCDescriptor { - template?: SFCBlock - script?: SFCBlock + template: SFCBlock | null + script: SFCBlock | null styles: SFCBlock[] customBlocks: SFCCustomBlock[] } @@ -40,10 +40,10 @@ interface SFCDescriptor { interface SFCCustomBlock { type: string content: string - attrs: { [key: string]: string } + attrs: { [key: string]: string | true } start: number end: number - map: RawSourceMap + map?: RawSourceMap } interface SFCBlock extends SFCCustomBlock { diff --git a/lib/parse.ts b/lib/parse.ts index 3378f1e..8fbd70e 100644 --- a/lib/parse.ts +++ b/lib/parse.ts @@ -23,10 +23,10 @@ export interface ParseOptions { export interface SFCCustomBlock { type: string content: string - attrs: { [key: string]: string } + attrs: { [key: string]: string | true } start: number end: number - map: RawSourceMap + map?: RawSourceMap } export interface SFCBlock extends SFCCustomBlock { @@ -37,8 +37,8 @@ export interface SFCBlock extends SFCCustomBlock { } export interface SFCDescriptor { - template?: SFCBlock - script?: SFCBlock + template: SFCBlock | null + script: SFCBlock | null styles: SFCBlock[] customBlocks: SFCCustomBlock[] }