Skip to content

MojiExtensionOptions

Defined in: extension.ts:57

Options for mojiExtension.

PropertyTypeDescriptionInherited fromDefined in
includeDefaults?booleanInclude the built-in DEFAULT_MOJIS. Defaults to true.CreateResolverOptions.includeDefaultsresolver.ts:127
mojis?| readonly MojiDefinition[] | Record<string, string | MojiDefinition>Custom mojis, merged over (or replacing) the defaults.CreateResolverOptions.mojisresolver.ts:117
resolveAsync?(slug) => Promise< | MojiDefinition | null | undefined>Dynamic, remote slug resolver — e.g. a lookup against a workspace’s custom-emoji registry. Consulted only when the synchronous resolver (resolver / mojis / defaults) does not know a slug. Results are cached (positive and negative) and de-duplicated, so each unknown slug hits the network at most once. When a fetch resolves to a definition, the pending :slug: in the document is converted automatically.-extension.ts:66
resolver?MojiResolverFully custom synchronous resolver, consulted first. Return null/undefined to fall through to mojis and the defaults. Use this for lookups you can answer without I/O (e.g. an in-memory map). For a remote registry that must be fetched, use the extension’s resolveAsync option instead (see AsyncMojiResolver / createMojiCache).CreateResolverOptions.resolverresolver.ts:125