Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add typescript typings #37

Closed

Conversation

marvinhagemeister
Copy link

@marvinhagemeister marvinhagemeister commented Jun 28, 2017

This PR adds typing so that the styled function will type-check when using typescript.

Still marked as wip because somehow the template tags are not recognized yet

Fixes #40

@codecov-io
Copy link

codecov-io commented Jun 28, 2017

Codecov Report

Merging #37 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #37   +/-   ##
=======================================
  Coverage   87.54%   87.54%           
=======================================
  Files          15       15           
  Lines         530      530           
  Branches      107      107           
=======================================
  Hits          464      464           
  Misses         53       53           
  Partials       13       13
Impacted Files Coverage Δ
src/styled.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69a4f59...cd0dd62. Read the comment docs.

@marvinhagemeister marvinhagemeister changed the title Add typescript typings WIP: Add typescript typings Jun 28, 2017
styled.d.ts Outdated
declare module "emotion/styled" {
import { Component } from "react";

export type Styler = (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may need a name change. I plan on adding a Style component in the future and this might get confusing. If this is how styled-components looks though then I say leave it.

@tkh44
Copy link
Member

tkh44 commented Jun 28, 2017

I'm not really familiar with typescript so I'm going to have to rely on external reviewers on this. I trust you, @patrick91, and others can work together on this 👍

@A-gambit
Copy link

A-gambit commented Sep 8, 2017

@marvinhagemeister Hey can you update your pull with the latest version of emotion?

@tkh44
Copy link
Member

tkh44 commented Oct 10, 2017

I'm going to close this for #379

@tkh44 tkh44 closed this Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants