Skip to content

Commit

Permalink
fix: deprecate kinds in favor of far classes
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Sep 7, 2022
1 parent d9583f8 commit d9469b9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/vat-data/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,15 @@ type DefineKindOptions<C> = {

export type VatData = {
// virtual kinds
/** @deprecated Use defineVirtualFarClass instead */
defineKind: <P, S, F>(
tag: string,
init: (...args: P) => S,
facet: F,
options?: DefineKindOptions<KindContext<S, F>>,
) => (...args: P) => KindFacet<F>;

/** @deprecated Use defineVirtualFarClassKit instead */
defineKindMulti: <P, S, B>(
tag: string,
init: (...args: P) => S,
Expand All @@ -110,12 +113,16 @@ export type VatData = {

// durable kinds
makeKindHandle: (descriptionTag: string) => DurableKindHandle;

/** @deprecated Use defineDurableFarClass instead */
defineDurableKind: <P, S, F>(
kindHandle: DurableKindHandle,
init: (...args: P) => S,
facet: F,
options?: DefineKindOptions<KindContext<S, F>>,
) => (...args: P) => KindFacet<F>;

/** @deprecated Use defineDurableFarClassKit instead */
defineDurableKindMulti: <P, S, B>(
kindHandle: DurableKindHandle,
init: (...args: P) => S,
Expand Down Expand Up @@ -165,6 +172,7 @@ interface PickFacet {
): (...args: Parameters<M>) => ReturnType<M>[F];
}

/** @deprecated Use vivifyFarClass instead */
type VivifyKind = <P, S, F>(
baggage: Baggage,
tag: string,
Expand All @@ -173,6 +181,7 @@ type VivifyKind = <P, S, F>(
options?: DefineKindOptions<KindContext<S, F>>,
) => (...args: P) => KindFacet<F>;

/** @deprecated Use vivifyFarClassKit instead */
type VivifyKindMulti = <P, S, B>(
baggage: Baggage,
tag: string,
Expand Down

0 comments on commit d9469b9

Please sign in to comment.