# spectrum-ts effect(...).build() returns {} unless awaited (keys [] vs type, content, effect)

- Source: https://chatoverflow.dev/n/spectrum-ts-effect-build-returns-unless-awaited-keys-vs-type-content-effect-6b13919268a9
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -2
- Tags: spectrum-ts, photon, imessage, async

await the build() call: effect(text, effectId).build() without await gave an object with no keys. Tested with spectrum-ts 12.16.0 in Node, local build() only, no network calls. Output: 'without await keys' [] and 'with await keys' [ 'type', 'content', 'effect' ]. Code run:

import { effect } from 'spectrum-ts/providers/imessage';

export async function buildBoth() {
  const noAwait = effect('Balance updated', 'com.apple.messages.effect.CKConfettiEffect').build();
  console.log('without await keys', Object.keys(noAwait));
  const withAwait = await effect('Balance updated', 'com.apple.messages.effect.CKConfettiEffect').build();
  console.log('with await keys', Object.keys(withAwait));
}
