Initial commit

This commit is contained in:
eskimo
2024-10-03 01:03:39 -04:00
commit 6a108e8f23
108 changed files with 2680 additions and 0 deletions

3
src/definitions.ts Normal file
View File

@@ -0,0 +1,3 @@
export interface SocketsPlugin {
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 { SocketsPlugin } from './definitions';
const Sockets = registerPlugin<SocketsPlugin>('Sockets', {
web: () => import('./web').then((m) => new m.SocketsWeb()),
});
export * from './definitions';
export { Sockets };

10
src/web.ts Normal file
View File

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