Skip to content

Commit

Permalink
Update type name w/o abbreviation
Browse files Browse the repository at this point in the history
Co-authored-by: Kræn Hansen <[email protected]>
  • Loading branch information
elle-j and kraenhansen committed Jun 12, 2024
1 parent d4c2f3d commit d111a7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/realm/src/Unmanaged.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type ExtractPropertyNamesOfType<T, PropType> = {
[K in keyof T]: T[K] extends PropType ? K : never;
}[keyof T];

type ExtractPropertyNamesOfTypeExclNullability<T, PropType> = {
type ExtractPropertyNamesOfTypeExcludingNullability<T, PropType> = {
[K in keyof T]: Exclude<T[K], null | undefined> extends PropType ? K : never;
}[keyof T];

Expand Down Expand Up @@ -62,7 +62,7 @@ type RealmSetRemappedModelPart<T> = {
* Exchanges properties defined as a {@link Counter} with a `number`.
*/
type RealmCounterRemappedModelPart<T> = {
[K in ExtractPropertyNamesOfTypeExclNullability<T, Counter>]?: Counter | number | Exclude<T[K], Counter>;
[K in ExtractPropertyNamesOfTypeExcludingNullability<T, Counter>]?: Counter | number | Exclude<T[K], Counter>;
};

/** Omits all properties of a model which are not defined by the schema */
Expand All @@ -73,7 +73,7 @@ export type OmittedRealmTypes<T> = Omit<
| ExtractPropertyNamesOfType<T, Function> // TODO: Figure out the use-case for this
| ExtractPropertyNamesOfType<T, AnyCollection>
| ExtractPropertyNamesOfType<T, AnyDictionary>
| ExtractPropertyNamesOfTypeExclNullability<T, Counter>
| ExtractPropertyNamesOfTypeExcludingNullability<T, Counter>
>;

/** Make all fields optional except those specified in K */
Expand Down

0 comments on commit d111a7f

Please sign in to comment.