-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,486 changed files
with
5,132 additions
and
998 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
//// [class.d.ts] | ||
//// [test.ts] | ||
A.Point.Origin, new A.Point(0, 0); | ||
// unexpected error here, bug 840000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...eferences/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/swc/tests/tsc-references/ES5For-ofTypeCheck10.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/InvalidNonInstantiatedModule.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
//// [InvalidNonInstantiatedModule.ts] | ||
M; | ||
M; // Error, not instantiated can not be used as var | ||
// Error only a namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/accessorsAreNotContextuallyTyped.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
//// [accessorsAreNotContextuallyTyped.ts] | ||
// accessors are not contextually typed | ||
var c; | ||
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; | ||
import { _ as _create_class } from "@swc/helpers/_/_create_class"; | ||
c.x(""); | ||
c.x(""); // string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/swc/tests/tsc-references/additionOperatorWithConstrainedTypeParameter.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
//// [additionOperatorWithConstrainedTypeParameter.ts] | ||
// test for #17069 |
1 change: 1 addition & 0 deletions
1
...es/swc/tests/tsc-references/additionOperatorWithNullValueAndInvalidOperator.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
//// [additionOperatorWithNullValueAndInvalidOperator.ts] | ||
// If one operand is the null or undefined value, it is treated as having the type of the other operand. |
1 change: 1 addition & 0 deletions
1
crates/swc/tests/tsc-references/additionOperatorWithNullValueAndValidOperator.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//// [additionOperatorWithNullValueAndValidOperator.ts] | ||
// If one operand is the null or undefined value, it is treated as having the type of the other operand. | ||
var E, E1; | ||
(E1 = E || (E = {}))[E1.a = 0] = "a", E1[E1.b = 1] = "b", E1[E1.c = 2] = "c", E.a, E.a, E.a, E.a; |
1 change: 1 addition & 0 deletions
1
.../swc/tests/tsc-references/additionOperatorWithOnlyNullValueOrUndefinedValue.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
//// [additionOperatorWithOnlyNullValueOrUndefinedValue.ts] | ||
// bug 819721 |
1 change: 1 addition & 0 deletions
1
crates/swc/tests/tsc-references/additionOperatorWithTypeParameter.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//// [additionOperatorWithTypeParameter.ts] | ||
// type parameter type is not a valid operand of addition operator | ||
var E, E1; | ||
(E1 = E || (E = {}))[E1.a = 0] = "a", E1[E1.b = 1] = "b"; |
1 change: 1 addition & 0 deletions
1
...c/tests/tsc-references/additionOperatorWithUndefinedValueAndInvalidOperands.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
//// [additionOperatorWithUndefinedValueAndInvalidOperands.ts] | ||
// If one operand is the null or undefined value, it is treated as having the type of the other operand. |
1 change: 1 addition & 0 deletions
1
...swc/tests/tsc-references/additionOperatorWithUndefinedValueAndValidOperator.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//// [additionOperatorWithUndefinedValueAndValidOperator.ts] | ||
// If one operand is the null or undefined value, it is treated as having the type of the other operand. | ||
var E, E1; | ||
(E1 = E || (E = {}))[E1.a = 0] = "a", E1[E1.b = 1] = "b", E1[E1.c = 2] = "c", E.a, E.a, E.a, E.a; |
1 change: 1 addition & 0 deletions
1
crates/swc/tests/tsc-references/ambientAccessors(target=es5).2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
//// [ambientAccessors.ts] | ||
// ok to use accessors in ambient class in ES3 |
6 changes: 5 additions & 1 deletion
6
crates/swc/tests/tsc-references/ambientDeclarations.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
//// [ambientDeclarations.ts] | ||
var E1, E2, E3, E11, E21, E31; | ||
// Ambient variable without type annotation | ||
var // Ambient enum | ||
E1, // Ambient enum with integer literal initializer | ||
E2, // Ambient enum members are always exported with or without export keyword | ||
E3, E11, E21, E31; | ||
(E11 = E1 || (E1 = {}))[E11.x = 0] = "x", E11[E11.y = 1] = "y", E11[E11.z = 2] = "z", (E21 = E2 || (E2 = {}))[E21.q = 0] = "q", E21[E21.a = 1] = "a", E21[E21.b = 2] = "b", E21[E21.c = 2] = "c", E21[E21.d = 3] = "d", (E31 = E3 || (E3 = {}))[E31.A = 0] = "A", E3.B, M1.x, M1.fn(); |
2 changes: 2 additions & 0 deletions
2
crates/swc/tests/tsc-references/ambientDeclarationsExternal.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
crates/swc/tests/tsc-references/ambientDeclarationsPatterns.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
//// [declarations.d.ts] | ||
//// [user.ts] | ||
///<reference path="declarations.d.ts" /> | ||
import { foo, baz } from "foobarbaz"; | ||
foo(baz); | ||
import { foos } from "foosball"; | ||
foo(foos); | ||
// Works with relative file name | ||
import fileText from "./file!text"; | ||
foo(fileText); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
export { }; | ||
//// [testB.ts] | ||
export { }; | ||
// Error |
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/ambientDeclarationsPatterns_merging3.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
//// [types.ts] | ||
//// [test.ts] | ||
ohno.a; | ||
ohno.a // oh no | ||
; | ||
export { }; |
1 change: 1 addition & 0 deletions
1
crates/swc/tests/tsc-references/ambientEnumDeclaration1.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//// [ambientEnumDeclaration1.ts] | ||
// In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. | ||
var E, E1; | ||
(E1 = E || (E = {}))[E1.a = 10] = "a", E1[E1.b = 11] = "b", E1[E1.c = 11] = "c", E1[E1.d = 12] = "d", E1[E1.e = 655360] = "e"; |
2 changes: 2 additions & 0 deletions
2
crates/swc/tests/tsc-references/ambientEnumDeclaration2.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
//// [ambientEnumDeclaration2.ts] | ||
// In ambient enum declarations that specify no const modifier, enum member declarations | ||
// that omit a value are considered computed members (as opposed to having auto- incremented values assigned). | ||
var E, E1, E2, E11; | ||
(E2 = E || (E = {}))[E2.a = 0] = "a", E2[E2.b = 1] = "b", (E11 = E1 || (E1 = {}))[E11.a = 0] = "a", E11[E11.b = 1] = "b"; |
2 changes: 2 additions & 0 deletions
2
crates/swc/tests/tsc-references/ambientShorthand_duplicate.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
//// [declarations1.d.ts] | ||
//// [declarations2.d.ts] | ||
//// [user.ts] | ||
///<reference path="declarations1.d.ts" /> | ||
///<reference path="declarations1.d.ts" /> | ||
export { }; |
2 changes: 2 additions & 0 deletions
2
crates/swc/tests/tsc-references/ambientShorthand_merging.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
//// [declarations1.d.ts] | ||
//// [declarations2.d.ts] | ||
//// [user.ts] | ||
///<reference path="declarations1.d.ts" /> | ||
///<reference path="declarations1.d.ts" /> | ||
export { }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
crates/swc/tests/tsc-references/annotatedThisPropertyInitializerDoesntNarrow.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
crates/swc/tests/tsc-references/anyAsConstructor.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
//// [anyAsConstructor.ts] | ||
// any is considered an untyped function call | ||
// can be called except with type arguments which is an error | ||
var x; | ||
new x(), new x("hello"), new x(x), new x(x); | ||
// no error |
2 changes: 2 additions & 0 deletions
2
crates/swc/tests/tsc-references/anyAsFunctionCall.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
//// [anyAsFunctionCall.ts] | ||
// any is considered an untyped function call | ||
// can be called except with type arguments which is an error | ||
var x; | ||
x(), x("hello"), x(x); |
2 changes: 2 additions & 0 deletions
2
crates/swc/tests/tsc-references/anyAsGenericFunctionCall.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
//// [anyAsGenericFunctionCall.ts] | ||
// any is considered an untyped function call | ||
// can be called except with type arguments which is an error | ||
var x; | ||
import "@swc/helpers/_/_class_call_check"; | ||
x(), x("hello"), x(x), x(x); |
2 changes: 2 additions & 0 deletions
2
crates/swc/tests/tsc-references/anyAssignabilityInInheritance.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
//// [anyAssignabilityInInheritance.ts] | ||
// any is not a subtype of any other types, errors expected on all the below derived classes unless otherwise noted | ||
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; | ||
function f() {} | ||
foo2(a), foo3(a), foo3(a), foo3(a), foo3(a), foo3(a), foo3(a), foo3(a), foo3(a), foo3(a), foo3(a), foo3(a), (E = E1 || (E1 = {}))[E.A = 0] = "A", foo3(a), (f || (f = {})).bar = 1, foo3(a); | ||
var E, a, E1, CC = function CC() { | ||
_class_call_check(this, CC); | ||
}; | ||
(CC || (CC = {})).bar = 1, foo3(a), foo3(a), foo3(a); | ||
// any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/swc/tests/tsc-references/anyAssignableToEveryType2.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
crates/swc/tests/tsc-references/apparentTypeSubtyping.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
//// [apparentTypeSubtyping.ts] | ||
// subtype checks use the apparent type of the target type | ||
// S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: | ||
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; | ||
import { _ as _inherits } from "@swc/helpers/_/_inherits"; | ||
import { _ as _create_super } from "@swc/helpers/_/_create_super"; |
2 changes: 2 additions & 0 deletions
2
crates/swc/tests/tsc-references/apparentTypeSupertype.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
//// [apparentTypeSupertype.ts] | ||
// subtype checks use the apparent type of the target type | ||
// S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: | ||
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check"; | ||
import { _ as _inherits } from "@swc/helpers/_/_inherits"; | ||
import { _ as _create_super } from "@swc/helpers/_/_create_super"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/swc/tests/tsc-references/arithmeticOperatorWithEnum.2.minified.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
crates/swc/tests/tsc-references/arithmeticOperatorWithEnumUnion.2.minified.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
crates/swc/tests/tsc-references/arithmeticOperatorWithInvalidOperands.2.minified.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
crates/swc/tests/tsc-references/arithmeticOperatorWithTypeParameter.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
//// [arithmeticOperatorWithTypeParameter.ts] | ||
// type parameter type is not valid for arithmetic operand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
//// [arrayLiteral.ts] | ||
// valid uses of array literals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/swc/tests/tsc-references/arrayLiteralInference.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.