Skip to content

Commit

Permalink
chore: fix types
Browse files Browse the repository at this point in the history
[skip netlify]
  • Loading branch information
typed-sigterm committed Oct 2, 2024
1 parent 872620c commit 67bff2f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions __tests__/shims.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vitest/globals" />
8 changes: 0 additions & 8 deletions __tests__/tsconfig.json

This file was deleted.

2 changes: 1 addition & 1 deletion app/composables/use-roll-call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default (config: RollCallConfig): Ref<RollCallController> => {
let i = (currentIndex.value ?? -1) + 1; // 若未开始,下一个为第一个,即下标 -1+1
if (i >= options.length) // 越界
i = 0;
const incoming = options[i];
const incoming = options[i]!;
currentValue.value = rollCallOptionToString(incoming);
currentIndex.value = i;

Expand Down
2 changes: 1 addition & 1 deletion app/utils/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface SaveFileOptions {
export async function saveFile(
filename: string,
content: string,
options: SaveFileOptions,
options?: SaveFileOptions,
) {
if (__APP__) { // 独立 app 环境,使用 Tauri API
const {
Expand Down
7 changes: 7 additions & 0 deletions vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ interface ImportMetaEnv {
/** 是否移除独立 App 环境相关代码 */
readonly EXC_NO_APP: string
}

declare module '*.md' {
import type { ComponentOptions } from 'vue';

const Component: ComponentOptions;
export default Component;
}

0 comments on commit 67bff2f

Please sign in to comment.