Comments (5)
@janne-slamcore Moro! Type definitions would definitely be a nice thing to have. Feel free to give it a go, I can appreciate a PR. I would prefer index.d.ts
approach in order to keep things simple.
from nudged.
@janne-slamcore Thanks for asking. Well, I can see the benefit of declaring the types in JSDoc comment blocks near the actual code. However, that likely implies that we need to migrate all the documentation from the current inhouse-ish Yamdog syntax to JSDoc. While valuable, that is asking quite lot of work, more than I can deal right now.
Of course, you could add the JSDoc without touching the current Yamdog docs. However, it is not preferable for me to need to maintain two kinds of documentation schemes side-by-side in the long term. For a transition period, it is okay, but I think the outcome should be either JSDoc-only or Yamdog-only.
Personally, I am not a big fan of JSDoc for its limitations in documenting complex nested structures and for the use of non-nesting /**
for the comment blocks. Still, I acknowledge it has a mature ecosystem and a plethora of tools. Also, my opinion on the downsides can be short-sighted and based on too little experience with JSDoc.
In case you have good experiences with JSDoc and are willing to do the work of migrating the docs to JSDoc and update the "build:docs" script, I will gladly show a green light (and buy you a beer if you reside in or visit Tampere).
Alternatively, I am cautiously okay to the suggestion of including JSDoc type declarations (without touching Yamdog-flavoured docs) but in that case I think I can decide only after I see how the outcome looks like. I fear the outcome is a codebase with 90% of documentation syntax and 10% of actual code somewhere between.
Finally, reconsider the option of manually constructed index.d.ts
. It is far for perfect and carries its own maintenance problems but it is simple and standalone. Also, think it as a stepping stone to discover if the above-mentioned heavier options are truly needed.
Feel free to share any further thoughts and opinions.
from nudged.
No problem, I will get back to this when I'm done with my project.
from nudged.
Any progress on this or shall I take a look?
This guide appears to generate some types from the existing js: https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html but there are a lot of any
fields that could use filling in.
https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html#testing-your-types has steps on how to publish types on DefinitelyTyped, but I'm not sure if that's preferred over including the types in this repo.
from nudged.
@axelpale Are you ok with me modifying the js to include jsdoc type declarations so the auto-generation handles most of the work?
from nudged.
Related Issues (19)
- Misleading documentation for nudged.Transform#get_matrix() HOT 3
- Allow easy serialization
- Alias multiplyRight
- Provide more prebuilt transformations HOT 1
- Allow transformation type I
- Bug in estimateTR
- Use Transform.prototype
- Implement Transform#add, Transform#subtract, Transform#negate, Transform#norm HOT 2
- Implement nudged.Transform.createFromCSSTransform(str) HOT 1
- Rewrite documentation to represent the estimators more clearly HOT 2
- Prevent singular estimates HOT 1
- I just want to say thank you HOT 3
- estimateRotator and estimateRotatorFixed HOT 1
- Transform.rotate and Transform.rotateFixed HOT 1
- Transform.multiply HOT 1
- multiplyBy documentation
- nudged.Transform.IDENTITY documentation
- Implement nudged.Transform.toString() HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nudged.