@@ -20,13 +20,13 @@ flinch is a zero-dependency typescript library for compile-time type testing. it
20
20
- [ examples] ( #examples )
21
21
- [ license] ( #license )
22
22
23
- ## installation 📦
23
+ ## installation
24
24
25
25
``` bash
26
26
npm install @flickr/flinch
27
27
```
28
28
29
- ## quick start 🚀
29
+ ## quick start
30
30
31
31
``` typescript
32
32
import flinch , { expectTrue , expectFalse , Equal , Extends } from ' @flickr/flinch'
@@ -69,7 +69,7 @@ assert.isOptional<{ a?: string }, 'a'>()
69
69
assert .isReadonly <{ readonly a: string }, ' a' >()
70
70
```
71
71
72
- ## core type utilities 🔧
72
+ ## core type utilities
73
73
74
74
### ` Equal<X, Y> `
75
75
tests if two types are exactly equal.
@@ -103,7 +103,7 @@ type Test1 = NotExtends<string, 'hello'> // true
103
103
type Test2 = NotExtends <' hello' , string > // false
104
104
` ` `
105
105
106
- ## type detection utilities 🔍
106
+ ## type detection utilities
107
107
108
108
### ` IsAny <T >`
109
109
detects if a type is ` any ` .
@@ -153,7 +153,7 @@ type Test1 = IsObject<{ a: string }> // true
153
153
type Test2 = IsObject <string []> // false
154
154
` ` `
155
155
156
- ## property analysis utilities 🔬
156
+ ## property analysis utilities
157
157
158
158
### ` HasProperty <T , K >`
159
159
checks if a type has a specific property.
@@ -182,7 +182,7 @@ type Test1 = IsReadonly<User, 'id'> // true
182
182
type Test2 = IsReadonly <User , ' name' > // false
183
183
` ` `
184
184
185
- ## function type utilities ⚡
185
+ ## function type utilities
186
186
187
187
### ` GetParameters <T >`
188
188
extracts parameter types from a function type.
@@ -200,7 +200,7 @@ type Fn = (a: string) => number
200
200
type Return = GetReturnType <Fn > // number
201
201
` ` `
202
202
203
- ## advanced type utilities 🧠
203
+ ## advanced type utilities
204
204
205
205
### ` IsUnion <T >`
206
206
detects if a type is a union type.
@@ -218,7 +218,7 @@ type Union = { a: string } | { b: number }
218
218
type Intersection = UnionToIntersection <Union > // { a: string } & { b: number }
219
219
` ` `
220
220
221
- ## tuple and array utilities 📋
221
+ ## tuple and array utilities
222
222
223
223
### ` IsTuple <T >`
224
224
detects if a type is a tuple (fixed-length array).
@@ -249,7 +249,7 @@ gets all elements except the first from a tuple.
249
249
type Rest = Tail <[string , number , boolean ]> // [number, boolean]
250
250
` ` `
251
251
252
- ## literal type utilities 📝
252
+ ## literal type utilities
253
253
254
254
### ` IsStringLiteral <T >`
255
255
detects if a type is a string literal.
@@ -267,7 +267,7 @@ type Test1 = IsNumberLiteral<42> // true
267
267
type Test2 = IsNumberLiteral <number > // false
268
268
` ` `
269
269
270
- ## assertion functions 🎪
270
+ ## assertion functions
271
271
272
272
flinch provides both type-level utilities and runtime assertion functions:
273
273
@@ -287,7 +287,7 @@ expectFalse<Equal<string, number>>() // ✅ compiles
287
287
expectFalse <Equal <string , string >>() // ❌ compilation error
288
288
` ` `
289
289
290
- ## examples 💡
290
+ ## examples
291
291
292
292
### testing api response types
293
293
0 commit comments