cspell-lib 6.14.2 → 6.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/Cache/cspell.cache.d.ts +5 -5
  2. package/dist/FeatureFlags/FeatureFlags.d.ts +1 -1
  3. package/dist/LanguageIds.d.ts +5 -5
  4. package/dist/Models/CSpellSettingsInternalDef.d.ts +1 -1
  5. package/dist/Models/TextDocument.d.ts +2 -2
  6. package/dist/Settings/CSpellSettingsServer.d.ts +3 -3
  7. package/dist/Settings/Controller/configLoader/configLoader.d.ts +3 -3
  8. package/dist/Settings/Controller/configLoader/normalizeRawSettings.d.ts +5 -5
  9. package/dist/Settings/Controller/pnpLoader.d.ts +1 -1
  10. package/dist/Settings/DictionarySettings.d.ts +1 -1
  11. package/dist/Settings/InDocSettings.d.ts +1 -1
  12. package/dist/Settings/LanguageSettings.d.ts +1 -1
  13. package/dist/SpellingDictionary/DictionaryController/DictionaryLoader.d.ts +1 -1
  14. package/dist/SpellingDictionary/SpellingDictionary.d.ts +1 -1
  15. package/dist/SpellingDictionary/SuggestExperimental/entities.d.ts +1 -1
  16. package/dist/SpellingDictionary/SuggestExperimental/suggest.d.ts +1 -1
  17. package/dist/exclusionHelper.d.ts +2 -2
  18. package/dist/spellCheckFile.d.ts +1 -1
  19. package/dist/textValidation/ValidationTypes.d.ts +4 -4
  20. package/dist/textValidation/parsedText.d.ts +2 -2
  21. package/dist/util/Comparable.d.ts +6 -6
  22. package/dist/util/Memorizer.d.ts +2 -2
  23. package/dist/util/PairingHeap.d.ts +1 -1
  24. package/dist/util/logger.d.ts +1 -1
  25. package/dist/util/repMap.d.ts +1 -1
  26. package/dist/util/timer.d.ts +2 -2
  27. package/dist/util/types.d.ts +11 -11
  28. package/dist/util/wordSplitter.d.ts +3 -3
  29. package/dist/wordListHelper.d.ts +1 -1
  30. package/package.json +14 -14
@@ -7,12 +7,12 @@ export interface CSpellCache {
7
7
  signature: Hash;
8
8
  files: CachedFile[];
9
9
  }
10
- export declare type Version = '0.1';
10
+ export type Version = '0.1';
11
11
  /**
12
12
  * Hash used. Starts with hash id. i.e. `sha1-` or `sha512-`.
13
13
  */
14
- export declare type Hash = string;
15
- export declare type UriRelPath = string;
14
+ export type Hash = string;
15
+ export type UriRelPath = string;
16
16
  export declare enum IssueCode {
17
17
  UnknownWord = 1,
18
18
  ForbiddenWord = 2,
@@ -24,7 +24,7 @@ export interface CachedFile {
24
24
  path: UriRelPath;
25
25
  issues: Issue[];
26
26
  }
27
- export declare type Issue = IssueEntry | IssueLine;
27
+ export type Issue = IssueEntry | IssueLine;
28
28
  export interface IssueEntry {
29
29
  line: number;
30
30
  character: number;
@@ -32,7 +32,7 @@ export interface IssueEntry {
32
32
  text: string;
33
33
  len: number;
34
34
  }
35
- export declare type IssueLine = [
35
+ export type IssueLine = [
36
36
  line: IssueEntry['line'],
37
37
  character: IssueEntry['character'],
38
38
  code: IssueEntry['code'],
@@ -2,7 +2,7 @@ export interface FeatureFlag {
2
2
  name: string;
3
3
  description: string;
4
4
  }
5
- declare type FlagTypes = string | boolean;
5
+ type FlagTypes = string | boolean;
6
6
  /**
7
7
  * Feature Flags are used to turn on/off features.
8
8
  * These are primarily used before a feature has been fully released.
@@ -12,12 +12,12 @@ export interface LanguageExtensionDefinition {
12
12
  /** Filenames that do not have an extension or have a different type than their implied extension */
13
13
  filenames?: string[];
14
14
  }
15
- export declare type LanguageDefinition = LanguageExtensionDefinition;
16
- export declare type LanguageDefinitions = LanguageDefinition[];
17
- export declare type ExtensionToLanguageIdMapSet = Map<string, Set<string>>;
18
- export declare type ExtensionToLanguageIdMap = Map<string, string[]>;
15
+ export type LanguageDefinition = LanguageExtensionDefinition;
16
+ export type LanguageDefinitions = LanguageDefinition[];
17
+ export type ExtensionToLanguageIdMapSet = Map<string, Set<string>>;
18
+ export type ExtensionToLanguageIdMap = Map<string, string[]>;
19
19
  export declare const languageExtensionDefinitions: LanguageDefinitions;
20
- export declare type LanguageId = string;
20
+ export type LanguageId = string;
21
21
  export declare const binaryLanguages: Set<string>;
22
22
  export declare const generatedFiles: Set<string>;
23
23
  export declare const languageIds: LanguageId[];
@@ -12,7 +12,7 @@ export interface CSpellSettingsInternalFinalized extends CSpellSettingsInternal
12
12
  ignoreRegExpList: RegExp[];
13
13
  includeRegExpList: RegExp[];
14
14
  }
15
- declare type DictionaryDefinitionCustomUniqueFields = Omit<DictionaryDefinitionCustom, keyof DictionaryDefinitionPreferred>;
15
+ type DictionaryDefinitionCustomUniqueFields = Omit<DictionaryDefinitionCustom, keyof DictionaryDefinitionPreferred>;
16
16
  export interface DictionaryDefinitionInternal extends Readonly<DictionaryDefinitionPreferred>, Readonly<Partial<DictionaryDefinitionCustomUniqueFields>>, Readonly<DictionaryDefinitionAugmented> {
17
17
  /**
18
18
  * Optional weight map used to improve suggestions.
@@ -1,5 +1,5 @@
1
1
  import * as Uri from './Uri';
2
- export declare type DocumentUri = Uri.Uri;
2
+ export type DocumentUri = Uri.Uri;
3
3
  export interface Position {
4
4
  line: number;
5
5
  character: number;
@@ -7,7 +7,7 @@ export interface Position {
7
7
  /**
8
8
  * Range offset tuple.
9
9
  */
10
- export declare type SimpleRange = [start: number, end: number];
10
+ export type SimpleRange = [start: number, end: number];
11
11
  export interface TextDocumentLine {
12
12
  readonly text: string;
13
13
  readonly offset: number;
@@ -1,9 +1,9 @@
1
1
  import type { AdvancedCSpellSettingsWithSourceTrace, Glob, ImportFileRef } from '@cspell/cspell-types';
2
2
  import { CSpellSettingsInternal, CSpellSettingsInternalFinalized } from '../Models/CSpellSettingsInternalDef';
3
3
  import { OptionalOrUndefined } from '../util/types';
4
- declare type CSpellSettingsWST = AdvancedCSpellSettingsWithSourceTrace;
5
- declare type CSpellSettingsWSTO = OptionalOrUndefined<AdvancedCSpellSettingsWithSourceTrace>;
6
- declare type CSpellSettingsI = CSpellSettingsInternal;
4
+ type CSpellSettingsWST = AdvancedCSpellSettingsWithSourceTrace;
5
+ type CSpellSettingsWSTO = OptionalOrUndefined<AdvancedCSpellSettingsWithSourceTrace>;
6
+ type CSpellSettingsI = CSpellSettingsInternal;
7
7
  declare function mergeObjects(left: undefined, right: undefined): undefined;
8
8
  declare function mergeObjects<T>(left: T, right: undefined): T;
9
9
  declare function mergeObjects<T>(left: T, right: T): T;
@@ -5,9 +5,9 @@ import { CSpellSettingsInternal } from '../../../Models/CSpellSettingsInternalDe
5
5
  import { OptionalOrUndefined } from '../../../util/types';
6
6
  import { LoaderResult } from '../pnpLoader';
7
7
  import { normalizeCacheSettings } from './normalizeRawSettings';
8
- export declare type CSpellSettingsWST = CSpellSettingsWithSourceTrace;
9
- export declare type CSpellSettingsI = CSpellSettingsInternal;
10
- declare type PnPSettings = OptionalOrUndefined<PnPSettingsStrict>;
8
+ export type CSpellSettingsWST = CSpellSettingsWithSourceTrace;
9
+ export type CSpellSettingsI = CSpellSettingsInternal;
10
+ type PnPSettings = OptionalOrUndefined<PnPSettingsStrict>;
11
11
  export declare const sectionCSpell = "cSpell";
12
12
  export declare const defaultFileName = "cspell.json";
13
13
  export declare const defaultConfigFilenames: readonly string[];
@@ -4,7 +4,7 @@ interface NormalizableFields {
4
4
  version?: string | number;
5
5
  }
6
6
  export declare function normalizeRawConfig(config: CSpellUserSettings | NormalizableFields): void;
7
- declare type NormalizeDictionaryDefsParams = OptionalOrUndefined<Pick<CSpellUserSettings, 'dictionaryDefinitions' | 'languageSettings'>>;
7
+ type NormalizeDictionaryDefsParams = OptionalOrUndefined<Pick<CSpellUserSettings, 'dictionaryDefinitions' | 'languageSettings'>>;
8
8
  export declare function normalizeDictionaryDefs(settings: NormalizeDictionaryDefsParams, pathToSettingsFile: string): import("../../../util/types").RemoveUndefined<{
9
9
  dictionaryDefinitions: import("../../../Models/CSpellSettingsInternalDef").DictionaryDefinitionInternalWithSource[] | undefined;
10
10
  languageSettings: import("../../../util/types").RemoveUndefined<{
@@ -29,13 +29,13 @@ export declare function normalizeDictionaryDefs(settings: NormalizeDictionaryDef
29
29
  parser?: string;
30
30
  }>[] | undefined;
31
31
  }>;
32
- declare type NormalizeOverrides = Pick<CSpellUserSettings, 'globRoot' | 'overrides'>;
33
- declare type NormalizeOverridesResult = Pick<CSpellUserSettings, 'overrides'>;
32
+ type NormalizeOverrides = Pick<CSpellUserSettings, 'globRoot' | 'overrides'>;
33
+ type NormalizeOverridesResult = Pick<CSpellUserSettings, 'overrides'>;
34
34
  export declare function normalizeOverrides(settings: NormalizeOverrides, pathToSettingsFile: string): NormalizeOverridesResult;
35
- declare type NormalizeReporters = Pick<CSpellUserSettings, 'reporters'>;
35
+ type NormalizeReporters = Pick<CSpellUserSettings, 'reporters'>;
36
36
  export declare function normalizeReporters(settings: NormalizeReporters, pathToSettingsFile: string): NormalizeReporters;
37
37
  export declare function normalizeLanguageSettings(languageSettings: LanguageSetting[] | undefined): LanguageSetting[] | undefined;
38
- declare type NormalizeGitignoreRoot = Pick<CSpellUserSettings, 'gitignoreRoot'>;
38
+ type NormalizeGitignoreRoot = Pick<CSpellUserSettings, 'gitignoreRoot'>;
39
39
  export declare function normalizeGitignoreRoot(settings: NormalizeGitignoreRoot, pathToSettingsFile: string): NormalizeGitignoreRoot;
40
40
  interface NormalizeSettingsGlobs {
41
41
  globRoot?: CSpellUserSettings['globRoot'];
@@ -2,7 +2,7 @@
2
2
  * Handles loading of `.pnp.js` and `.pnp.js` files.
3
3
  */
4
4
  import { URI } from 'vscode-uri';
5
- export declare type LoaderResult = URI | undefined;
5
+ export type LoaderResult = URI | undefined;
6
6
  export declare class PnpLoader {
7
7
  readonly pnpFiles: string[];
8
8
  private cacheKeySuffix;
@@ -1,7 +1,7 @@
1
1
  import type { DictionaryDefinition } from '@cspell/cspell-types';
2
2
  import { CSpellSettingsInternal, DictionaryDefinitionInternal, DictionaryDefinitionInternalWithSource } from '../Models/CSpellSettingsInternalDef';
3
3
  import { DictionaryReferenceCollection } from './DictionaryReferenceCollection';
4
- export declare type DefMapArrayItem = [string, DictionaryDefinitionInternal];
4
+ export type DefMapArrayItem = [string, DictionaryDefinitionInternal];
5
5
  /**
6
6
  * Combines the list of desired dictionaries with the list of dictionary
7
7
  * definitions. Order does not matter, but the number of leading `!` does.
@@ -1,6 +1,6 @@
1
1
  import type { CSpellUserSettings } from '@cspell/cspell-types';
2
2
  import { Sequence } from 'gensequence';
3
- export declare type CSpellUserSettingsKeys = keyof CSpellUserSettings;
3
+ export type CSpellUserSettingsKeys = keyof CSpellUserSettings;
4
4
  export interface DirectiveIssue {
5
5
  /**
6
6
  * the start and end offsets within the document of the issue.
@@ -1,5 +1,5 @@
1
1
  import type { BaseSetting, CSpellUserSettings, LanguageId, LanguageSetting, LocaleId } from '@cspell/cspell-types';
2
- export declare type LanguageSettings = LanguageSetting[];
2
+ export type LanguageSettings = LanguageSetting[];
3
3
  export declare function getDefaultLanguageSettings(): LanguageSettings;
4
4
  export declare function normalizeLanguageId(langId: LanguageId | LanguageId[]): Set<LanguageId>;
5
5
  export declare function normalizeLocale(locale: LocaleId | LocaleId[]): Set<LocaleId>;
@@ -1,7 +1,7 @@
1
1
  import { SpellingDictionary } from 'cspell-dictionary';
2
2
  import { CSpellIO } from 'cspell-io';
3
3
  import { DictionaryDefinitionInternal } from '../../Models/CSpellSettingsInternalDef';
4
- export declare type LoadOptions = DictionaryDefinitionInternal;
4
+ export type LoadOptions = DictionaryDefinitionInternal;
5
5
  export declare class DictionaryLoader {
6
6
  private cspellIO;
7
7
  private dictionaryCache;
@@ -7,7 +7,7 @@ declare const SpellingDictionaryModule: {
7
7
  readonly createIgnoreWordsDictionary: typeof cspellDictModule.createIgnoreWordsDictionary;
8
8
  readonly createSpellingDictionaryFromTrieFile: typeof cspellDictModule.createSpellingDictionaryFromTrieFile;
9
9
  };
10
- declare type SpellDictInterface = typeof SpellingDictionaryModule;
10
+ type SpellDictInterface = typeof SpellingDictionaryModule;
11
11
  export type { FindOptions, FindResult, HasOptions, SearchOptions, SpellingDictionary, SpellingDictionaryCollection, SpellingDictionaryOptions, SuggestionCollector, SuggestionResult, SuggestOptions, } from 'cspell-dictionary';
12
12
  export declare function getSpellDictInterface(): SpellDictInterface;
13
13
  export declare const createSpellingDictionary: typeof cspellDictModule.createSpellingDictionary;
@@ -1,4 +1,4 @@
1
- export declare type Feature = [string, number];
1
+ export type Feature = [string, number];
2
2
  export interface SuggestionResult {
3
3
  word: string;
4
4
  score: number;
@@ -1,6 +1,6 @@
1
1
  import { Trie, WalkerIterator } from 'cspell-trie-lib';
2
2
  import { SuggestionResult } from './entities';
3
- export declare type SuggestionIterator = Generator<SuggestionResult, void, number | undefined>;
3
+ export type SuggestionIterator = Generator<SuggestionResult, void, number | undefined>;
4
4
  export declare function suggest(trie: Trie, word: string, minScore?: number): SuggestionIterator;
5
5
  export declare function suggestIteration(i: WalkerIterator, word: string, minScore?: number): SuggestionIterator;
6
6
  //# sourceMappingURL=suggest.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { Glob } from '@cspell/cspell-types';
2
- export declare type ExclusionFunction = (fileUri: string) => boolean;
3
- export declare type FileExclusionFunction = (file: string) => boolean;
2
+ export type ExclusionFunction = (fileUri: string) => boolean;
3
+ export type FileExclusionFunction = (file: string) => boolean;
4
4
  /** The structure of the VS Code search.exclude settings */
5
5
  export interface ExcludeFilesGlobMap {
6
6
  [glob: string]: boolean;
@@ -33,7 +33,7 @@ export interface SpellCheckFileResult {
33
33
  checked: boolean;
34
34
  errors: Error[] | undefined;
35
35
  }
36
- export declare type UriString = string;
36
+ export type UriString = string;
37
37
  export interface DocumentWithText extends Document {
38
38
  text: string;
39
39
  }
@@ -1,5 +1,5 @@
1
1
  import { MappedText, TextOffset as TextOffsetRW, Issue } from '@cspell/cspell-types';
2
- export declare type TextOffsetRO = Readonly<TextOffsetRW>;
2
+ export type TextOffsetRO = Readonly<TextOffsetRW>;
3
3
  export interface ValidationOptions extends IncludeExcludeOptions {
4
4
  maxNumberOfProblems?: number;
5
5
  maxDuplicateProblems?: number;
@@ -27,8 +27,8 @@ export interface ValidationResult extends TextOffsetRW, Pick<Issue, 'message' |
27
27
  isFlagged?: boolean | undefined;
28
28
  isFound?: boolean | undefined;
29
29
  }
30
- export declare type ValidationResultRO = Readonly<ValidationResult>;
31
- export declare type LineValidatorFn = (line: LineSegment) => Iterable<ValidationResult>;
30
+ export type ValidationResultRO = Readonly<ValidationResult>;
31
+ export type LineValidatorFn = (line: LineSegment) => Iterable<ValidationResult>;
32
32
  export interface LineSegment {
33
33
  line: TextOffsetRO;
34
34
  segment: TextOffsetRO;
@@ -37,5 +37,5 @@ export interface MappedTextValidationResult extends MappedText {
37
37
  isFlagged?: boolean | undefined;
38
38
  isFound?: boolean | undefined;
39
39
  }
40
- export declare type TextValidatorFn = (text: MappedText) => Iterable<MappedTextValidationResult>;
40
+ export type TextValidatorFn = (text: MappedText) => Iterable<MappedTextValidationResult>;
41
41
  //# sourceMappingURL=ValidationTypes.d.ts.map
@@ -1,8 +1,8 @@
1
1
  import { MappedText } from '@cspell/cspell-types';
2
2
  import { ValidationIssue } from './validator';
3
3
  import * as TextRange from '../util/TextRange';
4
- export declare type Offset = number;
5
- export declare type SimpleRange = readonly [Offset, Offset];
4
+ export type Offset = number;
5
+ export type SimpleRange = readonly [Offset, Offset];
6
6
  export declare function mapIssueBackToOriginalPos(mappedText: MappedText, issue: ValidationIssue): ValidationIssue;
7
7
  export declare function mapRangeBackToOriginalPos(offRange: SimpleRange, map: number[] | undefined): SimpleRange;
8
8
  export declare function mapRangeToLocal(rangeOrig: SimpleRange, map: number[] | undefined): SimpleRange;
@@ -1,11 +1,11 @@
1
- export declare type Comparable = number | string | boolean | undefined | null | Date;
2
- export declare type ComparableFilter<T> = T extends Comparable ? T : never;
3
- export declare type ComparablePropertyNames<T> = {
1
+ export type Comparable = number | string | boolean | undefined | null | Date;
2
+ export type ComparableFilter<T> = T extends Comparable ? T : never;
3
+ export type ComparablePropertyNames<T> = {
4
4
  [K in keyof T]: T[K] extends Comparable ? K : never;
5
5
  }[keyof T];
6
- export declare type ComparableProperties<T> = Pick<T, ComparablePropertyNames<T>>;
7
- export declare type CompareArg<T> = ComparablePropertyNames<T> | ((t: T) => Comparable);
8
- export declare type CompareFn<T> = (a: T, b: T) => number;
6
+ export type ComparableProperties<T> = Pick<T, ComparablePropertyNames<T>>;
7
+ export type CompareArg<T> = ComparablePropertyNames<T> | ((t: T) => Comparable);
8
+ export type CompareFn<T> = (a: T, b: T) => number;
9
9
  export declare function compareBy<T>(extract: CompareArg<T>, ...extractors: CompareArg<T>[]): CompareFn<T>;
10
10
  export declare function compareBy<T>(extract: CompareArg<T>): CompareFn<T>;
11
11
  export declare function compareBy<T>(extract1: CompareArg<T>, extract2: CompareArg<T>): CompareFn<T>;
@@ -1,6 +1,6 @@
1
1
  /** Only types that can be easily turned into strings */
2
- declare type P0 = string | number | boolean | RegExp | undefined;
3
- declare type Primitive = P0 | P0[];
2
+ type P0 = string | number | boolean | RegExp | undefined;
3
+ type Primitive = P0 | P0[];
4
4
  /**
5
5
  * Memorize the result of a function call to be returned on later calls with the same parameters.
6
6
  *
@@ -6,7 +6,7 @@ export interface PairHeapNode<T> {
6
6
  /** Children */
7
7
  c: PairHeapNode<T> | undefined;
8
8
  }
9
- export declare type CompareFn<T> = (a: T, b: T) => number;
9
+ export type CompareFn<T> = (a: T, b: T) => number;
10
10
  export declare class PairingHeap<T> implements IterableIterator<T> {
11
11
  readonly compare: CompareFn<T>;
12
12
  private _heap;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
- declare type Console = typeof console;
3
+ type Console = typeof console;
4
4
  export interface Logger {
5
5
  log: Console['log'];
6
6
  warn: Console['warn'];
@@ -1,4 +1,4 @@
1
1
  import type { ReplaceMap } from '@cspell/cspell-types';
2
- export declare type ReplaceMapper = (src: string) => string;
2
+ export type ReplaceMapper = (src: string) => string;
3
3
  export declare function createMapper(repMap: ReplaceMap): ReplaceMapper;
4
4
  //# sourceMappingURL=repMap.d.ts.map
@@ -13,8 +13,8 @@ export interface Timer {
13
13
  lap(): number;
14
14
  }
15
15
  export declare function createTimer(hrTimeFn?: HRTimeFn): Timer;
16
- export declare type HRTimeFn = (time?: HRTime) => HRTime;
17
- export declare type HRTime = [number, number];
16
+ export type HRTimeFn = (time?: HRTime) => HRTime;
17
+ export type HRTime = [number, number];
18
18
  export declare function toMilliseconds(t: HRTime): number;
19
19
  export declare function polyHrTime(time?: HRTime): HRTime;
20
20
  export interface LapRecorder {
@@ -1,62 +1,62 @@
1
1
  /**
2
2
  * Make all optional fields required.
3
3
  */
4
- export declare type RequireOptional<T> = {
4
+ export type RequireOptional<T> = {
5
5
  [K in keyof Required<T>]: T[K];
6
6
  };
7
7
  /**
8
8
  * Make all properties in T optional and Possibly undefined
9
9
  */
10
- export declare type PartialWithUndefined<T> = {
10
+ export type PartialWithUndefined<T> = {
11
11
  [P in keyof T]?: T[P] | undefined;
12
12
  };
13
13
  /**
14
14
  * Make all fields mandatory
15
15
  */
16
- export declare type Mandatory<T> = {
16
+ export type Mandatory<T> = {
17
17
  [P in keyof T]-?: Exclude<T[P], undefined>;
18
18
  };
19
19
  /**
20
20
  * Union the fields
21
21
  */
22
- export declare type UnionFields<T, U> = {
22
+ export type UnionFields<T, U> = {
23
23
  [K in keyof T | keyof U]: (K extends keyof T ? T[K] : undefined) | (K extends keyof U ? U[K] : undefined);
24
24
  };
25
25
  /**
26
26
  * The keys of an object where the values cannot be undefined.
27
27
  */
28
- export declare type RequiredKeys<T> = Exclude<{
28
+ export type RequiredKeys<T> = Exclude<{
29
29
  [P in keyof T]: T[P] extends Exclude<T[P], undefined> ? P : never;
30
30
  }[keyof T], undefined>;
31
31
  /**
32
32
  * The keys of an object where the values cannot be undefined.
33
33
  */
34
- export declare type OptionalKeys<T> = Exclude<{
34
+ export type OptionalKeys<T> = Exclude<{
35
35
  [P in keyof T]: T[P] extends Exclude<T[P], undefined> ? never : P;
36
36
  }[keyof T], undefined>;
37
37
  /**
38
38
  * Extract the fields that cannot be `undefined`
39
39
  */
40
- export declare type OnlyRequired<T> = {
40
+ export type OnlyRequired<T> = {
41
41
  [P in RequiredKeys<T>]: T[P];
42
42
  };
43
43
  /**
44
44
  * Extract the fields that can be `undefined`
45
45
  */
46
- export declare type OnlyOptional<T> = {
46
+ export type OnlyOptional<T> = {
47
47
  [P in keyof T as P extends OptionalKeys<T> ? P : never]: T[P];
48
48
  };
49
- export declare type MakeOptional<T> = OnlyRequired<T> & Partial<OnlyOptional<T>>;
49
+ export type MakeOptional<T> = OnlyRequired<T> & Partial<OnlyOptional<T>>;
50
50
  /**
51
51
  * Like Required, but keeps the Optional.
52
52
  */
53
- export declare type RemoveUndefined<T> = {
53
+ export type RemoveUndefined<T> = {
54
54
  [P in keyof T]: Exclude<T[P], undefined>;
55
55
  };
56
56
  /**
57
57
  * Allow undefined in optional fields
58
58
  */
59
- export declare type OptionalOrUndefined<T> = {
59
+ export type OptionalOrUndefined<T> = {
60
60
  [P in keyof T]: P extends OptionalKeys<T> ? T[P] | undefined : T[P];
61
61
  };
62
62
  //# sourceMappingURL=types.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { TextOffset } from '@cspell/cspell-types';
2
- export declare type IsValidWordFn = (word: TextOffset) => boolean;
2
+ export type IsValidWordFn = (word: TextOffset) => boolean;
3
3
  export interface SplitResult {
4
4
  /** Original line passed to the split function */
5
5
  line: TextOffset;
@@ -23,7 +23,7 @@ export interface TextOffsetWithValid extends TextOffset {
23
23
  export interface SplitOptions extends WordBreakOptions {
24
24
  }
25
25
  export declare function split(line: TextOffset, offset: number, isValidWord: IsValidWordFn, options?: SplitOptions): SplitResult;
26
- declare type BreakPairs = readonly number[];
26
+ type BreakPairs = readonly number[];
27
27
  interface PossibleWordBreak {
28
28
  /** offset from the start of the string */
29
29
  offset: number;
@@ -34,7 +34,7 @@ interface PossibleWordBreak {
34
34
  */
35
35
  breaks: BreakPairs[];
36
36
  }
37
- export declare type SortedBreaks = PossibleWordBreak[];
37
+ export type SortedBreaks = PossibleWordBreak[];
38
38
  interface WordBreakOptions {
39
39
  optionalWordBreakCharacters?: string;
40
40
  }
@@ -1,7 +1,7 @@
1
1
  export interface WordDictionary {
2
2
  [index: string]: boolean;
3
3
  }
4
- export declare type WordSet = Set<string>;
4
+ export type WordSet = Set<string>;
5
5
  /**
6
6
  * Reads words from a file. It will not throw and error.
7
7
  * @param filename the file to read
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cspell-lib",
3
- "version": "6.14.2",
3
+ "version": "6.14.3",
4
4
  "description": "A library of useful functions used across various cspell tools.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -48,19 +48,19 @@
48
48
  },
49
49
  "homepage": "https://github.com/streetsidesoftware/cspell#readme",
50
50
  "dependencies": {
51
- "@cspell/cspell-bundled-dicts": "6.14.2",
52
- "@cspell/cspell-pipe": "6.14.2",
53
- "@cspell/cspell-types": "6.14.2",
54
- "@cspell/strong-weak-map": "6.14.2",
51
+ "@cspell/cspell-bundled-dicts": "6.14.3",
52
+ "@cspell/cspell-pipe": "6.14.3",
53
+ "@cspell/cspell-types": "6.14.3",
54
+ "@cspell/strong-weak-map": "6.14.3",
55
55
  "clear-module": "^4.1.2",
56
56
  "comment-json": "^4.2.3",
57
57
  "configstore": "^5.0.1",
58
- "cosmiconfig": "^7.0.1",
59
- "cspell-dictionary": "6.14.2",
60
- "cspell-glob": "6.14.2",
61
- "cspell-grammar": "6.14.2",
62
- "cspell-io": "6.14.2",
63
- "cspell-trie-lib": "6.14.2",
58
+ "cosmiconfig": "^7.1.0",
59
+ "cspell-dictionary": "6.14.3",
60
+ "cspell-glob": "6.14.3",
61
+ "cspell-grammar": "6.14.3",
62
+ "cspell-io": "6.14.3",
63
+ "cspell-trie-lib": "6.14.3",
64
64
  "fast-equals": "^4.0.3",
65
65
  "find-up": "^5.0.0",
66
66
  "fs-extra": "^10.1.0",
@@ -85,15 +85,15 @@
85
85
  "@cspell/dict-python": "^4.0.0",
86
86
  "@types/configstore": "^5.0.1",
87
87
  "@types/fs-extra": "^9.0.13",
88
- "@types/jest": "^29.2.2",
88
+ "@types/jest": "^29.2.3",
89
89
  "@types/node": "^18.11.9",
90
90
  "cspell-dict-nl-nl": "^1.1.2",
91
91
  "jest": "^29.3.1",
92
92
  "lorem-ipsum": "^2.0.8",
93
93
  "rimraf": "^3.0.2",
94
- "rollup": "^3.2.5",
94
+ "rollup": "^3.3.0",
95
95
  "rollup-plugin-dts": "^5.0.0",
96
96
  "ts-jest": "^29.0.3"
97
97
  },
98
- "gitHead": "ea9692380357e9e890c20f15b1200cc1c6c3a2df"
98
+ "gitHead": "df0efdbb0dc7b084579130ba5fe97441c0ab67ca"
99
99
  }