Skip to content

Commit

Permalink
Fix TsConfigJson to require paths array (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Jun 13, 2022
1 parent dfaba0e commit 74891f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/tsconfig-json.d.ts
Expand Up @@ -713,7 +713,7 @@ declare namespace TsConfigJson {
/**
Specify path mapping to be computed relative to baseUrl option.
*/
paths?: Partial<Record<string, string[]>>;
paths?: Record<string, string[]>;

/**
List of TypeScript language server plugins to load.
Expand Down
5 changes: 1 addition & 4 deletions test-d/tsconfig-json.ts
@@ -1,4 +1,4 @@
import {expectType, expectAssignable} from 'tsd';
import {expectType} from 'tsd';
import type {TsConfigJson} from '../index';

const tsConfig: TsConfigJson = {};
Expand All @@ -11,6 +11,3 @@ expectType<string[] | undefined>(tsConfig.files);
expectType<string[] | undefined>(tsConfig.include);
expectType<TsConfigJson.References[] | undefined>(tsConfig.references);
expectType<TsConfigJson.TypeAcquisition | undefined>(tsConfig.typeAcquisition);

// Undefined assigns
expectAssignable<NonNullable<typeof tsConfig['compilerOptions']>['paths']>({path: undefined});

0 comments on commit 74891f0

Please sign in to comment.