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
Updated Typescript definitions and included in package #258
Conversation
It seems that DefinitelyTyped/DefinitelyTyped#12845 kinda died on the vine. So, I took the .d.ts file from that PR, tweaked it a little bit by: * adding an overload to "create" (makes intellisense a bit happier in the default case) * changing the parameter type for "css" to model after the Flow type (instead of just "any") Since you can just include a .d.ts file in your package.json and Typescript will pick it up, I figured that would be the lowest friction distribution method, if you're cool with that.
Hey @upta, Thanks for the PR! Mind signing our Contributor License Agreement? When you've done so, go ahead and comment Yours truly, |
[clabot:check] |
CLA signature looks good 👍 |
Hi @upta , I've tried your declaration file, but it doesn't work for |
I'll take a look at it. I never tried it with the no-import since it mostly wasn't my file to start with, just tweaked a few things and added it to the package.json :) |
@abruzzihraig I updated the PR, no-important was working for me, let me know if it behaves better for you now. Thanks! |
@upta thanks bro, it works fine! |
Any plans to merge this PR? |
// Project: https://github.com/Khan/aphrodite | ||
|
||
declare module "aphrodite" { | ||
import * as React from "react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been using TypeScript & Aphrodite for a side project, and had to use my own copy because I'm using Aphrodite but not react -- can you remove this, since Aphrodite doesn't have a dependency on React? As an initial pass, it should be fine to just replace React.CSSProperties
with any
.
@upta Let me know if you'd still like to merge this and get credit, otherwise I'm happy to take this over and get it landed |
I get the following error when I'm trying to using
Is this pull request fixing it as well? |
@jlfwong Hey, sorry, I totally forgot you had pinged me until today's notification came in ;) Feel free to take over, I was just experimenting with aphrodite at the time and figured I'd see if I could help out |
Replaces Khan#258 since the contributor has asked for someone else to take over. * Provides intellisense for propteries in StyleSheet.Create * Provides type safety for fonts * updated to include new minify function and StyleSheetTestUtils.getBufferedStyles * Removed dependency on React.CSSProperties typings by pulling in typings from glamorous, and editing to match Aphrodite.
Replaces Khan#258 since the contributor has asked for someone else to take over. * Provides intellisense for propteries in StyleSheet.Create * Provides type safety for fonts * updated to include new minify function and StyleSheetTestUtils.getBufferedStyles * Removed dependency on React.CSSProperties typings by pulling in typings from glamorous, and editing to match Aphrodite.
I believe this has been accomplished by #302 |
It seems that DefinitelyTyped/DefinitelyTyped#12845 kinda died on the vine.
So, I took the .d.ts file from that PR, tweaked it a little bit by:
Since you can just include a .d.ts file in your package.json and Typescript will pick it up, I figured that would be the lowest friction distribution method, if you're cool with that.