Skip to content

Commit

Permalink
Update tsconfig with last tsconfig/base
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jul 13, 2023
1 parent 4782573 commit d4a6785
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 67 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "0.0.1",
"description": "mobu timer",
"main": "index.js",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
64 changes: 33 additions & 31 deletions src/Main.elm.d.ts
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
export namespace Elm {
namespace Main {
interface App {
ports: Ports;
}
declare module '*.elm' {
export namespace Elm {
namespace Main {
interface App {
ports: Ports;
}

interface Args {
node: HTMLElement;
flags: Flags;
}
interface Args {
node: HTMLElement;
flags: Flags;
}

interface Flags {
persisted: unknown;
gitRef: string;
}
interface Flags {
persisted: unknown;
gitRef: string;
}

interface Ports {
setStorage: Subscribe<object>;
playSound: Subscribe<string>;
notify: Subscribe<string>;
}
interface Ports {
setStorage: Subscribe<object>;
playSound: Subscribe<string>;
notify: Subscribe<string>;
}

interface Subscribe<T> {
subscribe(callback: (value: T) => void): void;
}
interface Subscribe<T> {
subscribe(callback: (value: T) => void): void;
}

interface Send<T> {
send(value: T): void;
}
interface Send<T> {
send(value: T): void;
}

interface KeyEvent {
sequence: string;
ctrl: boolean;
meta: boolean;
shift: boolean;
}
interface KeyEvent {
sequence: string;
ctrl: boolean;
meta: boolean;
shift: boolean;
}

function init(args: Args): App;
function init(args: Args): App;
}
}
}
30 changes: 0 additions & 30 deletions tsconfig.base.json

This file was deleted.

7 changes: 3 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
// TODO: Use tsconfig/base after all tools support tsconfig.extends array
"extends": "./tsconfig.base.json",
"extends": ["@tsconfig/strictest/tsconfig", "@tsconfig/node20/tsconfig"],
"compilerOptions": {
"lib": ["ESNext", "DOM"],
"lib": ["dom", "dom.iterable"],
"noEmit": true
},
"include": ["./src", "*.config*.ts"]
"include": ["./src/*.ts", "*.config*.ts"]
}
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, loadEnv } from 'vite';
import elmPlugin from 'vite-plugin-elm';
import { plugin } from 'vite-plugin-elm';
import { execSync } from 'child_process';

export default defineConfig(({ mode }) => {
Expand All @@ -11,7 +11,7 @@ export default defineConfig(({ mode }) => {
);

return {
plugins: [elmPlugin()],
plugins: [plugin()],
define: {
APP_COMMIT_REF: JSON.stringify(shortRef),
},
Expand Down

0 comments on commit d4a6785

Please sign in to comment.