Skip to content

Commit

Permalink
fix: reduce TS version to 3.3 (#1348)
Browse files Browse the repository at this point in the history
  • Loading branch information
longlho authored Jul 3, 2019
1 parent 96e9bae commit 6dfef2b
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"ts-jest": "^24.0.2",
"ts-node": "^8.3.0",
"tslib": "^1.9.3",
"typescript": "^3.5.1",
"typescript": "~3.3.0",
"watchify": "^3.7.0"
},
"scripts": {
Expand All @@ -151,8 +151,7 @@
"format": "prettier --check '**/*.{js,md,jsx,ts,tsx}'",
"lint:fix": "eslint . --fix",
"lint": "eslint .",
"prepare": "npm run clean && npm run build",
"preversion": "npm run clean && npm run build && npm run test:all",
"prerelease": "npm run clean && npm run build && npm run test:all",
"release": "standard-version",
"test:all": "npm run lint && npm run format && npm run test",
"test:perf": "cross-env NODE_ENV=production babel-node test/perf",
Expand Down
1 change: 0 additions & 1 deletion rollup.config.dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export default {
typescript({
target: 'es5',
module: 'commonjs',
incremental: false,
include: ['*.js+(|x)', '**/*.js+(|x)'],
}),
commonjs({
Expand Down
2 changes: 1 addition & 1 deletion src/components/injectIntl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as hoistNonReactStatics_ from 'hoist-non-react-statics';
// https://github.com/rollup/rollup/issues/1267
const hoistNonReactStatics = hoistNonReactStatics_;
import {invariantIntlContext} from '../utils';
import {IntlShape} from '../types';
import {IntlShape, Omit} from '../types';

function getDisplayName(Component: React.ComponentType<any>) {
return Component.displayName || Component.name || 'Component';
Expand Down
2 changes: 1 addition & 1 deletion src/components/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
DEFAULT_INTL_CONFIG,
createDefaultFormatters,
} from '../utils';
import {IntlConfig, IntlShape, IntlFormatters} from '../types';
import {IntlConfig, IntlShape, IntlFormatters, Omit} from '../types';
import {formatters} from '../format';
import areIntlLocalesSupported from 'intl-locales-supported';
import * as shallowEquals_ from 'shallow-equal/objects';
Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@ export interface MessageDescriptor {
description?: string | object;
defaultMessage?: string;
}

export type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
"outDir": "lib",
"jsx": "react",
"types": ["node"],
"incremental": true,
"declaration": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"moduleResolution": "node"
},
"include": ["src/*.ts*"]
}
}

0 comments on commit 6dfef2b

Please sign in to comment.