Skip to content

Commit

Permalink
fix: Typings for SFCDescriptor and SFCCustomBlock (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
ypresto authored and znck committed Sep 18, 2018
1 parent ada52c6 commit bb09115
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ interface ParseOptions {
}

interface SFCDescriptor {
template?: SFCBlock
script?: SFCBlock
template: SFCBlock | null
script: SFCBlock | null
styles: SFCBlock[]
customBlocks: SFCCustomBlock[]
}

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 {
Expand Down
8 changes: 4 additions & 4 deletions lib/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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[]
}
Expand Down

0 comments on commit bb09115

Please sign in to comment.