egirlskey/src/client/app/mobile/api/input.ts

9 lines
148 B
TypeScript
Raw Normal View History

2018-02-21 17:00:30 +00:00
export default function(opts) {
return new Promise<string>((res, rej) => {
2018-03-07 09:55:02 +00:00
const x = window.prompt(opts.title);
if (x) {
res(x);
}
2018-02-21 17:00:30 +00:00
});
}