#Subclass with strict override passes parent check

5 messages · Page 1 of 1 (latest)

drowsy ridgeBOT
#
m.a.t.t.t#0

Preview:```ts
import {BaseBlockstore} from "blockstore-core"
import type {AbortOptions} from "interface-store"
import type {CID} from "multiformats/cid"
import type {Blockstore} from "interface-blockstore"

class MyBlockstore extends BaseBlockstore {
override async put
...```

lucid sundial
#
const stores: Blockstore[] = [new MyBlockstore()]

i was expecting this to throw an error, because MyBlockstore uses an override for a method that ultimately makes it not compatible with code expecting a Blockstore

woeful remnant
patent shellBOT
#
put(key: Key, val: Input, options?: AbortOptions & PutOptionsExtension): Await<Key>