File: typeParameterConstraints1.errors.txt

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (19 lines) | stat: -rw-r--r-- 906 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
tests/cases/compiler/typeParameterConstraints1.ts(6,25): error TS2304: Cannot find name 'hm'.


==== tests/cases/compiler/typeParameterConstraints1.ts (1 errors) ====
    function foo1<T extends any>(test: T) { }
    function foo2<T extends number>(test: T) { }
    function foo3<T extends string>(test: T) { }
    function foo4<T extends Date>(test: T) { } // valid
    function foo5<T extends RegExp>(test: T) { } // valid
    function foo6<T extends hm>(test: T) { }
                            ~~
!!! error TS2304: Cannot find name 'hm'.
    function foo7<T extends Object>(test: T) { } // valid
    function foo8<T extends "">(test: T) { }
    function foo9<T extends 1 > (test: T) { }
    function foo10<T extends (1)> (test: T) { }
    function foo11<T extends null> (test: T) { }
    function foo12<T extends undefined>(test: T) { }
    function foo13<T extends void>(test: T) { }