union_types.ts

TypeScript고급

탐색기

C40
C++40
C#40
Dart40
Go40
Java40
JavaScript40
Kotlin40
Objective-C40
Perl40
PHP40
Python40
R40
Ruby40
Rust40
Shell40
Swift40
TypeScript
초급10
중급10
고급10
utility_types.ts
api_service.ts
type_guard.ts
generic_constraint.ts
union_types.ts
mapped_type.ts
decorator.ts
template_literal.ts
conditional_type.ts
assertion.ts
전문가5
마스터5
union_types.ts
Click to focus
1
2
3
type Result<T> = { ok: true; data: T } | { ok: false; error: string };
const parse = (r: Result<User>): User | null =>
   r.ok ? r.data : null;
0WPM0%0:000/143(0%)|Ln 1, Col 1
UTF-8TypeScript

관련 연습 문제