The flash service functions support a second argument (a hash of properties like sticky that get passed along without any filtering). However, adding custom properties (i.e. title) to that hash currently breaks in TypeScript compilation with the below error.
Argument of type '{ title: string; sticky: true; }' is not assignable to parameter of type 'Partial<MessageOptions>'.\n Object literal may only specify known properties, and 'title' does not exist in type 'Partial<MessageOptions>'.
While the flash objects contain all of the custom properties passed in, the type of MessageOptions is perpetually wrong, so it currently requires a ts-expect-error for this to compile, even though it works perfectly fine once it does compile.
The flash service functions support a second argument (a hash of properties like
sticky
that get passed along without any filtering). However, adding custom properties (i.e.title
) to that hash currently breaks in TypeScript compilation with the below error.Argument of type '{ title: string; sticky: true; }' is not assignable to parameter of type 'Partial<MessageOptions>'.\n Object literal may only specify known properties, and 'title' does not exist in type 'Partial<MessageOptions>'.
While the flash objects contain all of the custom properties passed in, the type of
MessageOptions
is perpetually wrong, so it currently requires ats-expect-error
for this to compile, even though it works perfectly fine once it does compile.