Skip to content

Instantly share code, notes, and snippets.

@yunsii
Last active March 18, 2022 13:12
Show Gist options
  • Select an option

  • Save yunsii/d03808c73714a116480c3370ce43ebe2 to your computer and use it in GitHub Desktop.

Select an option

Save yunsii/d03808c73714a116480c3370ce43ebe2 to your computer and use it in GitHub Desktop.
常用全局 TS 类型定义
// ref: https://dev.to/isthatcentered/typing-process-env-and-dealing-with-nodeenv-3ilm
declare namespace NodeJS {
interface ProcessEnv {
NODE_ENV: 'development' | 'production';
}
}
declare namespace React {
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
mb?: string;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment