promiseAllKeyed.ts(50,18): error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'.
promiseAllKeyed.ts(52,25): error TS2345: Argument of type 'string' is not assignable to parameter of type 'object'.
promiseAllKeyed.ts(54,18): error TS2345: Argument of type 'null' is not assignable to parameter of type 'object'.
promiseAllKeyed.ts(56,25): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object'.


==== promiseAllKeyed.ts (4 errors) ====
    declare const key: unique symbol;
    
    const values = {
        a: 1 as number,
        b: Promise.resolve("value"),
        c: { then(resolve: (value: boolean) => void) { resolve(true); } },
        [key]: Promise.resolve(42),
    } as const;
    
    async function testAllKeyed() {
        const result = await Promise.allKeyed(values);
        const a: number = result.a;
        const b: string = result.b;
        const c: boolean = result.c;
        const d: number = result[key];
    
        result.a = 2;
    }
    
    async function testAllSettledKeyed() {
        const result = await Promise.allSettledKeyed(values);
    
        if (result.b.status === "fulfilled") {
            const value: string = result.b.value;
        }
        else {
            const reason: any = result.b.reason;
        }
    
        if (result[key].status === "fulfilled") {
            const value: number = result[key].value;
        }
    }
    
    interface Input {
        a: Promise<number>;
        b: string;
    }
    
    declare const input: Input;
    
    const allResult: Promise<{ a: number; b: string; }> = Promise.allKeyed(input);
    const allSettledResult: Promise<{
        a: PromiseSettledResult<number>;
        b: PromiseSettledResult<string>;
    }> = Promise.allSettledKeyed(input);
    
    Promise.try(() => 1);
    
    Promise.allKeyed(0);
                     ~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'.
    
    Promise.allSettledKeyed("value");
                            ~~~~~~~
!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'object'.
    
    Promise.allKeyed(null);
                     ~~~~
!!! error TS2345: Argument of type 'null' is not assignable to parameter of type 'object'.
    
    Promise.allSettledKeyed(undefined);
                            ~~~~~~~~~
!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object'.
    