Skip to content

Commit b453d9d

Browse files
authored
Add undefined to optional properties, part SE (DefinitelyTyped#54310)
In preparation for exactOptionalPropertyTypes in Typescript 4.4, add undefined to all optional properties. #no-publishing-comment This PR covers packages starting with se--ss-. microsoft/dtslint#335
1 parent fc8f09a commit b453d9d

File tree

246 files changed

+8394
-8394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+8394
-8394
lines changed

types/seamless-immutable/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ declare namespace SeamlessImmutable {
1919
};
2020

2121
interface MergeConfig {
22-
deep?: boolean;
23-
mode?: 'replace' | 'merge';
22+
deep?: boolean | undefined;
23+
mode?: 'replace' | 'merge' | undefined;
2424
merger?(a: any, b: any, config: any): any;
2525
}
2626

types/seamless/index.d.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,125 +23,125 @@ declare namespace Seamless {
2323
* The text to show when the child page is loading.
2424
* @default 'Loading ...'
2525
*/
26-
loading?: string,
26+
loading?: string | undefined,
2727
/**
2828
* The url of the spinner GIF that is shown when the child page is loading.
2929
* @default 'http://www.travistidwell.com/seamless.js/src/loader.gif'
3030
*/
31-
spinner?: string,
31+
spinner?: string | undefined,
3232
/**
3333
* Show or not the loading indicator.
3434
* @default true
3535
*/
36-
showLoadingIndicator?: boolean,
36+
showLoadingIndicator?: boolean | undefined,
3737
/**
3838
* Called when a child iframe has finished connecting.
3939
* @default null
4040
*/
41-
onConnect?: ((data: any) => void) | null,
41+
onConnect?: ((data: any) => void) | null | undefined,
4242
/**
4343
* The styles to inject into the child page.
4444
* @default []
4545
*/
46-
styles?: string[],
46+
styles?: string[] | undefined,
4747
/**
4848
* If the fallback functionality is enabled.
4949
* @default false
5050
*/
51-
fallback?: boolean,
51+
fallback?: boolean | undefined,
5252
/**
5353
* Additional query params to attach to the fallback window when it is opened.
5454
* @default ''
5555
*/
56-
fallbackParams?: string,
56+
fallbackParams?: string | undefined,
5757
/**
5858
* A message to show below the child iframe to offer assistance if they are having problems.
5959
* @default ''
6060
*/
61-
fallbackText?: string,
61+
fallbackText?: string | undefined,
6262
/**
6363
* The string to show within the 'Click here' link to open the fallback window.
6464
* @default 'Click Here'
6565
*/
66-
fallbackLinkText?: string,
66+
fallbackLinkText?: string | undefined,
6767
/**
6868
* Text to add after the fallbackLinkText link.
6969
* @default 'to open in a separate window.'
7070
*/
71-
fallbackLinkAfter?: string,
71+
fallbackLinkAfter?: string | undefined,
7272
/**
7373
* An array of string styles to add to the fallback text when something bad happens.
7474
* @default [ 'padding: 15px', 'border: 1px solid transparent', 'border-radius: 4px', 'color: #3a87ad', 'background-color: #d9edf7', 'border-color: #bce8f1' ]
7575
*/
76-
fallbackStyles?: string[],
76+
fallbackStyles?: string[] | undefined,
7777
/**
7878
* An array of string styles to add to the fallback link.
7979
* @default [ 'display: inline-block', 'color: #333', 'border: 1px solid #ccc', 'background-color: #fff', 'padding: 5px 10px', 'text-decoration: none', 'font-size: 12px', 'line-height: 1.5', 'border-radius: 6px', 'font-weight: 400', 'cursor: pointer', '-webkit-user-select: none', '-moz-user-select: none', '-ms-user-select: none', 'user-select: none' ]
8080
*/
81-
fallbackLinkStyles?: string[],
81+
fallbackLinkStyles?: string[] | undefined,
8282
/**
8383
* An array of string styles to add to the fallback link on hover.
8484
* @default [ 'background-color:#ebebeb', 'border-color:#adadad' ]
8585
*/
86-
fallbackLinkHoverStyles?: string[],
86+
fallbackLinkHoverStyles?: string[] | undefined,
8787
/**
8888
* The width of the window that is opened up for the fallback.
8989
* @default 960
9090
*/
91-
fallbackWindowWidth?: number,
91+
fallbackWindowWidth?: number | undefined,
9292
/**
9393
* The height of the window that is opened up for the fallback.
9494
* @default 800
9595
*/
96-
fallbackWindowHeight?: number
96+
fallbackWindowHeight?: number | undefined
9797
}
9898

9999
export interface ConnectOptions {
100100
/**
101101
* The url of the parent page to connect to.
102102
* @default ''
103103
*/
104-
url?: string,
104+
url?: string | undefined,
105105
/**
106106
* The container for the main content on the page which determines the height of the page.
107107
* @default 'body'
108108
*/
109-
container?: string,
109+
container?: string | undefined,
110110
/**
111111
* The milliseconds that an update is created from the child to the parent.
112112
* @default 200
113113
*/
114-
update?: number,
114+
update?: number | undefined,
115115
/**
116116
* If this page should allow injected styles.
117117
* @default false
118118
*/
119-
allowStyleInjection?: boolean,
119+
allowStyleInjection?: boolean | undefined,
120120
/**
121121
* Allow appended styles to be injected.
122122
* @default false
123123
*/
124-
allowAppendedStyleInjection?: boolean,
124+
allowAppendedStyleInjection?: boolean | undefined,
125125
/**
126126
* If the child page requires cookies (See Child iFrame Cookie Problem section)
127127
* @default false
128128
*/
129-
requireCookies?: boolean,
129+
requireCookies?: boolean | undefined,
130130
/**
131131
* The message to show if the cookie test fails.
132132
* @default 'Your browser requires this page to be opened in a separate window.'
133133
*/
134-
cookieFallbackMsg?: string,
134+
cookieFallbackMsg?: string | undefined,
135135
/**
136136
* The text to place inside the link to have them open a new window if the cookie test fails.
137137
* @default 'Click Here'
138138
*/
139-
cookieFallbackLinkMsg?: string,
139+
cookieFallbackLinkMsg?: string | undefined,
140140
/**
141141
* The text to place after the link when the cookie test fails.
142142
* @default ' to open in a separate window.'
143143
*/
144-
cookieFallbackAfterMsg?: string,
144+
cookieFallbackAfterMsg?: string | undefined,
145145
/**
146146
* Callback that is called when an update is triggered to the parent.
147147
* @default null

types/search-index/index.d.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55

66
interface SearchIndexOptions {
7-
db?: string;
8-
cacheLength?: number;
9-
caseSensitive?: boolean;
10-
name?: string;
11-
tokenAppend?: string;
12-
stopwords?: string[];
7+
db?: string | undefined;
8+
cacheLength?: number | undefined;
9+
caseSensitive?: boolean | undefined;
10+
name?: string | undefined;
11+
tokenAppend?: string | undefined;
12+
stopwords?: string[] | undefined;
1313
}
1414

1515
interface Page {
@@ -67,12 +67,12 @@ interface Sort {
6767
type Score = 'TFIDF' | 'SUM' | 'PRODUCT' | 'CONCAT';
6868

6969
interface QueryOptions {
70-
BUCKETS?: string[];
71-
DOCUMENTS?: boolean;
72-
FACETS?: any[];
73-
PAGE?: Page;
74-
SCORE?: Score;
75-
SORT?: Sort;
70+
BUCKETS?: string[] | undefined;
71+
DOCUMENTS?: boolean | undefined;
72+
FACETS?: any[] | undefined;
73+
PAGE?: Page | undefined;
74+
SCORE?: Score | undefined;
75+
SORT?: Sort | undefined;
7676
}
7777

7878
interface PutOptions {

types/season/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55

66
export interface ParseOptions {
7-
allowDuplicateKeys?: boolean;
7+
allowDuplicateKeys?: boolean | undefined;
88
}
99

1010
/** Set the cache directory to use for storing compiled CSON files. */

types/seatsio/lib/chartManager.d.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ declare namespace Seatsio {
1414
secretKey: string;
1515
chart: string;
1616
mode: 'manageRulesets';
17-
language?: string;
18-
messages?: { [key: string]: string };
19-
tooltipInfo?: (object: BookableObject) => string;
20-
showFullScreenButton?: boolean;
21-
colorScheme?: ColorScheme;
22-
colors?: Colors;
23-
stylePreset?: StylePreset;
24-
style?: Style;
17+
language?: string | undefined;
18+
messages?: { [key: string]: string } | undefined;
19+
tooltipInfo?: ((object: BookableObject) => string) | undefined;
20+
showFullScreenButton?: boolean | undefined;
21+
colorScheme?: ColorScheme | undefined;
22+
colors?: Colors | undefined;
23+
stylePreset?: StylePreset | undefined;
24+
style?: Style | undefined;
2525

26-
onChartRendered?: (chart: ChartManager) => void;
27-
onChartRenderingFailed?: (chart: ChartManager) => void;
28-
onObjectSelected?: (object: BookableObject, selectedTicketType?: { price: number; ticketType?: string }) => void;
29-
onObjectDeselected?: (object: BookableObject, deselectedTicketType?: { price: number; ticketType?: string }) => void;
30-
onObjectClicked?: (object: BookableObject) => void;
31-
onFullScreenOpened?: () => void;
32-
onFullScreenClosed?: () => void;
26+
onChartRendered?: ((chart: ChartManager) => void) | undefined;
27+
onChartRenderingFailed?: ((chart: ChartManager) => void) | undefined;
28+
onObjectSelected?: ((object: BookableObject, selectedTicketType?: { price: number; ticketType?: string | undefined }) => void) | undefined;
29+
onObjectDeselected?: ((object: BookableObject, deselectedTicketType?: { price: number; ticketType?: string | undefined }) => void) | undefined;
30+
onObjectClicked?: ((object: BookableObject) => void) | undefined;
31+
onFullScreenOpened?: (() => void) | undefined;
32+
onFullScreenClosed?: (() => void) | undefined;
3333
}
3434
}

types/seatsio/lib/definitions.d.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@ declare namespace Seatsio {
33

44
interface BaseObject {
55
accessible: boolean;
6-
category?: Category;
7-
center?: { x: number, y: number };
6+
category?: Category | undefined;
7+
center?: { x: number, y: number } | undefined;
88
label: string;
99
labels: {
1010
own: string
11-
parent?: string
12-
section?: string
11+
parent?: string | undefined
12+
section?: string | undefined
1313
};
14-
pricing?: Pricing[] | Pricing;
14+
pricing?: Pricing[] | Pricing | undefined;
1515
status: string;
1616
extraData: any;
1717
dataPerEvent: { [eventKey: string]: DataPerEvent };
1818
forSale: boolean;
1919
selectable: boolean;
2020
selected: boolean;
21-
selectedTicketType?: string;
21+
selectedTicketType?: string | undefined;
2222
inSelectableChannel: boolean;
2323
objectType: string;
2424

2525
select(ticketType?: string): void;
2626
deselect(ticketType?: string): void;
2727
pulse(): void;
2828
unpulse(): void;
29-
displayObjectType?: string;
29+
displayObjectType?: string | undefined;
3030
}
3131

3232
interface Category {
@@ -39,7 +39,7 @@ declare namespace Seatsio {
3939

4040
interface Seat extends BaseObject {
4141
parent: { type: 'row' | 'table' };
42-
viewFromSeatUrl?: string;
42+
viewFromSeatUrl?: string | undefined;
4343
companionSeat: boolean;
4444
restrictedView: boolean;
4545
disabledBySocialDistancingRules: boolean;
@@ -65,7 +65,7 @@ declare namespace Seatsio {
6565
interface Pricing {
6666
price: number;
6767
formattedPrice: string;
68-
ticketType?: string;
68+
ticketType?: string | undefined;
6969
}
7070

7171
interface DataPerEvent {
@@ -86,19 +86,19 @@ declare namespace Seatsio {
8686
type ColorScheme = 'light' | 'dark';
8787

8888
interface Colors {
89-
colorSelected?: string;
90-
cursorTooltipBackgroundColor?: string;
91-
colorTitle?: string;
89+
colorSelected?: string | undefined;
90+
cursorTooltipBackgroundColor?: string | undefined;
91+
colorTitle?: string | undefined;
9292
}
9393

9494
type StylePreset = 'balance' | 'bubblegum' | 'flathead' | 'bezels' | 'leaf';
9595

9696
interface Style {
97-
font?: 'Roboto' | 'Montserrat' | 'WorkSans' | 'NotoSansHK' | 'Lato';
98-
fontWeight?: 'bolder' | 'minMax';
99-
borderRadius?: 'none' | 'max' | 'asymmetrical';
100-
border?: 'thick' | '3d';
101-
padding?: 'spacious';
102-
buttonFace?: 'fillEnabled' | 'fillHighlightedOption';
97+
font?: 'Roboto' | 'Montserrat' | 'WorkSans' | 'NotoSansHK' | 'Lato' | undefined;
98+
fontWeight?: 'bolder' | 'minMax' | undefined;
99+
borderRadius?: 'none' | 'max' | 'asymmetrical' | undefined;
100+
border?: 'thick' | '3d' | undefined;
101+
padding?: 'spacious' | undefined;
102+
buttonFace?: 'fillEnabled' | 'fillHighlightedOption' | undefined;
103103
}
104104
}

types/seatsio/lib/eventManager.d.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ declare namespace Seatsio {
1515
secretKey: string;
1616
event: string;
1717
mode: 'manageObjectStatuses' | 'manageForSaleConfig' | 'manageTableBooking' | 'manageChannels';
18-
language?: string;
19-
messages?: { [key: string]: string };
20-
tooltipInfo?: (object: BookableObject) => string;
21-
showFullScreenButton?: boolean;
22-
colorScheme?: ColorScheme;
23-
colors?: Colors;
24-
stylePreset?: StylePreset;
25-
style?: Style;
18+
language?: string | undefined;
19+
messages?: { [key: string]: string } | undefined;
20+
tooltipInfo?: ((object: BookableObject) => string) | undefined;
21+
showFullScreenButton?: boolean | undefined;
22+
colorScheme?: ColorScheme | undefined;
23+
colors?: Colors | undefined;
24+
stylePreset?: StylePreset | undefined;
25+
style?: Style | undefined;
2626

27-
onChartRendered?: (chart: EventManager) => void;
28-
onChartRenderingFailed?: (chart: EventManager) => void;
29-
onObjectSelected?: (object: BookableObject, selectedTicketType?: { price: number; ticketType?: string }) => void;
30-
onObjectDeselected?: (object: BookableObject, deselectedTicketType?: { price: number; ticketType?: string }) => void;
31-
onObjectClicked?: (object: BookableObject) => void;
32-
onFullScreenOpened?: () => void;
33-
onFullScreenClosed?: () => void;
27+
onChartRendered?: ((chart: EventManager) => void) | undefined;
28+
onChartRenderingFailed?: ((chart: EventManager) => void) | undefined;
29+
onObjectSelected?: ((object: BookableObject, selectedTicketType?: { price: number; ticketType?: string | undefined }) => void) | undefined;
30+
onObjectDeselected?: ((object: BookableObject, deselectedTicketType?: { price: number; ticketType?: string | undefined }) => void) | undefined;
31+
onObjectClicked?: ((object: BookableObject) => void) | undefined;
32+
onFullScreenOpened?: (() => void) | undefined;
33+
onFullScreenClosed?: (() => void) | undefined;
3434
}
3535
}

0 commit comments

Comments
 (0)