@dxos/app-framework - v0.8.2
    Preparing search index...

    Class AddToast

    Hierarchy

    • {
          input: {
              part: "toast";
              subject: {
                  actionAlt?: string | [string, { count?: number; ns: string }];
                  actionLabel?: string | [string, { count?: number; ns: string }];
                  closeLabel?: string | [string, { count?: number; ns: string }];
                  description?: string | [string, { count?: number; ns: string }];
                  duration?: number;
                  icon?: string;
                  id: string;
                  onAction?: any;
                  title?: string | [string, { count?: number; ns: string }];
              };
          };
      } & { output: void } & {
          _tag: "dxos.org/plugin/layout/action/update-layout";
      }
      • AddToast
    Index

    Constructors

    • Parameters

      • props: {
            input: {
                part: "toast";
                subject: {
                    actionAlt?: string | [string, { count?: number; ns: string }];
                    actionLabel?: string | [string, { count?: number; ns: string }];
                    closeLabel?: string | [string, { count?: number; ns: string }];
                    description?: string | [string, { count?: number; ns: string }];
                    duration?: number;
                    icon?: string;
                    id: string;
                    onAction?: any;
                    title?: string | [string, { count?: number; ns: string }];
                };
            };
            output: void;
        }
      • Optionaloptions: MakeOptions

      Returns AddToast

    Properties

    _tag: "dxos.org/plugin/layout/action/update-layout"
    input: {
        part: "toast";
        subject: {
            actionAlt?: string | [string, { count?: number; ns: string }];
            actionLabel?: string | [string, { count?: number; ns: string }];
            closeLabel?: string | [string, { count?: number; ns: string }];
            description?: string | [string, { count?: number; ns: string }];
            duration?: number;
            icon?: string;
            id: string;
            onAction?: any;
            title?: string | [string, { count?: number; ns: string }];
        };
    } = ...
    output: void = Schema.Void
    _tag: "dxos.org/plugin/layout/action/update-layout"
    "[TypeId]": {
        _A: Invariant<AddToast>;
        _I: Invariant<
            {
                _tag: "dxos.org/plugin/layout/action/update-layout";
                input: {
                    part: "toast";
                    subject: {
                        actionAlt?: string
                        | [string, { count?: number; ns: string }];
                        actionLabel?: string | [string, { count?: number; ns: string }];
                        closeLabel?: string | [string, { count?: number; ns: string }];
                        description?: string | [string, { count?: number; ns: string }];
                        duration?: number;
                        icon?: string;
                        id: string;
                        onAction?: any;
                        title?: string | [string, { count?: number; ns: string }];
                    };
                };
                output: void;
            },
        >;
        _R: Covariant<never>;
    }
    ast: Transformation

    3.10.0

    Context: never
    Encoded: {
        _tag: "dxos.org/plugin/layout/action/update-layout";
        input: {
            part: "toast";
            subject: {
                actionAlt?: string | [string, { count?: number; ns: string }];
                actionLabel?: string | [string, { count?: number; ns: string }];
                closeLabel?: string | [string, { count?: number; ns: string }];
                description?: string | [string, { count?: number; ns: string }];
                duration?: number;
                icon?: string;
                id: string;
                onAction?: any;
                title?: string | [string, { count?: number; ns: string }];
            };
        };
        output: void;
    }
    fields: {
        _tag: tag<"dxos.org/plugin/layout/action/update-layout">;
        input: Struct<
            {
                part: Literal<["toast"]>;
                subject: Struct<
                    {
                        actionAlt: optional<
                            Union<
                                [typeof String$, mutable<Tuple2<typeof String$, mutable<(...)>>>],
                            >,
                        >;
                        actionLabel: optional<
                            Union<
                                [typeof String$, mutable<Tuple2<typeof String$, mutable<(...)>>>],
                            >,
                        >;
                        closeLabel: optional<
                            Union<
                                [typeof String$, mutable<Tuple2<typeof String$, mutable<(...)>>>],
                            >,
                        >;
                        description: optional<
                            Union<
                                [typeof String$, mutable<Tuple2<typeof String$, mutable<(...)>>>],
                            >,
                        >;
                        duration: optional<SchemaClass<number, number, never>>;
                        icon: optional<SchemaClass<string, string, never>>;
                        id: SchemaClass<string, string, never>;
                        onAction: optional<SchemaClass<any, any, never>>;
                        title: optional<
                            Union<
                                [typeof String$, mutable<Tuple2<typeof String$, mutable<(...)>>>],
                            >,
                        >;
                    },
                >;
            },
        >;
        output: typeof Void;
    }
    identifier: string
    Type: AddToast

    Methods

    • Merges a set of new annotations with existing ones, potentially overwriting any duplicates.

      Parameters

      Returns SchemaClass<
          AddToast,
          {
              _tag: "dxos.org/plugin/layout/action/update-layout";
              input: {
                  part: "toast";
                  subject: {
                      actionAlt?: string
                      | [string, { count?: number; ns: string }];
                      actionLabel?: string | [string, { count?: number; ns: string }];
                      closeLabel?: string | [string, { count?: number; ns: string }];
                      description?: string | [string, { count?: number; ns: string }];
                      duration?: number;
                      icon?: string;
                      id: string;
                      onAction?: any;
                      title?: string | [string, { count?: number; ns: string }];
                  };
              };
              output: void;
          },
          never,
      >

    • Type Parameters

      • Extended = never

      Parameters

      • identifier: string

      Returns <NewFields extends Fields>(
          fields: NewFields | HasFields<NewFields>,
          annotations?: ClassAnnotations<
              Extended,
              {
                  [K in string
                  | number
                  | symbol]: Type<
                      { _tag: tag<"dxos.org/plugin/layout/action/update-layout"> } & {
                          input: Struct<{ part: Literal<(...)>; subject: Struct<(...)> }>;
                          output: typeof Void;
                      } & NewFields,
                  >[K]
              },
          >,
      ) => [Extended] extends [never]
          ? "Missing `Self` generic - use `class Self extends Base.extend<Self>()({ ... })`"
          : Class<
              Extended,
              { _tag: tag<"dxos.org/plugin/layout/action/update-layout"> } & {
                  input: Struct<
                      {
                          part: Literal<["toast"]>;
                          subject: Struct<
                              {
                                  actionAlt: optional<Union<(...)>>;
                                  actionLabel: optional<Union<(...)>>;
                                  closeLabel: optional<Union<(...)>>;
                                  description: optional<Union<(...)>>;
                                  duration: optional<SchemaClass<(...), (...), (...)>>;
                                  icon: optional<SchemaClass<(...), (...), (...)>>;
                                  id: SchemaClass<string, string, never>;
                                  onAction: optional<SchemaClass<(...), (...), (...)>>;
                                  title: optional<Union<(...)>>;
                              },
                          >;
                      },
                  >;
                  output: typeof Void;
              } & NewFields,
              {
                  _tag: "dxos.org/plugin/layout/action/update-layout";
                  input: {
                      part: "toast";
                      subject: {
                          actionAlt?: string
                          | [string, { count?: (...) | (...); ns: string }];
                          actionLabel?: string | [string, { count?: (...) | (...); ns: string }];
                          closeLabel?: string | [string, { count?: (...) | (...); ns: string }];
                          description?: string | [string, { count?: (...) | (...); ns: string }];
                          duration?: number;
                          icon?: string;
                          id: string;
                          onAction?: any;
                          title?: string | [string, { count?: (...) | (...); ns: string }];
                      };
                  };
                  output: void;
              } & {} & {
                  readonly [K in string
                  | number
                  | symbol as Key<NewFields, K>]: Encoded<NewFields[K]>
              } & {
                  readonly [K in string
                  | number
                  | symbol as Key<NewFields, K>]?: Encoded<NewFields[K]>
              },
              Context<NewFields[keyof NewFields]>,
              {
                  input: {
                      part: "toast";
                      subject: {
                          actionAlt?: string | [string, { count?: (...) | (...); ns: string }];
                          actionLabel?: string | [string, { count?: (...) | (...); ns: string }];
                          closeLabel?: string | [string, { count?: (...) | (...); ns: string }];
                          description?: string | [string, { count?: (...) | (...); ns: string }];
                          duration?: number;
                          icon?: string;
                          id: string;
                          onAction?: any;
                          title?: string | [string, { count?: (...) | (...); ns: string }];
                      };
                  };
              } & { output: void } & Constructor<NewFields>,
              AddToast,
              {},
          >

      import { Schema } from "effect"

      class MyClass extends Schema.Class<MyClass>("MyClass")({
      myField: Schema.String
      }) {
      myMethod() {
      return this.myField + "my"
      }
      }

      class NextClass extends MyClass.extend<NextClass>("NextClass")({
      nextField: Schema.Number
      }) {
      nextMethod() {
      return this.myMethod() + this.myField + this.nextField
      }
      }
    • Type Parameters

      • C extends new (...args: any[]) => any

      Parameters

      • this: C
      • ...args: ConstructorParameters<C>

      Returns InstanceType<C>

    • Type Parameters

      • A

      Parameters

      • this: A

      Returns A

    • Type Parameters

      • A
      • B = never

      Parameters

      • this: A
      • ab: (_: A) => B

      Returns B

    • Type Parameters

      • A
      • B = never
      • C = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C

      Returns C

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D

      Returns D

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E

      Returns E

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F

      Returns F

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G

      Returns G

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H

      Returns H

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I

      Returns I

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J

      Returns J

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K

      Returns K

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L

      Returns L

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M

      Returns M

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N

      Returns N

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O

      Returns O

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P

      Returns P

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q

      Returns Q

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never
      • R = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q
      • qr: (_: Q) => R

      Returns R

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never
      • R = never
      • S = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q
      • qr: (_: Q) => R
      • rs: (_: R) => S

      Returns S

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never
      • R = never
      • S = never
      • T = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q
      • qr: (_: Q) => R
      • rs: (_: R) => S
      • st: (_: S) => T

      Returns T

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never
      • R = never
      • S = never
      • T = never
      • U = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q
      • qr: (_: Q) => R
      • rs: (_: R) => S
      • st: (_: S) => T
      • tu: (_: T) => U

      Returns U

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never
      • R = never
      • S = never
      • T = never
      • U = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q
      • qr: (_: Q) => R
      • rs: (_: R) => S
      • st: (_: S) => T
      • tu: (_: T) => U

      Returns U

    • Type Parameters

      • Transformed = never

      Parameters

      • identifier: string

      Returns <NewFields extends Fields, R2, R3>(
          fields: NewFields,
          options: {
              decode: (
                  input: {
                      _tag: "dxos.org/plugin/layout/action/update-layout";
                      input: {
                          part: "toast";
                          subject: {
                              actionAlt?: string | [string, { count?: number; ns: string }];
                              actionLabel?: string | [string, { count?: number; ns: string }];
                              closeLabel?: string | [string, { count?: number; ns: string }];
                              description?: string | [string, { count?: number; ns: string }];
                              duration?: number;
                              icon?: string;
                              id: string;
                              onAction?: any;
                              title?: string | [string, { count?: number; ns: string }];
                          };
                      };
                      output: void;
                  },
                  options: ParseOptions,
                  ast: Transformation,
              ) => Effect<
                  {
                      [K in string
                      | number
                      | symbol]: Type<
                          { _tag: tag<"dxos.org/plugin/layout/action/update-layout"> } & {
                              input: Struct<{ part: ...; subject: ... }>;
                              output: typeof Void;
                          } & NewFields,
                      >[K]
                  },
                  ParseIssue,
                  R2,
              >;
              encode: (
                  input: {
                      [K in string | number | symbol]: Type<
                          { _tag: tag<"dxos.org/plugin/layout/action/update-layout"> } & {
                              input: Struct<{ part: Literal<(...)>; subject: Struct<(...)> }>;
                              output: typeof Void;
                          } & NewFields,
                      >[K]
                  },
                  options: ParseOptions,
                  ast: Transformation,
              ) => Effect<
                  {
                      input: {
                          part: "toast";
                          subject: {
                              actionAlt?: string
                              | [string, { count?: ...; ns: ... }];
                              actionLabel?: string | [string, { count?: ...; ns: ... }];
                              closeLabel?: string | [string, { count?: ...; ns: ... }];
                              description?: string | [string, { count?: ...; ns: ... }];
                              duration?: number;
                              icon?: string;
                              id: string;
                              onAction?: any;
                              title?: string | [string, { count?: ...; ns: ... }];
                          };
                      };
                  } & { output: void } & {
                      _tag: "dxos.org/plugin/layout/action/update-layout";
                  },
                  ParseIssue,
                  R3,
              >;
          },
          annotations?: ClassAnnotations<
              Transformed,
              {
                  [K in string
                  | number
                  | symbol]: Type<
                      { _tag: tag<"dxos.org/plugin/layout/action/update-layout"> } & {
                          input: Struct<{ part: Literal<(...)>; subject: Struct<(...)> }>;
                          output: typeof Void;
                      } & NewFields,
                  >[K]
              },
          >,
      ) => [Transformed] extends [never]
          ? "Missing `Self` generic - use `class Self extends Base.transformOrFail<Self>()({ ... })`"
          : Class<
              Transformed,
              { _tag: tag<"dxos.org/plugin/layout/action/update-layout"> } & {
                  input: Struct<
                      {
                          part: Literal<["toast"]>;
                          subject: Struct<
                              {
                                  actionAlt: optional<Union<(...)>>;
                                  actionLabel: optional<Union<(...)>>;
                                  closeLabel: optional<Union<(...)>>;
                                  description: optional<Union<(...)>>;
                                  duration: optional<SchemaClass<(...), (...), (...)>>;
                                  icon: optional<SchemaClass<(...), (...), (...)>>;
                                  id: SchemaClass<string, string, never>;
                                  onAction: optional<SchemaClass<(...), (...), (...)>>;
                                  title: optional<Union<(...)>>;
                              },
                          >;
                      },
                  >;
                  output: typeof Void;
              } & NewFields,
              Encoded<
                  { _tag: tag<"dxos.org/plugin/layout/action/update-layout"> } & {
                      input: Struct<
                          {
                              part: Literal<["toast"]>;
                              subject: Struct<
                                  {
                                      actionAlt: optional<(...)>;
                                      actionLabel: optional<(...)>;
                                      closeLabel: optional<(...)>;
                                      description: optional<(...)>;
                                      duration: optional<(...)>;
                                      icon: optional<(...)>;
                                      id: SchemaClass<(...), (...), (...)>;
                                      onAction: optional<(...)>;
                                      title: optional<(...)>;
                                  },
                              >;
                          },
                      >;
                      output: typeof Void;
                  },
              >,
              R2
              | R3
              | Context<NewFields[keyof NewFields]>,
              {
                  input: {
                      part: "toast";
                      subject: {
                          actionAlt?: string | [string, { count?: (...) | (...); ns: string }];
                          actionLabel?: string | [string, { count?: (...) | (...); ns: string }];
                          closeLabel?: string | [string, { count?: (...) | (...); ns: string }];
                          description?: string | [string, { count?: (...) | (...); ns: string }];
                          duration?: number;
                          icon?: string;
                          id: string;
                          onAction?: any;
                          title?: string | [string, { count?: (...) | (...); ns: string }];
                      };
                  };
              } & { output: void } & Constructor<NewFields>,
              AddToast,
              {},
          >

      import { Effect, Schema } from "effect"

      class MyClass extends Schema.Class<MyClass>("MyClass")({
      myField: Schema.String
      }) {
      myMethod() {
      return this.myField + "my"
      }
      }

      class NextClass extends MyClass.transformOrFail<NextClass>("NextClass")({
      nextField: Schema.Number
      }, {
      decode: (i) =>
      Effect.succeed({
      myField: i.myField,
      nextField: i.myField.length
      }),
      encode: (a) => Effect.succeed({ myField: a.myField })
      }) {
      nextMethod() {
      return this.myMethod() + this.myField + this.nextField
      }
      }
    • Type Parameters

      • Transformed = never

      Parameters

      • identifier: string

      Returns <NewFields extends Fields, R2, R3>(
          fields: NewFields,
          options: {
              decode: (
                  input: {
                      _tag: "dxos.org/plugin/layout/action/update-layout";
                      input: {
                          part: "toast";
                          subject: {
                              actionAlt?: string | [string, { count?: number; ns: string }];
                              actionLabel?: string | [string, { count?: number; ns: string }];
                              closeLabel?: string | [string, { count?: number; ns: string }];
                              description?: string | [string, { count?: number; ns: string }];
                              duration?: number;
                              icon?: string;
                              id: string;
                              onAction?: any;
                              title?: string | [string, { count?: number; ns: string }];
                          };
                      };
                      output: void;
                  },
                  options: ParseOptions,
                  ast: Transformation,
              ) => Effect<
                  {
                      [K in string
                      | number
                      | symbol]: (
                          {
                              _tag: "dxos.org/plugin/layout/action/update-layout";
                              input: {
                                  part: "toast";
                                  subject: {
                                      actionAlt?: (...)
                                      | (...)
                                      | (...);
                                      actionLabel?: (...) | (...) | (...);
                                      closeLabel?: (...) | (...) | (...);
                                      description?: (...) | (...) | (...);
                                      duration?: (...) | (...);
                                      icon?: (...) | (...);
                                      id: string;
                                      onAction?: any;
                                      title?: (...) | (...) | (...);
                                  };
                              };
                              output: void;
                          } & {} & {
                              readonly [K in string
                              | number
                              | symbol as Key<NewFields, K>]: Encoded<NewFields[K]>
                          } & {
                              readonly [K in string
                              | number
                              | symbol as Key<NewFields, K>]?: Encoded<(...)[(...)]>
                          }
                      )[K]
                  },
                  ParseIssue,
                  R2,
              >;
              encode: (
                  input: {
                      [K in string | number | symbol]: (
                          {
                              _tag: "dxos.org/plugin/layout/action/update-layout";
                              input: {
                                  part: "toast";
                                  subject: {
                                      actionAlt?: string
                                      | [(...), (...)];
                                      actionLabel?: string | [(...), (...)];
                                      closeLabel?: string | [(...), (...)];
                                      description?: string | [(...), (...)];
                                      duration?: number;
                                      icon?: string;
                                      id: string;
                                      onAction?: any;
                                      title?: string | [(...), (...)];
                                  };
                              };
                              output: void;
                          } & {} & {
                              readonly [K in string
                              | number
                              | symbol as Key<NewFields, K>]: Encoded<NewFields[K]>
                          } & {
                              readonly [K in string
                              | number
                              | symbol as Key<NewFields, K>]?: Encoded<NewFields[K]>
                          }
                      )[K]
                  },
                  options: ParseOptions,
                  ast: Transformation,
              ) => Effect<
                  Encoded<
                      { _tag: tag<"dxos.org/plugin/layout/action/update-layout"> } & {
                          input: Struct<
                              {
                                  part: Literal<[(...)]>;
                                  subject: Struct<
                                      {
                                          actionAlt: ...;
                                          actionLabel: ...;
                                          closeLabel: ...;
                                          description: ...;
                                          duration: ...;
                                          icon: ...;
                                          id: ...;
                                          onAction: ...;
                                          title: ...;
                                      },
                                  >;
                              },
                          >;
                          output: typeof Void;
                      },
                  >,
                  ParseIssue,
                  R3,
              >;
          },
          annotations?: ClassAnnotations<
              Transformed,
              {
                  [K in string
                  | number
                  | symbol]: Type<
                      { _tag: tag<"dxos.org/plugin/layout/action/update-layout"> } & {
                          input: Struct<{ part: Literal<(...)>; subject: Struct<(...)> }>;
                          output: typeof Void;
                      } & NewFields,
                  >[K]
              },
          >,
      ) => [Transformed] extends [never]
          ? "Missing `Self` generic - use `class Self extends Base.transformOrFailFrom<Self>()({ ... })`"
          : Class<
              Transformed,
              { _tag: tag<"dxos.org/plugin/layout/action/update-layout"> } & {
                  input: Struct<
                      {
                          part: Literal<["toast"]>;
                          subject: Struct<
                              {
                                  actionAlt: optional<Union<(...)>>;
                                  actionLabel: optional<Union<(...)>>;
                                  closeLabel: optional<Union<(...)>>;
                                  description: optional<Union<(...)>>;
                                  duration: optional<SchemaClass<(...), (...), (...)>>;
                                  icon: optional<SchemaClass<(...), (...), (...)>>;
                                  id: SchemaClass<string, string, never>;
                                  onAction: optional<SchemaClass<(...), (...), (...)>>;
                                  title: optional<Union<(...)>>;
                              },
                          >;
                      },
                  >;
                  output: typeof Void;
              } & NewFields,
              Encoded<
                  { _tag: tag<"dxos.org/plugin/layout/action/update-layout"> } & {
                      input: Struct<
                          {
                              part: Literal<["toast"]>;
                              subject: Struct<
                                  {
                                      actionAlt: optional<(...)>;
                                      actionLabel: optional<(...)>;
                                      closeLabel: optional<(...)>;
                                      description: optional<(...)>;
                                      duration: optional<(...)>;
                                      icon: optional<(...)>;
                                      id: SchemaClass<(...), (...), (...)>;
                                      onAction: optional<(...)>;
                                      title: optional<(...)>;
                                  },
                              >;
                          },
                      >;
                      output: typeof Void;
                  },
              >,
              R2
              | R3
              | Context<NewFields[keyof NewFields]>,
              {
                  input: {
                      part: "toast";
                      subject: {
                          actionAlt?: string | [string, { count?: (...) | (...); ns: string }];
                          actionLabel?: string | [string, { count?: (...) | (...); ns: string }];
                          closeLabel?: string | [string, { count?: (...) | (...); ns: string }];
                          description?: string | [string, { count?: (...) | (...); ns: string }];
                          duration?: number;
                          icon?: string;
                          id: string;
                          onAction?: any;
                          title?: string | [string, { count?: (...) | (...); ns: string }];
                      };
                  };
              } & { output: void } & Constructor<NewFields>,
              AddToast,
              {},
          >

      import { Effect, Schema } from "effect"

      class MyClass extends Schema.Class<MyClass>("MyClass")({
      myField: Schema.String
      }) {
      myMethod() {
      return this.myField + "my"
      }
      }

      class NextClass extends MyClass.transformOrFailFrom<NextClass>("NextClass")({
      nextField: Schema.Number
      }, {
      decode: (i) =>
      Effect.succeed({
      myField: i.myField,
      nextField: i.myField.length
      }),
      encode: (a) => Effect.succeed({ myField: a.myField })
      }) {
      nextMethod() {
      return this.myMethod() + this.myField + this.nextField
      }
      }