mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: generate typescript types for healthcheck pkg (#8846)
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
package enums
|
||||
package codersdk
|
||||
|
||||
type (
|
||||
Enum string
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
// Code generated by 'make site/src/api/typesGenerated.ts'. DO NOT EDIT.
|
||||
|
||||
// From codersdk/enums.go
|
||||
export type Enums = Enum[]
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package genericmap
|
||||
package codersdk
|
||||
|
||||
type Foo struct {
|
||||
Bar string `json:"bar"`
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// Code generated by 'make site/src/api/typesGenerated.ts'. DO NOT EDIT.
|
||||
|
||||
// From codersdk/genericmap.go
|
||||
export interface Buzz {
|
||||
readonly foo: Foo
|
||||
|
||||
+17
-17
@@ -1,4 +1,4 @@
|
||||
package generics
|
||||
package codersdk
|
||||
|
||||
import "time"
|
||||
|
||||
@@ -10,26 +10,26 @@ type Custom interface {
|
||||
string | bool | int | time.Duration | []string | *int
|
||||
}
|
||||
|
||||
// StaticGeneric has all generic fields defined in the field
|
||||
type StaticGeneric struct {
|
||||
Static GenericFields[string, int, time.Duration, string] `json:"static"`
|
||||
// Static has all generic fields defined in the field
|
||||
type Static struct {
|
||||
Static Fields[string, int, time.Duration, string] `json:"static"`
|
||||
}
|
||||
|
||||
// DynamicGeneric can has some dynamic fields
|
||||
type DynamicGeneric[A any, S Single] struct {
|
||||
Dynamic GenericFields[bool, A, string, S] `json:"dynamic"`
|
||||
Comparable bool `json:"comparable"`
|
||||
// Dynamic has some dynamic fields.
|
||||
type Dynamic[A any, S Single] struct {
|
||||
Dynamic Fields[bool, A, string, S] `json:"dynamic"`
|
||||
Comparable bool `json:"comparable"`
|
||||
}
|
||||
|
||||
type ComplexGeneric[C comparable, S Single, T Custom] struct {
|
||||
Dynamic GenericFields[C, bool, string, S] `json:"dynamic"`
|
||||
Order GenericFieldsDiffOrder[C, string, S, T] `json:"order"`
|
||||
Comparable C `json:"comparable"`
|
||||
Single S `json:"single"`
|
||||
Static StaticGeneric `json:"static"`
|
||||
type Complex[C comparable, S Single, T Custom] struct {
|
||||
Dynamic Fields[C, bool, string, S] `json:"dynamic"`
|
||||
Order FieldsDiffOrder[C, string, S, T] `json:"order"`
|
||||
Comparable C `json:"comparable"`
|
||||
Single S `json:"single"`
|
||||
Static Static `json:"static"`
|
||||
}
|
||||
|
||||
type GenericFields[C comparable, A any, T Custom, S Single] struct {
|
||||
type Fields[C comparable, A any, T Custom, S Single] struct {
|
||||
Comparable C `json:"comparable"`
|
||||
Any A `json:"any"`
|
||||
|
||||
@@ -38,6 +38,6 @@ type GenericFields[C comparable, A any, T Custom, S Single] struct {
|
||||
SingleConstraint S `json:"single_constraint"`
|
||||
}
|
||||
|
||||
type GenericFieldsDiffOrder[A any, C comparable, S Single, T Custom] struct {
|
||||
GenericFields[C, A, T, S]
|
||||
type FieldsDiffOrder[A any, C comparable, S Single, T Custom] struct {
|
||||
Fields Fields[C, A, T, S]
|
||||
}
|
||||
|
||||
+11
-13
@@ -1,22 +1,20 @@
|
||||
// Code generated by 'make site/src/api/typesGenerated.ts'. DO NOT EDIT.
|
||||
|
||||
// From codersdk/generics.go
|
||||
export interface ComplexGeneric<C extends comparable, S extends Single, T extends Custom> {
|
||||
readonly dynamic: GenericFields<C, boolean, string, S>
|
||||
readonly order: GenericFieldsDiffOrder<C, string, S, T>
|
||||
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: StaticGeneric
|
||||
readonly static: Static
|
||||
}
|
||||
|
||||
// From codersdk/generics.go
|
||||
export interface DynamicGeneric<A extends any, S extends Single> {
|
||||
readonly dynamic: GenericFields<boolean, A, string, S>
|
||||
export interface Dynamic<A extends any, S extends Single> {
|
||||
readonly dynamic: Fields<boolean, A, string, S>
|
||||
readonly comparable: boolean
|
||||
}
|
||||
|
||||
// From codersdk/generics.go
|
||||
export interface GenericFields<C extends comparable, A extends any, T extends Custom, S extends Single> {
|
||||
export interface Fields<C extends comparable, A extends any, T extends Custom, S extends Single> {
|
||||
readonly comparable: C
|
||||
readonly any: A
|
||||
readonly custom: T
|
||||
@@ -25,13 +23,13 @@ export interface GenericFields<C extends comparable, A extends any, T extends Cu
|
||||
}
|
||||
|
||||
// From codersdk/generics.go
|
||||
export interface GenericFieldsDiffOrder<A extends any, C extends comparable, S extends Single, T extends Custom> {
|
||||
readonly GenericFields: GenericFields<C, A, T, S>
|
||||
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 interface StaticGeneric {
|
||||
readonly static: GenericFields<string, number, number, string>
|
||||
export interface Static {
|
||||
readonly static: Fields<string, number, number, string>
|
||||
}
|
||||
|
||||
// From codersdk/generics.go
|
||||
|
||||
Reference in New Issue
Block a user