File: aliasDoesNotDuplicateSignatures.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 (21 lines) | stat: -rw-r--r-- 807 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
tests/cases/compiler/user.ts(3,5): error TS2322: Type '() => void' is not assignable to type 'string'.
tests/cases/compiler/user.ts(4,5): error TS2322: Type '() => void' is not assignable to type 'string'.


==== tests/cases/compiler/demo.d.ts (0 errors) ====
    declare namespace demoNS {
        function f(): void;
    }
    declare module 'demoModule' {
        import alias = demoNS;
        export = alias;
    }
==== tests/cases/compiler/user.ts (2 errors) ====
    import { f } from 'demoModule';
    // Assign an incorrect type here to see the type of 'f'.
    let x1: string = demoNS.f;
        ~~
!!! error TS2322: Type '() => void' is not assignable to type 'string'.
    let x2: string = f;
        ~~
!!! error TS2322: Type '() => void' is not assignable to type 'string'.