Proposal: support tsconfig "compilerOptions.types"
Closed this issue ยท 2 comments
ewgenius commented
@ArthurStam thanks for great twa libraries, good job ๐
Just a small proposal - what do you think about switching from index.ts
to index.d.ts
and providing global namespace augmentation out of the box?
With that changes it would be possible to add twa types with just tsconfig setting compilerOptions.types
:
ArthurStam commented
@ewgenius I think that maybe it's not a good idea to pollute global namespace in this package. We have publish another package: https://github.com/twa-dev/sdk, check it out:
import WebApp from '@twa-dev/sdk';
WebApp.showAlert('Hey there!');
It allows you to work with SDK and don't think about window
at all.
ewgenius commented
That makes sense, thanks!