1
+ /// <reference path='fourslash.ts' />
2
+
3
+ // @allowjs : true
4
+
5
+ // @Filename : test.js
6
+ ////interface Symbol {
7
+ //// /** Returns a string representation of an object. */
8
+ //// toString(): string;
9
+
10
+ //// /** Returns the primitive value of the specified object. */
11
+ //// valueOf(): Object;
12
+ //// }
13
+
14
+ ////interface SymbolConstructor {
15
+ //// /**
16
+ //// * A reference to the prototype.
17
+ //// */
18
+ //// readonly prototype: Symbol;
19
+
20
+ //// /**
21
+ //// * Returns a new unique Symbol value.
22
+ //// * @param description Description of the new Symbol object.
23
+ //// */
24
+ //// (description?: string | number): symbol;
25
+
26
+ //// /**
27
+ //// * Returns a Symbol object from the global symbol registry matching the given key if found.
28
+ //// * Otherwise, returns a new symbol with this key.
29
+ //// * @param key key to search for.
30
+ //// */
31
+ //// for(key: string): symbol;
32
+
33
+ //// /**
34
+ //// * Returns a key from the global symbol registry matching the given Symbol if found.
35
+ //// * Otherwise, returns a undefined.
36
+ //// * @param sym Symbol to find the key for.
37
+ //// */
38
+ //// keyFor(sym: symbol): string | undefined;
39
+ //// }
40
+
41
+ ////declare var Symbol: SymbolConstructor;/// <reference path="lib.es2015.symbol.d.ts" />
42
+
43
+ ////interface SymbolConstructor {
44
+ //// /**
45
+ //// * A method that determines if a constructor object recognizes an object as one of the
46
+ //// * constructor’s instances. Called by the semantics of the instanceof operator.
47
+ //// */
48
+ //// readonly hasInstance: symbol;
49
+ //// }
50
+
51
+ ////interface Function {
52
+ //// /**
53
+ //// * Determines whether the given value inherits from this function if this function was used
54
+ //// * as a constructor function.
55
+ //// *
56
+ //// * A constructor function can control which objects are recognized as its instances by
57
+ //// * 'instanceof' by overriding this method.
58
+ //// */
59
+ //// [Symbol.hasInstance](value: any): boolean;
60
+ //// }
61
+
62
+ ////interface SomeInterface {
63
+ //// (value: number): any;
64
+ //// }
65
+
66
+ ////var _ : SomeInterface;
67
+ ////_./**/
68
+
69
+ goTo . marker ( ) ;
70
+
71
+ verify . not . completionListContains ( "[Symbol.hasInstance]" ) ;
0 commit comments