MCPcopy Index your code
hub / github.com/resend/react-email / extend

Method extend

packages/editor/src/core/serializer/email-mark.ts:78–103  ·  view source on GitHub ↗
(
    extendedConfig?:
      | (() => Partial<ExtendedConfig>)
      | (Partial<ExtendedConfig> &
          ThisType<{
            name: string;
            options: ExtendedOptions;
            storage: ExtendedStorage;
            editor: Editor;
            type: MarkType;
          }>),
  )

Source from the content-addressed store, hash-verified

76
77 // @ts-expect-error - same as configure: extend returns EmailMark for chaining; base typings are incompatible
78 extend<
79 ExtendedOptions = Options,
80 ExtendedStorage = Storage,
81 ExtendedConfig extends MarkConfig<
82 ExtendedOptions,
83 ExtendedStorage
84 > = EmailMarkConfig<ExtendedOptions, ExtendedStorage>,
85 >(
86 extendedConfig?:
87 | (() => Partial<ExtendedConfig>)
88 | (Partial<ExtendedConfig> &
89 ThisType<{
90 name: string;
91 options: ExtendedOptions;
92 storage: ExtendedStorage;
93 editor: Editor;
94 type: MarkType;
95 }>),
96 ): EmailMark<ExtendedOptions, ExtendedStorage> {
97 const resolvedConfig =
98 typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig;
99 return super.extend(resolvedConfig) as EmailMark<
100 ExtendedOptions,
101 ExtendedStorage
102 >;
103 }
104}

Callers 7

prism.tsFile · 0.45
bold.tsxFile · 0.45
link.tsxFile · 0.45
code-block.tsxFile · 0.45
heading.tsxFile · 0.45
sup.tsxFile · 0.45
divider.tsxFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected