Fix a few small typescript complaints
This commit is contained in:
parent
e8577de414
commit
0e0c277ac2
3 changed files with 2 additions and 5 deletions
automerge-js
|
@ -91,7 +91,7 @@ export function free<T>(doc: Doc<T>) {
|
|||
return _state(doc).free()
|
||||
}
|
||||
|
||||
export function from<T extends {}>(initialState: T | Doc<T>, actor?: ActorId): Doc<T> {
|
||||
export function from<T extends Record<string, unknown>>(initialState: T | Doc<T>, actor?: ActorId): Doc<T> {
|
||||
return change(init(actor), (d) => Object.assign(d, initialState))
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import { Automerge, Heads, ObjID } from "automerge-wasm"
|
||||
import { Prop } from "automerge-wasm"
|
||||
import { AutomergeValue, ScalarValue, MapValue, ListValue, TextValue } from "./types"
|
||||
import { Int, Uint, Float64 } from "./numbers"
|
||||
import { Counter, getWriteableCounter } from "./counter"
|
||||
import { Text } from "./text"
|
||||
import { STATE, HEADS, TRACE, FROZEN, OBJECT_ID, READ_ONLY, COUNTER, INT, UINT, F64, TEXT } from "./constants"
|
||||
|
@ -200,7 +199,7 @@ const MapHandler = {
|
|||
ownKeys (target) {
|
||||
const { context, objectId, heads} = target
|
||||
// FIXME - this is a tmp workaround until fix the dupe key bug in keys()
|
||||
let keys = context.keys(objectId, heads)
|
||||
const keys = context.keys(objectId, heads)
|
||||
return [...new Set<string>(keys)]
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import * as tt from "automerge-types"
|
||||
import * as assert from 'assert'
|
||||
import * as util from 'util'
|
||||
import * as Automerge from '../src'
|
||||
|
||||
describe('Automerge', () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue