Upgrade typescript
This commit is contained in:
parent
cb6693413f
commit
cfb324a6d5
24 changed files with 57 additions and 41 deletions
|
@ -35,7 +35,7 @@
|
|||
"esbuild": "^0.12.15",
|
||||
"esbuild-register": "^2.5.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"typescript": "4.6.4"
|
||||
"typescript": "5.1.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash-es": "^4.17.21"
|
||||
|
|
|
@ -696,7 +696,7 @@ describe(`The exhaustive guide to dataverse`, () => {
|
|||
|
||||
// Let's create a function that will set a property of an object by a pointer, similar to `lodash.set()`.
|
||||
// The function will take the root object, the pointer, and the new value.
|
||||
function setByPointer<Root, Value>(
|
||||
function setByPointer<Root extends {}, Value>(
|
||||
root: Root,
|
||||
getPointer: (ptr: Pointer<Root>) => Pointer<Value>,
|
||||
newValue: Value,
|
||||
|
|
|
@ -233,7 +233,7 @@ class PrismInstance<V> implements Prism<V> {
|
|||
}
|
||||
|
||||
// let's cache the last value so we don't call the listener if the value hasn't changed
|
||||
let lastValue =
|
||||
let lastValue: V | typeof emptyObject =
|
||||
// use an empty object as the initial value so that the listener is called on the first tick.
|
||||
// if we were to use, say, undefined, and this.getValue() also returned undefined, the listener
|
||||
// would never be called.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue