Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cozy-dataproxy-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"test": "jest --config=./tests/jest.config.js",
"test:watch": "yarn test --watchAll",
"start": "yarn build:watch",
"lint": "cd .. && yarn eslint --ext js,jsx,ts packages/cozy-dataproxy-lib"
"lint": "cd ../.. && yarn eslint --ext js,jsx,ts packages/cozy-dataproxy-lib"
},
"types": "dist/index.d.ts"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
import type CozyClient from 'cozy-client'

import { CozyDoc } from '../types'

declare module 'cozy-realtime' {
export const RealtimePlugin = (): null => null
RealtimePlugin.pluginName = 'realtime'
export interface RealtimePluginType {
(): void
pluginName: 'realtime'
}

export const RealtimePlugin: RealtimePluginType

export default class CozyRealtime {
constructor(options: { client: CozyClient; sharedDriveId?: string })
subscribe(
event: string,
doctype: string,
handler: (doc: CozyDoc) => void
): void
stop(): void
}
}
Loading
Loading