-
I use and I met build error: - error TS18046: 'item' is of type 'unknown'. As you can see, the typeof item is object. not unknow. Anybody ever met this problem? |
Beta Was this translation helpful? Give feedback.
Answered by
velly
Nov 23, 2023
Replies: 1 comment
-
I'm so confused by this. export function castUnknown(value: unknown): T { |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
velly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm so confused by this.
Anyway, This is my workaround.
export function castUnknown(value: unknown): T {
return value as T;
}