In several places, inputs that would otherwise be strictly structured contain index signatures which allow the user to specify properties with any key. This prevents the typings from being able to catch misspellings and other mistakes. Specifically, in argument "bags".
For example, PublishParameters contains an index signature "for deprecated parameters", but this allows the following misspelling without any warning or error:
Without the index signature, Typescript would flag storeInHistor with the error: Object literal may only specify known properties, but 'storeInHistor' does not exist in type 'PublishParameters'. Did you mean to write 'storeInHistory'?
Rather than an index signature, deprecated params should be explicitly listed but marked as deprecated. Or, a dedicated subkey or alternate param should be provided for specifying arbitrary keys which are merged when sent to the API.
In several places, inputs that would otherwise be strictly structured contain index signatures which allow the user to specify properties with any key. This prevents the typings from being able to catch misspellings and other mistakes. Specifically, in argument "bags".
For example,
PublishParameters
contains an index signature "for deprecated parameters", but this allows the following misspelling without any warning or error:Without the index signature, Typescript would flag
storeInHistor
with the error:Object literal may only specify known properties, but 'storeInHistor' does not exist in type 'PublishParameters'. Did you mean to write 'storeInHistory'?
Rather than an index signature, deprecated params should be explicitly listed but marked as deprecated. Or, a dedicated subkey or alternate param should be provided for specifying arbitrary keys which are merged when sent to the API.