Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Conversation

@Ermakoy
Copy link
Contributor

@Ermakoy Ermakoy commented Jan 2, 2019

closes #79

@gregberge
Copy link
Member

Awesome! Thanks! Nothing to add in package.json?

@theKashey, could you give a look if types look right for you? I prefer to have a second look and I am not very good in TypeScript 🙏

@theKashey
Copy link
Contributor

This is HUGE!
d.ts is looking good, but it is not used anywhere, especially in -sc,-em packages.

@Ermakoy
Copy link
Contributor Author

Ermakoy commented Jan 4, 2019

@theKashey
I have lookup for other libraries with external TS typings (like postcss) and they somehow get their d.ts file shipped with other package files.

We can add "types": "dist/index.d.ts" into -em and -sc package.json and include definition file in rollup build phase

Will try to do this in minimal painful way

@gregberge
Copy link
Member

@Ermakoy are you still working on it?

@Ermakoy
Copy link
Contributor Author

Ermakoy commented Jan 4, 2019

@neoziro
Yep. I have solution, but have not committed it yet

@Ermakoy
Copy link
Contributor Author

Ermakoy commented Jan 4, 2019

@neoziro
Came up with this ^

@theKashey
Copy link
Contributor

they somehow get their d.ts file shipped with other package files.

d.ts resolution is separated from "normal" resolution. You may place index.d.ts in the rootDir, you may place server.d.ts to handle mypackage/server, even if "the real file" would be mypackage/server/index.js. And you always could use types field in the package.json.

DefinitelyTyped recommends storing your types in /types dir, but... that's quite strange rule. If your project is written in TS - your types would be stored next to your js files, thus dist is a good location.

@Ermakoy
Copy link
Contributor Author

Ermakoy commented Jan 5, 2019

@theKashey
fixed core-sc package.json

@Ermakoy
Copy link
Contributor Author

Ermakoy commented Jan 6, 2019

@neoziro @theKashey
Any updates?

@theKashey
Copy link
Contributor

Looking good for me. The change is too big to verify every single line, but - I am good to go 👍

@gregberge
Copy link
Member

Thanks for the review and thanks for you work! I will merge it and publish it!

@gregberge gregberge merged commit ab8c033 into smooth-code:master Jan 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeScript definitions

3 participants