Skip to content

Commit

Permalink
Fixed build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
notangelmario committed Oct 11, 2022
1 parent be5f6e4 commit 494f0b2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "miniated",
"private": true,
"author": "Savin Angel-Mario ([email protected])",
"version": "1.1.0",
"version": "1.1.3",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"check": "tsc --noEmit --resolveJsonModule src/main.ts"
"check": "tsc --noEmit --resolveJsonModule -p ./tsconfig.json"
},
"devDependencies": {
"@types/marked": "^4.0.7",
Expand Down
1 change: 0 additions & 1 deletion src/lib/editor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import monaco from "./monaco";
import { onClose, onOpen, onSave, initDropFile, initLaunchWithFile, onCreate, startAutosave } from "./file";
import { createNotice } from "./status";
import { Store } from "./store";

// Monaco editor doesn't have an API to change default keybindings
Expand Down
12 changes: 6 additions & 6 deletions src/lib/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function getExtension(fname: string) {
return fname.slice((Math.max(0, fname.lastIndexOf(".")) || Infinity) + 1);
}

export function initDropFile(element: HTMLElement, editor: monaco.editor.IStandaloneCodeEditor, store: Store, fileAvailableContext: monaco.editor.IContextKey<boolean>, disableAutosave: () => void) {
export function initDropFile(element: HTMLElement, editor: monaco.editor.IStandaloneCodeEditor, store: Store, fileAvailableContext: monaco.editor.IContextKey<boolean>, _disableAutosave: () => void) {
async function dropHandler(e: DragEvent) {
console.log('File(s) dropped');

Expand All @@ -131,16 +131,16 @@ export function initDropFile(element: HTMLElement, editor: monaco.editor.IStanda

const fileHandle = fileHandleRaw as FileSystemFileHandle;
setEditorText(editor, fileHandle, store, fileAvailableContext);
disableAutosave = startAutosave(editor, fileHandle);
_disableAutosave = startAutosave(editor, fileHandle);
}
}

element.addEventListener("drop", dropHandler, false);
}

export function initLaunchWithFile(editor: monaco.editor.IStandaloneCodeEditor, store: Store, fileAvailableContext: monaco.editor.IContextKey<boolean>, disableAutosave: () => void) {
//@ts-ignore
window.launchQueue.setConsumer((launchParams) => {
export function initLaunchWithFile(editor: monaco.editor.IStandaloneCodeEditor, store: Store, fileAvailableContext: monaco.editor.IContextKey<boolean>, _disableAutosave: () => void) {

(window as any).launchQueue.setConsumer((launchParams: any) => {
// Nothing to do when the queue is empty.
if (!launchParams.files.length) {
return;
Expand All @@ -149,7 +149,7 @@ export function initLaunchWithFile(editor: monaco.editor.IStandaloneCodeEditor,

setEditorText(editor, fileHandle, store, fileAvailableContext)

disableAutosave = startAutosave(editor, fileHandle)
_disableAutosave = startAutosave(editor, fileHandle);
});
}

Expand Down
7 changes: 5 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
"noImplicitReturns": true,
"skipLibCheck": true,
"types": [
"vite-plugin-pwa/client"
"vite-plugin-pwa/client",
"@types/marked",
"@types/wicg-file-system-access"
]
},
"include": ["src"]
"include": ["src"],
"exclude": ["node_modules"]
}

0 comments on commit 494f0b2

Please sign in to comment.