Skip to content

Inconsistent example #5

Description

@ile

The example has commitJson used here:

const newCommits = await getDocumentCommitsSince(commitJson.version) // TODO: Implement

before it's declared, here:

const {docJson, commitJson} = applyCommitJSON(version, schema, doc, newCommits, newCommitJson)

import { applyCommitJSON } from "@stepwisehq/prosemirror-collab-commit/apply-commit"

const newCommitJson = await getCommitsFromClient() // TODO: Implement

const version = await getDocumentVersion() // TODO: Implement
const doc = await getDocument() // TODO: Implement
const newCommits = await getDocumentCommitsSince(commitJson.version) // TODO: Implement
const schemaSpec = await getSchemaSpec() // TODO: Implement

const schema = new Schema(schemaSpec)

const {docJson, commitJson} = applyCommitJSON(version, schema, doc, newCommits, newCommitJson)

await saveDocument(docJson) // TODO: Implement
await broadcastCommit(commitJson) // TODO: Implement

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions