Add test for new Symbol()
This commit is contained in:
parent
92617f5978
commit
fbeadbcbd3
7
tests/baselines/reference/symbolType14.errors.txt
Normal file
7
tests/baselines/reference/symbolType14.errors.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
tests/cases/conformance/es6/Symbols/symbolType14.ts(1,1): error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/Symbols/symbolType14.ts (1 errors) ====
|
||||
new Symbol();
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2350: Only a void function can be called with the 'new' keyword.
|
5
tests/baselines/reference/symbolType14.js
Normal file
5
tests/baselines/reference/symbolType14.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
//// [symbolType14.ts]
|
||||
new Symbol();
|
||||
|
||||
//// [symbolType14.js]
|
||||
new Symbol();
|
2
tests/cases/conformance/es6/Symbols/symbolType14.ts
Normal file
2
tests/cases/conformance/es6/Symbols/symbolType14.ts
Normal file
|
@ -0,0 +1,2 @@
|
|||
//@target: ES6
|
||||
new Symbol();
|
Loading…
Reference in a new issue