Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Notryag committed Jan 27, 2024
1 parent 55d81a0 commit 8f6e1e2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Typescript/类型体操/day1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// type A = 1
// type B = 2
// type C = A extends B ? true : false

// // 返回类型的函数
// let fn = (x, y) => x + y
// type Fn<X, Y> = X | Y

// type StrOrNum = Fn<string, number>
// type Player = Fn<'p1', 'p2'>


// type b = number extends string ? true : false
// 工具类

// type A = string | undefined
// type B = Exclude<A, undefined>

type A = ( string | undefined | null) & {}
type B = undefined & {}

0 comments on commit 8f6e1e2

Please sign in to comment.