Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TsConfigJson to require paths array #404

Merged
merged 1 commit into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/tsconfig-json.d.ts
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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});