chore(tauri.js) type definitions for Config with proper optional defs

This commit is contained in:
Lucas Nogueira 2020-06-15 10:53:29 -03:00
parent 65e9c4fa40
commit 6cc5fc4370
No known key found for this signature in database
GPG Key ID: 2714B66BCFB01F7F

View File

@ -1,6 +1,3 @@
// TODO: Clean up types, properly mark which ones are optional
// May need to have different types for each stage of config generation process
export interface CliArg { export interface CliArg {
short?: string short?: string
name: string name: string
@ -44,38 +41,35 @@ export interface TauriConfig {
ctx: { ctx: {
prod?: boolean prod?: boolean
dev?: boolean dev?: boolean
target: string target?: string
debug?: boolean debug?: boolean
targetName: string
exitOnPanic?: boolean exitOnPanic?: boolean
} }
tauri: { tauri: {
cli: CliConfig cli?: CliConfig
inlinedAssets: string[]
devPath: string
embeddedServer: { embeddedServer: {
active: boolean active?: boolean
} }
bundle: { bundle: {
active: boolean active?: boolean
targets?: string | string[] targets?: string | string[]
identifier: string identifier: string
icon: string[] icon: string[]
resources?: string[] resources?: string[]
externalBin?: string[] externalBin?: string[]
copyright?: string copyright?: string
category: string category?: string
shortDescription?: string shortDescription?: string
longDescription?: string longDescription?: string
deb?: { deb?: {
depends?: string[] depends?: string[]
useBootstrapper: boolean useBootstrapper?: boolean
} }
osx?: { osx?: {
frameworks?: string[] frameworks?: string[]
minimumSystemVersion?: string minimumSystemVersion?: string
license?: string license?: string
useBootstrapper: boolean useBootstrapper?: boolean
} }
exceptionDomain?: string exceptionDomain?: string
} }
@ -85,18 +79,19 @@ export interface TauriConfig {
} }
window: { window: {
title: string title: string
width: number width?: number
height: number height?: number
resizable: boolean resizable?: boolean
fullscreen?: boolean
} }
security: { security: {
csp: string csp?: string
} }
edge: { edge: {
active: boolean active?: boolean
} }
inliner: { inliner: {
active: boolean active?: boolean
} }
} }
} }