Skip to content

Commit

Permalink
feat(types): expose FastOmit to improve emit performance (#4230)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbhopper committed Dec 20, 2023
1 parent 7c065e0 commit b6af93e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/styled-components/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type BaseObject = {};
// from https://stackoverflow.com/a/69852402
export type OmitNever<T> = { [K in keyof T as T[K] extends never ? never : K]: T[K] };

type FastOmit<T extends object, U extends string | number | symbol> = {
export type FastOmit<T extends object, U extends string | number | symbol> = {
[K in keyof T as K extends U ? never : K]: T[K];
};

Expand Down

0 comments on commit b6af93e

Please sign in to comment.