-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
645b692
commit b8bfa94
Showing
3 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* @file Unit Tests - BuildOptions | ||
* @module tsconfig-types/interfaces/interfaces/BuildOptions | ||
*/ | ||
|
||
import type TestSubject from '../build-options' | ||
|
||
describe('unit:interfaces/BuildOptions', () => { | ||
it('should allow empty object', () => { | ||
assertType<TestSubject>({}) | ||
}) | ||
|
||
it('should allow object with all build options', () => { | ||
assertType<Required<TestSubject>>({ | ||
assumeChangesOnlyAffectDirectDependencies: false, | ||
dry: false, | ||
force: false, | ||
incremental: false, | ||
traceResolution: false, | ||
verbose: false | ||
}) | ||
}) | ||
|
||
it('should allow object with unknown key', () => { | ||
assertType<TestSubject>({ key: 'value' }) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/** | ||
* @file Interfaces - BuildOptions | ||
* @module tsconfig-types/interfaces/BuildOptions | ||
*/ | ||
|
||
import type { CompilerOptionsValue } from '#src/types' | ||
|
||
/** | ||
* Program build options. | ||
*/ | ||
interface BuildOptions { | ||
[option: string]: CompilerOptionsValue | undefined | ||
|
||
/** | ||
* Have recompiles in projects that use {@linkcode incremental} assume that | ||
* changes within a file will only affect files directly depending on it. | ||
* | ||
* @default false | ||
*/ | ||
assumeChangesOnlyAffectDirectDependencies?: boolean | ||
|
||
/** | ||
* Show what would be built. | ||
* | ||
* @default false | ||
*/ | ||
dry?: boolean | ||
|
||
/** | ||
* Build all projects, including those that appear to be up to date. | ||
* | ||
* @default false | ||
*/ | ||
force?: boolean | ||
|
||
/** | ||
* Save `.tsbuildinfo` files to allow for incremental compilation of projects. | ||
* | ||
* @default false | ||
*/ | ||
incremental?: boolean | ||
|
||
/** | ||
* Log paths used during the module resolution process. | ||
* | ||
* @default false | ||
*/ | ||
traceResolution?: boolean | ||
|
||
/** | ||
* Enable verbose logging. | ||
* | ||
* @default false | ||
*/ | ||
verbose?: boolean | ||
} | ||
|
||
export type { BuildOptions as default } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters