mirror of
https://github.com/kamyu1537/eamuse-card-wasm.git
synced 2024-11-23 19:40:57 +01:00
🏷 encode, decode 에 return type 추가
This commit is contained in:
parent
01957550c9
commit
446441efa0
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user