File: intrinsics.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (26 lines) | stat: -rw-r--r-- 1,188 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
tests/cases/compiler/intrinsics.ts(1,21): error TS2749: 'hasOwnProperty' refers to a value, but is being used as a type here. Did you mean 'typeof hasOwnProperty'?
tests/cases/compiler/intrinsics.ts(1,21): error TS4025: Exported variable 'hasOwnProperty' has or is using private name 'hasOwnProperty'.
tests/cases/compiler/intrinsics.ts(10,1): error TS2304: Cannot find name '__proto__'.


==== tests/cases/compiler/intrinsics.ts (3 errors) ====
    var hasOwnProperty: hasOwnProperty; // Error
                        ~~~~~~~~~~~~~~
!!! error TS2749: 'hasOwnProperty' refers to a value, but is being used as a type here. Did you mean 'typeof hasOwnProperty'?
                        ~~~~~~~~~~~~~~
!!! error TS4025: Exported variable 'hasOwnProperty' has or is using private name 'hasOwnProperty'.
    
    module m1 {
        export var __proto__;
        interface __proto__ {}
    
        class C<T extends { __proto__: __proto__ }> { }
    }
    
    __proto__ = 0; // Error, __proto__ not defined
    ~~~~~~~~~
!!! error TS2304: Cannot find name '__proto__'.
    m1.__proto__ = 0;
    
    class Foo<__proto__> { }
    var foo: (__proto__: number) => void;