types: use Omit
instead of Pick + Exclude
(#296)
This commit is contained in:
parent
8eba1aba08
commit
a3032b9b39
@ -45,10 +45,7 @@ export interface ParserOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// `isNativeTag` is optional, others are required
|
// `isNativeTag` is optional, others are required
|
||||||
type MergedParserOptions = Pick<
|
type MergedParserOptions = Omit<Required<ParserOptions>, 'isNativeTag'> &
|
||||||
Required<ParserOptions>,
|
|
||||||
Exclude<keyof ParserOptions, 'isNativeTag'>
|
|
||||||
> &
|
|
||||||
Pick<ParserOptions, 'isNativeTag'>
|
Pick<ParserOptions, 'isNativeTag'>
|
||||||
|
|
||||||
export const defaultParserOptions: MergedParserOptions = {
|
export const defaultParserOptions: MergedParserOptions = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user