Closed hpk42 closed 12 months ago
I use typescrypt in some projects, it is more a situational thing depending in the project I am porting to webxdc, and sometimes if it from scratch and appropriate I also like to use typescrypt because it makes development easier for a non-advanced web developer like me (type checking/linting to avoid messing up and easy import of CSS, vite makes it quite easy to build typescrypt without any configuration)
would love to see this project as main source for types so copying the webxdc.d.ts file in every project can be avoided
I agree, the file must be easily accessible with package managers. It's similar to webxdc.js
in webxdc/hello.
I do use TS, and when I don't, then I use JSDoc.
all tasks are done, webxdc-types are available and linked from current webxdc-docs and the inlined copy of types is removed.
There are two typescript sources for webxdc:
https://webxdc.org/tips_and_tricks.html#get-the-typescript-definitions has doc strings, and also contains sendToChat etc.
https://github.com/webxdc/webxdc-types/blob/main/src/webxdc.ts is from last year, not documented
People who use typescript probably also use npm most of the time and in any case, it's better to have the single authoritative place in our webxdc-types repo, and point to it from the webxdc-docs, instead of inlining it into the repo. As i am not myself much into typescript i'd prefer if @Simon-Laux or @Septias (both of which are TS users/likers) could do a PR. (others like @ralphtheninja and @ansuz or @r10s or @webratte are not using typescript asfaik, not sure about @adbenitez and @WofWca ). Tasks:
tips_and_tricks.md
CC @faassen