mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-16 05:58:32 -06:00
Fix test
This commit is contained in:
parent
d4b8889984
commit
9179f4ca42
@ -1,6 +1,7 @@
|
||||
//// [tests/cases/compiler/moduleResolution.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
|
||||
export default 0;
|
||||
|
||||
// No extension: '.ts' added
|
||||
|
||||
@ -1,22 +1,23 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
export default 0;
|
||||
=== /src/a.ts ===
|
||||
|
||||
No type information for this code.export default 0;
|
||||
No type information for this code.
|
||||
No type information for this code.// No extension: '.ts' added
|
||||
No type information for this code.=== tests/cases/compiler/b.ts ===
|
||||
No type information for this code.=== /src/b.ts ===
|
||||
import a from './a';
|
||||
>a : Symbol(a, Decl(b.ts, 0, 6))
|
||||
|
||||
// Matching extension
|
||||
=== tests/cases/compiler/c.ts ===
|
||||
=== /src/c.ts ===
|
||||
import a from './a.ts';
|
||||
>a : Symbol(a, Decl(c.ts, 0, 6))
|
||||
|
||||
// '.js' extension: stripped and replaced with '.ts'
|
||||
=== tests/cases/compiler/d.ts ===
|
||||
=== /src/d.ts ===
|
||||
import a from './a.js';
|
||||
>a : Symbol(a, Decl(d.ts, 0, 6))
|
||||
|
||||
=== tests/cases/compiler/jquery.d.ts ===
|
||||
=== /src/jquery.d.ts ===
|
||||
declare var x: number;
|
||||
>x : Symbol(x, Decl(jquery.d.ts, 0, 11))
|
||||
|
||||
@ -24,12 +25,12 @@ export default x;
|
||||
>x : Symbol(x, Decl(jquery.d.ts, 0, 11))
|
||||
|
||||
// No extension: '.d.ts' added
|
||||
=== tests/cases/compiler/jquery_user_1.ts ===
|
||||
=== /src/jquery_user_1.ts ===
|
||||
import j from "./jquery";
|
||||
>j : Symbol(j, Decl(jquery_user_1.ts, 0, 6))
|
||||
|
||||
// '.js' extension: stripped and replaced with '.d.ts'
|
||||
=== tests/cases/compiler/jquery_user_1.ts ===
|
||||
=== /src/jquery_user_1.ts ===
|
||||
import j from "./jquery.js"
|
||||
>j : Symbol(j, Decl(jquery_user_1.ts, 0, 6))
|
||||
>j : Symbol(j, Decl(jquery_user_1.ts, 0, 6))
|
||||
|
||||
@ -1,32 +1,32 @@
|
||||
[
|
||||
"======== Resolving module './a' from 'C:/Users/anhans/TypeScript/tests/cases/compiler/b.ts'. ========",
|
||||
"======== Resolving module './a' from '/src/b.ts'. ========",
|
||||
"Module resolution kind is not specified, using 'NodeJs'.",
|
||||
"Loading module as file / folder, candidate module location 'C:/Users/anhans/TypeScript/tests/cases/compiler/a'.",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name './a' was successfully resolved to 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.ts'. ========",
|
||||
"======== Resolving module './a.ts' from 'C:/Users/anhans/TypeScript/tests/cases/compiler/c.ts'. ========",
|
||||
"Loading module as file / folder, candidate module location '/src/a'.",
|
||||
"File '/src/a.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name './a' was successfully resolved to '/src/a.ts'. ========",
|
||||
"======== Resolving module './a.ts' from '/src/c.ts'. ========",
|
||||
"Module resolution kind is not specified, using 'NodeJs'.",
|
||||
"Loading module as file / folder, candidate module location 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.ts'.",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name './a.ts' was successfully resolved to 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.ts'. ========",
|
||||
"======== Resolving module './a.js' from 'C:/Users/anhans/TypeScript/tests/cases/compiler/d.ts'. ========",
|
||||
"Loading module as file / folder, candidate module location '/src/a.ts'.",
|
||||
"File '/src/a.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name './a.ts' was successfully resolved to '/src/a.ts'. ========",
|
||||
"======== Resolving module './a.js' from '/src/d.ts'. ========",
|
||||
"Module resolution kind is not specified, using 'NodeJs'.",
|
||||
"Loading module as file / folder, candidate module location 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.js'.",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.js.ts' does not exist.",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.js.tsx' does not exist.",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.js.d.ts' does not exist.",
|
||||
"File name 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.js' has a '.js' extension - stripping it",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name './a.js' was successfully resolved to 'C:/Users/anhans/TypeScript/tests/cases/compiler/a.ts'. ========",
|
||||
"======== Resolving module './jquery.js' from 'C:/Users/anhans/TypeScript/tests/cases/compiler/jquery_user_1.ts'. ========",
|
||||
"Loading module as file / folder, candidate module location '/src/a.js'.",
|
||||
"File '/src/a.js.ts' does not exist.",
|
||||
"File '/src/a.js.tsx' does not exist.",
|
||||
"File '/src/a.js.d.ts' does not exist.",
|
||||
"File name '/src/a.js' has a '.js' extension - stripping it",
|
||||
"File '/src/a.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name './a.js' was successfully resolved to '/src/a.ts'. ========",
|
||||
"======== Resolving module './jquery.js' from '/src/jquery_user_1.ts'. ========",
|
||||
"Module resolution kind is not specified, using 'NodeJs'.",
|
||||
"Loading module as file / folder, candidate module location 'C:/Users/anhans/TypeScript/tests/cases/compiler/jquery.js'.",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/jquery.js.ts' does not exist.",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/jquery.js.tsx' does not exist.",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/jquery.js.d.ts' does not exist.",
|
||||
"File name 'C:/Users/anhans/TypeScript/tests/cases/compiler/jquery.js' has a '.js' extension - stripping it",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/jquery.ts' does not exist.",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/jquery.tsx' does not exist.",
|
||||
"File 'C:/Users/anhans/TypeScript/tests/cases/compiler/jquery.d.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name './jquery.js' was successfully resolved to 'C:/Users/anhans/TypeScript/tests/cases/compiler/jquery.d.ts'. ========"
|
||||
"Loading module as file / folder, candidate module location '/src/jquery.js'.",
|
||||
"File '/src/jquery.js.ts' does not exist.",
|
||||
"File '/src/jquery.js.tsx' does not exist.",
|
||||
"File '/src/jquery.js.d.ts' does not exist.",
|
||||
"File name '/src/jquery.js' has a '.js' extension - stripping it",
|
||||
"File '/src/jquery.ts' does not exist.",
|
||||
"File '/src/jquery.tsx' does not exist.",
|
||||
"File '/src/jquery.d.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name './jquery.js' was successfully resolved to '/src/jquery.d.ts'. ========"
|
||||
]
|
||||
@ -1,22 +1,23 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
export default 0;
|
||||
=== /src/a.ts ===
|
||||
|
||||
No type information for this code.export default 0;
|
||||
No type information for this code.
|
||||
No type information for this code.// No extension: '.ts' added
|
||||
No type information for this code.=== tests/cases/compiler/b.ts ===
|
||||
No type information for this code.=== /src/b.ts ===
|
||||
import a from './a';
|
||||
>a : number
|
||||
|
||||
// Matching extension
|
||||
=== tests/cases/compiler/c.ts ===
|
||||
=== /src/c.ts ===
|
||||
import a from './a.ts';
|
||||
>a : number
|
||||
|
||||
// '.js' extension: stripped and replaced with '.ts'
|
||||
=== tests/cases/compiler/d.ts ===
|
||||
=== /src/d.ts ===
|
||||
import a from './a.js';
|
||||
>a : number
|
||||
|
||||
=== tests/cases/compiler/jquery.d.ts ===
|
||||
=== /src/jquery.d.ts ===
|
||||
declare var x: number;
|
||||
>x : number
|
||||
|
||||
@ -24,12 +25,12 @@ export default x;
|
||||
>x : number
|
||||
|
||||
// No extension: '.d.ts' added
|
||||
=== tests/cases/compiler/jquery_user_1.ts ===
|
||||
=== /src/jquery_user_1.ts ===
|
||||
import j from "./jquery";
|
||||
>j : number
|
||||
|
||||
// '.js' extension: stripped and replaced with '.d.ts'
|
||||
=== tests/cases/compiler/jquery_user_1.ts ===
|
||||
=== /src/jquery_user_1.ts ===
|
||||
import j from "./jquery.js"
|
||||
>j : number
|
||||
>j : number
|
||||
|
||||
@ -1,27 +1,28 @@
|
||||
// @traceResolution: true
|
||||
// @Filename: a.ts
|
||||
|
||||
// @Filename: /src/a.ts
|
||||
export default 0;
|
||||
|
||||
// No extension: '.ts' added
|
||||
// @Filename: b.ts
|
||||
// @Filename: /src/b.ts
|
||||
import a from './a';
|
||||
|
||||
// Matching extension
|
||||
// @Filename: c.ts
|
||||
// @Filename: /src/c.ts
|
||||
import a from './a.ts';
|
||||
|
||||
// '.js' extension: stripped and replaced with '.ts'
|
||||
// @Filename: d.ts
|
||||
// @Filename: /src/d.ts
|
||||
import a from './a.js';
|
||||
|
||||
// @Filename: jquery.d.ts
|
||||
// @Filename: /src/jquery.d.ts
|
||||
declare var x: number;
|
||||
export default x;
|
||||
|
||||
// No extension: '.d.ts' added
|
||||
// @Filename: jquery_user_1.ts
|
||||
// @Filename: /src/jquery_user_1.ts
|
||||
import j from "./jquery";
|
||||
|
||||
// '.js' extension: stripped and replaced with '.d.ts'
|
||||
// @Filename: jquery_user_1.ts
|
||||
// @Filename: /src/jquery_user_1.ts
|
||||
import j from "./jquery.js"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user