Skip to content

Commit

Permalink
fix: some ts config warning
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Aug 12, 2024
1 parent da45c4e commit 02b67e4
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build

on:
push:
branches: [test]
branches: [main]
# tags:
# - 'v*.*.*'
jobs:
Expand Down
2 changes: 1 addition & 1 deletion apps/electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-main",
"version": "0.1.0",
"version": "0.2.0",
"private": false,
"description": "Electron main process",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion apps/electron/scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const options: Configuration = {
publish: [
{
provider: 'github',
releaseType: 'prerelease',
releaseType: 'draft',
// private: true,
},
],
Expand Down
9 changes: 5 additions & 4 deletions apps/electron/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"compilerOptions": {
"target": "esnext",
"target": "ESNext",
"baseUrl": ".",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"paths": {
"/@/*": [
"./src/*"
]
},
"types": [
"node"
"node",
"vite/client"
],
"strict": true,
"sourceMap": false,
Expand Down
2 changes: 1 addition & 1 deletion apps/preload/src/ipcRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class IPCRenderer<
name: T,
fn: (...args: Parameters<BackgroundMessageType[T]>) => void,
): () => void => {
this.listeners[name] = this.listeners[name] || []
this.listeners[name] ??= []

this.listeners[name].push(fn)

Expand Down
2 changes: 1 addition & 1 deletion apps/preload/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const config: UserConfig = {
reportCompressedSize: false,
},

plugins: [dts({ rollupTypes: true })],
plugins: [dts()],
}

export default config
10 changes: 9 additions & 1 deletion packages/vite-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@
"version": "1.0.0",
"description": "",
"author": "",
"license": "ISC",
"license": "MIT",
"keywords": [],
"exports": {
".": {
"types": "./dist/index.d.ts",
"development": "./src/index.ts",
"default": "./dist/index.mjs"
},
"./dist/*": "./dist/*"
},
"main": "index.js",
"files": [
"dist"
Expand Down

0 comments on commit 02b67e4

Please sign in to comment.