adamjeffries / overhaul Goto Github PK
View Code? Open in Web Editor NEWOverhaul Properties: Type Checking, Formatting, & Annotations
License: MIT License
Overhaul Properties: Type Checking, Formatting, & Annotations
License: MIT License
it works when npm link directly, but fail with npm i
uncaught exception TypeError: Cannot read property '1' of null
at getArgumentNames
node_modules/overhaul/overhaul.js:19:51)
usage:
oh.object({
val: oh.run( val => val * 2) // modify
})
sometimes need to check for map type: <string - number>
, not its hard to define easily, still doable with chained every
though
oh.object().value(null)
=> error will be expect object to be object
like, either name
or id
should be required, now its impossible to set.
response: typedef.object({
"id,key,state": typedef.string
})
like:
const format = oh.object({
id: oh.string.required
}, {ignore: true});
format.value({id: "aaa", name: "hi"}); // {id: "aaa"}, ignore `name`
Following is not working:
oh.object({
id: oh.move("pid").required
});
has to be:
oh.object({
id: oh.required.move("pid")
});
expected behaviors:
oh.object({
id: oh.move("pid").required
}).value({
pid: "aaa"
});
// should work fine
current behaviors: throw error for pid
required
but i got the reason, since it only checks keys list inside... and no pid
list as key
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.