Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 6d8b757

Browse files
author
Achim Schneider
committed
fix more ts impoerts
1 parent 263abcd commit 6d8b757

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

packages/playground/src/context/messages/reducer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CompilationResult, TestingResult, FormattingResult } from '@paritytech/commontypes';
1+
import Common from '@paritytech/commontypes';
22
import { Message, Status, Severity, Prompt } from '@paritytech/components/';
33
import * as sizeLimit from '~/constants';
44
import { extractContractSize } from '../side-effects/compile';
@@ -33,7 +33,7 @@ export type CompilationMessage = {
3333
payload: {
3434
status: Status;
3535
content: string;
36-
result?: CompilationResult;
36+
result?: Common.CompilationResult;
3737
};
3838
};
3939

@@ -42,7 +42,7 @@ export type TestingMessage = {
4242
payload: {
4343
status: Status;
4444
content: string;
45-
result?: TestingResult;
45+
result?: Common.TestingResult;
4646
};
4747
};
4848

@@ -51,7 +51,7 @@ export type FormattingMessage = {
5151
payload: {
5252
status: Status;
5353
content: string;
54-
result?: FormattingResult;
54+
result?: Common.FormattingResult;
5555
};
5656
};
5757

packages/playground/src/context/side-effects/create-gist.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { State, Dispatch } from '../app/reducer';
22
import { MessageAction, MessageDispatch, GistMessage } from '../messages/reducer';
33
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
44
import { GistCreateApiResponse, gistCreateRequest } from '@paritytech/ink-editor/api/gists';
5-
import { GistCreateResponse } from '@paritytech/commontypes';
5+
import Common from '@paritytech/commontypes';
66
import { GIST_CREATE_URL } from '~/env';
77

88
const resetToNotAsked = (dispatch: Dispatch, dispatchMessage: MessageDispatch): void => {
@@ -39,7 +39,7 @@ const getMessageAction = (result: GistCreateApiResponse): GistMessage => {
3939
}
4040
};
4141

42-
const handleOk = (response: GistCreateResponse): GistMessage => {
42+
const handleOk = (response: Common.GistCreateResponse): GistMessage => {
4343
switch (response.type) {
4444
case 'ERROR':
4545
return {

packages/playground/src/context/side-effects/load-code.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { State, Dispatch as AppDispatch } from '../app/reducer';
22
import { MessageDispatch } from '../messages/reducer';
33
import { gistLoadRequest } from '@paritytech/ink-editor/api/gists';
4-
import { GistCreateResponse } from '@paritytech/commontypes';
4+
import Common from '@paritytech/commontypes';
55
import qs from 'qs';
66
// See: https://github.com/webpack/webpack/issues/12900
77
import exampleCode from '../../../../../crates/contract/lib.txt!=!../../../../../crates/contract/lib.rs';
@@ -39,7 +39,7 @@ const handleError = (content: string, dispatch: Dispatch): string => {
3939
};
4040

4141
const handleSuccess = (
42-
response: Extract<GistCreateResponse, { type: 'SUCCESS' }>,
42+
response: Extract<Common.GistCreateResponse, { type: 'SUCCESS' }>,
4343
dispatch: Dispatch
4444
): string => {
4545
dispatch.message({

0 commit comments

Comments
 (0)