File: declarationEmitPrivatePromiseLikeInterface.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 (42 lines) | stat: -rw-r--r-- 2,404 bytes parent folder | download | duplicates (3)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
tests/cases/compiler/Api.ts(6,5): error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.
tests/cases/compiler/Api.ts(7,5): error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.
tests/cases/compiler/Api.ts(8,5): error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.


==== tests/cases/compiler/http-client.ts (0 errors) ====
    type TPromise<ResolveType, RejectType = any> = Omit<Promise<ResolveType>, "then" | "catch"> & {
        then<TResult1 = ResolveType, TResult2 = never>(
            onfulfilled?: ((value: ResolveType) => TResult1 | PromiseLike<TResult1>) | undefined | null,
            onrejected?: ((reason: RejectType) => TResult2 | PromiseLike<TResult2>) | undefined | null,
        ): TPromise<TResult1 | TResult2, RejectType>;
        catch<TResult = never>(
            onrejected?: ((reason: RejectType) => TResult | PromiseLike<TResult>) | undefined | null,
        ): TPromise<ResolveType | TResult, RejectType>;
    };
    
    export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
        data: D;
        error: E;
    }
    
    export class HttpClient<SecurityDataType = unknown> {
        public request = <T = any, E = any>(): TPromise<HttpResponse<T, E>> => {
            return '' as any;
        };
    }
==== tests/cases/compiler/Api.ts (3 errors) ====
    import { HttpClient } from "./http-client";
    
    export class Api<SecurityDataType = unknown> {
        constructor(private http: HttpClient<SecurityDataType>) { }
    
        abc1 = () => this.http.request();
        ~~~~
!!! error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.
        abc2 = () => this.http.request();
        ~~~~
!!! error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.
        abc3 = () => this.http.request();
        ~~~~
!!! error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.
    }