mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-10 19:56:54 +03:00
chore(*): upgrade to TypeScript 4.1 (#739)
* chore(*): upgrade to TypeScript 4.1 * Fix lint * Fix tests
This commit is contained in:
parent
698fdec21d
commit
985b7b6a56
|
@ -42,7 +42,7 @@
|
|||
"stylelint-processor-styled-components": "^1.10.0",
|
||||
"ts-jest": "^26.2.0",
|
||||
"ts-node": "^9.0.0",
|
||||
"typescript": "~4.0.7",
|
||||
"typescript": "~4.1.6",
|
||||
"url-loader": "^4.1.0",
|
||||
"webpack": "^4.44.1",
|
||||
"webpack-cli": "^3.3.12",
|
||||
|
|
|
@ -79,7 +79,7 @@ export default class Tabs<P> extends Component<TabsProps<P>> {
|
|||
<TabsContainer position={this.props.position}>
|
||||
{tabsHeader}
|
||||
<div>
|
||||
<this.SelectedComponent {...(this.selector! && this.selector!())} />
|
||||
<this.SelectedComponent {...(this.selector! && this.selector())} />
|
||||
</div>
|
||||
</TabsContainer>
|
||||
);
|
||||
|
|
|
@ -196,13 +196,20 @@ export const invertBase16Theme = (base16Theme: Base16Theme): Base16Theme =>
|
|||
{} as Base16Theme
|
||||
);
|
||||
|
||||
export const createStyling = curry(
|
||||
interface Options {
|
||||
defaultBase16?: Base16Theme;
|
||||
base16Themes?: { [themeName: string]: Base16Theme };
|
||||
}
|
||||
|
||||
export const createStyling = curry<
|
||||
(base16Theme: Base16Theme) => StylingConfig,
|
||||
Options | undefined,
|
||||
Theme | undefined,
|
||||
StylingFunction
|
||||
>(
|
||||
(
|
||||
getStylingFromBase16: (base16Theme: Base16Theme) => StylingConfig,
|
||||
options: {
|
||||
defaultBase16?: Base16Theme;
|
||||
base16Themes?: { [themeName: string]: Base16Theme };
|
||||
} = {},
|
||||
options: Options = {},
|
||||
themeOrStyling: Theme = {},
|
||||
...args
|
||||
): StylingFunction => {
|
||||
|
|
|
@ -17,7 +17,7 @@ describe('Server', function () {
|
|||
|
||||
describe('Express backend', function () {
|
||||
it('loads main page', function () {
|
||||
return new Promise((done) => {
|
||||
return new Promise<void>((done) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
request('http://localhost:8000')
|
||||
.get('/')
|
||||
|
@ -64,7 +64,7 @@ describe('Server', function () {
|
|||
});
|
||||
|
||||
it('should connect', function () {
|
||||
return new Promise((done) => {
|
||||
return new Promise<void>((done) => {
|
||||
socket.on('connect', function (status) {
|
||||
expect(status.id).toBeTruthy();
|
||||
done();
|
||||
|
@ -89,7 +89,7 @@ describe('Server', function () {
|
|||
});
|
||||
|
||||
it('should send message', function () {
|
||||
return new Promise((done) => {
|
||||
return new Promise<void>((done) => {
|
||||
const data = {
|
||||
type: 'ACTION',
|
||||
payload: {
|
||||
|
@ -146,7 +146,7 @@ describe('Server', function () {
|
|||
'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36',
|
||||
};
|
||||
it('should add a report', function () {
|
||||
return new Promise((done) => {
|
||||
return new Promise<void>((done) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
request('http://localhost:8000')
|
||||
.post('/')
|
||||
|
@ -163,7 +163,7 @@ describe('Server', function () {
|
|||
});
|
||||
|
||||
it('should get the report', function () {
|
||||
return new Promise((done) => {
|
||||
return new Promise<void>((done) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
request('http://localhost:8000')
|
||||
.post('/')
|
||||
|
@ -182,7 +182,7 @@ describe('Server', function () {
|
|||
});
|
||||
|
||||
it('should list reports', function () {
|
||||
return new Promise((done) => {
|
||||
return new Promise<void>((done) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
request('http://localhost:8000')
|
||||
.post('/')
|
||||
|
@ -207,7 +207,7 @@ describe('Server', function () {
|
|||
|
||||
describe('GraphQL backend', function () {
|
||||
it('should get the report', function () {
|
||||
return new Promise((done) => {
|
||||
return new Promise<void>((done) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
request('http://localhost:8000')
|
||||
.post('/graphql')
|
||||
|
|
|
@ -84,8 +84,8 @@ export default class StackTraceTab<
|
|||
this.setState({
|
||||
stackFrames: [],
|
||||
showDocsLink:
|
||||
liftedAction!.action &&
|
||||
liftedAction!.action.type &&
|
||||
!!liftedAction!.action &&
|
||||
!!liftedAction!.action.type &&
|
||||
liftedAction!.action.type !== '@@INIT',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -33,14 +33,14 @@ const StackTraceTabAsAny = StackTraceTab as any;
|
|||
|
||||
describe('StackTraceTab component', () => {
|
||||
it('should render with no props', () => {
|
||||
return new Promise((done) => {
|
||||
return new Promise<void>((done) => {
|
||||
const component = mount(<StackTraceTabAsAny />);
|
||||
genAsyncSnapshot(component, done);
|
||||
});
|
||||
});
|
||||
|
||||
it('should render with props, but without stack', () => {
|
||||
return new Promise((done) => {
|
||||
return new Promise<void>((done) => {
|
||||
const component = mount(
|
||||
<StackTraceTabAsAny actions={actions} action={actions[0].action} />
|
||||
);
|
||||
|
@ -49,7 +49,7 @@ describe('StackTraceTab component', () => {
|
|||
});
|
||||
|
||||
it('should render the link to docs', () => {
|
||||
return new Promise((done) => {
|
||||
return new Promise<void>((done) => {
|
||||
const component = mount(
|
||||
<StackTraceTabAsAny actions={actions} action={actions[1].action} />
|
||||
);
|
||||
|
@ -58,7 +58,7 @@ describe('StackTraceTab component', () => {
|
|||
});
|
||||
|
||||
it('should render with trace stack', () => {
|
||||
return new Promise((done) => {
|
||||
return new Promise<void>((done) => {
|
||||
const component = mount(
|
||||
<StackTraceTabAsAny actions={actions} action={actions[2].action} />
|
||||
);
|
||||
|
|
|
@ -1071,7 +1071,7 @@ describe('instrument', () => {
|
|||
});
|
||||
|
||||
it('should get stack trace inside setTimeout using a function', () =>
|
||||
new Promise((done) => {
|
||||
new Promise<void>((done) => {
|
||||
const stack = new Error().stack;
|
||||
setTimeout(() => {
|
||||
const traceFn = () => stack! + new Error().stack!;
|
||||
|
|
18
yarn.lock
18
yarn.lock
|
@ -21305,7 +21305,7 @@ fsevents@^1.2.7:
|
|||
stylelint-processor-styled-components: ^1.10.0
|
||||
ts-jest: ^26.2.0
|
||||
ts-node: ^9.0.0
|
||||
typescript: ~4.0.7
|
||||
typescript: ~4.1.6
|
||||
url-loader: ^4.1.0
|
||||
webpack: ^4.44.1
|
||||
webpack-cli: ^3.3.12
|
||||
|
@ -23947,23 +23947,23 @@ fsevents@^1.2.7:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"typescript@patch:typescript@~4.0.7#builtin<compat/typescript>":
|
||||
version: 4.0.7
|
||||
resolution: "typescript@patch:typescript@npm%3A4.0.7#builtin<compat/typescript>::version=4.0.7&hash=ddfc1b"
|
||||
"typescript@patch:typescript@~4.1.6#builtin<compat/typescript>":
|
||||
version: 4.1.6
|
||||
resolution: "typescript@patch:typescript@npm%3A4.1.6#builtin<compat/typescript>::version=4.1.6&hash=ddfc1b"
|
||||
bin:
|
||||
tsc: bin/tsc
|
||||
tsserver: bin/tsserver
|
||||
checksum: f234923fbef722077d00ee008aa3492b02adbfe5a67b1c31687a0f7c6cb9946b759665ea643ffc1174298ffb1c59de0cc2abe1a91e57415d51951589eff12446
|
||||
checksum: 12e2121f1dd538030ec829e6d5ed8205c256f3b22269744140676deace23b559aa67d143676761a1780c14f70f16953d8ae850a344bee2f7d915e0bf6ca6943e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
typescript@~4.0.7:
|
||||
version: 4.0.7
|
||||
resolution: "typescript@npm:4.0.7"
|
||||
typescript@~4.1.6:
|
||||
version: 4.1.6
|
||||
resolution: "typescript@npm:4.1.6"
|
||||
bin:
|
||||
tsc: bin/tsc
|
||||
tsserver: bin/tsserver
|
||||
checksum: 1b4c63a228efd6ceec80382b6001dad2c27c9bd46022f965dab907a13275c9ceb7b4b4de8be8902457bd644d2b0f9ddd8cf03b561e35d7cd2d793cf7554afd2d
|
||||
checksum: 36cdaf5d69fe096d3644d01f163a62c9469065e23867e2d732f83a85e97e67a32644407bebb36e46d8bcc2c5c57d4b7a07f0701b591af038a5984b58a0664566
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user