Skip to content

Commit b46925b

Browse files
committed
typescript tweaks
1 parent 3fc5835 commit b46925b

File tree

9 files changed

+17
-9
lines changed

9 files changed

+17
-9
lines changed

playground/app.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import { compressToURL as encode } from '@amoutonbrady/lz-string';
2-
import { Show, onCleanup, createEffect, createSignal, JSX } from 'solid-js';
2+
import {
3+
Show,
4+
onCleanup,
5+
createEffect,
6+
createSignal,
7+
JSX,
8+
} from 'solid-js';
39

410
import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
511
import tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker';

playground/components/header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const Header: Component<{
3131
window.removeEventListener('resize', closeMobileMenu);
3232
});
3333

34-
function closeMobileMenu(event: any) {
34+
function closeMobileMenu() {
3535
setShowMenu(false);
3636
}
3737

@@ -195,7 +195,7 @@ export const Header: Component<{
195195
<select
196196
name="version"
197197
id="version"
198-
onClick={(e) => setShowMenu(false)}
198+
onClick={() => setShowMenu(false)}
199199
class="-mb-1 leading-snug text-white bg-transparent border-transparent hover:border-white cursor-pointer"
200200
style={`background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")`}
201201
onChange={(e) => props.onVersionChange(e.currentTarget.value)}

playground/components/update.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component } from 'solid-js';
1+
import type { Component } from 'solid-js';
22
import { Portal } from 'solid-js/web';
33

44
import { Icon } from 'solid-heroicons';

playground/utils/exportToCsb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pkg from '../../package.json';
2-
import { Tab } from '../../src';
2+
import type { Tab } from '../../src';
33
import { compressToBase64 } from '@amoutonbrady/lz-string';
44

55
type IFiles = Record<string, { content: string | Record<string, any>; isBinary: boolean }>;

playground/utils/exportToJson.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Tab } from '../../src';
1+
import type { Tab } from '../../src';
22

33
/**
44
* This function will convert the tabs of the playground

src/components/editor/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {
22
Component,
33
createEffect,
44
onMount,
5-
JSX,
65
Show,
76
createSignal,
87
onCleanup,

src/components/error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component } from 'solid-js';
1+
import type { Component } from 'solid-js';
22
import { Portal } from 'solid-js/web';
33

44
import { Icon } from 'solid-heroicons';

src/components/repl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { isServer } from 'solid-js/web';
33
import { Icon } from 'solid-heroicons';
44
import { refresh } from 'solid-heroicons/outline';
55
import { unwrap, createStore } from 'solid-js/store';
6-
import { editor as mEditor } from 'monaco-editor';
6+
import type { editor as mEditor } from 'monaco-editor';
77
import { Preview } from './preview';
88
import { TabItem } from './tab/item';
99
import { TabList } from './tab/list';

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"resolveJsonModule": true,
1212
"noEmit": true,
1313
"strict": true,
14+
"noUnusedLocals": true,
15+
"noUnusedParameters": true,
16+
"importsNotUsedAsValues": "error",
1417
"skipLibCheck": true,
1518
"jsxImportSource": "solid-js",
1619
"types": ["vite/client"]

0 commit comments

Comments
 (0)