Skip to content

Commit ceccfd8

Browse files
committed
array-type: [ default: array, generic: array ]
1 parent c7834c5 commit ceccfd8

File tree

141 files changed

+1625
-1625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+1625
-1625
lines changed

.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
],
1717
"rules": {
1818
"@typescript-eslint/adjacent-overload-signatures": "error",
19-
"@typescript-eslint/array-type": ["error", { "default": "array", "readonly": "generic" }],
19+
"@typescript-eslint/array-type": "error",
2020
"camelcase": "off",
2121
"@typescript-eslint/camelcase": ["error", { "properties": "never", "allow": ["^[A-Za-z][a-zA-Za-z]+_[A-Za-z]+$"] }],
2222
"@typescript-eslint/class-name-casing": "error",

scripts/failed-tests.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ declare class FailedTestsReporter extends Mocha.reporters.Base {
88
reporterOptions: FailedTestsReporter.ReporterOptions;
99
reporter?: Mocha.reporters.Base;
1010
constructor(runner: Mocha.Runner, options?: { reporterOptions?: FailedTestsReporter.ReporterOptions });
11-
static writeFailures(file: string, passes: ReadonlyArray<Mocha.Test>, failures: ReadonlyArray<Mocha.Test>, keepFailed: boolean, done: (err?: NodeJS.ErrnoException) => void): void;
11+
static writeFailures(file: string, passes: readonly Mocha.Test[], failures: readonly Mocha.Test[], keepFailed: boolean, done: (err?: NodeJS.ErrnoException) => void): void;
1212
done(failures: number, fn?: (failures: number) => void): void;
1313
}
1414

scripts/types/ambient.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ declare module "vinyl" {
1919
cwd: string;
2020
base: string;
2121
path: string;
22-
readonly history: ReadonlyArray<string>;
22+
readonly history: readonly string[];
2323
contents: T;
2424
relative: string;
2525
dirname: string;
@@ -45,7 +45,7 @@ declare module "vinyl" {
4545
cwd?: string;
4646
base?: string;
4747
path?: string;
48-
history?: ReadonlyArray<string>;
48+
history?: readonly string[];
4949
stat?: import("fs").Stats;
5050
contents?: T;
5151
sourceMap?: import("./sourcemaps").RawSourceMap | string;

src/compiler/builder.ts

+42-42
Large diffs are not rendered by default.

src/compiler/builderState.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ namespace ts {
6969
/**
7070
* Cache of all files excluding default library file for the current program
7171
*/
72-
allFilesExcludingDefaultLibraryFile?: ReadonlyArray<SourceFile>;
72+
allFilesExcludingDefaultLibraryFile?: readonly SourceFile[];
7373
/**
7474
* Cache of all the file names
7575
*/
76-
allFileNames?: ReadonlyArray<string>;
76+
allFileNames?: readonly string[];
7777
}
7878

7979
export function cloneMapOrUndefined<T>(map: ReadonlyMap<T> | undefined) {
@@ -286,7 +286,7 @@ namespace ts.BuilderState {
286286
/**
287287
* Gets the files affected by the path from the program
288288
*/
289-
export function getFilesAffectedBy(state: BuilderState, programOfThisState: Program, path: Path, cancellationToken: CancellationToken | undefined, computeHash: ComputeHash, cacheToUpdateSignature?: Map<string>, exportedModulesMapCache?: ComputingExportedModulesMap): ReadonlyArray<SourceFile> {
289+
export function getFilesAffectedBy(state: BuilderState, programOfThisState: Program, path: Path, cancellationToken: CancellationToken | undefined, computeHash: ComputeHash, cacheToUpdateSignature?: Map<string>, exportedModulesMapCache?: ComputingExportedModulesMap): readonly SourceFile[] {
290290
// Since the operation could be cancelled, the signatures are always stored in the cache
291291
// They will be committed once it is safe to use them
292292
// eg when calling this api from tsserver, if there is no cancellation of the operation
@@ -407,7 +407,7 @@ namespace ts.BuilderState {
407407
/**
408408
* Get all the dependencies of the sourceFile
409409
*/
410-
export function getAllDependencies(state: BuilderState, programOfThisState: Program, sourceFile: SourceFile): ReadonlyArray<string> {
410+
export function getAllDependencies(state: BuilderState, programOfThisState: Program, sourceFile: SourceFile): readonly string[] {
411411
const compilerOptions = programOfThisState.getCompilerOptions();
412412
// With --out or --outFile all outputs go into single file, all files depend on each other
413413
if (compilerOptions.outFile || compilerOptions.out) {
@@ -445,7 +445,7 @@ namespace ts.BuilderState {
445445
/**
446446
* Gets the names of all files from the program
447447
*/
448-
function getAllFileNames(state: BuilderState, programOfThisState: Program): ReadonlyArray<string> {
448+
function getAllFileNames(state: BuilderState, programOfThisState: Program): readonly string[] {
449449
if (!state.allFileNames) {
450450
const sourceFiles = programOfThisState.getSourceFiles();
451451
state.allFileNames = sourceFiles === emptyArray ? emptyArray : sourceFiles.map(file => file.fileName);
@@ -496,7 +496,7 @@ namespace ts.BuilderState {
496496
/**
497497
* Gets all files of the program excluding the default library file
498498
*/
499-
function getAllFilesExcludingDefaultLibraryFile(state: BuilderState, programOfThisState: Program, firstSourceFile: SourceFile): ReadonlyArray<SourceFile> {
499+
function getAllFilesExcludingDefaultLibraryFile(state: BuilderState, programOfThisState: Program, firstSourceFile: SourceFile): readonly SourceFile[] {
500500
// Use cached result
501501
if (state.allFilesExcludingDefaultLibraryFile) {
502502
return state.allFilesExcludingDefaultLibraryFile;

0 commit comments

Comments
 (0)