Fix TsConfigJson to require paths array (#404)

This commit is contained in:
hiroki osame 2022-06-13 06:39:44 -04:00 committed by GitHub
parent dfaba0eb25
commit 74891f0dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -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.

View File

@ -1,4 +1,4 @@
import {expectType, expectAssignable} from 'tsd';
import {expectType} from 'tsd';
import type {TsConfigJson} from '../index';
const tsConfig: TsConfigJson = {};
@ -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});