mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-07 10:22:29 +02:00
Fixing TS API typings (#1451)
Co-authored-by: Amr Bashir <48618675+amrbashir@users.noreply.github.com>
This commit is contained in:
6
.changes/fix-ts-api-typings.md
Normal file
6
.changes/fix-ts-api-typings.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri.js": patch
|
||||
"tauri": minor
|
||||
---
|
||||
|
||||
Fixed missing 'App' variant & string promise instead of void promise.
|
||||
@@ -55,8 +55,8 @@ async function getTauriVersion(): Promise<string> {
|
||||
* @param [exitCode] defaults to 0.
|
||||
* @returns {Promise<void>} Application is closing, nothing is returned
|
||||
*/
|
||||
async function exit(exitCode: Number = 0): Promise<void> {
|
||||
return invokeTauriCommand<string>({
|
||||
async function exit(exitCode: number = 0): Promise<void> {
|
||||
return invokeTauriCommand({
|
||||
__tauriModule: 'App',
|
||||
mainThread: true,
|
||||
message: {
|
||||
@@ -72,7 +72,7 @@ async function exit(exitCode: Number = 0): Promise<void> {
|
||||
* @returns {Promise<void>} Application is restarting, nothing is returned
|
||||
*/
|
||||
async function relaunch(): Promise<void> {
|
||||
return invokeTauriCommand<string>({
|
||||
return invokeTauriCommand({
|
||||
__tauriModule: 'App',
|
||||
mainThread: true,
|
||||
message: {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
import { invoke } from '../tauri'
|
||||
|
||||
export type TauriModule =
|
||||
| 'App'
|
||||
| 'Fs'
|
||||
| 'Window'
|
||||
| 'Shell'
|
||||
|
||||
Reference in New Issue
Block a user