# Commit (/docs/collab/reference/collab-client/classes/Commit)



# Class: Commit [#class-commit]

Defined in:
node\_modules/.store/@stepwisehq-prosemirror-collab-commit-virtual-03dc2b656d/package/dist/collab-commit.d.ts:14

## Constructors [#constructors]

### Constructor [#constructor]

```ts
new Commit(
   version: number,
   ref: string,
   steps: Step[]): Commit;
```

Defined in:
node\_modules/.store/@stepwisehq-prosemirror-collab-commit-virtual-03dc2b656d/package/dist/collab-commit.d.ts:18

#### Parameters [#parameters]

##### version [#version]

`number`

##### ref [#ref]

`string`

##### steps [#steps]

`Step`\[]

#### Returns [#returns]

`Commit`

## Properties [#properties]

### ref [#ref-1]

```ts
readonly ref: string;
```

Defined in:
node\_modules/.store/@stepwisehq-prosemirror-collab-commit-virtual-03dc2b656d/package/dist/collab-commit.d.ts:16

***

### steps [#steps-1]

```ts
readonly steps: Step[];
```

Defined in:
node\_modules/.store/@stepwisehq-prosemirror-collab-commit-virtual-03dc2b656d/package/dist/collab-commit.d.ts:17

***

### version [#version-1]

```ts
readonly version: number;
```

Defined in:
node\_modules/.store/@stepwisehq-prosemirror-collab-commit-virtual-03dc2b656d/package/dist/collab-commit.d.ts:15

## Methods [#methods]

### toJSON() [#tojson]

```ts
toJSON(): CommitJSON;
```

Defined in:
node\_modules/.store/@stepwisehq-prosemirror-collab-commit-virtual-03dc2b656d/package/dist/collab-commit.d.ts:19

#### Returns [#returns-1]

[`CommitJSON`](/docs/collab/reference/collab-client/interfaces/CommitJSON)

***

### toSchema() [#toschema]

```ts
toSchema(schema: Schema): Commit;
```

Defined in:
node\_modules/.store/@stepwisehq-prosemirror-collab-commit-virtual-03dc2b656d/package/dist/collab-commit.d.ts:21

Return a new commit with the steps linked to the supplied schema.

#### Parameters [#parameters-1]

##### schema [#schema]

`Schema`

#### Returns [#returns-2]

`Commit`

***

### FromJSON() [#fromjson]

```ts
static FromJSON(schema: Schema, spec: CommitJSON): Commit;
```

Defined in:
node\_modules/.store/@stepwisehq-prosemirror-collab-commit-virtual-03dc2b656d/package/dist/collab-commit.d.ts:23

Return a commit based on the supplied JSON and schema.

#### Parameters [#parameters-2]

##### schema [#schema-1]

`Schema`

##### spec [#spec]

[`CommitJSON`](/docs/collab/reference/collab-client/interfaces/CommitJSON)

#### Returns [#returns-3]

`Commit`
