Skip to content

Commit e8cb353

Browse files
committed
refactor _AddControl interface
1 parent 1f3180b commit e8cb353

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

shared/ScriptUI.d.ts

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2639,7 +2639,7 @@ declare class _Control {
26392639
* @param name A unique name for the control.
26402640
*/
26412641
interface _AddControlProperties {
2642-
name: string
2642+
name?: string
26432643
}
26442644

26452645
/**
@@ -2774,7 +2774,7 @@ interface _AddControl {
27742774
type: "button",
27752775
bounds?: Bounds | [number, number, number, number],
27762776
text?: string,
2777-
properties?: Partial<_AddControlProperties>,
2777+
properties?: _AddControlProperties,
27782778
): Button
27792779

27802780
/**
@@ -2785,57 +2785,73 @@ interface _AddControl {
27852785
type: "checkbox",
27862786
bounds?: Bounds | [number, number, number, number],
27872787
text?: string,
2788-
properties?: Partial<_AddControlProperties>,
2788+
properties?: _AddControlProperties,
27892789
): Checkbox
27902790

2791+
/**
2792+
*/
27912793
(
27922794
type: "dropdownlist",
27932795
bounds?: Bounds | [number, number, number, number],
27942796
items?: string[],
27952797
properties?: Partial<_AddControlPropertiesDropDownList>,
27962798
): DropDownList
27972799

2800+
/**
2801+
*/
27982802
(
27992803
type: "edittext",
28002804
bounds?: Bounds | [number, number, number, number],
28012805
text?: string,
28022806
properties?: Partial<_AddControlPropertiesEditText>,
28032807
): EditText
28042808

2809+
/**
2810+
*/
28052811
(
28062812
type: "flashplayer",
28072813
bounds?: Bounds | [number, number, number, number],
28082814
movieToLoad?: string | File,
2809-
properties?: Partial<_AddControlProperties>,
2815+
properties?: _AddControlProperties,
28102816
): FlashPlayer
28112817

2818+
/**
2819+
*/
28122820
(
28132821
type: "group",
28142822
bounds?: Bounds | [number, number, number, number],
2815-
properties?: Partial<_AddControlProperties>,
2823+
properties?: _AddControlProperties,
28162824
): Group
28172825

2826+
/**
2827+
*/
28182828
(
28192829
type: "iconbutton",
28202830
bounds?: Bounds | [number, number, number, number],
28212831
icon?: string | File,
28222832
properties?: Partial<_AddControlPropertiesIconButton>,
28232833
): IconButton
28242834

2835+
/**
2836+
*/
28252837
(
28262838
type: "image",
28272839
bounds?: Bounds | [number, number, number, number],
28282840
icon?: string | File,
2829-
properties?: Partial<_AddControlProperties>,
2841+
properties?: _AddControlProperties,
28302842
): Image
28312843

2844+
/**
2845+
*/
28322846
(
28332847
type: "listbox",
28342848
bounds?: Bounds | [number, number, number, number],
28352849
items?: string[],
28362850
properties?: Partial<_AddControlPropertiesListBox>,
28372851
): ListBox
28382852

2853+
/**
2854+
*/
28392855
(
28402856
type: "panel",
28412857
bounds?: Bounds | [number, number, number, number],
@@ -2852,7 +2868,7 @@ interface _AddControl {
28522868
bounds?: Bounds | [number, number, number, number],
28532869
value?: number,
28542870
max?: number,
2855-
properties?: Partial<_AddControlProperties>,
2871+
properties?: _AddControlProperties,
28562872
): Progressbar
28572873

28582874
/**
@@ -2863,7 +2879,7 @@ interface _AddControl {
28632879
type: "radiobutton",
28642880
bounds?: Bounds | [number, number, number, number],
28652881
text?: string,
2866-
properties?: Partial<_AddControlProperties>,
2882+
properties?: _AddControlProperties,
28672883
): RadioButton
28682884

28692885
/**
@@ -2876,7 +2892,7 @@ interface _AddControl {
28762892
value?: number,
28772893
min?: number,
28782894
max?: number,
2879-
properties?: Partial<_AddControlProperties>,
2895+
properties?: _AddControlProperties,
28802896
): Scrollbar
28812897

28822898
/**
@@ -2889,30 +2905,38 @@ interface _AddControl {
28892905
value?: number,
28902906
min?: number,
28912907
max?: number,
2892-
properties?: Partial<_AddControlProperties>,
2908+
properties?: _AddControlProperties,
28932909
): Slider
28942910

2911+
/**
2912+
*/
28952913
(
28962914
type: "statictext",
28972915
bounds?: Bounds | [number, number, number, number],
28982916
text?: string,
28992917
properties?: Partial<_AddControlPropertiesStaticText>,
29002918
): StaticText
29012919

2920+
/**
2921+
*/
29022922
(
29032923
type: "tab",
29042924
bounds: Bounds | [number, number, number, number],
29052925
text?: string[],
2906-
properties?: Partial<_AddControlProperties>,
2926+
properties?: _AddControlProperties,
29072927
): Tab
29082928

2929+
/**
2930+
*/
29092931
(
29102932
type: "tabbedpanel",
29112933
bounds?: Bounds | [number, number, number, number],
29122934
text?: string,
2913-
properties?: Partial<_AddControlProperties>,
2935+
properties?: _AddControlProperties,
29142936
): TabbedPanel
29152937

2938+
/**
2939+
*/
29162940
(
29172941
type: "treeview",
29182942
bounds?: Bounds | [number, number, number, number],

0 commit comments

Comments
 (0)