forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick PR microsoft#35209 into release-3.7 (microsoft#35213)
Component commits: 74a6343 Fix the usage of pattern matching for check of hasZeroOrOneAsteriskCharacter Fixes microsoft#35171 ffe82c6 Fix error message
- Loading branch information
1 parent
b37cc6e
commit c18d72f
Showing
9 changed files
with
92 additions
and
6 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
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
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
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
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
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,26 @@ | ||
tests/cases/compiler/tsconfig.json(6,11): error TS5061: Pattern '@interface/**/*' can have at most one '*' character. | ||
tests/cases/compiler/tsconfig.json(7,11): error TS5061: Pattern '@service/**/*' can have at most one '*' character. | ||
tests/cases/compiler/tsconfig.json(7,29): error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. | ||
|
||
|
||
==== tests/cases/compiler/tsconfig.json (3 errors) ==== | ||
{ | ||
"compilerOptions": { | ||
"traceResolution": true, | ||
"baseUrl": "./src", | ||
"paths": { | ||
"@interface/**/*" : ["./src/interface/*"], | ||
~~~~~~~~~~~~~~~~~ | ||
!!! error TS5061: Pattern '@interface/**/*' can have at most one '*' character. | ||
"@service/**/*": ["./src/service/**/*"], | ||
~~~~~~~~~~~~~~~ | ||
!!! error TS5061: Pattern '@service/**/*' can have at most one '*' character. | ||
~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS5062: Substitution './src/service/**/*' in pattern '@service/**/*' can have at most one '*' character. | ||
"@controller/*": ["controller/*"], | ||
} | ||
} | ||
} | ||
|
||
==== tests/cases/compiler/src/main.ts (0 errors) ==== | ||
import 'someModule'; |
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,7 @@ | ||
//// [main.ts] | ||
import 'someModule'; | ||
|
||
//// [main.js] | ||
"use strict"; | ||
exports.__esModule = true; | ||
require("someModule"); |
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,36 @@ | ||
[ | ||
"======== Resolving module 'someModule' from 'tests/cases/compiler/src/main.ts'. ========", | ||
"Module resolution kind is not specified, using 'NodeJs'.", | ||
"'baseUrl' option is set to 'tests/cases/compiler/src', using this value to resolve non-relative module name 'someModule'.", | ||
"'paths' option is specified, looking for a pattern to match module name 'someModule'.", | ||
"'baseUrl' option is set to 'tests/cases/compiler/src', using this value to resolve non-relative module name 'someModule'.", | ||
"Resolving module name 'someModule' relative to base url 'tests/cases/compiler/src' - 'tests/cases/compiler/src/someModule'.", | ||
"Loading module as file / folder, candidate module location 'tests/cases/compiler/src/someModule', target file type 'TypeScript'.", | ||
"File 'tests/cases/compiler/src/someModule.ts' does not exist.", | ||
"File 'tests/cases/compiler/src/someModule.tsx' does not exist.", | ||
"File 'tests/cases/compiler/src/someModule.d.ts' does not exist.", | ||
"Directory 'tests/cases/compiler/src/someModule' does not exist, skipping all lookups in it.", | ||
"Loading module 'someModule' from 'node_modules' folder, target file type 'TypeScript'.", | ||
"Directory 'tests/cases/compiler/src/node_modules' does not exist, skipping all lookups in it.", | ||
"Directory 'tests/cases/compiler/node_modules' does not exist, skipping all lookups in it.", | ||
"Directory 'tests/cases/node_modules' does not exist, skipping all lookups in it.", | ||
"Directory 'tests/node_modules' does not exist, skipping all lookups in it.", | ||
"Directory 'node_modules' does not exist, skipping all lookups in it.", | ||
"Directory '/node_modules' does not exist, skipping all lookups in it.", | ||
"'baseUrl' option is set to 'tests/cases/compiler/src', using this value to resolve non-relative module name 'someModule'.", | ||
"'paths' option is specified, looking for a pattern to match module name 'someModule'.", | ||
"'baseUrl' option is set to 'tests/cases/compiler/src', using this value to resolve non-relative module name 'someModule'.", | ||
"Resolving module name 'someModule' relative to base url 'tests/cases/compiler/src' - 'tests/cases/compiler/src/someModule'.", | ||
"Loading module as file / folder, candidate module location 'tests/cases/compiler/src/someModule', target file type 'JavaScript'.", | ||
"File 'tests/cases/compiler/src/someModule.js' does not exist.", | ||
"File 'tests/cases/compiler/src/someModule.jsx' does not exist.", | ||
"Directory 'tests/cases/compiler/src/someModule' does not exist, skipping all lookups in it.", | ||
"Loading module 'someModule' from 'node_modules' folder, target file type 'JavaScript'.", | ||
"Directory 'tests/cases/compiler/src/node_modules' does not exist, skipping all lookups in it.", | ||
"Directory 'tests/cases/compiler/node_modules' does not exist, skipping all lookups in it.", | ||
"Directory 'tests/cases/node_modules' does not exist, skipping all lookups in it.", | ||
"Directory 'tests/node_modules' does not exist, skipping all lookups in it.", | ||
"Directory 'node_modules' does not exist, skipping all lookups in it.", | ||
"Directory '/node_modules' does not exist, skipping all lookups in it.", | ||
"======== Module name 'someModule' was not resolved. ========" | ||
] |
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,16 @@ | ||
// @noTypesAndSymbols: true | ||
// @filename: tsconfig.json | ||
{ | ||
"compilerOptions": { | ||
"traceResolution": true, | ||
"baseUrl": "./src", | ||
"paths": { | ||
"@interface/**/*" : ["./src/interface/*"], | ||
"@service/**/*": ["./src/service/**/*"], | ||
"@controller/*": ["controller/*"], | ||
} | ||
} | ||
} | ||
|
||
// @filename: src/main.ts | ||
import 'someModule'; |