first commit

This commit is contained in:
Hussar
2026-04-12 15:35:50 +00:00
commit 42d20cb0ed
80 changed files with 2210 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
export interface TwitchExtLike {
onAuthorized(callback: (auth: { token: string; userId: string }) => void): void;
onContext(callback: (context: Record<string, unknown>) => void): void;
onVisibilityChanged(callback: (isVisible: boolean, context: unknown) => void): void;
listen(topic: string, callback: (target: string, contentType: string, message: string) => void): void;
}
export const twitchExtMock: TwitchExtLike = {
onAuthorized(callback) {
callback({
token:
'mock.jwt.token',
userId: 'U_mock_viewer'
});
},
onContext(callback) {
callback({ theme: 'dark' });
},
onVisibilityChanged(callback) {
callback(true, {});
},
listen(_topic, _callback) {
// No-op in local mock mode.
}
};