1
0
mirror of https://github.com/kamyu1537/eamuse-card-wasm.git synced 2024-11-24 03:50:10 +01:00

🏷 encode, decode 에 return type 추가

This commit is contained in:
Byeon Seongun 2020-05-06 16:28:05 +09:00
parent 01957550c9
commit 446441efa0
No known key found for this signature in database
GPG Key ID: DA5BD8E6CBC00CC3

View File

@ -21,7 +21,7 @@ const wasmModule = new WebAssembly.Module(bytes);
const wasmInstance = new WebAssembly.Instance(wasmModule, go.importObject);
go.run(wasmInstance).then();
export const encode = function(nfcId: string) {
export const encode = function(nfcId: string): Promise<string> {
return new Promise((resolve) => {
// @ts-ignore
KONAMI_CARD_ENCODE(nfcId, function(result: string) {
@ -30,7 +30,7 @@ export const encode = function(nfcId: string) {
});
};
export const decode = function(cardId: string) {
export const decode = function(cardId: string): Promise<string> {
return new Promise((resolve) => {
// @ts-ignore
KONAMI_CARD_DECODE(cardId, function(result: string) {