/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
benchmark/fixtures/strip-types-benchmark.ts
34 строки
553 B
Marco Ippolito
benchmark: create benchmark for typescript
25 сен 2024, 20:25
Не верифицирован
25 сен 2024, 20:25
00d4f80
Код
Авторство
О чём код?
type ComplexType = { a: string; b: number; c: boolean; d: { e: string[]; f: { g: number; h: [string, number, boolean]; }; }; }; function processData(input: ComplexType): ComplexType { return { ...input, b: input.b + 1 }; } const data: ComplexType = { a: "test", b: 42, c: true, d: { e: ["hello", "world"], f: { g: 100, h: ["str", 123, false] } } }; export const result = processData(data);