chore: New sdk things

This commit is contained in:
BluJ
2023-03-06 15:28:11 -07:00
parent 40c75cfcb2
commit b4fc6e891e
19 changed files with 157 additions and 185 deletions

View File

@@ -1,4 +1,4 @@
import { ConfigSpec, ValueSpec } from "../../types/config-types";
import { InputSpec, ValueSpec } from "../../types/config-types";
import { typeFromProps } from "../../util";
import { BuilderExtract, IBuilder } from "./builder";
import { Value } from "./value";
@@ -483,19 +483,19 @@ import { Value } from "./value";
```
*/
export class Config<A extends ConfigSpec> extends IBuilder<A> {
export class Config<A extends InputSpec> extends IBuilder<A> {
static empty() {
return new Config({});
}
static withValue<K extends string, B extends ValueSpec>(
key: K,
value: Value<B>
value: Value<B>,
) {
return Config.empty().withValue(key, value);
}
static addValue<K extends string, B extends ValueSpec>(
key: K,
value: Value<B>
value: Value<B>,
) {
return Config.empty().withValue(key, value);
}