Skip to content

Commit 6dfef2b

Browse files
authored
fix: reduce TS version to 3.3 (#1348)
1 parent 96e9bae commit 6dfef2b

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
"ts-jest": "^24.0.2",
135135
"ts-node": "^8.3.0",
136136
"tslib": "^1.9.3",
137-
"typescript": "^3.5.1",
137+
"typescript": "~3.3.0",
138138
"watchify": "^3.7.0"
139139
},
140140
"scripts": {
@@ -151,8 +151,7 @@
151151
"format": "prettier --check '**/*.{js,md,jsx,ts,tsx}'",
152152
"lint:fix": "eslint . --fix",
153153
"lint": "eslint .",
154-
"prepare": "npm run clean && npm run build",
155-
"preversion": "npm run clean && npm run build && npm run test:all",
154+
"prerelease": "npm run clean && npm run build && npm run test:all",
156155
"release": "standard-version",
157156
"test:all": "npm run lint && npm run format && npm run test",
158157
"test:perf": "cross-env NODE_ENV=production babel-node test/perf",

rollup.config.dist.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export default {
3838
typescript({
3939
target: 'es5',
4040
module: 'commonjs',
41-
incremental: false,
4241
include: ['*.js+(|x)', '**/*.js+(|x)'],
4342
}),
4443
commonjs({

src/components/injectIntl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as hoistNonReactStatics_ from 'hoist-non-react-statics';
66
// https://github.com/rollup/rollup/issues/1267
77
const hoistNonReactStatics = hoistNonReactStatics_;
88
import {invariantIntlContext} from '../utils';
9-
import {IntlShape} from '../types';
9+
import {IntlShape, Omit} from '../types';
1010

1111
function getDisplayName(Component: React.ComponentType<any>) {
1212
return Component.displayName || Component.name || 'Component';

src/components/provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
DEFAULT_INTL_CONFIG,
2020
createDefaultFormatters,
2121
} from '../utils';
22-
import {IntlConfig, IntlShape, IntlFormatters} from '../types';
22+
import {IntlConfig, IntlShape, IntlFormatters, Omit} from '../types';
2323
import {formatters} from '../format';
2424
import areIntlLocalesSupported from 'intl-locales-supported';
2525
import * as shallowEquals_ from 'shallow-equal/objects';

src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,5 @@ export interface MessageDescriptor {
106106
description?: string | object;
107107
defaultMessage?: string;
108108
}
109+
110+
export type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
"outDir": "lib",
66
"jsx": "react",
77
"types": ["node"],
8-
"incremental": true,
98
"declaration": true,
109
"strict": true,
1110
"noUnusedLocals": true,
1211
"noUnusedParameters": true,
1312
"moduleResolution": "node"
1413
},
1514
"include": ["src/*.ts*"]
16-
}
15+
}

0 commit comments

Comments
 (0)