Skip to content

refactor: deduplicate / type license feature code #5734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! Update frontend types
  • Loading branch information
ammario committed Jan 17, 2023
commit 48cda29da3bb32f03ef20a164539d9f21b58b7ae
10 changes: 10 additions & 0 deletions scripts/apitypings/testdata/enums/enums.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
// Code generated by 'make site/src/api/typesGenerated.ts'. DO NOT EDIT.


// PartialRecord is useful when a union string literal is a record key type but
// we do not want to fill all keys on every record.
//
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- necessary for abstract record support
type PartialRecord<K extends keyof any, T> = {
[P in K]?: T;
};

// From codersdk/enums.go
export type Enum = "bar" | "baz" | "foo" | "qux"
export const Enums: Enum[] = ["bar", "baz", "foo", "qux"]
9 changes: 9 additions & 0 deletions scripts/apitypings/testdata/generics/generics.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
// Code generated by 'make site/src/api/typesGenerated.ts'. DO NOT EDIT.


// PartialRecord is useful when a union string literal is a record key type but
// we do not want to fill all keys on every record.
//
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- necessary for abstract record support
type PartialRecord<K extends keyof any, T> = {
[P in K]?: T;
};

// From codersdk/generics.go
export interface ComplexGeneric<C extends comparable, S extends Single, T extends Custom> {
readonly dynamic: GenericFields<C, boolean, string, S>
Expand Down