Initial commit

This commit is contained in:
eskimo
2025-04-13 17:56:38 -04:00
commit 1cfde91b76
43 changed files with 1181 additions and 0 deletions

3
src/definitions.ts Normal file
View File

@@ -0,0 +1,3 @@
export interface PromoCodePlugin {
echo(options: { value: string }): Promise<{ value: string }>;
}

10
src/index.ts Normal file
View File

@@ -0,0 +1,10 @@
import { registerPlugin } from '@capacitor/core';
import type { PromoCodePlugin } from './definitions';
const PromoCode = registerPlugin<PromoCodePlugin>('PromoCode', {
web: () => import('./web').then((m) => new m.PromoCodeWeb()),
});
export * from './definitions';
export { PromoCode };

10
src/web.ts Normal file
View File

@@ -0,0 +1,10 @@
import { WebPlugin } from '@capacitor/core';
import type { PromoCodePlugin } from './definitions';
export class PromoCodeWeb extends WebPlugin implements PromoCodePlugin {
async echo(options: { value: string }): Promise<{ value: string }> {
console.log('ECHO', options);
return options;
}
}