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 29, 2022
1 parent 46aa80e commit bf4a71a
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 @@ -96,12 +96,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 @@ -111,12 +114,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 @@ -166,6 +173,7 @@ interface PickFacet {
): (...args: Parameters<M>) => ReturnType<M>[F];
}

/** @deprecated Use vivifyFarClass instead */
type VivifyKind = <P, S, F>(
baggage: Baggage,
tag: string,
Expand All @@ -174,6 +182,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 bf4a71a

Please sign in to comment.