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
|
//// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] ////
//// [index.d.ts]
interface Statics {
"$$whatever": string;
}
declare namespace hoistNonReactStatics {
type NonReactStatics<T> = {[X in Exclude<keyof T, keyof Statics>]: T[X]}
}
export = hoistNonReactStatics;
//// [index.d.ts]
import * as hoistNonReactStatics from "hoist-non-react-statics";
export interface DefaultTheme {}
export type StyledComponent<TTag extends string, TTheme = DefaultTheme, TStyle = {}, TWhatever = never> =
string
& StyledComponentBase<TTag, TTheme, TStyle, TWhatever>
& hoistNonReactStatics.NonReactStatics<TTag>;
export interface StyledComponentBase<TTag extends string, TTheme = DefaultTheme, TStyle = {}, TWhatever = never> {
tag: TTag;
theme: TTheme;
style: TStyle;
whatever: TWhatever;
}
export interface StyledInterface {
div: (a: TemplateStringsArray) => StyledComponent<"div">;
}
declare const styled: StyledInterface;
export default styled;
//// [index.ts]
import styled from "styled-components";
const A = styled.div``;
const B = styled.div``;
export const C = styled.div``;
export default Object.assign(A, {
B,
C
});
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.C = void 0;
const styled_components_1 = require("styled-components");
const A = styled_components_1.default.div ``;
const B = styled_components_1.default.div ``;
exports.C = styled_components_1.default.div ``;
exports.default = Object.assign(A, {
B,
C: exports.C
});
|