Remove vestigial baselines (#45916)
* Remove vestigial baselines * Update Baselines and/or Applied Lint Fixes * Add --quiet Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
This commit is contained in:
parent
534fc14c66
commit
6aaefe41fe
|
@ -20,6 +20,7 @@ jobs:
|
|||
git config user.email "typescriptbot@microsoft.com"
|
||||
git config user.name "TypeScript Bot"
|
||||
npm install
|
||||
git rm -r --quiet tests/baselines/reference :^tests/baselines/reference/docker :^tests/baselines/reference/user
|
||||
gulp runtests-parallel --ci --fix || true
|
||||
gulp baseline-accept
|
||||
git add ./src
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"kind": "JSDocComment",
|
||||
"pos": 0,
|
||||
"end": 8,
|
||||
"flags": "JSDoc",
|
||||
"modifierFlagsCache": 0,
|
||||
"transformFlags": 0,
|
||||
"comment": "*@a"
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"kind": "JSDocComment",
|
||||
"pos": 0,
|
||||
"end": 9,
|
||||
"flags": "JSDoc",
|
||||
"modifierFlagsCache": 0,
|
||||
"transformFlags": 0,
|
||||
"comment": "* @a"
|
||||
}
|
|
@ -1,81 +0,0 @@
|
|||
//// [tests/cases/conformance/declarationEmit/bundledNodeDTSFailsWithOutFlag.ts] ////
|
||||
|
||||
//// [index.ts]
|
||||
export * from "./nested";
|
||||
|
||||
//// [base.ts]
|
||||
import { B } from "./shared";
|
||||
|
||||
export function f() {
|
||||
return new B();
|
||||
}
|
||||
|
||||
//// [derived.ts]
|
||||
import { f } from "./base";
|
||||
|
||||
export function g() {
|
||||
return f();
|
||||
}
|
||||
|
||||
//// [index.ts]
|
||||
export * from "./base";
|
||||
export * from "./derived";
|
||||
export * from "./shared";
|
||||
|
||||
//// [shared.ts]
|
||||
export class B {}
|
||||
|
||||
|
||||
|
||||
|
||||
//// [out.d.ts]
|
||||
declare module "nested/shared" {
|
||||
export class B {
|
||||
}
|
||||
}
|
||||
declare module "nested/base" {
|
||||
import { B } from "nested/shared";
|
||||
export function f(): B;
|
||||
}
|
||||
declare module "nested/derived" {
|
||||
export function g(): import("nested").B;
|
||||
}
|
||||
declare module "nested/index" {
|
||||
export * from "nested/base";
|
||||
export * from "nested/derived";
|
||||
export * from "nested/shared";
|
||||
}
|
||||
declare module "index" {
|
||||
export * from "nested/index";
|
||||
}
|
||||
|
||||
|
||||
//// [DtsFileErrors]
|
||||
|
||||
|
||||
dist/out.d.ts(10,33): error TS2307: Cannot find module 'nested' or its corresponding type declarations.
|
||||
|
||||
|
||||
==== ./dist/out.d.ts (1 errors) ====
|
||||
declare module "nested/shared" {
|
||||
export class B {
|
||||
}
|
||||
}
|
||||
declare module "nested/base" {
|
||||
import { B } from "nested/shared";
|
||||
export function f(): B;
|
||||
}
|
||||
declare module "nested/derived" {
|
||||
export function g(): import("nested").B;
|
||||
~~~~~~~~
|
||||
!!! error TS2307: Cannot find module 'nested' or its corresponding type declarations.
|
||||
}
|
||||
declare module "nested/index" {
|
||||
export * from "nested/base";
|
||||
export * from "nested/derived";
|
||||
export * from "nested/shared";
|
||||
}
|
||||
declare module "index" {
|
||||
export * from "nested/index";
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
=== tests/cases/conformance/declarationEmit/index.ts ===
|
||||
export * from "./nested";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
|
||||
import { B } from "./shared";
|
||||
>B : Symbol(B, Decl(base.ts, 0, 8))
|
||||
|
||||
export function f() {
|
||||
>f : Symbol(f, Decl(base.ts, 0, 29))
|
||||
|
||||
return new B();
|
||||
>B : Symbol(B, Decl(base.ts, 0, 8))
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
|
||||
import { f } from "./base";
|
||||
>f : Symbol(f, Decl(derived.ts, 0, 8))
|
||||
|
||||
export function g() {
|
||||
>g : Symbol(g, Decl(derived.ts, 0, 27))
|
||||
|
||||
return f();
|
||||
>f : Symbol(f, Decl(derived.ts, 0, 8))
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
|
||||
export * from "./base";
|
||||
No type information for this code.export * from "./derived";
|
||||
No type information for this code.export * from "./shared";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
|
||||
export class B {}
|
||||
>B : Symbol(B, Decl(shared.ts, 0, 0))
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
=== tests/cases/conformance/declarationEmit/index.ts ===
|
||||
export * from "./nested";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
|
||||
import { B } from "./shared";
|
||||
>B : typeof B
|
||||
|
||||
export function f() {
|
||||
>f : () => B
|
||||
|
||||
return new B();
|
||||
>new B() : B
|
||||
>B : typeof B
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
|
||||
import { f } from "./base";
|
||||
>f : () => import("tests/cases/conformance/declarationEmit/index").B
|
||||
|
||||
export function g() {
|
||||
>g : () => import("tests/cases/conformance/declarationEmit/index").B
|
||||
|
||||
return f();
|
||||
>f() : import("tests/cases/conformance/declarationEmit/index").B
|
||||
>f : () => import("tests/cases/conformance/declarationEmit/index").B
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
|
||||
export * from "./base";
|
||||
No type information for this code.export * from "./derived";
|
||||
No type information for this code.export * from "./shared";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
|
||||
export class B {}
|
||||
>B : B
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
//// [tests/cases/conformance/declarationEmit/bundledNodeDTSPassesWithFlag.ts] ////
|
||||
|
||||
//// [index.ts]
|
||||
export * from "./nested";
|
||||
|
||||
//// [base.ts]
|
||||
import { B } from "./shared";
|
||||
|
||||
export function f() {
|
||||
return new B();
|
||||
}
|
||||
|
||||
//// [derived.ts]
|
||||
import { f } from "./base";
|
||||
|
||||
export function g() {
|
||||
return f();
|
||||
}
|
||||
|
||||
//// [index.ts]
|
||||
export * from "./base";
|
||||
export * from "./derived";
|
||||
export * from "./shared";
|
||||
|
||||
//// [shared.ts]
|
||||
export class B {}
|
||||
|
||||
|
||||
|
||||
|
||||
//// [out.d.ts]
|
||||
declare module "nested/shared" {
|
||||
export class B {
|
||||
}
|
||||
}
|
||||
declare module "nested/base" {
|
||||
import { B } from "nested/shared";
|
||||
export function f(): B;
|
||||
}
|
||||
declare module "nested/derived" {
|
||||
export function g(): import("nested").B;
|
||||
}
|
||||
declare module "nested/index" {
|
||||
export * from "nested/base";
|
||||
export * from "nested/derived";
|
||||
export * from "nested/shared";
|
||||
}
|
||||
declare module "index" {
|
||||
export * from "nested/index";
|
||||
}
|
||||
|
||||
|
||||
//// [DtsFileErrors]
|
||||
|
||||
|
||||
dist/out.d.ts(10,33): error TS2307: Cannot find module 'nested' or its corresponding type declarations.
|
||||
|
||||
|
||||
==== ./dist/out.d.ts (1 errors) ====
|
||||
declare module "nested/shared" {
|
||||
export class B {
|
||||
}
|
||||
}
|
||||
declare module "nested/base" {
|
||||
import { B } from "nested/shared";
|
||||
export function f(): B;
|
||||
}
|
||||
declare module "nested/derived" {
|
||||
export function g(): import("nested").B;
|
||||
~~~~~~~~
|
||||
!!! error TS2307: Cannot find module 'nested' or its corresponding type declarations.
|
||||
}
|
||||
declare module "nested/index" {
|
||||
export * from "nested/base";
|
||||
export * from "nested/derived";
|
||||
export * from "nested/shared";
|
||||
}
|
||||
declare module "index" {
|
||||
export * from "nested/index";
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
=== tests/cases/conformance/declarationEmit/index.ts ===
|
||||
export * from "./nested";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
|
||||
import { B } from "./shared";
|
||||
>B : Symbol(B, Decl(base.ts, 0, 8))
|
||||
|
||||
export function f() {
|
||||
>f : Symbol(f, Decl(base.ts, 0, 29))
|
||||
|
||||
return new B();
|
||||
>B : Symbol(B, Decl(base.ts, 0, 8))
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
|
||||
import { f } from "./base";
|
||||
>f : Symbol(f, Decl(derived.ts, 0, 8))
|
||||
|
||||
export function g() {
|
||||
>g : Symbol(g, Decl(derived.ts, 0, 27))
|
||||
|
||||
return f();
|
||||
>f : Symbol(f, Decl(derived.ts, 0, 8))
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
|
||||
export * from "./base";
|
||||
No type information for this code.export * from "./derived";
|
||||
No type information for this code.export * from "./shared";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
|
||||
export class B {}
|
||||
>B : Symbol(B, Decl(shared.ts, 0, 0))
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
=== tests/cases/conformance/declarationEmit/index.ts ===
|
||||
export * from "./nested";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
|
||||
import { B } from "./shared";
|
||||
>B : typeof B
|
||||
|
||||
export function f() {
|
||||
>f : () => B
|
||||
|
||||
return new B();
|
||||
>new B() : B
|
||||
>B : typeof B
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
|
||||
import { f } from "./base";
|
||||
>f : () => import("tests/cases/conformance/declarationEmit/index").B
|
||||
|
||||
export function g() {
|
||||
>g : () => import("tests/cases/conformance/declarationEmit/index").B
|
||||
|
||||
return f();
|
||||
>f() : import("tests/cases/conformance/declarationEmit/index").B
|
||||
>f : () => import("tests/cases/conformance/declarationEmit/index").B
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
|
||||
export * from "./base";
|
||||
No type information for this code.export * from "./derived";
|
||||
No type information for this code.export * from "./shared";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
|
||||
export class B {}
|
||||
>B : B
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
//// [tests/cases/conformance/declarationEmit/bundledNodeDTSWithExports.ts] ////
|
||||
|
||||
//// [index.ts]
|
||||
export {}
|
||||
|
||||
//// [base.ts]
|
||||
import { C } from "./";
|
||||
|
||||
export function f() {
|
||||
return new C();
|
||||
}
|
||||
|
||||
//// [derived.ts]
|
||||
import { f } from "./base";
|
||||
|
||||
export function g() {
|
||||
return f();
|
||||
}
|
||||
|
||||
//// [index.ts]
|
||||
export * from "./base";
|
||||
export * from "./derived";
|
||||
export class C {}
|
||||
|
||||
|
||||
|
||||
|
||||
//// [out.d.ts]
|
||||
declare module "index" {
|
||||
export {};
|
||||
}
|
||||
declare module "nested/derived" {
|
||||
export function g(): import("nested").C;
|
||||
}
|
||||
declare module "nested/index" {
|
||||
export * from "nested/base";
|
||||
export * from "nested/derived";
|
||||
export class C {
|
||||
}
|
||||
}
|
||||
declare module "nested/base" {
|
||||
import { C } from "nested/index";
|
||||
export function f(): C;
|
||||
}
|
||||
|
||||
|
||||
//// [DtsFileErrors]
|
||||
|
||||
|
||||
dist/out.d.ts(5,33): error TS2307: Cannot find module 'nested' or its corresponding type declarations.
|
||||
|
||||
|
||||
==== ./dist/out.d.ts (1 errors) ====
|
||||
declare module "index" {
|
||||
export {};
|
||||
}
|
||||
declare module "nested/derived" {
|
||||
export function g(): import("nested").C;
|
||||
~~~~~~~~
|
||||
!!! error TS2307: Cannot find module 'nested' or its corresponding type declarations.
|
||||
}
|
||||
declare module "nested/index" {
|
||||
export * from "nested/base";
|
||||
export * from "nested/derived";
|
||||
export class C {
|
||||
}
|
||||
}
|
||||
declare module "nested/base" {
|
||||
import { C } from "nested/index";
|
||||
export function f(): C;
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
=== tests/cases/conformance/declarationEmit/index.ts ===
|
||||
export {}
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
|
||||
import { C } from "./";
|
||||
>C : Symbol(C, Decl(base.ts, 0, 8))
|
||||
|
||||
export function f() {
|
||||
>f : Symbol(f, Decl(base.ts, 0, 23))
|
||||
|
||||
return new C();
|
||||
>C : Symbol(C, Decl(base.ts, 0, 8))
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
|
||||
import { f } from "./base";
|
||||
>f : Symbol(f, Decl(derived.ts, 0, 8))
|
||||
|
||||
export function g() {
|
||||
>g : Symbol(g, Decl(derived.ts, 0, 27))
|
||||
|
||||
return f();
|
||||
>f : Symbol(f, Decl(derived.ts, 0, 8))
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
|
||||
export * from "./base";
|
||||
export * from "./derived";
|
||||
export class C {}
|
||||
>C : Symbol(C, Decl(index.ts, 1, 26))
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
=== tests/cases/conformance/declarationEmit/index.ts ===
|
||||
export {}
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
|
||||
import { C } from "./";
|
||||
>C : typeof C
|
||||
|
||||
export function f() {
|
||||
>f : () => C
|
||||
|
||||
return new C();
|
||||
>new C() : C
|
||||
>C : typeof C
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
|
||||
import { f } from "./base";
|
||||
>f : () => import("tests/cases/conformance/declarationEmit/nested/index").C
|
||||
|
||||
export function g() {
|
||||
>g : () => import("tests/cases/conformance/declarationEmit/nested/index").C
|
||||
|
||||
return f();
|
||||
>f() : import("tests/cases/conformance/declarationEmit/nested/index").C
|
||||
>f : () => import("tests/cases/conformance/declarationEmit/nested/index").C
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
|
||||
export * from "./base";
|
||||
export * from "./derived";
|
||||
export class C {}
|
||||
>C : C
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
//// [tests/cases/conformance/declarationEmit/bundledNodeDTSWithScopedPackage.ts] ////
|
||||
|
||||
//// [index.ts]
|
||||
export * from "./nested";
|
||||
|
||||
//// [base.ts]
|
||||
import { B } from "./shared";
|
||||
|
||||
export function f() {
|
||||
return new B();
|
||||
}
|
||||
|
||||
//// [derived.ts]
|
||||
import { f } from "./base";
|
||||
|
||||
export function g() {
|
||||
return f();
|
||||
}
|
||||
|
||||
//// [index.ts]
|
||||
export * from "./base";
|
||||
export * from "./derived";
|
||||
export * from "./shared";
|
||||
|
||||
//// [shared.ts]
|
||||
export class B {}
|
||||
|
||||
|
||||
|
||||
|
||||
//// [out.d.ts]
|
||||
declare module "nested/shared" {
|
||||
export class B {
|
||||
}
|
||||
}
|
||||
declare module "nested/base" {
|
||||
import { B } from "nested/shared";
|
||||
export function f(): B;
|
||||
}
|
||||
declare module "nested/derived" {
|
||||
export function g(): import("nested").B;
|
||||
}
|
||||
declare module "nested/index" {
|
||||
export * from "nested/base";
|
||||
export * from "nested/derived";
|
||||
export * from "nested/shared";
|
||||
}
|
||||
declare module "index" {
|
||||
export * from "nested/index";
|
||||
}
|
||||
|
||||
|
||||
//// [DtsFileErrors]
|
||||
|
||||
|
||||
dist/out.d.ts(10,33): error TS2307: Cannot find module 'nested' or its corresponding type declarations.
|
||||
|
||||
|
||||
==== ./dist/out.d.ts (1 errors) ====
|
||||
declare module "nested/shared" {
|
||||
export class B {
|
||||
}
|
||||
}
|
||||
declare module "nested/base" {
|
||||
import { B } from "nested/shared";
|
||||
export function f(): B;
|
||||
}
|
||||
declare module "nested/derived" {
|
||||
export function g(): import("nested").B;
|
||||
~~~~~~~~
|
||||
!!! error TS2307: Cannot find module 'nested' or its corresponding type declarations.
|
||||
}
|
||||
declare module "nested/index" {
|
||||
export * from "nested/base";
|
||||
export * from "nested/derived";
|
||||
export * from "nested/shared";
|
||||
}
|
||||
declare module "index" {
|
||||
export * from "nested/index";
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
=== tests/cases/conformance/declarationEmit/index.ts ===
|
||||
export * from "./nested";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
|
||||
import { B } from "./shared";
|
||||
>B : Symbol(B, Decl(base.ts, 0, 8))
|
||||
|
||||
export function f() {
|
||||
>f : Symbol(f, Decl(base.ts, 0, 29))
|
||||
|
||||
return new B();
|
||||
>B : Symbol(B, Decl(base.ts, 0, 8))
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
|
||||
import { f } from "./base";
|
||||
>f : Symbol(f, Decl(derived.ts, 0, 8))
|
||||
|
||||
export function g() {
|
||||
>g : Symbol(g, Decl(derived.ts, 0, 27))
|
||||
|
||||
return f();
|
||||
>f : Symbol(f, Decl(derived.ts, 0, 8))
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
|
||||
export * from "./base";
|
||||
No type information for this code.export * from "./derived";
|
||||
No type information for this code.export * from "./shared";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
|
||||
export class B {}
|
||||
>B : Symbol(B, Decl(shared.ts, 0, 0))
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
=== tests/cases/conformance/declarationEmit/index.ts ===
|
||||
export * from "./nested";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
|
||||
import { B } from "./shared";
|
||||
>B : typeof B
|
||||
|
||||
export function f() {
|
||||
>f : () => B
|
||||
|
||||
return new B();
|
||||
>new B() : B
|
||||
>B : typeof B
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
|
||||
import { f } from "./base";
|
||||
>f : () => import("tests/cases/conformance/declarationEmit/index").B
|
||||
|
||||
export function g() {
|
||||
>g : () => import("tests/cases/conformance/declarationEmit/index").B
|
||||
|
||||
return f();
|
||||
>f() : import("tests/cases/conformance/declarationEmit/index").B
|
||||
>f : () => import("tests/cases/conformance/declarationEmit/index").B
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
|
||||
export * from "./base";
|
||||
No type information for this code.export * from "./derived";
|
||||
No type information for this code.export * from "./shared";
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
|
||||
export class B {}
|
||||
>B : B
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
=== tests/cases/compiler/commonMissingSemicolons.ts ===
|
||||
async function myAsyncFunction1() {}
|
||||
>myAsyncFunction1 : Symbol(myAsyncFunction1, Decl(commonMissingSemicolons.ts, 0, 0))
|
||||
|
||||
asynd function myAsyncFunction2() {}
|
||||
>myAsyncFunction2 : Symbol(myAsyncFunction2, Decl(commonMissingSemicolons.ts, 1, 5))
|
||||
|
||||
sasync function myAsyncFunction3() {}
|
||||
>myAsyncFunction3 : Symbol(myAsyncFunction3, Decl(commonMissingSemicolons.ts, 2, 6))
|
||||
|
||||
// Arrow functions don't (yet?) parse as nicely as standalone functions.
|
||||
// Eventually it would be good to get them the same "did you mean" for typos such as "asyncd".
|
||||
const myAsyncArrow1 = async () => 3;
|
||||
>myAsyncArrow1 : Symbol(myAsyncArrow1, Decl(commonMissingSemicolons.ts, 6, 5))
|
||||
|
||||
const myAsyncArrow2 = asyncd () => 3;
|
||||
>myAsyncArrow2 : Symbol(myAsyncArrow2, Decl(commonMissingSemicolons.ts, 7, 5))
|
||||
|
||||
class MyClass1 {}
|
||||
>MyClass1 : Symbol(MyClass1, Decl(commonMissingSemicolons.ts, 7, 37))
|
||||
|
||||
clasd MyClass2 {}
|
||||
classs MyClass3 {}
|
||||
|
||||
const myConst1 = 1;
|
||||
>myConst1 : Symbol(myConst1, Decl(commonMissingSemicolons.ts, 13, 5))
|
||||
|
||||
consd myConst2 = 1;
|
||||
constd myConst3 = 1;
|
||||
|
||||
declare const myDeclareConst1: 1;
|
||||
>myDeclareConst1 : Symbol(myDeclareConst1, Decl(commonMissingSemicolons.ts, 17, 13))
|
||||
|
||||
declared const myDeclareConst2: 1;
|
||||
>myDeclareConst2 : Symbol(myDeclareConst2, Decl(commonMissingSemicolons.ts, 18, 14))
|
||||
|
||||
declare constd myDeclareConst3: 1;
|
||||
declared constd myDeclareConst4: 1;
|
||||
declareconst myDeclareConst5;
|
||||
|
||||
function myFunction1() { }
|
||||
>myFunction1 : Symbol(myFunction1, Decl(commonMissingSemicolons.ts, 21, 29))
|
||||
|
||||
functiond myFunction2() { }
|
||||
function function() { }
|
||||
> : Symbol((Missing), Decl(commonMissingSemicolons.ts, 24, 27), Decl(commonMissingSemicolons.ts, 25, 8))
|
||||
> : Symbol((Missing), Decl(commonMissingSemicolons.ts, 24, 27), Decl(commonMissingSemicolons.ts, 25, 8))
|
||||
|
||||
functionMyFunction;
|
||||
|
||||
interface myInterface1 { }
|
||||
>myInterface1 : Symbol(myInterface1, Decl(commonMissingSemicolons.ts, 26, 19))
|
||||
|
||||
interfaced myInterface2 { }
|
||||
interface interface { }
|
||||
>interface : Symbol(interface, Decl(commonMissingSemicolons.ts, 29, 27))
|
||||
|
||||
interface { }
|
||||
interface void { }
|
||||
interfaceMyInterface { }
|
||||
|
||||
let let = 1;
|
||||
>let : Symbol(let, Decl(commonMissingSemicolons.ts, 35, 3))
|
||||
|
||||
let let1 = 1;
|
||||
>let1 : Symbol(let1, Decl(commonMissingSemicolons.ts, 36, 3))
|
||||
|
||||
letd let2 = 1;
|
||||
letMyLet;
|
||||
|
||||
type type;
|
||||
>type : Symbol(type, Decl(commonMissingSemicolons.ts, 38, 9))
|
||||
|
||||
type type1 = {};
|
||||
>type1 : Symbol(type1, Decl(commonMissingSemicolons.ts, 40, 10))
|
||||
|
||||
type type2 = type;
|
||||
>type2 : Symbol(type2, Decl(commonMissingSemicolons.ts, 41, 16))
|
||||
>type : Symbol(type, Decl(commonMissingSemicolons.ts, 38, 9))
|
||||
|
||||
type type3 = {};
|
||||
>type3 : Symbol(type3, Decl(commonMissingSemicolons.ts, 42, 18))
|
||||
|
||||
typed type4 = {}
|
||||
typed type5 = type;
|
||||
typeMyType;
|
||||
|
||||
var myVar1 = 1;
|
||||
>myVar1 : Symbol(myVar1, Decl(commonMissingSemicolons.ts, 48, 3))
|
||||
|
||||
vard myVar2 = 1;
|
||||
varMyVar;
|
||||
|
|
@ -1,164 +0,0 @@
|
|||
=== tests/cases/compiler/commonMissingSemicolons.ts ===
|
||||
async function myAsyncFunction1() {}
|
||||
>myAsyncFunction1 : () => Promise<void>
|
||||
|
||||
asynd function myAsyncFunction2() {}
|
||||
>asynd : any
|
||||
>myAsyncFunction2 : () => void
|
||||
|
||||
sasync function myAsyncFunction3() {}
|
||||
>sasync : any
|
||||
>myAsyncFunction3 : () => void
|
||||
|
||||
// Arrow functions don't (yet?) parse as nicely as standalone functions.
|
||||
// Eventually it would be good to get them the same "did you mean" for typos such as "asyncd".
|
||||
const myAsyncArrow1 = async () => 3;
|
||||
>myAsyncArrow1 : () => Promise<number>
|
||||
>async () => 3 : () => Promise<number>
|
||||
>3 : 3
|
||||
|
||||
const myAsyncArrow2 = asyncd () => 3;
|
||||
>myAsyncArrow2 : any
|
||||
>asyncd () : any
|
||||
>asyncd : any
|
||||
>3 : 3
|
||||
|
||||
class MyClass1 {}
|
||||
>MyClass1 : MyClass1
|
||||
|
||||
clasd MyClass2 {}
|
||||
>clasd : any
|
||||
>MyClass2 : any
|
||||
|
||||
classs MyClass3 {}
|
||||
>classs : any
|
||||
>MyClass3 : any
|
||||
|
||||
const myConst1 = 1;
|
||||
>myConst1 : 1
|
||||
>1 : 1
|
||||
|
||||
consd myConst2 = 1;
|
||||
>consd : any
|
||||
>myConst2 = 1 : 1
|
||||
>myConst2 : any
|
||||
>1 : 1
|
||||
|
||||
constd myConst3 = 1;
|
||||
>constd : any
|
||||
>myConst3 = 1 : 1
|
||||
>myConst3 : any
|
||||
>1 : 1
|
||||
|
||||
declare const myDeclareConst1: 1;
|
||||
>myDeclareConst1 : 1
|
||||
|
||||
declared const myDeclareConst2: 1;
|
||||
>declared : any
|
||||
>myDeclareConst2 : 1
|
||||
|
||||
declare constd myDeclareConst3: 1;
|
||||
>declare : any
|
||||
>constd : any
|
||||
>myDeclareConst3 : any
|
||||
>1 : 1
|
||||
|
||||
declared constd myDeclareConst4: 1;
|
||||
>declared : any
|
||||
>constd : any
|
||||
>myDeclareConst4 : any
|
||||
>1 : 1
|
||||
|
||||
declareconst myDeclareConst5;
|
||||
>declareconst : any
|
||||
>myDeclareConst5 : any
|
||||
|
||||
function myFunction1() { }
|
||||
>myFunction1 : () => void
|
||||
|
||||
functiond myFunction2() { }
|
||||
>functiond : any
|
||||
>myFunction2() : any
|
||||
>myFunction2 : any
|
||||
|
||||
function function() { }
|
||||
> : () => any
|
||||
> : () => any
|
||||
|
||||
functionMyFunction;
|
||||
>functionMyFunction : any
|
||||
|
||||
interface myInterface1 { }
|
||||
interfaced myInterface2 { }
|
||||
>interfaced : any
|
||||
>myInterface2 : any
|
||||
|
||||
interface interface { }
|
||||
interface { }
|
||||
>interface : any
|
||||
|
||||
interface void { }
|
||||
>interface : any
|
||||
>void { } : undefined
|
||||
>{ } : {}
|
||||
|
||||
interfaceMyInterface { }
|
||||
>interfaceMyInterface : any
|
||||
|
||||
let let = 1;
|
||||
>let : number
|
||||
>1 : 1
|
||||
|
||||
let let1 = 1;
|
||||
>let1 : number
|
||||
>1 : 1
|
||||
|
||||
letd let2 = 1;
|
||||
>letd : any
|
||||
>let2 = 1 : 1
|
||||
>let2 : any
|
||||
>1 : 1
|
||||
|
||||
letMyLet;
|
||||
>letMyLet : any
|
||||
|
||||
type type;
|
||||
>type : any
|
||||
|
||||
type type1 = {};
|
||||
>type1 : type1
|
||||
|
||||
type type2 = type;
|
||||
>type2 : any
|
||||
|
||||
type type3 = {};
|
||||
>type3 : type3
|
||||
|
||||
typed type4 = {}
|
||||
>typed : any
|
||||
>type4 = {} : {}
|
||||
>type4 : any
|
||||
>{} : {}
|
||||
|
||||
typed type5 = type;
|
||||
>typed : any
|
||||
>type5 = type : any
|
||||
>type5 : any
|
||||
>type : any
|
||||
|
||||
typeMyType;
|
||||
>typeMyType : any
|
||||
|
||||
var myVar1 = 1;
|
||||
>myVar1 : number
|
||||
>1 : 1
|
||||
|
||||
vard myVar2 = 1;
|
||||
>vard : any
|
||||
>myVar2 = 1 : 1
|
||||
>myVar2 : any
|
||||
>1 : 1
|
||||
|
||||
varMyVar;
|
||||
>varMyVar : any
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
//// [tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport.ts] ////
|
||||
|
||||
//// [foo.ts]
|
||||
export const enum ConstFooEnum {
|
||||
Some,
|
||||
Values,
|
||||
Here
|
||||
};
|
||||
export function fooFunc(): void { /* removed */ }
|
||||
//// [index.ts]
|
||||
import * as Foo from "./foo";
|
||||
|
||||
function check(x: Foo.ConstFooEnum): void {
|
||||
switch (x) {
|
||||
case Foo.ConstFooEnum.Some:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//// [foo.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.fooFunc = void 0;
|
||||
;
|
||||
function fooFunc() { }
|
||||
exports.fooFunc = fooFunc;
|
||||
//// [index.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
function check(x) {
|
||||
switch (x) {
|
||||
case 0 /* Some */:
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
=== tests/cases/compiler/foo.ts ===
|
||||
export const enum ConstFooEnum {
|
||||
>ConstFooEnum : Symbol(ConstFooEnum, Decl(foo.ts, 0, 0))
|
||||
|
||||
Some,
|
||||
>Some : Symbol(ConstFooEnum.Some, Decl(foo.ts, 0, 32))
|
||||
|
||||
Values,
|
||||
>Values : Symbol(ConstFooEnum.Values, Decl(foo.ts, 1, 9))
|
||||
|
||||
Here
|
||||
>Here : Symbol(ConstFooEnum.Here, Decl(foo.ts, 2, 11))
|
||||
|
||||
};
|
||||
export function fooFunc(): void { /* removed */ }
|
||||
>fooFunc : Symbol(fooFunc, Decl(foo.ts, 4, 2))
|
||||
|
||||
=== tests/cases/compiler/index.ts ===
|
||||
import * as Foo from "./foo";
|
||||
>Foo : Symbol(Foo, Decl(index.ts, 0, 6))
|
||||
|
||||
function check(x: Foo.ConstFooEnum): void {
|
||||
>check : Symbol(check, Decl(index.ts, 0, 29))
|
||||
>x : Symbol(x, Decl(index.ts, 2, 15))
|
||||
>Foo : Symbol(Foo, Decl(index.ts, 0, 6))
|
||||
>ConstFooEnum : Symbol(Foo.ConstFooEnum, Decl(foo.ts, 0, 0))
|
||||
|
||||
switch (x) {
|
||||
>x : Symbol(x, Decl(index.ts, 2, 15))
|
||||
|
||||
case Foo.ConstFooEnum.Some:
|
||||
>Foo.ConstFooEnum.Some : Symbol(Foo.ConstFooEnum.Some, Decl(foo.ts, 0, 32))
|
||||
>Foo.ConstFooEnum : Symbol(Foo.ConstFooEnum, Decl(foo.ts, 0, 0))
|
||||
>Foo : Symbol(Foo, Decl(index.ts, 0, 6))
|
||||
>ConstFooEnum : Symbol(Foo.ConstFooEnum, Decl(foo.ts, 0, 0))
|
||||
>Some : Symbol(Foo.ConstFooEnum.Some, Decl(foo.ts, 0, 32))
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
=== tests/cases/compiler/foo.ts ===
|
||||
export const enum ConstFooEnum {
|
||||
>ConstFooEnum : ConstFooEnum
|
||||
|
||||
Some,
|
||||
>Some : ConstFooEnum.Some
|
||||
|
||||
Values,
|
||||
>Values : ConstFooEnum.Values
|
||||
|
||||
Here
|
||||
>Here : ConstFooEnum.Here
|
||||
|
||||
};
|
||||
export function fooFunc(): void { /* removed */ }
|
||||
>fooFunc : () => void
|
||||
|
||||
=== tests/cases/compiler/index.ts ===
|
||||
import * as Foo from "./foo";
|
||||
>Foo : typeof Foo
|
||||
|
||||
function check(x: Foo.ConstFooEnum): void {
|
||||
>check : (x: Foo.ConstFooEnum) => void
|
||||
>x : Foo.ConstFooEnum
|
||||
>Foo : any
|
||||
|
||||
switch (x) {
|
||||
>x : Foo.ConstFooEnum
|
||||
|
||||
case Foo.ConstFooEnum.Some:
|
||||
>Foo.ConstFooEnum.Some : Foo.ConstFooEnum.Some
|
||||
>Foo.ConstFooEnum : typeof Foo.ConstFooEnum
|
||||
>Foo : typeof Foo
|
||||
>ConstFooEnum : typeof Foo.ConstFooEnum
|
||||
>Some : Foo.ConstFooEnum.Some
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
//// [emitCodeBeforeSuperCall.ts]
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
|
||||
class Base {
|
||||
}
|
||||
class Sub extends Base {
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
console.log('hi');
|
||||
super();
|
||||
}
|
||||
field = 0;
|
||||
}
|
||||
|
||||
class Test extends Base {
|
||||
prop: number;
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
1; // Any statements here break it
|
||||
super();
|
||||
this.prop = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [emitCodeBeforeSuperCall.js]
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
class Base {
|
||||
}
|
||||
class Sub extends Base {
|
||||
// @ts-ignore
|
||||
constructor(p) {
|
||||
console.log('hi');
|
||||
super();
|
||||
this.p = p;
|
||||
this.field = 0;
|
||||
}
|
||||
}
|
||||
class Test extends Base {
|
||||
// @ts-ignore
|
||||
constructor(p) {
|
||||
1; // Any statements here break it
|
||||
super();
|
||||
this.p = p;
|
||||
this.prop = 1;
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
=== tests/cases/conformance/classes/constructorDeclarations/superCalls/emitCodeBeforeSuperCall.ts ===
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
|
||||
class Base {
|
||||
>Base : Symbol(Base, Decl(emitCodeBeforeSuperCall.ts, 0, 0))
|
||||
}
|
||||
class Sub extends Base {
|
||||
>Sub : Symbol(Sub, Decl(emitCodeBeforeSuperCall.ts, 6, 1))
|
||||
>Base : Symbol(Base, Decl(emitCodeBeforeSuperCall.ts, 0, 0))
|
||||
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
>p : Symbol(Sub.p, Decl(emitCodeBeforeSuperCall.ts, 9, 16))
|
||||
|
||||
console.log('hi');
|
||||
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
|
||||
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
|
||||
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
super();
|
||||
>super : Symbol(Base, Decl(emitCodeBeforeSuperCall.ts, 0, 0))
|
||||
}
|
||||
field = 0;
|
||||
>field : Symbol(Sub.field, Decl(emitCodeBeforeSuperCall.ts, 12, 5))
|
||||
}
|
||||
|
||||
class Test extends Base {
|
||||
>Test : Symbol(Test, Decl(emitCodeBeforeSuperCall.ts, 14, 1))
|
||||
>Base : Symbol(Base, Decl(emitCodeBeforeSuperCall.ts, 0, 0))
|
||||
|
||||
prop: number;
|
||||
>prop : Symbol(Test.prop, Decl(emitCodeBeforeSuperCall.ts, 16, 25))
|
||||
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
>p : Symbol(Test.p, Decl(emitCodeBeforeSuperCall.ts, 19, 16))
|
||||
|
||||
1; // Any statements here break it
|
||||
super();
|
||||
>super : Symbol(Base, Decl(emitCodeBeforeSuperCall.ts, 0, 0))
|
||||
|
||||
this.prop = 1;
|
||||
>this.prop : Symbol(Test.prop, Decl(emitCodeBeforeSuperCall.ts, 16, 25))
|
||||
>this : Symbol(Test, Decl(emitCodeBeforeSuperCall.ts, 14, 1))
|
||||
>prop : Symbol(Test.prop, Decl(emitCodeBeforeSuperCall.ts, 16, 25))
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
=== tests/cases/conformance/classes/constructorDeclarations/superCalls/emitCodeBeforeSuperCall.ts ===
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
|
||||
class Base {
|
||||
>Base : Base
|
||||
}
|
||||
class Sub extends Base {
|
||||
>Sub : Sub
|
||||
>Base : Base
|
||||
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
>p : number
|
||||
|
||||
console.log('hi');
|
||||
>console.log('hi') : void
|
||||
>console.log : (message?: any, ...optionalParams: any[]) => void
|
||||
>console : Console
|
||||
>log : (message?: any, ...optionalParams: any[]) => void
|
||||
>'hi' : "hi"
|
||||
|
||||
super();
|
||||
>super() : void
|
||||
>super : typeof Base
|
||||
}
|
||||
field = 0;
|
||||
>field : number
|
||||
>0 : 0
|
||||
}
|
||||
|
||||
class Test extends Base {
|
||||
>Test : Test
|
||||
>Base : Base
|
||||
|
||||
prop: number;
|
||||
>prop : number
|
||||
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
>p : number
|
||||
|
||||
1; // Any statements here break it
|
||||
>1 : 1
|
||||
|
||||
super();
|
||||
>super() : void
|
||||
>super : typeof Base
|
||||
|
||||
this.prop = 1;
|
||||
>this.prop = 1 : 1
|
||||
>this.prop : number
|
||||
>this : this
|
||||
>prop : number
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
//// [emitCodeBeforeSuperCall2.ts]
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
|
||||
|
||||
class BaseA {
|
||||
public constructor(public x: number) { }
|
||||
}
|
||||
class DerivedA extends BaseA {
|
||||
constructor(public x: number) { super(x); }
|
||||
}
|
||||
|
||||
|
||||
//// [emitCodeBeforeSuperCall2.js]
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var BaseA = /** @class */ (function () {
|
||||
function BaseA(x) {
|
||||
this.x = x;
|
||||
}
|
||||
return BaseA;
|
||||
}());
|
||||
var DerivedA = /** @class */ (function (_super) {
|
||||
__extends(DerivedA, _super);
|
||||
function DerivedA(x) {
|
||||
var _this = this;
|
||||
_this.x = x;
|
||||
_this = _super.call(this, x) || this;
|
||||
return _this;
|
||||
}
|
||||
return DerivedA;
|
||||
}(BaseA));
|
|
@ -1,23 +0,0 @@
|
|||
=== tests/cases/conformance/classes/constructorDeclarations/superCalls/emitCodeBeforeSuperCall2.ts ===
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
|
||||
|
||||
class BaseA {
|
||||
>BaseA : Symbol(BaseA, Decl(emitCodeBeforeSuperCall2.ts, 0, 0))
|
||||
|
||||
public constructor(public x: number) { }
|
||||
>x : Symbol(BaseA.x, Decl(emitCodeBeforeSuperCall2.ts, 7, 23))
|
||||
}
|
||||
class DerivedA extends BaseA {
|
||||
>DerivedA : Symbol(DerivedA, Decl(emitCodeBeforeSuperCall2.ts, 8, 1))
|
||||
>BaseA : Symbol(BaseA, Decl(emitCodeBeforeSuperCall2.ts, 0, 0))
|
||||
|
||||
constructor(public x: number) { super(x); }
|
||||
>x : Symbol(DerivedA.x, Decl(emitCodeBeforeSuperCall2.ts, 10, 16))
|
||||
>super : Symbol(BaseA, Decl(emitCodeBeforeSuperCall2.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(emitCodeBeforeSuperCall2.ts, 10, 16))
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
=== tests/cases/conformance/classes/constructorDeclarations/superCalls/emitCodeBeforeSuperCall2.ts ===
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
|
||||
|
||||
class BaseA {
|
||||
>BaseA : BaseA
|
||||
|
||||
public constructor(public x: number) { }
|
||||
>x : number
|
||||
}
|
||||
class DerivedA extends BaseA {
|
||||
>DerivedA : DerivedA
|
||||
>BaseA : BaseA
|
||||
|
||||
constructor(public x: number) { super(x); }
|
||||
>x : number
|
||||
>super(x) : void
|
||||
>super : typeof BaseA
|
||||
>x : number
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
//// [emitCodeBeforeSuperCallWithDefineFields.ts]
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
|
||||
class Base {
|
||||
}
|
||||
class Sub extends Base {
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
console.log('hi');
|
||||
super();
|
||||
}
|
||||
field = 0;
|
||||
}
|
||||
|
||||
class Test extends Base {
|
||||
prop: number;
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
1; // Any statements here break it
|
||||
super();
|
||||
this.prop = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [emitCodeBeforeSuperCallWithDefineFields.js]
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
class Base {
|
||||
}
|
||||
class Sub extends Base {
|
||||
// @ts-ignore
|
||||
constructor(p) {
|
||||
console.log('hi');
|
||||
super();
|
||||
Object.defineProperty(this, "p", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: p
|
||||
});
|
||||
Object.defineProperty(this, "field", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
class Test extends Base {
|
||||
// @ts-ignore
|
||||
constructor(p) {
|
||||
1; // Any statements here break it
|
||||
super();
|
||||
Object.defineProperty(this, "p", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: p
|
||||
});
|
||||
Object.defineProperty(this, "prop", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
this.prop = 1;
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
=== tests/cases/conformance/classes/constructorDeclarations/superCalls/emitCodeBeforeSuperCallWithDefineFields.ts ===
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
|
||||
class Base {
|
||||
>Base : Symbol(Base, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 0, 0))
|
||||
}
|
||||
class Sub extends Base {
|
||||
>Sub : Symbol(Sub, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 6, 1))
|
||||
>Base : Symbol(Base, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 0, 0))
|
||||
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
>p : Symbol(Sub.p, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 9, 16))
|
||||
|
||||
console.log('hi');
|
||||
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
|
||||
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
|
||||
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
super();
|
||||
>super : Symbol(Base, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 0, 0))
|
||||
}
|
||||
field = 0;
|
||||
>field : Symbol(Sub.field, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 12, 5))
|
||||
}
|
||||
|
||||
class Test extends Base {
|
||||
>Test : Symbol(Test, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 14, 1))
|
||||
>Base : Symbol(Base, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 0, 0))
|
||||
|
||||
prop: number;
|
||||
>prop : Symbol(Test.prop, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 16, 25))
|
||||
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
>p : Symbol(Test.p, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 19, 16))
|
||||
|
||||
1; // Any statements here break it
|
||||
super();
|
||||
>super : Symbol(Base, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 0, 0))
|
||||
|
||||
this.prop = 1;
|
||||
>this.prop : Symbol(Test.prop, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 16, 25))
|
||||
>this : Symbol(Test, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 14, 1))
|
||||
>prop : Symbol(Test.prop, Decl(emitCodeBeforeSuperCallWithDefineFields.ts, 16, 25))
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
=== tests/cases/conformance/classes/constructorDeclarations/superCalls/emitCodeBeforeSuperCallWithDefineFields.ts ===
|
||||
// TODO: With false, master is correct for `Test` but incorrect for `Sub`.
|
||||
// `Test` is correct because classic emit doesn't emit for definition and `Test`
|
||||
// doesn't need to emit any code for initialisation because it's already
|
||||
// part of the user code
|
||||
|
||||
class Base {
|
||||
>Base : Base
|
||||
}
|
||||
class Sub extends Base {
|
||||
>Sub : Sub
|
||||
>Base : Base
|
||||
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
>p : number
|
||||
|
||||
console.log('hi');
|
||||
>console.log('hi') : void
|
||||
>console.log : (message?: any, ...optionalParams: any[]) => void
|
||||
>console : Console
|
||||
>log : (message?: any, ...optionalParams: any[]) => void
|
||||
>'hi' : "hi"
|
||||
|
||||
super();
|
||||
>super() : void
|
||||
>super : typeof Base
|
||||
}
|
||||
field = 0;
|
||||
>field : number
|
||||
>0 : 0
|
||||
}
|
||||
|
||||
class Test extends Base {
|
||||
>Test : Test
|
||||
>Base : Base
|
||||
|
||||
prop: number;
|
||||
>prop : number
|
||||
|
||||
// @ts-ignore
|
||||
constructor(public p: number) {
|
||||
>p : number
|
||||
|
||||
1; // Any statements here break it
|
||||
>1 : 1
|
||||
|
||||
super();
|
||||
>super() : void
|
||||
>super : typeof Base
|
||||
|
||||
this.prop = 1;
|
||||
>this.prop = 1 : 1
|
||||
>this.prop : number
|
||||
>this : this
|
||||
>prop : number
|
||||
>1 : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
tests/cases/conformance/es2020/modules/1.ts(2,1): error TS2304: Cannot find name 'ns'.
|
||||
tests/cases/conformance/es2020/modules/1.ts(3,1): error TS2304: Cannot find name 'ns'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/0.ts (0 errors) ====
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/1.ts (2 errors) ====
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
ns.b;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/2.ts (0 errors) ====
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
|
@ -1,48 +0,0 @@
|
|||
//// [tests/cases/conformance/es2020/modules/exportAsNamespace1_amd.ts] ////
|
||||
|
||||
//// [0.ts]
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
//// [1.ts]
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
//// [2.ts]
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
|
||||
//// [0.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.a = 1;
|
||||
exports.b = 2;
|
||||
});
|
||||
//// [1.js]
|
||||
define(["require", "exports", "./0"], function (require, exports, ns) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.ns = ns;
|
||||
ns.a;
|
||||
ns.b;
|
||||
});
|
||||
//// [2.js]
|
||||
define(["require", "exports", "./1"], function (require, exports, foo) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
});
|
||||
|
||||
|
||||
//// [0.d.ts]
|
||||
export declare const a = 1;
|
||||
export declare const b = 2;
|
||||
//// [1.d.ts]
|
||||
export * as ns from './0';
|
||||
//// [2.d.ts]
|
||||
export {};
|
|
@ -1,32 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : Symbol(a, Decl(0.ts, 0, 12))
|
||||
|
||||
export const b = 2;
|
||||
>b : Symbol(b, Decl(0.ts, 1, 12))
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : Symbol(ns, Decl(1.ts, 0, 11))
|
||||
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : 1
|
||||
>1 : 1
|
||||
|
||||
export const b = 2;
|
||||
>b : 2
|
||||
>2 : 2
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : typeof ns
|
||||
|
||||
ns.a;
|
||||
>ns.a : any
|
||||
>ns : any
|
||||
>a : any
|
||||
|
||||
ns.b;
|
||||
>ns.b : any
|
||||
>ns : any
|
||||
>b : any
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : typeof foo
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : 1
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>a : 1
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : 2
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>b : 2
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
tests/cases/conformance/es2020/modules/1.ts(2,1): error TS2304: Cannot find name 'ns'.
|
||||
tests/cases/conformance/es2020/modules/1.ts(3,1): error TS2304: Cannot find name 'ns'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/0.ts (0 errors) ====
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/1.ts (2 errors) ====
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
ns.b;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/2.ts (0 errors) ====
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
|
@ -1,37 +0,0 @@
|
|||
//// [tests/cases/conformance/es2020/modules/exportAsNamespace1_esnext.ts] ////
|
||||
|
||||
//// [0.ts]
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
//// [1.ts]
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
//// [2.ts]
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
|
||||
//// [0.js]
|
||||
export var a = 1;
|
||||
export var b = 2;
|
||||
//// [1.js]
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
ns.b;
|
||||
//// [2.js]
|
||||
import * as foo from './1';
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
|
||||
|
||||
//// [0.d.ts]
|
||||
export declare const a = 1;
|
||||
export declare const b = 2;
|
||||
//// [1.d.ts]
|
||||
export * as ns from './0';
|
||||
//// [2.d.ts]
|
||||
export {};
|
|
@ -1,32 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : Symbol(a, Decl(0.ts, 0, 12))
|
||||
|
||||
export const b = 2;
|
||||
>b : Symbol(b, Decl(0.ts, 1, 12))
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : Symbol(ns, Decl(1.ts, 0, 11))
|
||||
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : 1
|
||||
>1 : 1
|
||||
|
||||
export const b = 2;
|
||||
>b : 2
|
||||
>2 : 2
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : typeof ns
|
||||
|
||||
ns.a;
|
||||
>ns.a : any
|
||||
>ns : any
|
||||
>a : any
|
||||
|
||||
ns.b;
|
||||
>ns.b : any
|
||||
>ns : any
|
||||
>b : any
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : typeof foo
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : 1
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>a : 1
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : 2
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>b : 2
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
tests/cases/conformance/es2020/modules/1.ts(2,1): error TS2304: Cannot find name 'ns'.
|
||||
tests/cases/conformance/es2020/modules/1.ts(3,1): error TS2304: Cannot find name 'ns'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/0.ts (0 errors) ====
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/1.ts (2 errors) ====
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
ns.b;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/2.ts (0 errors) ====
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
|
@ -1,72 +0,0 @@
|
|||
//// [tests/cases/conformance/es2020/modules/exportAsNamespace1_system.ts] ////
|
||||
|
||||
//// [0.ts]
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
//// [1.ts]
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
//// [2.ts]
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
|
||||
//// [0.js]
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var a, b;
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
exports_1("a", a = 1);
|
||||
exports_1("b", b = 2);
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [1.js]
|
||||
System.register(["./0"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters: [
|
||||
function (ns_1) {
|
||||
exports_1("ns", ns_1);
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
ns.a;
|
||||
ns.b;
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [2.js]
|
||||
System.register(["./1"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var foo;
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters: [
|
||||
function (foo_1) {
|
||||
foo = foo_1;
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
//// [0.d.ts]
|
||||
export declare const a = 1;
|
||||
export declare const b = 2;
|
||||
//// [1.d.ts]
|
||||
export * as ns from './0';
|
||||
//// [2.d.ts]
|
||||
export {};
|
|
@ -1,32 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : Symbol(a, Decl(0.ts, 0, 12))
|
||||
|
||||
export const b = 2;
|
||||
>b : Symbol(b, Decl(0.ts, 1, 12))
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : Symbol(ns, Decl(1.ts, 0, 11))
|
||||
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : 1
|
||||
>1 : 1
|
||||
|
||||
export const b = 2;
|
||||
>b : 2
|
||||
>2 : 2
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : typeof ns
|
||||
|
||||
ns.a;
|
||||
>ns.a : any
|
||||
>ns : any
|
||||
>a : any
|
||||
|
||||
ns.b;
|
||||
>ns.b : any
|
||||
>ns : any
|
||||
>b : any
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : typeof foo
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : 1
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>a : 1
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : 2
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>b : 2
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
tests/cases/conformance/es2020/modules/1.ts(2,1): error TS2304: Cannot find name 'ns'.
|
||||
tests/cases/conformance/es2020/modules/1.ts(3,1): error TS2304: Cannot find name 'ns'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/0.ts (0 errors) ====
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/1.ts (2 errors) ====
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
ns.b;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/2.ts (0 errors) ====
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
|
@ -1,73 +0,0 @@
|
|||
//// [tests/cases/conformance/es2020/modules/exportAsNamespace1_umd.ts] ////
|
||||
|
||||
//// [0.ts]
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
//// [1.ts]
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
//// [2.ts]
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
|
||||
//// [0.js]
|
||||
(function (factory) {
|
||||
if (typeof module === "object" && typeof module.exports === "object") {
|
||||
var v = factory(require, exports);
|
||||
if (v !== undefined) module.exports = v;
|
||||
}
|
||||
else if (typeof define === "function" && define.amd) {
|
||||
define(["require", "exports"], factory);
|
||||
}
|
||||
})(function (require, exports) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.a = 1;
|
||||
exports.b = 2;
|
||||
});
|
||||
//// [1.js]
|
||||
(function (factory) {
|
||||
if (typeof module === "object" && typeof module.exports === "object") {
|
||||
var v = factory(require, exports);
|
||||
if (v !== undefined) module.exports = v;
|
||||
}
|
||||
else if (typeof define === "function" && define.amd) {
|
||||
define(["require", "exports", "./0"], factory);
|
||||
}
|
||||
})(function (require, exports) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.ns = require("./0");
|
||||
ns.a;
|
||||
ns.b;
|
||||
});
|
||||
//// [2.js]
|
||||
(function (factory) {
|
||||
if (typeof module === "object" && typeof module.exports === "object") {
|
||||
var v = factory(require, exports);
|
||||
if (v !== undefined) module.exports = v;
|
||||
}
|
||||
else if (typeof define === "function" && define.amd) {
|
||||
define(["require", "exports", "./1"], factory);
|
||||
}
|
||||
})(function (require, exports) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var foo = require("./1");
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
});
|
||||
|
||||
|
||||
//// [0.d.ts]
|
||||
export declare const a = 1;
|
||||
export declare const b = 2;
|
||||
//// [1.d.ts]
|
||||
export * as ns from './0';
|
||||
//// [2.d.ts]
|
||||
export {};
|
|
@ -1,32 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : Symbol(a, Decl(0.ts, 0, 12))
|
||||
|
||||
export const b = 2;
|
||||
>b : Symbol(b, Decl(0.ts, 1, 12))
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : Symbol(ns, Decl(1.ts, 0, 11))
|
||||
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : 1
|
||||
>1 : 1
|
||||
|
||||
export const b = 2;
|
||||
>b : 2
|
||||
>2 : 2
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : typeof ns
|
||||
|
||||
ns.a;
|
||||
>ns.a : any
|
||||
>ns : any
|
||||
>a : any
|
||||
|
||||
ns.b;
|
||||
>ns.b : any
|
||||
>ns : any
|
||||
>b : any
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : typeof foo
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : 1
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>a : 1
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : 2
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>b : 2
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
tests/cases/conformance/es2020/modules/1.ts(2,1): error TS2304: Cannot find name 'ns'.
|
||||
tests/cases/conformance/es2020/modules/1.ts(3,1): error TS2304: Cannot find name 'ns'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/0.ts (0 errors) ====
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/1.ts (2 errors) ====
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
ns.b;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/2.ts (0 errors) ====
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
|
@ -1,56 +0,0 @@
|
|||
//// [tests/cases/conformance/es2020/modules/exportAsNamespace2_amd.ts] ////
|
||||
|
||||
//// [0.ts]
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
//// [1.ts]
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
//// [2.ts]
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
|
||||
//// [0.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.a = 1;
|
||||
exports.b = 2;
|
||||
});
|
||||
//// [1.js]
|
||||
define(["require", "exports", "./0"], function (require, exports, ns) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.ns = ns;
|
||||
ns.a;
|
||||
ns.b;
|
||||
});
|
||||
//// [2.js]
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
define(["require", "exports", "./1"], function (require, exports, foo) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
foo = __importStar(foo);
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
});
|
||||
|
||||
|
||||
//// [0.d.ts]
|
||||
export declare const a = 1;
|
||||
export declare const b = 2;
|
||||
//// [1.d.ts]
|
||||
export * as ns from './0';
|
||||
//// [2.d.ts]
|
||||
export {};
|
|
@ -1,32 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : Symbol(a, Decl(0.ts, 0, 12))
|
||||
|
||||
export const b = 2;
|
||||
>b : Symbol(b, Decl(0.ts, 1, 12))
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : Symbol(ns, Decl(1.ts, 0, 11))
|
||||
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : 1
|
||||
>1 : 1
|
||||
|
||||
export const b = 2;
|
||||
>b : 2
|
||||
>2 : 2
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : typeof ns
|
||||
|
||||
ns.a;
|
||||
>ns.a : any
|
||||
>ns : any
|
||||
>a : any
|
||||
|
||||
ns.b;
|
||||
>ns.b : any
|
||||
>ns : any
|
||||
>b : any
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : typeof foo
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : 1
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>a : 1
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : 2
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>b : 2
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
tests/cases/conformance/es2020/modules/1.ts(2,1): error TS2304: Cannot find name 'ns'.
|
||||
tests/cases/conformance/es2020/modules/1.ts(3,1): error TS2304: Cannot find name 'ns'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/0.ts (0 errors) ====
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/1.ts (2 errors) ====
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
ns.b;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/2.ts (0 errors) ====
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
|
@ -1,32 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : Symbol(a, Decl(0.ts, 0, 12))
|
||||
|
||||
export const b = 2;
|
||||
>b : Symbol(b, Decl(0.ts, 1, 12))
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : Symbol(ns, Decl(1.ts, 0, 11))
|
||||
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : 1
|
||||
>1 : 1
|
||||
|
||||
export const b = 2;
|
||||
>b : 2
|
||||
>2 : 2
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : typeof ns
|
||||
|
||||
ns.a;
|
||||
>ns.a : any
|
||||
>ns : any
|
||||
>a : any
|
||||
|
||||
ns.b;
|
||||
>ns.b : any
|
||||
>ns : any
|
||||
>b : any
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : typeof foo
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : 1
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>a : 1
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : 2
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>b : 2
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
tests/cases/conformance/es2020/modules/1.ts(2,1): error TS2304: Cannot find name 'ns'.
|
||||
tests/cases/conformance/es2020/modules/1.ts(3,1): error TS2304: Cannot find name 'ns'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/0.ts (0 errors) ====
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/1.ts (2 errors) ====
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
ns.b;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/2.ts (0 errors) ====
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
|
@ -1,72 +0,0 @@
|
|||
//// [tests/cases/conformance/es2020/modules/exportAsNamespace2_system.ts] ////
|
||||
|
||||
//// [0.ts]
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
//// [1.ts]
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
//// [2.ts]
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
|
||||
//// [0.js]
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var a, b;
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
exports_1("a", a = 1);
|
||||
exports_1("b", b = 2);
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [1.js]
|
||||
System.register(["./0"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters: [
|
||||
function (ns_1) {
|
||||
exports_1("ns", ns_1);
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
ns.a;
|
||||
ns.b;
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [2.js]
|
||||
System.register(["./1"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var foo;
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters: [
|
||||
function (foo_1) {
|
||||
foo = foo_1;
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
//// [0.d.ts]
|
||||
export declare const a = 1;
|
||||
export declare const b = 2;
|
||||
//// [1.d.ts]
|
||||
export * as ns from './0';
|
||||
//// [2.d.ts]
|
||||
export {};
|
|
@ -1,32 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : Symbol(a, Decl(0.ts, 0, 12))
|
||||
|
||||
export const b = 2;
|
||||
>b : Symbol(b, Decl(0.ts, 1, 12))
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : Symbol(ns, Decl(1.ts, 0, 11))
|
||||
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : 1
|
||||
>1 : 1
|
||||
|
||||
export const b = 2;
|
||||
>b : 2
|
||||
>2 : 2
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : typeof ns
|
||||
|
||||
ns.a;
|
||||
>ns.a : any
|
||||
>ns : any
|
||||
>a : any
|
||||
|
||||
ns.b;
|
||||
>ns.b : any
|
||||
>ns : any
|
||||
>b : any
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : typeof foo
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : 1
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>a : 1
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : 2
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>b : 2
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
tests/cases/conformance/es2020/modules/1.ts(2,1): error TS2304: Cannot find name 'ns'.
|
||||
tests/cases/conformance/es2020/modules/1.ts(3,1): error TS2304: Cannot find name 'ns'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/0.ts (0 errors) ====
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/1.ts (2 errors) ====
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
ns.b;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'ns'.
|
||||
|
||||
==== tests/cases/conformance/es2020/modules/2.ts (0 errors) ====
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
|
@ -1,87 +0,0 @@
|
|||
//// [tests/cases/conformance/es2020/modules/exportAsNamespace2_umd.ts] ////
|
||||
|
||||
//// [0.ts]
|
||||
export const a = 1;
|
||||
export const b = 2;
|
||||
|
||||
//// [1.ts]
|
||||
export * as ns from './0';
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
//// [2.ts]
|
||||
import * as foo from './1'
|
||||
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
|
||||
//// [0.js]
|
||||
(function (factory) {
|
||||
if (typeof module === "object" && typeof module.exports === "object") {
|
||||
var v = factory(require, exports);
|
||||
if (v !== undefined) module.exports = v;
|
||||
}
|
||||
else if (typeof define === "function" && define.amd) {
|
||||
define(["require", "exports"], factory);
|
||||
}
|
||||
})(function (require, exports) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.a = 1;
|
||||
exports.b = 2;
|
||||
});
|
||||
//// [1.js]
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
(function (factory) {
|
||||
if (typeof module === "object" && typeof module.exports === "object") {
|
||||
var v = factory(require, exports);
|
||||
if (v !== undefined) module.exports = v;
|
||||
}
|
||||
else if (typeof define === "function" && define.amd) {
|
||||
define(["require", "exports", "./0"], factory);
|
||||
}
|
||||
})(function (require, exports) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.ns = __importStar(require("./0"));
|
||||
ns.a;
|
||||
ns.b;
|
||||
});
|
||||
//// [2.js]
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
(function (factory) {
|
||||
if (typeof module === "object" && typeof module.exports === "object") {
|
||||
var v = factory(require, exports);
|
||||
if (v !== undefined) module.exports = v;
|
||||
}
|
||||
else if (typeof define === "function" && define.amd) {
|
||||
define(["require", "exports", "./1"], factory);
|
||||
}
|
||||
})(function (require, exports) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var foo = __importStar(require("./1"));
|
||||
foo.ns.a;
|
||||
foo.ns.b;
|
||||
});
|
||||
|
||||
|
||||
//// [0.d.ts]
|
||||
export declare const a = 1;
|
||||
export declare const b = 2;
|
||||
//// [1.d.ts]
|
||||
export * as ns from './0';
|
||||
//// [2.d.ts]
|
||||
export {};
|
|
@ -1,32 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : Symbol(a, Decl(0.ts, 0, 12))
|
||||
|
||||
export const b = 2;
|
||||
>b : Symbol(b, Decl(0.ts, 1, 12))
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : Symbol(ns, Decl(1.ts, 0, 11))
|
||||
|
||||
ns.a;
|
||||
ns.b;
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>a : Symbol(foo.ns.a, Decl(0.ts, 0, 12))
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
>foo.ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>foo : Symbol(foo, Decl(2.ts, 0, 6))
|
||||
>ns : Symbol(foo.ns, Decl(1.ts, 0, 11))
|
||||
>b : Symbol(foo.ns.b, Decl(0.ts, 1, 12))
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
=== tests/cases/conformance/es2020/modules/0.ts ===
|
||||
export const a = 1;
|
||||
>a : 1
|
||||
>1 : 1
|
||||
|
||||
export const b = 2;
|
||||
>b : 2
|
||||
>2 : 2
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/1.ts ===
|
||||
export * as ns from './0';
|
||||
>ns : typeof ns
|
||||
|
||||
ns.a;
|
||||
>ns.a : any
|
||||
>ns : any
|
||||
>a : any
|
||||
|
||||
ns.b;
|
||||
>ns.b : any
|
||||
>ns : any
|
||||
>b : any
|
||||
|
||||
=== tests/cases/conformance/es2020/modules/2.ts ===
|
||||
import * as foo from './1'
|
||||
>foo : typeof foo
|
||||
|
||||
foo.ns.a;
|
||||
>foo.ns.a : 1
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>a : 1
|
||||
|
||||
foo.ns.b;
|
||||
>foo.ns.b : 2
|
||||
>foo.ns : typeof foo.ns
|
||||
>foo : typeof foo
|
||||
>ns : typeof foo.ns
|
||||
>b : 2
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(7,18): error TS1125: Hexadecimal digit expected.
|
||||
tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected.
|
||||
tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected.
|
||||
tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected.
|
||||
tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,18): error TS1125: Hexadecimal digit expected.
|
||||
tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,27): error TS1125: Hexadecimal digit expected.
|
||||
tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts(9,51): error TS1125: Hexadecimal digit expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts (7 errors) ====
|
||||
function tag (str: any, ...args: any[]): any {
|
||||
return str
|
||||
}
|
||||
|
||||
const a = tag`123`
|
||||
const b = tag`123 ${100}`
|
||||
const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`;
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
const a1 = tag`${ 100 }\0` // \0
|
||||
const a2 = tag`${ 100 }\00` // \\00
|
||||
const a3 = tag`${ 100 }\u` // \\u
|
||||
const a4 = tag`${ 100 }\u0` // \\u0
|
||||
const a5 = tag`${ 100 }\u00` // \\u00
|
||||
const a6 = tag`${ 100 }\u000` // \\u000
|
||||
const a7 = tag`${ 100 }\u0000` // \u0000
|
||||
const a8 = tag`${ 100 }\u{` // \\u{
|
||||
const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF
|
||||
const a10 = tag`${ 100 }\u{1f622` // \\u{1f622
|
||||
const a11 = tag`${ 100 }\u{1f622}` // \u{1f622}
|
||||
const a12 = tag`${ 100 }\x` // \\x
|
||||
const a13 = tag`${ 100 }\x0` // \\x0
|
||||
const a14 = tag`${ 100 }\x00` // \x00
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
//// [invalidTaggedTemplateEscapeSequences.ts]
|
||||
function tag (str: any, ...args: any[]): any {
|
||||
return str
|
||||
}
|
||||
|
||||
const a = tag`123`
|
||||
const b = tag`123 ${100}`
|
||||
const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`;
|
||||
const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate
|
||||
const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate
|
||||
|
||||
const a1 = tag`${ 100 }\0` // \0
|
||||
const a2 = tag`${ 100 }\00` // \\00
|
||||
const a3 = tag`${ 100 }\u` // \\u
|
||||
const a4 = tag`${ 100 }\u0` // \\u0
|
||||
const a5 = tag`${ 100 }\u00` // \\u00
|
||||
const a6 = tag`${ 100 }\u000` // \\u000
|
||||
const a7 = tag`${ 100 }\u0000` // \u0000
|
||||
const a8 = tag`${ 100 }\u{` // \\u{
|
||||
const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF
|
||||
const a10 = tag`${ 100 }\u{1f622` // \\u{1f622
|
||||
const a11 = tag`${ 100 }\u{1f622}` // \u{1f622}
|
||||
const a12 = tag`${ 100 }\x` // \\x
|
||||
const a13 = tag`${ 100 }\x0` // \\x0
|
||||
const a14 = tag`${ 100 }\x00` // \x00
|
||||
|
||||
|
||||
//// [invalidTaggedTemplateEscapeSequences.js]
|
||||
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
||||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
||||
return cooked;
|
||||
};
|
||||
function tag(str) {
|
||||
var args = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
args[_i - 1] = arguments[_i];
|
||||
}
|
||||
return str;
|
||||
}
|
||||
var a = tag(__makeTemplateObject(["123"], ["123"]));
|
||||
var b = tag(__makeTemplateObject(["123 ", ""], ["123 ", ""]), 100);
|
||||
var x = tag(__makeTemplateObject([void 0, void 0, " wonderful ", void 0], ["\\u{hello} ", " \\xtraordinary ", " wonderful ", " \\uworld"]), 100, 200, 300);
|
||||
var y = "hello} " + 100 + " traordinary " + 200 + " wonderful " + 300 + " world"; // should error with NoSubstitutionTemplate
|
||||
var z = tag(__makeTemplateObject([void 0], ["\\u{hello} \\xtraordinary wonderful \\uworld"])); // should work with Tagged NoSubstitutionTemplate
|
||||
var a1 = tag(__makeTemplateObject(["", "\0"], ["", "\\0"]), 100); // \0
|
||||
var a2 = tag(__makeTemplateObject(["", void 0], ["", "\\00"]), 100); // \\00
|
||||
var a3 = tag(__makeTemplateObject(["", void 0], ["", "\\u"]), 100); // \\u
|
||||
var a4 = tag(__makeTemplateObject(["", void 0], ["", "\\u0"]), 100); // \\u0
|
||||
var a5 = tag(__makeTemplateObject(["", void 0], ["", "\\u00"]), 100); // \\u00
|
||||
var a6 = tag(__makeTemplateObject(["", void 0], ["", "\\u000"]), 100); // \\u000
|
||||
var a7 = tag(__makeTemplateObject(["", "\0"], ["", "\\u0000"]), 100); // \u0000
|
||||
var a8 = tag(__makeTemplateObject(["", void 0], ["", "\\u{"]), 100); // \\u{
|
||||
var a9 = tag(__makeTemplateObject(["", "\uDBFF\uDFFF"], ["", "\\u{10FFFF}"]), 100); // \\u{10FFFF
|
||||
var a10 = tag(__makeTemplateObject(["", void 0], ["", "\\u{1f622"]), 100); // \\u{1f622
|
||||
var a11 = tag(__makeTemplateObject(["", "\uD83D\uDE22"], ["", "\\u{1f622}"]), 100); // \u{1f622}
|
||||
var a12 = tag(__makeTemplateObject(["", void 0], ["", "\\x"]), 100); // \\x
|
||||
var a13 = tag(__makeTemplateObject(["", void 0], ["", "\\x0"]), 100); // \\x0
|
||||
var a14 = tag(__makeTemplateObject(["", "\0"], ["", "\\x00"]), 100); // \x00
|
|
@ -1,85 +0,0 @@
|
|||
=== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts ===
|
||||
function tag (str: any, ...args: any[]): any {
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
>str : Symbol(str, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 14))
|
||||
>args : Symbol(args, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 23))
|
||||
|
||||
return str
|
||||
>str : Symbol(str, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 14))
|
||||
}
|
||||
|
||||
const a = tag`123`
|
||||
>a : Symbol(a, Decl(invalidTaggedTemplateEscapeSequences.ts, 4, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const b = tag`123 ${100}`
|
||||
>b : Symbol(b, Decl(invalidTaggedTemplateEscapeSequences.ts, 5, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`;
|
||||
>x : Symbol(x, Decl(invalidTaggedTemplateEscapeSequences.ts, 6, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate
|
||||
>y : Symbol(y, Decl(invalidTaggedTemplateEscapeSequences.ts, 7, 5))
|
||||
|
||||
const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate
|
||||
>z : Symbol(z, Decl(invalidTaggedTemplateEscapeSequences.ts, 8, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a1 = tag`${ 100 }\0` // \0
|
||||
>a1 : Symbol(a1, Decl(invalidTaggedTemplateEscapeSequences.ts, 10, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a2 = tag`${ 100 }\00` // \\00
|
||||
>a2 : Symbol(a2, Decl(invalidTaggedTemplateEscapeSequences.ts, 11, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a3 = tag`${ 100 }\u` // \\u
|
||||
>a3 : Symbol(a3, Decl(invalidTaggedTemplateEscapeSequences.ts, 12, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a4 = tag`${ 100 }\u0` // \\u0
|
||||
>a4 : Symbol(a4, Decl(invalidTaggedTemplateEscapeSequences.ts, 13, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a5 = tag`${ 100 }\u00` // \\u00
|
||||
>a5 : Symbol(a5, Decl(invalidTaggedTemplateEscapeSequences.ts, 14, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a6 = tag`${ 100 }\u000` // \\u000
|
||||
>a6 : Symbol(a6, Decl(invalidTaggedTemplateEscapeSequences.ts, 15, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a7 = tag`${ 100 }\u0000` // \u0000
|
||||
>a7 : Symbol(a7, Decl(invalidTaggedTemplateEscapeSequences.ts, 16, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a8 = tag`${ 100 }\u{` // \\u{
|
||||
>a8 : Symbol(a8, Decl(invalidTaggedTemplateEscapeSequences.ts, 17, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF
|
||||
>a9 : Symbol(a9, Decl(invalidTaggedTemplateEscapeSequences.ts, 18, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a10 = tag`${ 100 }\u{1f622` // \\u{1f622
|
||||
>a10 : Symbol(a10, Decl(invalidTaggedTemplateEscapeSequences.ts, 19, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a11 = tag`${ 100 }\u{1f622}` // \u{1f622}
|
||||
>a11 : Symbol(a11, Decl(invalidTaggedTemplateEscapeSequences.ts, 20, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a12 = tag`${ 100 }\x` // \\x
|
||||
>a12 : Symbol(a12, Decl(invalidTaggedTemplateEscapeSequences.ts, 21, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a13 = tag`${ 100 }\x0` // \\x0
|
||||
>a13 : Symbol(a13, Decl(invalidTaggedTemplateEscapeSequences.ts, 22, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
||||
const a14 = tag`${ 100 }\x00` // \x00
|
||||
>a14 : Symbol(a14, Decl(invalidTaggedTemplateEscapeSequences.ts, 23, 5))
|
||||
>tag : Symbol(tag, Decl(invalidTaggedTemplateEscapeSequences.ts, 0, 0))
|
||||
|
|
@ -1,143 +0,0 @@
|
|||
=== tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts ===
|
||||
function tag (str: any, ...args: any[]): any {
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>str : any
|
||||
>args : any[]
|
||||
|
||||
return str
|
||||
>str : any
|
||||
}
|
||||
|
||||
const a = tag`123`
|
||||
>a : any
|
||||
>tag`123` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`123` : "123"
|
||||
|
||||
const b = tag`123 ${100}`
|
||||
>b : any
|
||||
>tag`123 ${100}` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`123 ${100}` : string
|
||||
>100 : 100
|
||||
|
||||
const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`;
|
||||
>x : any
|
||||
>tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string
|
||||
>100 : 100
|
||||
>200 : 200
|
||||
>300 : 300
|
||||
|
||||
const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate
|
||||
>y : string
|
||||
>`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld` : string
|
||||
>100 : 100
|
||||
>200 : 200
|
||||
>300 : 300
|
||||
|
||||
const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate
|
||||
>z : any
|
||||
>tag`\u{hello} \xtraordinary wonderful \uworld` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`\u{hello} \xtraordinary wonderful \uworld` : "\\u{hello} \\xtraordinary wonderful \\uworld"
|
||||
|
||||
const a1 = tag`${ 100 }\0` // \0
|
||||
>a1 : any
|
||||
>tag`${ 100 }\0` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\0` : string
|
||||
>100 : 100
|
||||
|
||||
const a2 = tag`${ 100 }\00` // \\00
|
||||
>a2 : any
|
||||
>tag`${ 100 }\00` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\00` : string
|
||||
>100 : 100
|
||||
|
||||
const a3 = tag`${ 100 }\u` // \\u
|
||||
>a3 : any
|
||||
>tag`${ 100 }\u` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\u` : string
|
||||
>100 : 100
|
||||
|
||||
const a4 = tag`${ 100 }\u0` // \\u0
|
||||
>a4 : any
|
||||
>tag`${ 100 }\u0` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\u0` : string
|
||||
>100 : 100
|
||||
|
||||
const a5 = tag`${ 100 }\u00` // \\u00
|
||||
>a5 : any
|
||||
>tag`${ 100 }\u00` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\u00` : string
|
||||
>100 : 100
|
||||
|
||||
const a6 = tag`${ 100 }\u000` // \\u000
|
||||
>a6 : any
|
||||
>tag`${ 100 }\u000` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\u000` : string
|
||||
>100 : 100
|
||||
|
||||
const a7 = tag`${ 100 }\u0000` // \u0000
|
||||
>a7 : any
|
||||
>tag`${ 100 }\u0000` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\u0000` : string
|
||||
>100 : 100
|
||||
|
||||
const a8 = tag`${ 100 }\u{` // \\u{
|
||||
>a8 : any
|
||||
>tag`${ 100 }\u{` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\u{` : string
|
||||
>100 : 100
|
||||
|
||||
const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF
|
||||
>a9 : any
|
||||
>tag`${ 100 }\u{10FFFF}` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\u{10FFFF}` : string
|
||||
>100 : 100
|
||||
|
||||
const a10 = tag`${ 100 }\u{1f622` // \\u{1f622
|
||||
>a10 : any
|
||||
>tag`${ 100 }\u{1f622` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\u{1f622` : string
|
||||
>100 : 100
|
||||
|
||||
const a11 = tag`${ 100 }\u{1f622}` // \u{1f622}
|
||||
>a11 : any
|
||||
>tag`${ 100 }\u{1f622}` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\u{1f622}` : string
|
||||
>100 : 100
|
||||
|
||||
const a12 = tag`${ 100 }\x` // \\x
|
||||
>a12 : any
|
||||
>tag`${ 100 }\x` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\x` : string
|
||||
>100 : 100
|
||||
|
||||
const a13 = tag`${ 100 }\x0` // \\x0
|
||||
>a13 : any
|
||||
>tag`${ 100 }\x0` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\x0` : string
|
||||
>100 : 100
|
||||
|
||||
const a14 = tag`${ 100 }\x00` // \x00
|
||||
>a14 : any
|
||||
>tag`${ 100 }\x00` : any
|
||||
>tag : (str: any, ...args: any[]) => any
|
||||
>`${ 100 }\x00` : string
|
||||
>100 : 100
|
||||
|
|
@ -1,732 +0,0 @@
|
|||
[
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 977
|
||||
},
|
||||
"quickInfo": {
|
||||
"kind": "constructor",
|
||||
"kindModifiers": "",
|
||||
"textSpan": {
|
||||
"start": 977,
|
||||
"length": 3
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "constructor",
|
||||
"kind": "keyword"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "Foo",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "value",
|
||||
"kind": "parameterName"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "number",
|
||||
"kind": "keyword"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "Foo",
|
||||
"kind": "className"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
{
|
||||
"text": "This is the constructor.",
|
||||
"kind": "text"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"name": "myjsdoctag",
|
||||
"text": [
|
||||
{
|
||||
"text": "this is a comment",
|
||||
"kind": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 981
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 985
|
||||
},
|
||||
"quickInfo": {
|
||||
"kind": "class",
|
||||
"kindModifiers": "",
|
||||
"textSpan": {
|
||||
"start": 985,
|
||||
"length": 3
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "class",
|
||||
"kind": "keyword"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "Foo",
|
||||
"kind": "className"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
{
|
||||
"text": "This is class Foo.",
|
||||
"kind": "text"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"name": "mytag",
|
||||
"text": [
|
||||
{
|
||||
"text": "comment1 comment2",
|
||||
"kind": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 989
|
||||
},
|
||||
"quickInfo": {
|
||||
"kind": "method",
|
||||
"kindModifiers": "static",
|
||||
"textSpan": {
|
||||
"start": 989,
|
||||
"length": 7
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "Foo",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method1",
|
||||
"kind": "methodName"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "void",
|
||||
"kind": "keyword"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
{
|
||||
"text": "method1 documentation",
|
||||
"kind": "text"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"name": "mytag",
|
||||
"text": [
|
||||
{
|
||||
"text": "comment1 comment2",
|
||||
"kind": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 997
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 1004
|
||||
},
|
||||
"quickInfo": {
|
||||
"kind": "method",
|
||||
"kindModifiers": "",
|
||||
"textSpan": {
|
||||
"start": 1004,
|
||||
"length": 7
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "Foo",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method2",
|
||||
"kind": "methodName"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "void",
|
||||
"kind": "keyword"
|
||||
}
|
||||
],
|
||||
"documentation": [],
|
||||
"tags": [
|
||||
{
|
||||
"name": "mytag"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 1012
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 1019
|
||||
},
|
||||
"quickInfo": {
|
||||
"kind": "method",
|
||||
"kindModifiers": "",
|
||||
"textSpan": {
|
||||
"start": 1019,
|
||||
"length": 7
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "Foo",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method3",
|
||||
"kind": "methodName"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "number",
|
||||
"kind": "keyword"
|
||||
}
|
||||
],
|
||||
"documentation": [],
|
||||
"tags": [
|
||||
{
|
||||
"name": "returns",
|
||||
"text": [
|
||||
{
|
||||
"text": "a value",
|
||||
"kind": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 1027
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 1034
|
||||
},
|
||||
"quickInfo": {
|
||||
"kind": "method",
|
||||
"kindModifiers": "",
|
||||
"textSpan": {
|
||||
"start": 1034,
|
||||
"length": 7
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "Foo",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method4",
|
||||
"kind": "methodName"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "foo",
|
||||
"kind": "parameterName"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "string",
|
||||
"kind": "keyword"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "number",
|
||||
"kind": "keyword"
|
||||
}
|
||||
],
|
||||
"documentation": [],
|
||||
"tags": [
|
||||
{
|
||||
"name": "param",
|
||||
"text": [
|
||||
{
|
||||
"text": "foo",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "A value.",
|
||||
"kind": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "returns",
|
||||
"text": [
|
||||
{
|
||||
"text": "Another value",
|
||||
"kind": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "mytag"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 1049
|
||||
},
|
||||
"quickInfo": {
|
||||
"kind": "property",
|
||||
"kindModifiers": "",
|
||||
"textSpan": {
|
||||
"start": 1049,
|
||||
"length": 9
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "property",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "Foo",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "property1",
|
||||
"kind": "propertyName"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "string",
|
||||
"kind": "keyword"
|
||||
}
|
||||
],
|
||||
"documentation": [],
|
||||
"tags": [
|
||||
{
|
||||
"name": "mytag",
|
||||
"text": [
|
||||
{
|
||||
"text": "comment1 comment2",
|
||||
"kind": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 1064
|
||||
},
|
||||
"quickInfo": {
|
||||
"kind": "property",
|
||||
"kindModifiers": "",
|
||||
"textSpan": {
|
||||
"start": 1064,
|
||||
"length": 9
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "property",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "Foo",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "property2",
|
||||
"kind": "propertyName"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "number",
|
||||
"kind": "keyword"
|
||||
}
|
||||
],
|
||||
"documentation": [],
|
||||
"tags": [
|
||||
{
|
||||
"name": "mytag1",
|
||||
"text": [
|
||||
{
|
||||
"text": "some comments\nsome more comments about mytag1",
|
||||
"kind": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "mytag2",
|
||||
"text": [
|
||||
{
|
||||
"text": "here all the comments are on a new line",
|
||||
"kind": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "mytag3"
|
||||
},
|
||||
{
|
||||
"name": "mytag"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 1079
|
||||
},
|
||||
"quickInfo": {
|
||||
"kind": "method",
|
||||
"kindModifiers": "",
|
||||
"textSpan": {
|
||||
"start": 1079,
|
||||
"length": 7
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method",
|
||||
"kind": "text"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "Foo",
|
||||
"kind": "className"
|
||||
},
|
||||
{
|
||||
"text": ".",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": "method5",
|
||||
"kind": "methodName"
|
||||
},
|
||||
{
|
||||
"text": "(",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ")",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": ":",
|
||||
"kind": "punctuation"
|
||||
},
|
||||
{
|
||||
"text": " ",
|
||||
"kind": "space"
|
||||
},
|
||||
{
|
||||
"text": "void",
|
||||
"kind": "keyword"
|
||||
}
|
||||
],
|
||||
"documentation": [],
|
||||
"tags": [
|
||||
{
|
||||
"name": "mytag"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocTags.ts",
|
||||
"position": 1100
|
||||
},
|
||||
"quickInfo": {
|
||||
"kind": "",
|
||||
"kindModifiers": "",
|
||||
"textSpan": {
|
||||
"start": 1094,
|
||||
"length": 6
|
||||
},
|
||||
"displayParts": [
|
||||
{
|
||||
"text": "any",
|
||||
"kind": "keyword"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
|
@ -1,16 +0,0 @@
|
|||
tests/cases/compiler/jsxFactoryAndFragment.tsx(3,1): error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option.
|
||||
tests/cases/compiler/jsxFactoryAndFragment.tsx(4,1): error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option.
|
||||
tests/cases/compiler/jsxFactoryAndFragment.tsx(4,17): error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option.
|
||||
|
||||
|
||||
==== tests/cases/compiler/jsxFactoryAndFragment.tsx (3 errors) ====
|
||||
declare var h: any;
|
||||
|
||||
<></>;
|
||||
~~~~~
|
||||
!!! error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option.
|
||||
<><span>1</span><><span>2.1</span><span>2.2</span></></>;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option.
|
|
@ -1,13 +0,0 @@
|
|||
//// [jsxFactoryAndFragment.tsx]
|
||||
declare var h: any;
|
||||
|
||||
<></>;
|
||||
<><span>1</span><><span>2.1</span><span>2.2</span></></>;
|
||||
|
||||
//// [jsxFactoryAndFragment.js]
|
||||
h(React.Fragment, null);
|
||||
h(React.Fragment, null,
|
||||
h("span", null, "1"),
|
||||
h(React.Fragment, null,
|
||||
h("span", null, "2.1"),
|
||||
h("span", null, "2.2")));
|
|
@ -1,6 +0,0 @@
|
|||
=== tests/cases/compiler/jsxFactoryAndFragment.tsx ===
|
||||
declare var h: any;
|
||||
>h : Symbol(h, Decl(jsxFactoryAndFragment.tsx, 0, 11))
|
||||
|
||||
<></>;
|
||||
<><span>1</span><><span>2.1</span><span>2.2</span></></>;
|
|
@ -1,20 +0,0 @@
|
|||
=== tests/cases/compiler/jsxFactoryAndFragment.tsx ===
|
||||
declare var h: any;
|
||||
>h : any
|
||||
|
||||
<></>;
|
||||
><></> : any
|
||||
|
||||
<><span>1</span><><span>2.1</span><span>2.2</span></></>;
|
||||
><><span>1</span><><span>2.1</span><span>2.2</span></></> : any
|
||||
><span>1</span> : any
|
||||
>span : any
|
||||
>span : any
|
||||
><><span>2.1</span><span>2.2</span></> : any
|
||||
><span>2.1</span> : any
|
||||
>span : any
|
||||
>span : any
|
||||
><span>2.2</span> : any
|
||||
>span : any
|
||||
>span : any
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
tests/cases/compiler/user.ts(1,15): error TS2691: An import path cannot end with a '.ts' extension. Consider importing './x' instead.
|
||||
tests/cases/compiler/user.ts(2,15): error TS2691: An import path cannot end with a '.tsx' extension. Consider importing './y' instead.
|
||||
tests/cases/compiler/user.ts(3,15): error TS2691: An import path cannot end with a '.d.ts' extension. Consider importing './z' instead.
|
||||
|
||||
|
||||
==== tests/cases/compiler/x.ts (0 errors) ====
|
||||
export default 0;
|
||||
|
||||
==== tests/cases/compiler/y.tsx (0 errors) ====
|
||||
export default 0;
|
||||
|
||||
==== tests/cases/compiler/z.d.ts (0 errors) ====
|
||||
declare const x: number;
|
||||
export default x;
|
||||
|
||||
==== tests/cases/compiler/user.ts (3 errors) ====
|
||||
import x from "./x.ts";
|
||||
~~~~~~~~
|
||||
!!! error TS2691: An import path cannot end with a '.ts' extension. Consider importing './x' instead.
|
||||
import y from "./y.tsx";
|
||||
~~~~~~~~~
|
||||
!!! error TS2691: An import path cannot end with a '.tsx' extension. Consider importing './y' instead.
|
||||
import z from "./z.d.ts";
|
||||
~~~~~~~~~~
|
||||
!!! error TS2691: An import path cannot end with a '.d.ts' extension. Consider importing './z' instead.
|
||||
|
||||
// Making sure the suggested fixes are valid:
|
||||
import x2 from "./x";
|
||||
import y2 from "./y";
|
||||
import z2 from "./z";
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
//// [tests/cases/compiler/moduleResolutionNoTs.ts] ////
|
||||
|
||||
//// [x.ts]
|
||||
export default 0;
|
||||
|
||||
//// [y.tsx]
|
||||
export default 0;
|
||||
|
||||
//// [z.d.ts]
|
||||
declare const x: number;
|
||||
export default x;
|
||||
|
||||
//// [user.ts]
|
||||
import x from "./x.ts";
|
||||
import y from "./y.tsx";
|
||||
import z from "./z.d.ts";
|
||||
|
||||
// Making sure the suggested fixes are valid:
|
||||
import x2 from "./x";
|
||||
import y2 from "./y";
|
||||
import z2 from "./z";
|
||||
|
||||
|
||||
//// [x.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports["default"] = 0;
|
||||
//// [y.jsx]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports["default"] = 0;
|
||||
//// [user.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
|
@ -1,33 +0,0 @@
|
|||
=== tests/cases/compiler/x.ts ===
|
||||
export default 0;
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/compiler/y.tsx ===
|
||||
export default 0;
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/compiler/z.d.ts ===
|
||||
declare const x: number;
|
||||
>x : Symbol(x, Decl(z.d.ts, 0, 13))
|
||||
|
||||
export default x;
|
||||
>x : Symbol(x, Decl(z.d.ts, 0, 13))
|
||||
|
||||
=== tests/cases/compiler/user.ts ===
|
||||
import x from "./x.ts";
|
||||
>x : Symbol(x, Decl(user.ts, 0, 6))
|
||||
|
||||
import y from "./y.tsx";
|
||||
>y : Symbol(y, Decl(user.ts, 1, 6))
|
||||
|
||||
import z from "./z.d.ts";
|
||||
>z : Symbol(z, Decl(user.ts, 2, 6))
|
||||
|
||||
// Making sure the suggested fixes are valid:
|
||||
import x2 from "./x";
|
||||
>x2 : Symbol(x2, Decl(user.ts, 5, 6))
|
||||
|
||||
import y2 from "./y";
|
||||
>y2 : Symbol(y2, Decl(user.ts, 6, 6))
|
||||
|
||||
import z2 from "./z";
|
||||
>z2 : Symbol(z2, Decl(user.ts, 7, 6))
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
=== tests/cases/compiler/x.ts ===
|
||||
export default 0;
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/compiler/y.tsx ===
|
||||
export default 0;
|
||||
No type information for this code.
|
||||
No type information for this code.=== tests/cases/compiler/z.d.ts ===
|
||||
declare const x: number;
|
||||
>x : number
|
||||
|
||||
export default x;
|
||||
>x : number
|
||||
|
||||
=== tests/cases/compiler/user.ts ===
|
||||
import x from "./x.ts";
|
||||
>x : any
|
||||
|
||||
import y from "./y.tsx";
|
||||
>y : any
|
||||
|
||||
import z from "./z.d.ts";
|
||||
>z : any
|
||||
|
||||
// Making sure the suggested fixes are valid:
|
||||
import x2 from "./x";
|
||||
>x2 : 0
|
||||
|
||||
import y2 from "./y";
|
||||
>y2 : 0
|
||||
|
||||
import z2 from "./z";
|
||||
>z2 : number
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
tests/cases/compiler/nonexistentPropertyAvailableOnPromisedType.ts(2,7): error TS2570: Property 'toLowerCase' does not exist on type 'Promise<string>'. Did you forget to use 'await'?
|
||||
|
||||
|
||||
==== tests/cases/compiler/nonexistentPropertyAvailableOnPromisedType.ts (1 errors) ====
|
||||
function f(x: Promise<string>) {
|
||||
x.toLowerCase();
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2570: Property 'toLowerCase' does not exist on type 'Promise<string>'. Did you forget to use 'await'?
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
//// [nonexistentPropertyAvailableOnPromisedType.ts]
|
||||
function f(x: Promise<string>) {
|
||||
x.toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
//// [nonexistentPropertyAvailableOnPromisedType.js]
|
||||
function f(x) {
|
||||
x.toLowerCase();
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
=== tests/cases/compiler/nonexistentPropertyAvailableOnPromisedType.ts ===
|
||||
function f(x: Promise<string>) {
|
||||
>f : Symbol(f, Decl(nonexistentPropertyAvailableOnPromisedType.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(nonexistentPropertyAvailableOnPromisedType.ts, 0, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
x.toLowerCase();
|
||||
>x : Symbol(x, Decl(nonexistentPropertyAvailableOnPromisedType.ts, 0, 11))
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
=== tests/cases/compiler/nonexistentPropertyAvailableOnPromisedType.ts ===
|
||||
function f(x: Promise<string>) {
|
||||
>f : (x: Promise<string>) => void
|
||||
>x : Promise<string>
|
||||
|
||||
x.toLowerCase();
|
||||
>x.toLowerCase() : any
|
||||
>x.toLowerCase : any
|
||||
>x : Promise<string>
|
||||
>toLowerCase : any
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
// ==ORIGINAL==
|
||||
|
||||
import { } from "lib";
|
||||
|
||||
// ==ORGANIZED==
|
||||
|
||||
import { } from "lib";
|
|
@ -1,9 +0,0 @@
|
|||
// ==ORIGINAL==
|
||||
|
||||
import { x } from "a";
|
||||
export { x };
|
||||
|
||||
// ==ORGANIZED==
|
||||
|
||||
import { x } from "a";
|
||||
export { x };
|
|
@ -1,9 +0,0 @@
|
|||
// ==ORIGINAL==
|
||||
|
||||
import { x } from "a";
|
||||
const o = { x };
|
||||
|
||||
// ==ORGANIZED==
|
||||
|
||||
import { x } from "a";
|
||||
const o = { x };
|
|
@ -1,17 +0,0 @@
|
|||
//// [override16.ts]
|
||||
class A {
|
||||
foo?: string;
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
override foo = "string";
|
||||
}
|
||||
|
||||
|
||||
//// [override16.js]
|
||||
class A {
|
||||
foo;
|
||||
}
|
||||
class B extends A {
|
||||
foo = "string";
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
=== tests/cases/conformance/override/override16.ts ===
|
||||
class A {
|
||||
>A : Symbol(A, Decl(override16.ts, 0, 0))
|
||||
|
||||
foo?: string;
|
||||
>foo : Symbol(A.foo, Decl(override16.ts, 0, 9))
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
>B : Symbol(B, Decl(override16.ts, 2, 1))
|
||||
>A : Symbol(A, Decl(override16.ts, 0, 0))
|
||||
|
||||
override foo = "string";
|
||||
>foo : Symbol(B.foo, Decl(override16.ts, 4, 19))
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
=== tests/cases/conformance/override/override16.ts ===
|
||||
class A {
|
||||
>A : A
|
||||
|
||||
foo?: string;
|
||||
>foo : string
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
>B : B
|
||||
>A : A
|
||||
|
||||
override foo = "string";
|
||||
>foo : string
|
||||
>"string" : "string"
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
c:/root/tsconfig.json(5,9): error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option.
|
||||
|
||||
|
||||
==== c:/root/tsconfig.json (1 errors) ====
|
||||
// paths should error in the absence of baseurl
|
||||
|
||||
{
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
~~~~~~~
|
||||
!!! error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option.
|
||||
"*": [
|
||||
"*",
|
||||
"generated/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
==== c:/root/f1.ts (0 errors) ====
|
||||
export var x = 1;
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
//// [f1.ts]
|
||||
export var x = 1;
|
||||
|
||||
|
||||
//// [f1.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.x = void 0;
|
||||
exports.x = 1;
|
||||
});
|
|
@ -1,4 +0,0 @@
|
|||
=== c:/root/f1.ts ===
|
||||
export var x = 1;
|
||||
>x : Symbol(x, Decl(f1.ts, 0, 10))
|
||||
|
|
@ -1 +0,0 @@
|
|||
[]
|
|
@ -1,5 +0,0 @@
|
|||
=== c:/root/f1.ts ===
|
||||
export var x = 1;
|
||||
>x : number
|
||||
>1 : 1
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
//// [privateNameFieldInitializer-static.ts]
|
||||
class A {
|
||||
static #field = 10;
|
||||
static #uninitialized;
|
||||
}
|
||||
|
||||
|
||||
//// [privateNameFieldInitializer-static.js]
|
||||
var _A_field, _A_uninitialized;
|
||||
class A {
|
||||
}
|
||||
_A_field = { value: 10 };
|
||||
_A_uninitialized = { value: void 0 };
|
|
@ -1,11 +0,0 @@
|
|||
=== tests/cases/conformance/classes/members/privateNames/privateNameFieldInitializer-static.ts ===
|
||||
class A {
|
||||
>A : Symbol(A, Decl(privateNameFieldInitializer-static.ts, 0, 0))
|
||||
|
||||
static #field = 10;
|
||||
>#field : Symbol(A.#field, Decl(privateNameFieldInitializer-static.ts, 0, 9))
|
||||
|
||||
static #uninitialized;
|
||||
>#uninitialized : Symbol(A.#uninitialized, Decl(privateNameFieldInitializer-static.ts, 1, 23))
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
=== tests/cases/conformance/classes/members/privateNames/privateNameFieldInitializer-static.ts ===
|
||||
class A {
|
||||
>A : A
|
||||
|
||||
static #field = 10;
|
||||
>#field : number
|
||||
>10 : 10
|
||||
|
||||
static #uninitialized;
|
||||
>#uninitialized : any
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
DifferentNamesNotSpecifiedWithAllowJs/tsconfig.json(4,5): error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
|
||||
|
||||
==== DifferentNamesNotSpecifiedWithAllowJs/tsconfig.json (1 errors) ====
|
||||
{
|
||||
"compilerOptions": {
|
||||
"out": "test.js",
|
||||
"allowJs": true
|
||||
~~~~~~~~~
|
||||
!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
}
|
||||
}
|
||||
==== DifferentNamesNotSpecifiedWithAllowJs/a.ts (0 errors) ====
|
||||
var test = 10;
|
||||
==== DifferentNamesNotSpecifiedWithAllowJs/b.js (0 errors) ====
|
||||
var test2 = 10; // Should get compiled
|
|
@ -1,17 +0,0 @@
|
|||
DifferentNamesSpecifiedWithAllowJs/tsconfig.json(4,5): error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
|
||||
|
||||
==== DifferentNamesSpecifiedWithAllowJs/tsconfig.json (1 errors) ====
|
||||
{
|
||||
"compilerOptions": {
|
||||
"out": "test.js",
|
||||
"allowJs": true
|
||||
~~~~~~~~~
|
||||
!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
},
|
||||
"files": [ "a.ts", "b.js" ]
|
||||
}
|
||||
==== DifferentNamesSpecifiedWithAllowJs/a.ts (0 errors) ====
|
||||
var test = 10;
|
||||
==== DifferentNamesSpecifiedWithAllowJs/b.js (0 errors) ====
|
||||
var test2 = 10; // Should get compiled
|
|
@ -1,12 +0,0 @@
|
|||
SameNameDTsSpecifiedWithAllowJs/tsconfig.json(2,24): error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
|
||||
|
||||
==== SameNameDTsSpecifiedWithAllowJs/tsconfig.json (1 errors) ====
|
||||
{
|
||||
"compilerOptions": { "allowJs": true },
|
||||
~~~~~~~~~
|
||||
!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
"files": [ "a.d.ts" ]
|
||||
}
|
||||
==== SameNameDTsSpecifiedWithAllowJs/a.d.ts (0 errors) ====
|
||||
declare var test: number;
|
|
@ -1,12 +0,0 @@
|
|||
SameNameDTsSpecifiedWithAllowJs/tsconfig.json(2,24): error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
|
||||
|
||||
==== SameNameDTsSpecifiedWithAllowJs/tsconfig.json (1 errors) ====
|
||||
{
|
||||
"compilerOptions": { "allowJs": true },
|
||||
~~~~~~~~~
|
||||
!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
"files": [ "a.d.ts" ]
|
||||
}
|
||||
==== SameNameDTsSpecifiedWithAllowJs/a.d.ts (0 errors) ====
|
||||
declare var test: number;
|
|
@ -1,9 +0,0 @@
|
|||
SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json(1,24): error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
|
||||
|
||||
==== SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json (1 errors) ====
|
||||
{ "compilerOptions": { "allowJs": true } }
|
||||
~~~~~~~~~
|
||||
!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
==== SameNameFilesNotSpecifiedWithAllowJs/a.ts (0 errors) ====
|
||||
var test = 10;
|
|
@ -1,9 +0,0 @@
|
|||
SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json(1,24): error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
|
||||
|
||||
==== SameNameFilesNotSpecifiedWithAllowJs/tsconfig.json (1 errors) ====
|
||||
{ "compilerOptions": { "allowJs": true } }
|
||||
~~~~~~~~~
|
||||
!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
==== SameNameFilesNotSpecifiedWithAllowJs/a.ts (0 errors) ====
|
||||
var test = 10;
|
|
@ -1,12 +0,0 @@
|
|||
SameNameTsSpecifiedWithAllowJs/tsconfig.json(2,24): error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
|
||||
|
||||
==== SameNameTsSpecifiedWithAllowJs/tsconfig.json (1 errors) ====
|
||||
{
|
||||
"compilerOptions": { "allowJs": true },
|
||||
~~~~~~~~~
|
||||
!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
"files": [ "a.ts" ]
|
||||
}
|
||||
==== SameNameTsSpecifiedWithAllowJs/a.ts (0 errors) ====
|
||||
var test = 10;
|
|
@ -1,12 +0,0 @@
|
|||
SameNameTsSpecifiedWithAllowJs/tsconfig.json(2,24): error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
|
||||
|
||||
==== SameNameTsSpecifiedWithAllowJs/tsconfig.json (1 errors) ====
|
||||
{
|
||||
"compilerOptions": { "allowJs": true },
|
||||
~~~~~~~~~
|
||||
!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
"files": [ "a.ts" ]
|
||||
}
|
||||
==== SameNameTsSpecifiedWithAllowJs/a.ts (0 errors) ====
|
||||
var test = 10;
|
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue