TS Template Literal Type Example
[TS Generic](https://texonom.com/ts-generic-1e0e381c280e43f59102538dc94d2d7c) 


이해를 돕기 위한 예시들
```typetype First = 'cho'type Last = 'seonglae'type FullName = `${First} ${Last}`type Name = 'program'type Version = '1.1.1' | '1.1.2'type Full = `${Name} ${Version}````



### 이딴식들로는 안쓴다 어차피 ts는 정적 타이핑
```typetype Entry = "In" | "Out";type InOrOut<Type extends `fade${string}`> = Type extends `fade${infer Return}` ? Return : never;// type I = "In"type In = InOrOut<"fadeIn">;// type O = "Out"type Out = InOrOut<"fadeOut">;```
```typetype TrimRight<T extends string> =   T extends `${infer R} `     ? TrimRight<R>     : T;```





> [Template Literal Types로 타입 안전하게 코딩하기](https://toss.tech/article/template-literal-types)





