Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESModuleのパッケージを読み込めるようにする #2073

Merged
merged 13 commits into from
May 24, 2024
Merged
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"buffer": "6.0.3",
"clone-deep": "4.0.1",
"dayjs": "1.10.7",
"electron-log": "5.0.0",
"electron-log": "5.1.2",
Hiroshiba marked this conversation as resolved.
Show resolved Hide resolved
"electron-window-state": "5.0.3",
"encoding-japanese": "1.0.30",
"fast-array-diff": "1.1.0",
Expand Down
13 changes: 13 additions & 0 deletions src/@types/immer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// immerの内部APIの型定義。exportsで指定されていないファイルを参照するために用意したもの。
declare module "immer/src/plugins/patches" {
export function enablePatches(): void;
}
declare module "immer/src/plugins/mapset" {
export function enableMapSet(): void;
}
declare module "immer/src/utils/plugins" {
import { Patch } from "immer";
export function getPlugin(name: "Patches"): {
applyPatches_: (state: unknown, patches: Patch[]) => void;
};
}
8 changes: 8 additions & 0 deletions src/@types/vuex.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// vuexのexportsにtypeがないのを回避するWorkaround。
Hiroshiba marked this conversation as resolved.
Show resolved Hide resolved
// https://github.com/vuejs/vuex/issues/2213#issuecomment-1592267216
declare module "vuex" {
export * from "vuex/types/index.d.ts";
export * from "vuex/types/helpers.d.ts";
export * from "vuex/types/logger.d.ts";
export * from "vuex/types/vue.d.ts";
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
Expand Down
Loading