This change makes a few simplifications to how properties are exposed in the system, mostly in the name of usability, but also to feel a bit more like "idiomatic JavaScript". Namely: * Rename `then` to `mapValue`. This hopefully helps to suggest that this is meant for a dataflow style of programming. * Move Property<T> into the runtime module, and remove PropertyState<T>, collapsing back down to a single type. This also eliminates some of the messy internal runtime casting, accessing of internal members, etc. * Export a Computed<T> interface from the root of the module. This is the entirety of the public-facing surface area for properties, and exposes that single `mapValue` member function. The internal runtime logic understands how to handle Property<T>s specifically in addition to Computed<T>s more generally (in case someone writes their own).
47 lines
1.1 KiB
JSON
47 lines
1.1 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"outDir": "bin",
|
|
"target": "es6",
|
|
"module": "commonjs",
|
|
"moduleResolution": "node",
|
|
"declaration": true,
|
|
"sourceMap": true,
|
|
"stripInternal": true,
|
|
"experimentalDecorators": true,
|
|
"pretty": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"noImplicitAny": true,
|
|
"noImplicitReturns": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"strictNullChecks": true
|
|
},
|
|
"files": [
|
|
"index.ts",
|
|
"computed.ts",
|
|
"config.ts",
|
|
"resource.ts",
|
|
|
|
"asset/index.ts",
|
|
"asset/asset.ts",
|
|
"asset/archive.ts",
|
|
|
|
"runtime/index.ts",
|
|
"runtime/closure.ts",
|
|
"runtime/config.ts",
|
|
"runtime/langhost.ts",
|
|
"runtime/log.ts",
|
|
"runtime/property.ts",
|
|
"runtime/resource.ts",
|
|
"runtime/settings.ts",
|
|
|
|
"cmd/langhost/index.ts",
|
|
"cmd/langhost/run.ts",
|
|
|
|
"tests/config.spec.ts",
|
|
"tests/init.spec.ts",
|
|
"tests/util.ts",
|
|
"tests/runtime/closure.spec.ts",
|
|
"tests/runtime/langhost/run.spec.ts"
|
|
]
|
|
}
|
|
|