Skip to content

Instantly share code, notes, and snippets.

@LironHazan
Created October 10, 2020 07:19
Show Gist options
  • Save LironHazan/3b25e96c3bb6b4adef3955c8dc186b57 to your computer and use it in GitHub Desktop.
Save LironHazan/3b25e96c3bb6b4adef3955c8dc186b57 to your computer and use it in GitHub Desktop.
I promised I'll switch to new Observable - for our rxjs blog post
private async getTheBand(name: string): Promise<Artist> {
const artist = await import('../../../wasm/pkg/rust_wasm_part');
return artist.query_band(name);
}
getTheBand$(name): Observable<Artist> {
return defer(() => this.getTheBand(name));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment