types: fix error inference for public compile method
This commit is contained in:
parent
f97d6e7d63
commit
b255f42ab3
@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
ErrorCodes,
|
ErrorCodes,
|
||||||
CoreCompilerError,
|
|
||||||
createCompilerError,
|
createCompilerError,
|
||||||
defaultOnError
|
defaultOnError,
|
||||||
|
CompilerError
|
||||||
} from './errors'
|
} from './errors'
|
||||||
import {
|
import {
|
||||||
assert,
|
assert,
|
||||||
@ -38,7 +38,7 @@ export interface ParserOptions {
|
|||||||
// The full set is https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references
|
// The full set is https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references
|
||||||
namedCharacterReferences?: { [name: string]: string | undefined }
|
namedCharacterReferences?: { [name: string]: string | undefined }
|
||||||
|
|
||||||
onError?: (error: CoreCompilerError) => void
|
onError?: (error: CompilerError) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export const defaultParserOptions: Required<ParserOptions> = {
|
export const defaultParserOptions: Required<ParserOptions> = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user