Skip to content

Commit 55da032

Browse files
committed
Fix typings for SFCDescriptor and SFCCustomBlock
1 parent ada52c6 commit 55da032

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ interface ParseOptions {
3131
}
3232

3333
interface SFCDescriptor {
34-
template?: SFCBlock
35-
script?: SFCBlock
34+
template: SFCBlock | null
35+
script: SFCBlock | null
3636
styles: SFCBlock[]
3737
customBlocks: SFCCustomBlock[]
3838
}
@@ -43,7 +43,7 @@ interface SFCCustomBlock {
4343
attrs: { [key: string]: string }
4444
start: number
4545
end: number
46-
map: RawSourceMap
46+
map?: RawSourceMap
4747
}
4848

4949
interface SFCBlock extends SFCCustomBlock {

lib/parse.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface SFCCustomBlock {
2626
attrs: { [key: string]: string }
2727
start: number
2828
end: number
29-
map: RawSourceMap
29+
map?: RawSourceMap
3030
}
3131

3232
export interface SFCBlock extends SFCCustomBlock {
@@ -37,8 +37,8 @@ export interface SFCBlock extends SFCCustomBlock {
3737
}
3838

3939
export interface SFCDescriptor {
40-
template?: SFCBlock
41-
script?: SFCBlock
40+
template: SFCBlock | null
41+
script: SFCBlock | null
4242
styles: SFCBlock[]
4343
customBlocks: SFCCustomBlock[]
4444
}

0 commit comments

Comments
 (0)