Skip to content
This repository was archived by the owner on May 8, 2023. It is now read-only.

Conversation

@kamikazebr
Copy link

@kamikazebr kamikazebr commented Sep 16, 2022

Description

Start the TS migration for the lit js sdk.

Look for that kind @ts-expect-error in the code to check what is ignore for ts build and may need fix the typings. See example below: In that case i choose for now just ignore.

image

What was done

  • Using ts-migrate to automate.
  • Created types folder with modules.d.ts and types.d.ts for organizing the new types informations (may you want put the types in different folders os structure)
  • Added one tsconfig.json and typescript package
  • Bumped the Version to 2.0.0

How test

Just run npx tsc and will get the types.


What need to be done

  • Configure output dir for the types and bundle for distribuition.
  • Finising check onto @ts-expect-error

Considerations

I hope that could help others people want use that with Typescript and inspire more people help to convert that.

Comment on lines +1 to +24
{
"mainEntryPointFilePath": "<projectFolder>/dist/dts/index.d.ts",
"apiReport": {
"enabled": false
},
"docModel": {
"enabled": false
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "<projectFolder>/dist/types/index.d.ts"
},
"messages": {
"extractorMessageReporting": {
"default": {
"logLevel": "none"
},
"ae-forgotten-export": {
"logLevel": "none"
}
}
}
}

No newline at end of file
Copy link
Author

Choose a reason for hiding this comment

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

Not used yet, but could if want compress all types in one file for example.

Copy link
Author

Choose a reason for hiding this comment

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

That could be removed for now.

@glitch003
Copy link
Contributor

Hey, thanks for sharing this. We're working on a TS migration that also refactors most of the SDK into smaller packages, with other improvements too. It should be out in a few weeks.

Unfortunately since we're already working on it, we can't accept this PR. Really appreciate your work on this though!

@glitch003 glitch003 closed this Sep 19, 2022
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.

2 participants