Comments (4)
Hey Juan,
I think I didn't understand well what's your problem on creating the d.ts file, maybe because I don't use typescript myself.
When you do a get
in a freezer store you get a freezer node. What's a freezer node? there are 3 types:
- Objects, with methods
set
,replace
,remove
,toJSON
,pivot
,transact
,now
an events operations. - Arrays, with
replace,
toJSON,
pivot,
transact,
now` and all event and array operations. - Leaves: They have no methods in it.
I suppose this polymorphic behavior, is a pain for creating a typescript declaration. Isn't it?
from freezer.
@Juancoll Did you guys ever get to finish the bindings? Would love to use them myself.
from freezer.
I think it never got done. I don't use typescript so I don't plan to add it, but if someone wants to create a PR I'd be glad to merge it.
from freezer.
@arqex still not using ts? :D
we are migrating our codebase to typescript and freezer makes the heart of the state management logic so we would love to get ts support. I have good experience in TS but never wrote types for a lib before.
I will probably give it a try starting with migrating the code itself to ts then see how can I define the types.
I will fork it but would you be interested to help me if needed or accept a PR with the changes when done?
from freezer.
Related Issues (20)
- Trigger returns undefined HOT 1
- multiple parents and node invariant check HOT 4
- Cannot sort arrays HOT 4
- always run in transact() mode HOT 4
- bug: nodes of value 0 get affected while updating its empty-array sibling HOT 1
- Store doesn't reset between launches. HOT 2
- state not updating when it should HOT 1
- Handle high frequency updates HOT 1
- JavaScript heap out of memory when using freezer-js HOT 2
- MS Edge compatibility issue with processQueue() HOT 6
- Set function is not working HOT 2
- Freezer: Can't add node to the tree. It's already added and freezer is configured to `singleParent: true`
- Object References and relations across state changes? HOT 1
- Bower version not updated HOT 2
- Best way to implement Provider / connect( ... ) for React components using freezer? HOT 2
- Parents reference of some children not updated after reset HOT 1
- Pivot on whole freezer object? HOT 3
- Interactive blog posts and documentation HOT 1
- Provide a warning when attempting to update the state of an outdated freezer object HOT 1
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 freezer.