Skip to content

Latest commit

 

History

History
930 lines (539 loc) · 25 KB

modules.md

File metadata and controls

930 lines (539 loc) · 25 KB

@cspell/cspell-types / Exports

@cspell/cspell-types

Table of contents

Enumerations

Interfaces

Type Aliases

Variables

Type Aliases

CSpellPackageSettings

Ƭ CSpellPackageSettings: CSpellUserSettings

These settings come from user and workspace settings.

Defined in

CSpellSettingsDef.ts:9


CSpellUserSettings

Ƭ CSpellUserSettings: CSpellSettings

Defined in

CSpellSettingsDef.ts:11


CSpellUserSettingsFields

Ƭ CSpellUserSettingsFields: { [key in ConfigKeys]: key }

Defined in

configFields.ts:5


CSpellUserSettingsWithComments

Ƭ CSpellUserSettingsWithComments: CSpellUserSettings

Defined in

CSpellSettingsDef.ts:723


CacheFormat

Ƭ CacheFormat: "legacy" | "universal"

Defined in

CSpellSettingsDef.ts:309


CacheStrategy

Ƭ CacheStrategy: "metadata" | "content"

The Strategy to use to detect if a file has changed.

  • metadata - uses the file system timestamp and size to detect changes (fastest).
  • content - uses a hash of the file content to check file changes (slower - more accurate).

Defined in

CSpellSettingsDef.ts:307


CharacterSet

Ƭ CharacterSet: string

This is a set of characters that can include - or |

  • - - indicates a range of characters: a-c => abc
  • | - is a group separator, indicating that the characters on either side are not related.

Defined in

DictionaryInformation.ts:209


CustomDictionaryPath

Ƭ CustomDictionaryPath: FsDictionaryPath

A File System Path to a dictionary file.

Defined in

DictionaryDefinition.ts:176


CustomDictionaryScope

Ƭ CustomDictionaryScope: "user" | "workspace" | "folder"

Specifies the scope of a dictionary.

Defined in

DictionaryDefinition.ts:121


DebugEmitter

Ƭ DebugEmitter: (message: string) => void

Type declaration

▸ (message): void

Parameters
Name Type
message string
Returns

void

Defined in

CSpellReporter.ts:58


DictionaryDefinition

Ƭ DictionaryDefinition: DictionaryDefinitionPreferred | DictionaryDefinitionCustom | DictionaryDefinitionAugmented | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy

Defined in

DictionaryDefinition.ts:3


DictionaryFileTypes

Ƭ DictionaryFileTypes: "S" | "W" | "C" | "T"

Defined in

DictionaryDefinition.ts:10


DictionaryId

Ƭ DictionaryId: string

This is the name of a dictionary.

Name Format:

  • Must contain at least 1 number or letter.
  • Spaces are allowed.
  • Leading and trailing space will be removed.
  • Names ARE case-sensitive.
  • Must not contain *, !, ;, ,, {, }, [, ], ~.

Pattern

^(?=[^!,;{}[]~\n]+$)(?=(.\w)).+$

Defined in

DictionaryDefinition.ts:157


DictionaryNegRef

Ƭ DictionaryNegRef: string

This a negative reference to a named dictionary.

It is used to exclude or include a dictionary by name.

The reference starts with 1 or more !.

  • !<dictionary_name> - Used to exclude the dictionary matching <dictionary_name>.
  • !!<dictionary_name> - Used to re-include a dictionary matching <dictionary_name>. Overrides !<dictionary_name>.
  • !!!<dictionary_name> - Used to exclude a dictionary matching <dictionary_name>. Overrides !!<dictionary_name>.

Pattern

^(?=!+[^!,;{}[]~\n]+$)(?=(.\w)).+$

Defined in

DictionaryDefinition.ts:204


DictionaryPath

Ƭ DictionaryPath: string

A File System Path to a dictionary file.

Pattern

^.*.(?:txt|trie)(?:.gz)?$

Defined in

DictionaryDefinition.ts:171


DictionaryRef

Ƭ DictionaryRef: DictionaryId

This a reference to a named dictionary. It is expected to match the name of a dictionary.

Defined in

DictionaryDefinition.ts:189


DictionaryReference

Ƭ DictionaryReference: DictionaryRef | DictionaryNegRef

Reference to a dictionary by name. One of:

Defined in

DictionaryDefinition.ts:184


ErrorEmitter

Ƭ ErrorEmitter: (message: string, error: ErrorLike) => void

Type declaration

▸ (message, error): void

Parameters
Name Type
message string
error ErrorLike
Returns

void

Defined in

CSpellReporter.ts:62


ErrorLike

Ƭ ErrorLike: Error | { message: string ; name: string ; toString: () => string }

Defined in

CSpellReporter.ts:60


FSPathResolvable

Ƭ FSPathResolvable: FsPath

A File System Path.

Special Properties:

  • ${cwd} prefix - will be replaced with the current working directory.
  • Relative paths are relative to the configuration file.

Defined in

CSpellSettingsDef.ts:702


Feature

Ƭ Feature: FeatureEnableOnly | FeatureWithConfiguration

Defined in

features.ts:29


FsPath

Ƭ FsPath: string

A File System Path. Relative paths are relative to the configuration file.

Defined in

CSpellSettingsDef.ts:693


Glob

Ƭ Glob: SimpleGlob | GlobDef

These are glob expressions.

Defined in

CSpellSettingsDef.ts:645


LanguageId

Ƭ LanguageId: LanguageIdSingle | LanguageIdMultiple | LanguageIdMultipleNeg

Defined in

CSpellSettingsDef.ts:688


LanguageIdMultiple

Ƭ LanguageIdMultiple: string

This can be 'typescript,cpp,json,literal haskell', etc.

Pattern

^([-\w_\s]+)(,[-\w_\s]+)*$

Defined in

CSpellSettingsDef.ts:680


LanguageIdMultipleNeg

Ƭ LanguageIdMultipleNeg: string

This can be 'typescript,cpp,json,literal haskell', etc.

Pattern

^(![-\w_\s]+)(,![-\w_\s]+)*$

Defined in

CSpellSettingsDef.ts:686


LanguageIdSingle

Ƭ LanguageIdSingle: string

This can be '*', 'typescript', 'cpp', 'json', etc.

Pattern

^(!?[-\w_\s]+)|(*)$

Defined in

CSpellSettingsDef.ts:674


LocalId

Ƭ LocalId: LocaleId

Deprecated

true

Deprecation Message

Use LocaleId instead.

Defined in

CSpellSettingsDef.ts:642


LocaleId

Ƭ LocaleId: string

This is a written language locale like: 'en', 'en-GB', 'fr', 'es', 'de', etc.

Defined in

CSpellSettingsDef.ts:622


MappedText

Ƭ MappedText: Readonly<TransformedText>

Defined in

TextMap.ts:1


MessageEmitter

Ƭ MessageEmitter: (message: string, msgType: MessageType) => void

Type declaration

▸ (message, msgType): void

Parameters
Name Type
message string
msgType MessageType
Returns

void

Defined in

CSpellReporter.ts:56


MessageType

Ƭ MessageType: "Debug" | "Info" | "Warning"

Defined in

CSpellReporter.ts:44


MessageTypeLookup

Ƭ MessageTypeLookup: { [key in MessageType]: key }

Defined in

CSpellReporter.ts:46


ParserName

Ƭ ParserName: string

Defined in

Parser.ts:3


ParserOptions

Ƭ ParserOptions: Record<string, unknown>

Defined in

Parser.ts:1


Pattern

Ƭ Pattern: string | InternalRegExp

Defined in

CSpellSettingsDef.ts:580


PatternId

Ƭ PatternId: string

This matches the name in a pattern definition.

Defined in

CSpellSettingsDef.ts:613


PatternRef

Ƭ PatternRef: Pattern | PatternId | PredefinedPatterns

A PatternRef is a Pattern or PatternId.

Defined in

CSpellSettingsDef.ts:616


PredefinedPatterns

Ƭ PredefinedPatterns: "Base64" | "Base64MultiLine" | "Base64SingleLine" | "CStyleComment" | "CStyleHexValue" | "CSSHexValue" | "CommitHash" | "CommitHashLink" | "Email" | "EscapeCharacters" | "HexValues" | "href" | "PhpHereDoc" | "PublicKey" | "RsaCert" | "SshRsa" | "SHA" | "HashStrings" | "SpellCheckerDisable" | "SpellCheckerDisableBlock" | "SpellCheckerDisableLine" | "SpellCheckerDisableNext" | "SpellCheckerIgnoreInDocSetting" | "string" | "UnicodeRef" | "Urls" | "UUID" | "Everything"

Defined in

CSpellSettingsDef.ts:582


ProgressEmitter

Ƭ ProgressEmitter: (p: ProgressItem | ProgressFileComplete) => void

Type declaration

▸ (p): void

Parameters
Name Type
p ProgressItem | ProgressFileComplete
Returns

void

Defined in

CSpellReporter.ts:95


ProgressItem

Ƭ ProgressItem: ProgressFileBegin | ProgressFileComplete

Defined in

CSpellReporter.ts:67


ProgressTypes

Ƭ ProgressTypes: "ProgressFileBegin" | "ProgressFileComplete"

Defined in

CSpellReporter.ts:66


RegExpPatternList

Ƭ RegExpPatternList: PatternRef[]

A list of pattern names or regular expressions.

Defined in

CSpellSettingsDef.ts:619


ReplaceEntry

Ƭ ReplaceEntry: [string, string]

Defined in

DictionaryDefinition.ts:159


ReplaceMap

Ƭ ReplaceMap: ReplaceEntry[]

Defined in

DictionaryDefinition.ts:160


ReporterSettings

Ƭ ReporterSettings: string | [string] | [string, Serializable]

Reporter name or reporter name + reporter config.

Defined in

CSpellSettingsDef.ts:775


ResultEmitter

Ƭ ResultEmitter: (result: RunResult) => void | Promise<void>

Type declaration

▸ (result): void | Promise<void>

Parameters
Name Type
result RunResult
Returns

void | Promise<void>

Defined in

CSpellReporter.ts:110


SimpleGlob

Ƭ SimpleGlob: string

Simple Glob string, the root will be globRoot.

Defined in

CSpellSettingsDef.ts:648


Source

Ƭ Source: FileSource | MergeSource | InMemorySource | BaseSource

Defined in

CSpellSettingsDef.ts:726


SpellingErrorEmitter

Ƭ SpellingErrorEmitter: (issue: Issue) => void

Type declaration

▸ (issue): void

Parameters
Name Type
issue Issue
Returns

void

Defined in

CSpellReporter.ts:64


SuggestionCostMapDef

Ƭ SuggestionCostMapDef: CostMapDefReplace | CostMapDefInsDel | CostMapDefSwap

A WeightedMapDef enables setting weights for edits between related characters and substrings.

Multiple groups can be defined using a |. A multi-character substring is defined using ().

For example, in some languages, some letters sound alike.

  map: 'sc(sh)(sch)(ss)|t(tt)' # two groups.
  replace: 50    # Make it 1/2 the cost of a normal edit to replace a `t` with `tt`.

The following could be used to make inserting, removing, or replacing vowels cheaper.

  map: 'aeiouy'
  insDel: 50     # Make it is cheaper to insert or delete a vowel.
  replace: 45    # It is even cheaper to replace one with another.

Note: the default edit distance is 100.

Defined in

suggestionCostsDef.ts:24


SuggestionCostsDefs

Ƭ SuggestionCostsDefs: SuggestionCostMapDef[]

Defined in

suggestionCostsDef.ts:26


TrustLevel

Ƭ TrustLevel: "trusted" | "untrusted"

Trust Security Level.

Defined in

CSpellSettingsDef.ts:705


Version

Ƭ Version: VersionLatest | VersionLegacy

Defined in

CSpellSettingsDef.ts:636


VersionLatest

Ƭ VersionLatest: "0.2"

Configuration File Version.

Defined in

CSpellSettingsDef.ts:627


VersionLegacy

Ƭ VersionLegacy: "0.1"

Legacy Configuration File Versions.

Deprecated

true

Deprecation Message

Use 0.2 instead.

Defined in

CSpellSettingsDef.ts:634

Variables

ConfigFields

Const ConfigFields: CSpellUserSettingsFields

Defined in

configFields.ts:9


MessageTypes

Const MessageTypes: MessageTypeLookup

Defined in

CSpellReporter.ts:50