Skip to content

Commit 343e9d1

Browse files
also exclude unset from <KnownProps['charset']
1 parent 5e4b048 commit 343e9d1

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/DocumentWatcher.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ import {
2323
resolveTextEditorOptions,
2424
} from './api'
2525

26-
type EncodingMap = Record<
27-
NonNullable<KnownProps['charset']>,
28-
TextDocument['encoding']
29-
>
26+
type Charset = Exclude<KnownProps['charset'], undefined | 'unset'>
27+
type EncodingMap = Record<Charset, TextDocument['encoding']>
3028
const encodingMap = {
3129
'utf-8': 'utf8',
3230
'utf-8-bom': 'utf8bom',

0 commit comments

Comments
 (0)