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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
=== tests/cases/compiler/node_modules/@types/react/index.d.ts ===
export = React;
>React : any
declare namespace React {
export type Component<T = any, U = {}, V = {}> = { x: T, y: U, z: V };
>Component : Component<T, U, V>
>x : T
>y : U
>z : V
export interface DOMAttributes<T> { }
}
=== tests/cases/compiler/node_modules/@emotion/core/index.d.ts ===
import {
Component
>Component : any
} from 'react'
export {};
declare module 'react' {
>'react' : error
interface DOMAttributes<T> {
css?: any
>css : any
}
}
=== tests/cases/compiler/src/get-comp.ts ===
import {Component} from 'react';
>Component : any
export function getComp(): Component {
>getComp : () => Component
return {} as any as Component
>{} as any as Component : Component
>{} as any : any
>{} : {}
}
=== tests/cases/compiler/src/inferred-comp-export.ts ===
import { getComp } from "./get-comp";
>getComp : () => import("tests/cases/compiler/node_modules/@types/react/index").Component
// this shouldn't need any triple-slash references - it should have a direct import to `react` and that's it
// This issue (#35343) _only_ reproduces in the test harness when the file in question is in a subfolder
export const obj = {
>obj : { comp: import("tests/cases/compiler/node_modules/@types/react/index").Component; }
>{ comp: getComp()} : { comp: import("tests/cases/compiler/node_modules/@types/react/index").Component; }
comp: getComp()
>comp : import("tests/cases/compiler/node_modules/@types/react/index").Component
>getComp() : import("tests/cases/compiler/node_modules/@types/react/index").Component
>getComp : () => import("tests/cases/compiler/node_modules/@types/react/index").Component
}
=== tests/cases/compiler/src/some-other-file.ts ===
export * from '@emotion/core';
|