Skip to content

Commit

Permalink
Fix tsc errors
Browse files Browse the repository at this point in the history
Signed-off-by: William So <[email protected]>
  • Loading branch information
polyipseity committed Dec 19, 2023
1 parent c1552a7 commit a6acc16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sources/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export abstract class AbstractSettingsManager<T extends AbstractSettingsManager
}

protected override async load0(): Promise<DeepReadonly<T>> {
return simplifyType(deepFreeze(await this.#read()))
return simplifyType<T>(deepFreeze(await this.#read()))
}

async #read(reader: () => unknown = (): ReturnType<typeof this.read0> =>
Expand Down
2 changes: 1 addition & 1 deletion sources/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export function cloneAsFrozen<T>(
obj: T,
cloner: <V>(value: V) => V = structuredClone,
): DeepReadonly<T> {
return simplifyType(deepFreeze(cloneAsWritable(obj, cloner)))
return simplifyType<T>(deepFreeze(cloneAsWritable(obj, cloner)))
}

export function cloneAsWritable<T>(
Expand Down

0 comments on commit a6acc16

Please sign in to comment.