文件操作 - arrayable.d.ts
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/type-fest/source/arrayable.d.ts
编辑文件内容
/** Create a type that represents either the value or an array of the value. @see Promisable @example ``` import type {Arrayable} from 'type-fest'; function bundle(input: string, output: Arrayable<string>) { const outputList = Array.isArray(output) ? output : [output]; // … for (const output of outputList) { console.log(`write to: ${output}`); } } bundle('src/index.js', 'dist/index.js'); bundle('src/index.js', ['dist/index.cjs', 'dist/index.mjs']); ``` @category Array */ export type Arrayable<T> = T // TODO: Use `readonly T[]` when this issue is resolved: https://github.com/microsoft/TypeScript/issues/17002 | T[];
修改文件时间
将文件时间修改为当前时间的前一年
删除文件