correctOrderOfPromiseMethod.ts(29,56): error TS2352: Conversion of type 'undefined' to type 'readonly ["a", "b", "c"]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.


==== correctOrderOfPromiseMethod.ts (1 errors) ====
    interface A {
        id: string
    }
    
    interface B {
        id: string
        fieldB: string
    }
    
    async function countEverything(): Promise<number> {
        const providerA = async (): Promise<A[]> => { return [] }
        const providerB = async (): Promise<B[]> => { return [] }
    
        const [resultA, resultB] = await Promise.all([
            providerA(),
            providerB(),
        ]);
    
        const dataA: A[] = resultA;
        const dataB: B[] = resultB;
        if (dataA && dataB) {
            return dataA.length + dataB.length;
        }
        return 0;
    }
    
    // #31179
    
    const expected: Promise<["a", "b", "c"]> = Promise.all(undefined as readonly ["a", "b", "c"]);
                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2352: Conversion of type 'undefined' to type 'readonly ["a", "b", "c"]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
    