Skip to content

Commit

Permalink
feat(ts-next)!: multiple configuration files in extends
Browse files Browse the repository at this point in the history
  • Loading branch information
unicornware committed Feb 5, 2023
1 parent 5b50a50 commit de15f9b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/interfaces/__tests__/tsconfig.spec-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @module tsconfig-types/interfaces/tests/TSConfig
*/

import type { JsonObject } from '@flex-development/tutils'
import type { JsonObject, OneOrMany } from '@flex-development/tutils'
import type BuildOptions from '../build-options'
import type CompilerOptions from '../compiler-options'
import type ProjectReference from '../project-reference'
Expand Down Expand Up @@ -45,10 +45,10 @@ describe('unit:interfaces/TSConfig', () => {
.toEqualTypeOf<string[] | undefined>()
})

it('should match [extends?: string]', () => {
it('should match [extends?: OneOrMany<string>]', () => {
expectTypeOf<TestSubject>()
.toHaveProperty('extends')
.toEqualTypeOf<string | undefined>()
.toEqualTypeOf<OneOrMany<string> | undefined>()
})

it('should match [files?: string[]]', () => {
Expand Down
8 changes: 5 additions & 3 deletions src/interfaces/tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @module tsconfig-types/interfaces/TSConfig
*/

import type { JsonObject } from '@flex-development/tutils'
import type { JsonObject, OneOrMany } from '@flex-development/tutils'
import type BuildOptions from './build-options'
import type CompilerOptions from './compiler-options'
import type ProjectReference from './project-reference'
Expand Down Expand Up @@ -45,9 +45,11 @@ interface TSConfig extends JsonObject {
exclude?: string[]

/**
* Path to configuration file to inherit from.
* Configuration file(s) to inherit from.
*
* @see https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#supporting-multiple-configuration-files-in-extends
*/
extends?: string
extends?: OneOrMany<string>

/**
* Files to include in the program.
Expand Down

0 comments on commit de15f9b

Please sign in to comment.