You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now, I just edited nativescript-toast's index.d.ts to: export function makeText(text: string, duration?: string): Toast;
I'm guessing duration's type is at fault as Typescript enums are number based (quoted here), so the duration argument should be changed either to constant strings or string-safe Typescript enums (manual example here ; npm package implementation here)
Hi,
I tried to create a long Toast (as shown on the example page):
Toast.makeText("Hello World", "long").show();
However, I get an error, when compiling it:
error TS2345: Argument of type '"long"' is not assignable to parameter of type 'duration'.
I'm using Nativescript 2.5 (and newest TNS Android). I think there's something wrong with the declaration of the parameter 'duration'...
The text was updated successfully, but these errors were encountered: