Skip to content

Commit 9939fd5

Browse files
committed
do not use Partial
1 parent 578d47f commit 9939fd5

File tree

1 file changed

+44
-49
lines changed

1 file changed

+44
-49
lines changed

shared/ScriptUI.d.ts

Lines changed: 44 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2650,8 +2650,8 @@ interface _AddControlProperties {
26502650
* @param items An array of strings for the text of each list item. An item object is created for each item. An item with the text string "-" creates a separator item. Supply this property, or the items argument to the add() method, not both. This form is most useful for elements defined using Resource Specifications.
26512651
*/
26522652
interface _AddControlPropertiesDropDownList {
2653-
name: string
2654-
items: string[]
2653+
name?: string
2654+
items?: string[]
26552655
}
26562656

26572657
/**
@@ -2666,14 +2666,14 @@ interface _AddControlPropertiesDropDownList {
26662666
* @param wantReturn Only applies to multiple line edit controls in ScriptUI Version 6.0 or later. When true the RETURN/ENTER keystroke is considered as text-input advancing the cursor to the next line. The default value is false.
26672667
*/
26682668
interface _AddControlPropertiesEditText {
2669-
name: string
2670-
multiline: boolean
2671-
borderless: boolean
2672-
scrollable: boolean
2673-
readonly: boolean
2674-
noecho: boolean
2675-
enterKeySignalsOnChange: boolean
2676-
wantReturn: boolean
2669+
name?: string
2670+
multiline?: boolean
2671+
borderless?: boolean
2672+
scrollable?: boolean
2673+
readonly?: boolean
2674+
noecho?: boolean
2675+
enterKeySignalsOnChange?: boolean
2676+
wantReturn?: boolean
26772677
}
26782678

26792679
/**
@@ -2683,9 +2683,9 @@ interface _AddControlPropertiesEditText {
26832683
* @param toggle For a button-style control, a value of true causes it to get a button-pressed appearance the first time it is clicked, and alternate with the unpressed appearance each time it is clicked. The toggle state is reflected in the control’s value property.
26842684
*/
26852685
interface _AddControlPropertiesIconButton {
2686-
name: string
2687-
style: "button" | "toolbutton"
2688-
toggle: boolean
2686+
name?: string
2687+
style?: "button" | "toolbutton"
2688+
toggle?: boolean
26892689
}
26902690

26912691
/**
@@ -2700,14 +2700,14 @@ interface _AddControlPropertiesIconButton {
27002700
* @param columnTitles A corresponding array of strings for the title of each column, to be shown if showHeaders is true.
27012701
*/
27022702
interface _AddControlPropertiesListBox {
2703-
name: string
2704-
multiselect: boolean
2705-
selected: boolean
2706-
items: string[]
2707-
numberOfColumns: number
2708-
showHeaders: boolean
2709-
columnWidths: number[]
2710-
columnTitles: string[]
2703+
name?: string
2704+
multiselect?: boolean
2705+
selected?: boolean
2706+
items?: string[]
2707+
numberOfColumns?: number
2708+
showHeaders?: boolean
2709+
columnWidths?: number[]
2710+
columnTitles?: string[]
27112711
}
27122712

27132713
/**
@@ -2717,9 +2717,9 @@ interface _AddControlPropertiesListBox {
27172717
* @param su1PanelCoordinates Photoshop only. When true, this panel automatically adjusts the positions of its children for compatibility with Photoshop CS. Default is false, meaning that the panel does not adjust the positions of its children, even if the parent window has automatic adjustment enabled.
27182718
*/
27192719
interface _AddControlPropertiesPanel {
2720-
name: string
2721-
borderStyle: string
2722-
su1PanelCoordinates: boolean
2720+
name?: string
2721+
borderStyle?: string
2722+
su1PanelCoordinates?: boolean
27232723
}
27242724

27252725
/**
@@ -2730,10 +2730,10 @@ interface _AddControlPropertiesPanel {
27302730
* @param truncate If middle or end, defines where to remove characters from the text and replace them with an ellipsis if the specified title does not fit within the space reserved for it. If none, and the text does not fit, characters are removed from the end, without any replacement ellipsis character.
27312731
*/
27322732
interface _AddControlPropertiesStaticText {
2733-
name: string
2734-
multiline: boolean
2735-
scrolling: boolean
2736-
truncate: string
2733+
name?: string
2734+
multiline?: boolean
2735+
scrolling?: boolean
2736+
truncate?: string
27372737
}
27382738

27392739
/**
@@ -2742,8 +2742,8 @@ interface _AddControlPropertiesStaticText {
27422742
* @param items An array of strings for the text of each top-level list item. An item object is created for each item. An item with the text string "-" creates a separator item. Supply this property, or the items argument to the add() method, not both. This form is most useful for elements defined using Resource Specifications.
27432743
*/
27442744
interface _AddControlPropertiesTreeView {
2745-
name: string
2746-
items: string[]
2745+
name?: string
2746+
items?: string[]
27472747
}
27482748

27492749
/**
@@ -2757,13 +2757,13 @@ interface _AddControlPropertiesTreeView {
27572757
* @param borderless When true, the window has no title bar or borders. Properties that control those features are ignored.
27582758
*/
27592759
interface _AddControlPropertiesWindow {
2760-
resizeable: boolean
2761-
su1PanelCoordinates: boolean
2762-
closeButton: boolean
2763-
maximizeButton: boolean
2764-
minimizeButton: boolean
2765-
independent: boolean
2766-
borderless: boolean
2760+
resizeable?: boolean
2761+
su1PanelCoordinates?: boolean
2762+
closeButton?: boolean
2763+
maximizeButton?: boolean
2764+
minimizeButton?: boolean
2765+
independent?: boolean
2766+
borderless?: boolean
27672767
}
27682768

27692769
interface _AddControl {
@@ -2786,7 +2786,7 @@ interface _AddControl {
27862786
type: "dropdownlist",
27872787
bounds?: _Bounds,
27882788
items?: string[],
2789-
properties?: Partial<_AddControlPropertiesDropDownList>,
2789+
properties?: _AddControlPropertiesDropDownList,
27902790
): DropDownList
27912791

27922792
/**
@@ -2795,7 +2795,7 @@ interface _AddControl {
27952795
type: "edittext",
27962796
bounds?: _Bounds,
27972797
text?: string,
2798-
properties?: Partial<_AddControlPropertiesEditText>,
2798+
properties?: _AddControlPropertiesEditText,
27992799
): EditText
28002800

28012801
/**
@@ -2817,7 +2817,7 @@ interface _AddControl {
28172817
type: "iconbutton",
28182818
bounds?: _Bounds,
28192819
icon?: string | File,
2820-
properties?: Partial<_AddControlPropertiesIconButton>,
2820+
properties?: _AddControlPropertiesIconButton,
28212821
): IconButton
28222822

28232823
/**
@@ -2830,17 +2830,12 @@ interface _AddControl {
28302830
type: "listbox",
28312831
bounds?: _Bounds,
28322832
items?: string[],
2833-
properties?: Partial<_AddControlPropertiesListBox>,
2833+
properties?: _AddControlPropertiesListBox,
28342834
): ListBox
28352835

28362836
/**
28372837
*/
2838-
(
2839-
type: "panel",
2840-
bounds?: _Bounds,
2841-
text?: string,
2842-
properties?: Partial<_AddControlPropertiesPanel>,
2843-
): Panel
2838+
(type: "panel", bounds?: _Bounds, text?: string, properties?: _AddControlPropertiesPanel): Panel
28442839

28452840
/**
28462841
* Creation of a ProgressBar.
@@ -2897,7 +2892,7 @@ interface _AddControl {
28972892
type: "statictext",
28982893
bounds?: _Bounds,
28992894
text?: string,
2900-
properties?: Partial<_AddControlPropertiesStaticText>,
2895+
properties?: _AddControlPropertiesStaticText,
29012896
): StaticText
29022897

29032898
/**
@@ -2919,6 +2914,6 @@ interface _AddControl {
29192914
type: "treeview",
29202915
bounds?: _Bounds,
29212916
items?: string[],
2922-
properties?: Partial<_AddControlPropertiesTreeView>,
2917+
properties?: _AddControlPropertiesTreeView,
29232918
): TreeView
29242919
}

0 commit comments

Comments
 (0)