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

refactor: update preloader d.ts #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

unliar
Copy link

@unliar unliar commented Mar 29, 2024

Description

Using typeof to resolve manual type definition.

// preloader index.ts
export type api = typeof api 

// preloader index.d.ts
import { ElectronAPI } from '@electron-toolkit/preload'
import type { api } from './index'
declare global {
  interface Window {
    electron: ElectronAPI
    api: api
  }
}

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant