export class Actor {
conn: unknown | null = null;
init(userID: string, queryClient: QueryClient) {
const client = createClient<typeof registry>("http://localhost:8080");
const conn = client.stream.getOrCreate(userID).connect();
// how to extract the type of "conn" here?
this.conn = conn;
}
}
export const actor = new Actor();
export class Actor {
conn: unknown | null = null;
init(userID: string, queryClient: QueryClient) {
const client = createClient<typeof registry>("http://localhost:8080");
const conn = client.stream.getOrCreate(userID).connect();
// how to extract the type of "conn" here?
this.conn = conn;
}
}
export const actor = new Actor();