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

feat: TypeScript definitions #80

Merged
merged 1 commit into from
May 13, 2018
Merged

Conversation

theKashey
Copy link
Collaborator

@theKashey theKashey commented May 13, 2018

Adding types for TypeScript. implements #79
dtslint is not properly working for the case of '/server' so I had to use a bit "old" syntax for declaration.

Not adding typecheck:ts into CI, as long typechecking is failing.

dtslint was just created for DefinitelyTyped and few things are bound to DefinitelyTyped.
It asks you to use "new" syntax, dont use "declare modules" and mark all the exports as "exports". Meanwhile in this case tests could not see '/server' and there is no way to use "new" syntax.

For the old syntax it asks not to use exports at all, as result - nothing will work. 💩

So type-checking is red, type-testing is green. And type-testing is the only thing the customers needs.

<App prop1={"1"} prop2={2}/>
);

getLoadableState(app).then(() => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the only thing, which matters.

@codecov
Copy link

codecov bot commented May 13, 2018

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #80   +/-   ##
=======================================
  Coverage   88.83%   88.83%           
=======================================
  Files          15       15           
  Lines         197      197           
  Branches       53       53           
=======================================
  Hits          175      175           
  Misses         20       20           
  Partials        2        2

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 9ea86f3...20dbddc. Read the comment docs.

@gregberge
Copy link
Owner

Thank you very much for that!

@gregberge gregberge merged commit db19796 into gregberge:master May 13, 2018
@gregberge gregberge mentioned this pull request May 13, 2018
@jbadeau
Copy link

jbadeau commented Nov 8, 2018

Any timeline when this PR will be published?

@theKashey
Copy link
Collaborator Author

@jbadeau - it was published.

@gregberge
Copy link
Owner

@jbadeau types are no longer maintained into this repository, please use https://github.com/DefinitelyTyped/DefinitelyTyped instead.

@m4r00p
Copy link

m4r00p commented Dec 19, 2018

Would be also nice to publish some example with TypeScript server-side rendering.

@allen-munsch
Copy link

For anyone else looking for how to install the types, @types/@loadable/components to save you some digging its:

npm install @types/loadable__component

@nandorojo
Copy link

And for yarn, yarn add -D @types/loadable__component 😊

@cbdeveloper
Copy link

cbdeveloper commented Mar 12, 2021

For anyone else looking for how to install the types, @types/@loadable/components to save you some digging its:

npm install @types/loadable__component

This should be in the docs README.md. Just had to dig deep in order to find it.

I mean, those @types are still being used, right?

@theKashey theKashey deleted the typedef branch March 13, 2021 07:36
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.

7 participants