Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

[WIP] test($typescript): Added test for when generating definition files #121

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions test/glamorous.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import * as React from "react";
import glamorous, { ThemeProvider } from "../";

// Needed if generating definition files
// https://github.com/Microsoft/TypeScript/issues/5938
import * as Unused from "../typings/styled-function"
export { Unused }

// static styles
const Static = glamorous.div({
"fontSize": 20,
Expand Down Expand Up @@ -121,3 +126,6 @@ const StatelessToWrap: React.StatelessComponent<object> = () => (
)

const WrappedStateless = glamorous(StatelessToWrap)({})

// Exported Component (for testing declaration generation)
export const ExportedComponent = glamorous.span({});
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"allowJs": false,
"declaration": true,
"inlineSources": true,
"jsx": "react",
"module": "commonjs",
Expand Down