From 0c16ab1aa881855ad8e737b9df9ff2c49e71c317 Mon Sep 17 00:00:00 2001 From: Yuya Tanaka Date: Sat, 1 Sep 2018 00:11:32 +0900 Subject: [PATCH] Fix typings for SFCDescriptor and SFCCustomBlock --- README.md | 8 ++++---- lib/parse.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) 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[] }