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
|
//// [tests/cases/compiler/reactTransitiveImportHasValidDeclaration.ts] ////
//// [index.d.ts]
declare namespace React {
export interface DetailedHTMLProps<T, U> {}
export interface HTMLAttributes<T> {}
}
export = React;
export as namespace React;
//// [index.d.ts]
/// <reference types="react" />
declare module 'react' { // augment
interface HTMLAttributes<T> {
css?: unknown;
}
}
export interface StyledOtherComponentList {
"div": React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
}
export interface StyledOtherComponent<A, B, C> {}
//// [index.d.ts]
export * from "./types/react";
//// [index.d.ts]
import {StyledOtherComponent, StyledOtherComponentList} from "create-emotion-styled";
export default function styled(tag: string): (o: object) => StyledOtherComponent<{}, StyledOtherComponentList["div"], any>;
//// [index.ts]
import styled from "react-emotion"
const Form = styled('div')({ color: "red" })
export default Form
//// [index.js]
"use strict";
exports.__esModule = true;
var react_emotion_1 = require("react-emotion");
var Form = react_emotion_1["default"]('div')({ color: "red" });
exports["default"] = Form;
//// [index.d.ts]
/// <reference types="react" />
declare const Form: import("create-emotion-styled").StyledOtherComponent<{}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any>;
export default Form;
|