mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Add test for new Symbol()
This commit is contained in:
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();
|
||||
Reference in New Issue
Block a user