File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ import * as testLab from "./providers/testLab";
53
53
*/
54
54
function assertRuntimeOptionsValid ( runtimeOptions : RuntimeOptions ) : boolean {
55
55
const mem = runtimeOptions . memory ;
56
- if ( mem && ! ( mem instanceof ResetValue ) && ! VALID_MEMORY_OPTIONS . includes ( mem ) ) {
56
+ if ( mem && typeof mem !== "object" && ! VALID_MEMORY_OPTIONS . includes ( mem ) ) {
57
57
throw new Error (
58
58
`The only valid memory allocation values are: ${ VALID_MEMORY_OPTIONS . join ( ", " ) } `
59
59
) ;
Original file line number Diff line number Diff line change @@ -178,11 +178,11 @@ export interface RuntimeOptions {
178
178
/**
179
179
* Amount of memory to allocate to the function.
180
180
*/
181
- memory ?: typeof VALID_MEMORY_OPTIONS [ number ] | ResetValue ;
181
+ memory ?: typeof VALID_MEMORY_OPTIONS [ number ] | Expression < number > | ResetValue ;
182
182
/**
183
183
* Timeout for the function in seconds, possible values are 0 to 540.
184
184
*/
185
- timeoutSeconds ?: number | ResetValue ;
185
+ timeoutSeconds ?: number | Expression < number > | ResetValue ;
186
186
187
187
/**
188
188
* Min number of actual instances to be running at a given time.
@@ -191,12 +191,12 @@ export interface RuntimeOptions {
191
191
* Instances will be billed for memory allocation and 10% of CPU allocation
192
192
* while idle.
193
193
*/
194
- minInstances ?: number | ResetValue ;
194
+ minInstances ?: number | Expression < number > | ResetValue ;
195
195
196
196
/**
197
197
* Max number of actual instances allowed to be running in parallel.
198
198
*/
199
- maxInstances ?: number | ResetValue ;
199
+ maxInstances ?: number | Expression < number > | ResetValue ;
200
200
201
201
/**
202
202
* Connect cloud function to specified VPC connector.
You can’t perform that action at this time.
0 commit comments