mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-16 07:59:01 +08:00
* Specify types in package * Do not remove types file on eject * Stop copying types into generated project * Reference react and react-dom * Reference node types * Install node types as well * Restore copying * Add Node to the list of installed types * Reference Jest types * Remove jest types from install * Remove jest from CRA install * Remove Jest reference and let user do this themselves * Stop copying types file * Add types key to package.json * Add appTypeDeclarations and create when missing * Rename declarations file * Add Jest back to install instructions * Minimize diff
61 lines
1.1 KiB
TypeScript
61 lines
1.1 KiB
TypeScript
/// <reference types="node" />
|
|
/// <reference types="react" />
|
|
/// <reference types="react-dom" />
|
|
|
|
declare namespace NodeJS {
|
|
interface ProcessEnv {
|
|
[key: string]: string | undefined
|
|
NODE_ENV: 'development' | 'production' | 'test'
|
|
PUBLIC_URL: string
|
|
}
|
|
}
|
|
|
|
declare module '*.bmp' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
|
|
declare module '*.gif' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
|
|
declare module '*.jpg' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
|
|
declare module '*.jpeg' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
|
|
declare module '*.png' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
|
|
declare module '*.svg' {
|
|
import * as React from 'react';
|
|
|
|
export const ReactComponent: React.SFC<React.SVGProps<SVGSVGElement>>;
|
|
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
|
|
declare module '*.module.css' {
|
|
const classes: { [key: string]: string };
|
|
export default classes;
|
|
}
|
|
|
|
declare module '*.module.scss' {
|
|
const classes: { [key: string]: string };
|
|
export default classes;
|
|
}
|
|
|
|
declare module '*.module.sass' {
|
|
const classes: { [key: string]: string };
|
|
export default classes;
|
|
}
|