Comments (2)
新版 v0.4.0 Key 的智能提示实现了:https://stook-cn.now.sh/docs/stook/typescript#store-key,不过方案用的是 TypeScript 的类型声明合并,在项目根目录增加 index.d.ts 文件,内容如下:
import stook from 'stook'
declare module 'stook' {
interface Key {
User: string
Counter: string
}
}
这个版本没做完全约束,当然严格约束也可以实现,这个再看看用户反馈,需不需要这么严格?
from stook.
这个建议很不错,我看看怎么实现比较好
from stook.
Related Issues (9)
- 初始值依赖组件的渲染顺序?? HOT 1
- 如何取消一个请求。 HOT 2
- useFetch 与useEffect 是否不同 HOT 1
- 可以在React组件外部订阅状态更新吗? HOT 1
- 支持class component HOT 2
- 能否优化下报错的定位 HOT 4
- key 越来越多,Storage 这个对象会越来越大,会不会有性能问题? HOT 2
- useStore能否支持useSelector 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 stook.