INNER CODE UNIT · TypeScript

hello

aws-devtools-labs/aws-blocks · native/swift/Demo/typescript-demo/aws-blocks/index.ts:80

export const hello = new ApiNamespace(scope, 'hello', (context) => ({
  async greet(name: string) {
    return { message: `Hello, ${name}!`, timestamp: Date.now() };
  }
}));

export const authApi = auth.createApi();

export const api = new ApiNamespace(scope, 'api', (context) => ({
  async getValue(key: string) {
    return await store.get(key);
  },
  
  async setValue(key: string, value: string) {
    await store.put(key, value);
    return { success: true };
  },
  

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…