chore: Use the types from the fronted system

This commit is contained in:
BluJ
2023-02-13 16:58:04 -07:00
parent 2989347a55
commit 1c4a14d631
13 changed files with 252 additions and 273 deletions

View File

@@ -1,8 +1,8 @@
import { ValueSpecAny } from "../types.ts";
import { ValueSpec } from "../types/config-types.ts";
import { IBuilder } from "./builder.ts";
import { Description } from "./value.ts";
export class Pointer<A extends ValueSpecAny> extends IBuilder<A> {
export class Pointer<A extends ValueSpec> extends IBuilder<A> {
static packageTorKey<A extends Description & { "package-id": string; interface: string }>(a: A) {
return new Pointer({
type: "pointer" as const,
@@ -27,7 +27,9 @@ export class Pointer<A extends ValueSpecAny> extends IBuilder<A> {
...a,
});
}
static packageConfig<A extends Description & { "package-id": string; selector: string; multi: boolean }>(a: A) {
static packageConfig<
A extends Description & { "package-id": string; selector: string; multi: boolean; interface: string }
>(a: A) {
return new Pointer({
type: "pointer" as const,
subtype: "package" as const,
@@ -35,10 +37,13 @@ export class Pointer<A extends ValueSpecAny> extends IBuilder<A> {
...a,
});
}
static system<A extends Description & Record<string, unknown>>(a: A) {
static system<A extends Description & { "package-id": string; selector: string; multi: boolean; interface: string }>(
a: A
) {
return new Pointer({
type: "pointer" as const,
subtype: "system" as const,
target: "system" as const,
...a,
});
}