mirror of
https://github.com/coder/coder.git
synced 2026-06-04 05:28:20 +00:00
077e594856
switch to guts for typescript type generation omitempty vs null must now be explicit
47 lines
1.6 KiB
TypeScript
47 lines
1.6 KiB
TypeScript
// Code generated by 'guts'. DO NOT EDIT.
|
|
|
|
export type Comparable = string | number | boolean;
|
|
|
|
// From codersdk/generics.go
|
|
export interface Complex<C extends Comparable, S extends Single, T extends Custom> {
|
|
readonly dynamic: Fields<C, boolean, string, S>;
|
|
readonly order: FieldsDiffOrder<C, string, S, T>;
|
|
readonly comparable: C;
|
|
readonly single: S;
|
|
readonly static: Static;
|
|
}
|
|
|
|
// From codersdk/generics.go
|
|
export type Custom = string | boolean | number | number | string[] | (number | null);
|
|
|
|
// From codersdk/generics.go
|
|
// biome-ignore lint lint/complexity/noUselessTypeConstraint: golang does 'any' for generics, typescript does not like it
|
|
export interface Dynamic<A extends any, S extends Single> {
|
|
readonly dynamic: Fields<boolean, A, string, S>;
|
|
readonly comparable: boolean;
|
|
}
|
|
|
|
// From codersdk/generics.go
|
|
// biome-ignore lint lint/complexity/noUselessTypeConstraint: golang does 'any' for generics, typescript does not like it
|
|
export interface Fields<C extends Comparable, A extends any, T extends Custom, S extends Single> {
|
|
readonly comparable: C;
|
|
readonly any: A;
|
|
readonly custom: T;
|
|
readonly again: T;
|
|
readonly single_constraint: S;
|
|
}
|
|
|
|
// From codersdk/generics.go
|
|
// biome-ignore lint lint/complexity/noUselessTypeConstraint: golang does 'any' for generics, typescript does not like it
|
|
export interface FieldsDiffOrder<A extends any, C extends Comparable, S extends Single, T extends Custom> {
|
|
readonly Fields: Fields<C, A, T, S>;
|
|
}
|
|
|
|
// From codersdk/generics.go
|
|
export type Single = string;
|
|
|
|
// From codersdk/generics.go
|
|
export interface Static {
|
|
readonly static: Fields<string, number, number, string>;
|
|
}
|