Skip to content

Commit e3b1e96

Browse files
authored
TsConfigJson: Fix Plugin type (#554)
1 parent 2ef0940 commit e3b1e96

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source/tsconfig-json.d.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,10 @@ declare namespace TsConfigJson {
188188
| 'webworker.iterable';
189189

190190
export type Plugin = {
191-
[key: string]: unknown;
192191
/**
193192
Plugin name.
194193
*/
195-
name?: string;
194+
name: string;
196195
};
197196

198197
export type ImportsNotUsedAsValues =

test-d/tsconfig-json.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {expectType} from 'tsd';
2-
import type {TsConfigJson} from '../index';
1+
import {expectType, expectAssignable} from 'tsd';
2+
import type {Jsonifiable, TsConfigJson} from '../index';
33

44
const tsConfig: TsConfigJson = {};
55

@@ -11,3 +11,4 @@ expectType<string[] | undefined>(tsConfig.files);
1111
expectType<string[] | undefined>(tsConfig.include);
1212
expectType<TsConfigJson.References[] | undefined>(tsConfig.references);
1313
expectType<TsConfigJson.TypeAcquisition | undefined>(tsConfig.typeAcquisition);
14+
expectAssignable<Jsonifiable>(tsConfig);

0 commit comments

Comments
 (0)