Liking cljdoc? Tell your friends :D

dots.typescript.language-service


applicable-refactorscljs

(applicable-refactors language-service file-name position-or-range)
(applicable-refactors language-service file-name position-or-range preferences)
(applicable-refactors language-service
                      file-name
                      position-or-range
                      preferences
                      trigger-reason)
(applicable-refactors language-service
                      file-name
                      position-or-range
                      preferences
                      trigger-reason
                      kind)
(applicable-refactors language-service
                      file-name
                      position-or-range
                      preferences
                      trigger-reason
                      kind
                      include-interactive-actions?)

Parameters:

  • file-name: string
  • position-or-range: number | TextRange
  • preferences: UserPreferences | undefined
  • trigger-reason: RefactorTriggerReason | undefined
  • kind: string | undefined
  • include-interactive-actions?: boolean | undefined - Include refactor actions that require additional arguments to be passed when calling getEditsForRefactor. When true, clients should inspect the isInteractive property of each returned RefactorActionInfo and ensure they are able to collect the appropriate arguments for any interactive action before offering it.

Returns: ApplicableRefactorInfo[]

**Parameters:**
- `file-name`: `string`
- `position-or-range`: `number | TextRange`
- `preferences`: `UserPreferences | undefined`
- `trigger-reason`: `RefactorTriggerReason | undefined`
- `kind`: `string | undefined`
- `include-interactive-actions?`: `boolean | undefined` - Include refactor actions that require additional arguments to be
passed when calling `getEditsForRefactor`. When true, clients should inspect the `isInteractive`
property of each returned `RefactorActionInfo` and ensure they are able to collect the appropriate
arguments for any interactive action before offering it.

**Returns:** `ApplicableRefactorInfo[]`
sourceraw docstring

apply-code-action-commandcljs

(apply-code-action-command language-service action)
(apply-code-action-command language-service action format-settings)
(apply-code-action-command language-service file-name action)

Parameters:

  • file-name: string
  • action: InstallPackageAction | InstallPackageAction[]
  • format-settings: FormatCodeSettings | undefined

Returns: Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>

**Parameters:**
- `file-name`: `string`
- `action`: `InstallPackageAction | InstallPackageAction[]`
- `format-settings`: `FormatCodeSettings | undefined`

**Returns:** `Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>`
sourceraw docstring

brace-matching-at-positioncljs

(brace-matching-at-position language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: TextSpan[]

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `TextSpan[]`
sourceraw docstring

breakpoint-statement-at-positioncljs

(breakpoint-statement-at-position language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: TextSpan | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `TextSpan | undefined`
sourceraw docstring

cleanup-semantic-cachecljs

(cleanup-semantic-cache language-service)

This is used as a part of restarting the language service.

Returns: void

This is used as a part of restarting the language service.

**Returns:** `void`
sourceraw docstring

code-fixes-at-positioncljs

(code-fixes-at-position language-service
                        file-name
                        start
                        end
                        error-codes
                        format-options
                        preferences)

Parameters:

  • file-name: string
  • start: number
  • end: number
  • error-codes: readonly number[]
  • format-options: FormatCodeSettings
  • preferences: UserPreferences

Returns: readonly CodeFixAction[]

**Parameters:**
- `file-name`: `string`
- `start`: `number`
- `end`: `number`
- `error-codes`: `readonly number[]`
- `format-options`: `FormatCodeSettings`
- `preferences`: `UserPreferences`

**Returns:** `readonly CodeFixAction[]`
sourceraw docstring

combined-code-fixcljs

(combined-code-fix language-service scope fix-id format-options preferences)

Parameters:

  • scope: CombinedCodeFixScope
  • fix-id: {}
  • format-options: FormatCodeSettings
  • preferences: UserPreferences

Returns: CombinedCodeActions

**Parameters:**
- `scope`: `CombinedCodeFixScope`
- `fix-id`: `{}`
- `format-options`: `FormatCodeSettings`
- `preferences`: `UserPreferences`

**Returns:** `CombinedCodeActions`
sourceraw docstring

comment-selectioncljs

(comment-selection language-service file-name text-range)

Parameters:

  • file-name: string
  • text-range: TextRange

Returns: TextChange[]

**Parameters:**
- `file-name`: `string`
- `text-range`: `TextRange`

**Returns:** `TextChange[]`
sourceraw docstring

compiler-options-diagnosticscljs

(compiler-options-diagnostics language-service)

Gets global diagnostics related to the program configuration and compiler options.

Returns: Diagnostic[]

Gets global diagnostics related to the program configuration and compiler options.

**Returns:** `Diagnostic[]`
sourceraw docstring

completion-entry-detailscljs

(completion-entry-details language-service file-name position entry-name)
(completion-entry-details language-service
                          file-name
                          position
                          entry-name
                          format-options)
(completion-entry-details language-service
                          file-name
                          position
                          entry-name
                          format-options
                          source)
(completion-entry-details language-service
                          file-name
                          position
                          entry-name
                          format-options
                          source
                          preferences)
(completion-entry-details language-service
                          file-name
                          position
                          entry-name
                          format-options
                          source
                          preferences
                          data)

Gets the extended details for a completion entry retrieved from getCompletionsAtPosition.

Parameters:

  • file-name: string - The path to the file
  • position: number - A zero based index of the character where you want the entries
  • entry-name: string - The name from an existing completion which came from getCompletionsAtPosition
  • format-options: FormatCodeSettings | FormatCodeOptions | undefined - How should code samples in the completions be formatted, can be undefined for backwards compatibility
  • source: string | undefined - source property from the completion entry
  • preferences: UserPreferences | undefined - User settings, can be undefined for backwards compatibility
  • data: CompletionEntryData | undefined - data property from the completion entry

Returns: CompletionEntryDetails | undefined

Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`.

**Parameters:**
- `file-name`: `string` - The path to the file
- `position`: `number` - A zero based index of the character where you want the entries
- `entry-name`: `string` - The `name` from an existing completion which came from `getCompletionsAtPosition`
- `format-options`: `FormatCodeSettings | FormatCodeOptions | undefined` - How should code samples in the completions be formatted, can be undefined for backwards compatibility
- `source`: `string | undefined` - `source` property from the completion entry
- `preferences`: `UserPreferences | undefined` - User settings, can be undefined for backwards compatibility
- `data`: `CompletionEntryData | undefined` - `data` property from the completion entry

**Returns:** `CompletionEntryDetails | undefined`
sourceraw docstring

completion-entry-symbolcljs

(completion-entry-symbol language-service file-name position name)
(completion-entry-symbol language-service file-name position name source)

Parameters:

  • file-name: string
  • position: number
  • name: string
  • source: string | undefined

Returns: Symbol | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`
- `name`: `string`
- `source`: `string | undefined`

**Returns:** `Symbol | undefined`
sourceraw docstring

completions-at-positioncljs

(completions-at-position language-service file-name position)
(completions-at-position language-service file-name position options)
(completions-at-position language-service
                         file-name
                         position
                         options
                         formatting-settings)

Gets completion entries at a particular position in a file.

Parameters:

  • file-name: string - The path to the file
  • position: number - A zero-based index of the character where you want the entries
  • options: GetCompletionsAtPositionOptions | undefined - An object describing how the request was triggered and what kinds of code actions can be returned with the completions.
  • formatting-settings: FormatCodeSettings | undefined - settings needed for calling formatting functions.

Returns: WithMetadata<CompletionInfo> | undefined

Gets completion entries at a particular position in a file.

**Parameters:**
- `file-name`: `string` - The path to the file
- `position`: `number` - A zero-based index of the character where you want the entries
- `options`: `GetCompletionsAtPositionOptions | undefined` - An object describing how the request was triggered and what kinds
of code actions can be returned with the completions.
- `formatting-settings`: `FormatCodeSettings | undefined` - settings needed for calling formatting functions.

**Returns:** `WithMetadata<CompletionInfo> | undefined`
sourceraw docstring

definition-and-bound-spancljs

(definition-and-bound-span language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: DefinitionInfoAndBoundSpan | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `DefinitionInfoAndBoundSpan | undefined`
sourceraw docstring

definition-at-positioncljs

(definition-at-position language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: readonly DefinitionInfo[] | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `readonly DefinitionInfo[] | undefined`
sourceraw docstring

disposecljs

(dispose language-service)

Returns: void

**Returns:** `void`
sourceraw docstring

doc-comment-template-at-positioncljs

(doc-comment-template-at-position language-service file-name position)
(doc-comment-template-at-position language-service file-name position options)
(doc-comment-template-at-position language-service
                                  file-name
                                  position
                                  options
                                  format-options)

Parameters:

  • file-name: string
  • position: number
  • options: DocCommentTemplateOptions | undefined
  • format-options: FormatCodeSettings | undefined

Returns: TextInsertion | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`
- `options`: `DocCommentTemplateOptions | undefined`
- `format-options`: `FormatCodeSettings | undefined`

**Returns:** `TextInsertion | undefined`
sourceraw docstring

document-highlightscljs

(document-highlights language-service file-name position files-to-search)

Parameters:

  • file-name: string
  • position: number
  • files-to-search: string[]

Returns: DocumentHighlights[] | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`
- `files-to-search`: `string[]`

**Returns:** `DocumentHighlights[] | undefined`
sourceraw docstring

edits-for-file-renamecljs

(edits-for-file-rename language-service
                       old-file-path
                       new-file-path
                       format-options)
(edits-for-file-rename language-service
                       old-file-path
                       new-file-path
                       format-options
                       preferences)

Parameters:

  • old-file-path: string
  • new-file-path: string
  • format-options: FormatCodeSettings
  • preferences: UserPreferences | undefined

Returns: readonly FileTextChanges[]

**Parameters:**
- `old-file-path`: `string`
- `new-file-path`: `string`
- `format-options`: `FormatCodeSettings`
- `preferences`: `UserPreferences | undefined`

**Returns:** `readonly FileTextChanges[]`
sourceraw docstring

edits-for-refactorcljs

(edits-for-refactor language-service
                    file-name
                    format-options
                    position-or-range
                    refactor-name
                    action-name)
(edits-for-refactor language-service
                    file-name
                    format-options
                    position-or-range
                    refactor-name
                    action-name
                    preferences)
(edits-for-refactor language-service
                    file-name
                    format-options
                    position-or-range
                    refactor-name
                    action-name
                    preferences
                    interactive-refactor-arguments)

Parameters:

  • file-name: string
  • format-options: FormatCodeSettings
  • position-or-range: number | TextRange
  • refactor-name: string
  • action-name: string
  • preferences: UserPreferences | undefined
  • interactive-refactor-arguments: InteractiveRefactorArguments | undefined

Returns: RefactorEditInfo | undefined

**Parameters:**
- `file-name`: `string`
- `format-options`: `FormatCodeSettings`
- `position-or-range`: `number | TextRange`
- `refactor-name`: `string`
- `action-name`: `string`
- `preferences`: `UserPreferences | undefined`
- `interactive-refactor-arguments`: `InteractiveRefactorArguments | undefined`

**Returns:** `RefactorEditInfo | undefined`
sourceraw docstring

emit-outputcljs

(emit-output language-service file-name)
(emit-output language-service file-name emit-only-dts-files?)
(emit-output language-service file-name emit-only-dts-files? force-dts-emit?)

Parameters:

  • file-name: string
  • emit-only-dts-files?: boolean | undefined
  • force-dts-emit?: boolean | undefined

Returns: EmitOutput

**Parameters:**
- `file-name`: `string`
- `emit-only-dts-files?`: `boolean | undefined`
- `force-dts-emit?`: `boolean | undefined`

**Returns:** `EmitOutput`
sourceraw docstring

encoded-semantic-classificationscljs

(encoded-semantic-classifications language-service file-name span)
(encoded-semantic-classifications language-service file-name span format)

Gets semantic highlights information for a particular file. Has two formats, an older version used by VS and a format used by VS Code.

Parameters:

  • file-name: string - The path to the file
  • span: TextSpan
  • format: SemanticClassificationFormat | undefined - Which format to use, defaults to "original"

Returns: Classifications - a number array encoded as triples of [start, length, ClassificationType, ...].

Gets semantic highlights information for a particular file. Has two formats, an older
version used by VS and a format used by VS Code.

**Parameters:**
- `file-name`: `string` - The path to the file
- `span`: `TextSpan`
- `format`: `SemanticClassificationFormat | undefined` - Which format to use, defaults to "original"

**Returns:** `Classifications` - a number array encoded as triples of [start, length, ClassificationType, ...].
sourceraw docstring

encoded-syntactic-classificationscljs

(encoded-syntactic-classifications language-service file-name span)

Encoded as triples of [start, length, ClassificationType].

Parameters:

  • file-name: string
  • span: TextSpan

Returns: Classifications

Encoded as triples of [start, length, ClassificationType].

**Parameters:**
- `file-name`: `string`
- `span`: `TextSpan`

**Returns:** `Classifications`
sourceraw docstring

file-referencescljs

(file-references language-service file-name)

Parameters:

  • file-name: string

Returns: ReferenceEntry[]

**Parameters:**
- `file-name`: `string`

**Returns:** `ReferenceEntry[]`
sourceraw docstring

find-referencescljs

(find-references language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: ReferencedSymbol[] | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `ReferencedSymbol[] | undefined`
sourceraw docstring

find-rename-locationscljs

(find-rename-locations language-service
                       file-name
                       position
                       find-in-strings?
                       find-in-comments?)
(find-rename-locations language-service
                       file-name
                       position
                       find-in-strings?
                       find-in-comments?
                       preferences)
(find-rename-locations language-service
                       file-name
                       position
                       find-in-strings?
                       find-in-comments?
                       provide-prefix-and-suffix-text-for-rename?)

Parameters:

  • file-name: string
  • position: number
  • find-in-strings?: boolean
  • find-in-comments?: boolean
  • preferences: UserPreferences
  • provide-prefix-and-suffix-text-for-rename?: boolean | undefined

Returns: readonly RenameLocation[] | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`
- `find-in-strings?`: `boolean`
- `find-in-comments?`: `boolean`
- `preferences`: `UserPreferences`
- `provide-prefix-and-suffix-text-for-rename?`: `boolean | undefined`

**Returns:** `readonly RenameLocation[] | undefined`
sourceraw docstring

formatting-edits-after-keystrokecljs

(formatting-edits-after-keystroke language-service
                                  file-name
                                  position
                                  key
                                  options)

Parameters:

  • file-name: string
  • position: number
  • key: string
  • options: FormatCodeSettings | FormatCodeOptions

Returns: TextChange[]

**Parameters:**
- `file-name`: `string`
- `position`: `number`
- `key`: `string`
- `options`: `FormatCodeSettings | FormatCodeOptions`

**Returns:** `TextChange[]`
sourceraw docstring

formatting-edits-for-documentcljs

(formatting-edits-for-document language-service file-name options)

Parameters:

  • file-name: string
  • options: FormatCodeSettings | FormatCodeOptions

Returns: TextChange[]

**Parameters:**
- `file-name`: `string`
- `options`: `FormatCodeSettings | FormatCodeOptions`

**Returns:** `TextChange[]`
sourceraw docstring

formatting-edits-for-rangecljs

(formatting-edits-for-range language-service file-name start end options)

Parameters:

  • file-name: string
  • start: number
  • end: number
  • options: FormatCodeSettings | FormatCodeOptions

Returns: TextChange[]

**Parameters:**
- `file-name`: `string`
- `start`: `number`
- `end`: `number`
- `options`: `FormatCodeSettings | FormatCodeOptions`

**Returns:** `TextChange[]`
sourceraw docstring

implementation-at-positioncljs

(implementation-at-position language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: readonly ImplementationLocation[] | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `readonly ImplementationLocation[] | undefined`
sourceraw docstring

indentation-at-positioncljs

(indentation-at-position language-service file-name position options)

Parameters:

  • file-name: string
  • position: number
  • options: EditorSettings | EditorOptions

Returns: number

**Parameters:**
- `file-name`: `string`
- `position`: `number`
- `options`: `EditorSettings | EditorOptions`

**Returns:** `number`
sourceraw docstring

jsx-closing-tag-at-positioncljs

(jsx-closing-tag-at-position language-service file-name position)

This will return a defined result if the position is after the > of the opening tag, or somewhere in the text, of a JSXElement with no closing tag. Editors should call this after > is typed.

Parameters:

  • file-name: string
  • position: number

Returns: JsxClosingTagInfo | undefined

This will return a defined result if the position is after the `>` of the opening tag, or somewhere in the text, of a JSXElement with no closing tag.
Editors should call this after `>` is typed.

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `JsxClosingTagInfo | undefined`
sourceraw docstring

linked-editing-range-at-positioncljs

(linked-editing-range-at-position language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: LinkedEditingInfo | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `LinkedEditingInfo | undefined`
sourceraw docstring

move-to-refactoring-file-suggestionscljs

(move-to-refactoring-file-suggestions language-service
                                      file-name
                                      position-or-range)
(move-to-refactoring-file-suggestions language-service
                                      file-name
                                      position-or-range
                                      preferences)
(move-to-refactoring-file-suggestions language-service
                                      file-name
                                      position-or-range
                                      preferences
                                      trigger-reason)
(move-to-refactoring-file-suggestions language-service
                                      file-name
                                      position-or-range
                                      preferences
                                      trigger-reason
                                      kind)

Parameters:

  • file-name: string
  • position-or-range: number | TextRange
  • preferences: UserPreferences | undefined
  • trigger-reason: RefactorTriggerReason | undefined
  • kind: string | undefined

Returns: { newFileName: string; files: string[]; }

**Parameters:**
- `file-name`: `string`
- `position-or-range`: `number | TextRange`
- `preferences`: `UserPreferences | undefined`
- `trigger-reason`: `RefactorTriggerReason | undefined`
- `kind`: `string | undefined`

**Returns:** `{ newFileName: string; files: string[]; }`
sourceraw docstring

name-or-dotted-name-spancljs

(name-or-dotted-name-span language-service file-name start-pos end-pos)

Parameters:

  • file-name: string
  • start-pos: number
  • end-pos: number

Returns: TextSpan | undefined

**Parameters:**
- `file-name`: `string`
- `start-pos`: `number`
- `end-pos`: `number`

**Returns:** `TextSpan | undefined`
sourceraw docstring

(navigate-to-items language-service search-value)
(navigate-to-items language-service search-value max-result-count)
(navigate-to-items language-service search-value max-result-count file-name)
(navigate-to-items language-service
                   search-value
                   max-result-count
                   file-name
                   exclude-dts-files?)
(navigate-to-items language-service
                   search-value
                   max-result-count
                   file-name
                   exclude-dts-files?
                   exclude-lib-files?)

Parameters:

  • search-value: string
  • max-result-count: number | undefined
  • file-name: string | undefined
  • exclude-dts-files?: boolean | undefined
  • exclude-lib-files?: boolean | undefined

Returns: NavigateToItem[]

**Parameters:**
- `search-value`: `string`
- `max-result-count`: `number | undefined`
- `file-name`: `string | undefined`
- `exclude-dts-files?`: `boolean | undefined`
- `exclude-lib-files?`: `boolean | undefined`

**Returns:** `NavigateToItem[]`
sourceraw docstring

(navigation-bar-items language-service file-name)

Parameters:

  • file-name: string

Returns: NavigationBarItem[]

**Parameters:**
- `file-name`: `string`

**Returns:** `NavigationBarItem[]`
sourceraw docstring

(navigation-tree language-service file-name)

Parameters:

  • file-name: string

Returns: NavigationTree

**Parameters:**
- `file-name`: `string`

**Returns:** `NavigationTree`
sourceraw docstring

organize-importscljs

(organize-imports language-service args format-options)
(organize-imports language-service args format-options preferences)

Parameters:

  • args: OrganizeImportsArgs
  • format-options: FormatCodeSettings
  • preferences: UserPreferences | undefined

Returns: readonly FileTextChanges[]

**Parameters:**
- `args`: `OrganizeImportsArgs`
- `format-options`: `FormatCodeSettings`
- `preferences`: `UserPreferences | undefined`

**Returns:** `readonly FileTextChanges[]`
sourceraw docstring

outlining-spanscljs

(outlining-spans language-service file-name)

Parameters:

  • file-name: string

Returns: OutliningSpan[]

**Parameters:**
- `file-name`: `string`

**Returns:** `OutliningSpan[]`
sourceraw docstring

prepare-call-hierarchycljs

(prepare-call-hierarchy language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: CallHierarchyItem | CallHierarchyItem[] | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `CallHierarchyItem | CallHierarchyItem[] | undefined`
sourceraw docstring

programcljs

(program language-service)

Returns: Program | undefined

**Returns:** `Program | undefined`
sourceraw docstring

provide-call-hierarchy-incoming-callscljs

(provide-call-hierarchy-incoming-calls language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: CallHierarchyIncomingCall[]

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `CallHierarchyIncomingCall[]`
sourceraw docstring

provide-call-hierarchy-outgoing-callscljs

(provide-call-hierarchy-outgoing-calls language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: CallHierarchyOutgoingCall[]

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `CallHierarchyOutgoingCall[]`
sourceraw docstring

provide-inlay-hintscljs

(provide-inlay-hints language-service file-name span)
(provide-inlay-hints language-service file-name span preferences)

Parameters:

  • file-name: string
  • span: TextSpan
  • preferences: UserPreferences | undefined

Returns: InlayHint[]

**Parameters:**
- `file-name`: `string`
- `span`: `TextSpan`
- `preferences`: `UserPreferences | undefined`

**Returns:** `InlayHint[]`
sourceraw docstring

quick-info-at-positioncljs

(quick-info-at-position language-service file-name position)

Gets semantic information about the identifier at a particular position in a file. Quick info is what you typically see when you hover in an editor.

Parameters:

  • file-name: string - The path to the file
  • position: number - A zero-based index of the character where you want the quick info

Returns: QuickInfo | undefined

Gets semantic information about the identifier at a particular position in a
file. Quick info is what you typically see when you hover in an editor.

**Parameters:**
- `file-name`: `string` - The path to the file
- `position`: `number` - A zero-based index of the character where you want the quick info

**Returns:** `QuickInfo | undefined`
sourceraw docstring

references-at-positioncljs

(references-at-position language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: ReferenceEntry[] | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `ReferenceEntry[] | undefined`
sourceraw docstring

rename-infocljs

(rename-info language-service file-name position)
(rename-info language-service file-name position options)
(rename-info language-service file-name position preferences)

Parameters:

  • file-name: string
  • position: number
  • options: RenameInfoOptions | undefined
  • preferences: UserPreferences

Returns: RenameInfo

**Parameters:**
- `file-name`: `string`
- `position`: `number`
- `options`: `RenameInfoOptions | undefined`
- `preferences`: `UserPreferences`

**Returns:** `RenameInfo`
sourceraw docstring

semantic-classificationscljs

(semantic-classifications language-service file-name span)
(semantic-classifications language-service file-name span format)

Parameters:

  • file-name: string
  • span: TextSpan
  • format: SemanticClassificationFormat

Returns: ClassifiedSpan[] | ClassifiedSpan2020[]

**Parameters:**
- `file-name`: `string`
- `span`: `TextSpan`
- `format`: `SemanticClassificationFormat`

**Returns:** `ClassifiedSpan[] | ClassifiedSpan2020[]`
sourceraw docstring

semantic-diagnosticscljs

(semantic-diagnostics language-service file-name)

Gets warnings or errors indicating type system issues in a given file. Requesting semantic diagnostics may start up the type system and run deferred work, so the first call may take longer than subsequent calls.

Unlike the other get*Diagnostics functions, these diagnostics can potentially not include a reference to a source file. Specifically, the first time this is called, it will return global diagnostics with no associated location.

To contrast the differences between semantic and syntactic diagnostics, consider the sentence: "The sun is green." is syntactically correct; those are real English words with correct sentence structure. However, it is semantically invalid, because it is not true.

Parameters:

  • file-name: string - A path to the file you want semantic diagnostics for

Returns: Diagnostic[]

Gets warnings or errors indicating type system issues in a given file.
Requesting semantic diagnostics may start up the type system and
run deferred work, so the first call may take longer than subsequent calls.

Unlike the other get*Diagnostics functions, these diagnostics can potentially not
include a reference to a source file. Specifically, the first time this is called,
it will return global diagnostics with no associated location.

To contrast the differences between semantic and syntactic diagnostics, consider the
sentence: "The sun is green." is syntactically correct; those are real English words with
correct sentence structure. However, it is semantically invalid, because it is not true.

**Parameters:**
- `file-name`: `string` - A path to the file you want semantic diagnostics for

**Returns:** `Diagnostic[]`
sourceraw docstring

signature-help-itemscljs

(signature-help-items language-service file-name position)
(signature-help-items language-service file-name position options)

Parameters:

  • file-name: string
  • position: number
  • options: SignatureHelpItemsOptions | undefined

Returns: SignatureHelpItems | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`
- `options`: `SignatureHelpItemsOptions | undefined`

**Returns:** `SignatureHelpItems | undefined`
sourceraw docstring

smart-selection-rangecljs

(smart-selection-range language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: SelectionRange

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `SelectionRange`
sourceraw docstring

span-of-enclosing-commentcljs

(span-of-enclosing-comment language-service file-name position only-multi-line?)

Parameters:

  • file-name: string
  • position: number
  • only-multi-line?: boolean

Returns: TextSpan | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`
- `only-multi-line?`: `boolean`

**Returns:** `TextSpan | undefined`
sourceraw docstring

suggestion-diagnosticscljs

(suggestion-diagnostics language-service file-name)

Gets suggestion diagnostics for a specific file. These diagnostics tend to proactively suggest refactors, as opposed to diagnostics that indicate potentially incorrect runtime behavior.

Parameters:

  • file-name: string - A path to the file you want semantic diagnostics for

Returns: DiagnosticWithLocation[]

Gets suggestion diagnostics for a specific file. These diagnostics tend to
proactively suggest refactors, as opposed to diagnostics that indicate
potentially incorrect runtime behavior.

**Parameters:**
- `file-name`: `string` - A path to the file you want semantic diagnostics for

**Returns:** `DiagnosticWithLocation[]`
sourceraw docstring

supported-code-fixescljs

(supported-code-fixes language-service)
(supported-code-fixes language-service file-name)

Parameters:

  • file-name: string | undefined

Returns: readonly string[]

**Parameters:**
- `file-name`: `string | undefined`

**Returns:** `readonly string[]`
sourceraw docstring

syntactic-classificationscljs

(syntactic-classifications language-service file-name span)
(syntactic-classifications language-service file-name span format)

Parameters:

  • file-name: string
  • span: TextSpan
  • format: SemanticClassificationFormat

Returns: ClassifiedSpan[] | ClassifiedSpan2020[]

**Parameters:**
- `file-name`: `string`
- `span`: `TextSpan`
- `format`: `SemanticClassificationFormat`

**Returns:** `ClassifiedSpan[] | ClassifiedSpan2020[]`
sourceraw docstring

syntactic-diagnosticscljs

(syntactic-diagnostics language-service file-name)

Gets errors indicating invalid syntax in a file.

In English, "this cdeo have, erorrs" is syntactically invalid because it has typos, grammatical errors, and misplaced punctuation. Likewise, examples of syntax errors in TypeScript are missing parentheses in an if statement, mismatched curly braces, and using a reserved keyword as a variable name.

These diagnostics are inexpensive to compute and don't require knowledge of other files. Note that a non-empty result increases the likelihood of false positives from getSemanticDiagnostics.

While these represent the majority of syntax-related diagnostics, there are some that require the type system, which will be present in getSemanticDiagnostics.

Parameters:

  • file-name: string - A path to the file you want syntactic diagnostics for

Returns: DiagnosticWithLocation[]

Gets errors indicating invalid syntax in a file.

In English, "this cdeo have, erorrs" is syntactically invalid because it has typos,
grammatical errors, and misplaced punctuation. Likewise, examples of syntax
errors in TypeScript are missing parentheses in an `if` statement, mismatched
curly braces, and using a reserved keyword as a variable name.

These diagnostics are inexpensive to compute and don't require knowledge of
other files. Note that a non-empty result increases the likelihood of false positives
from `getSemanticDiagnostics`.

While these represent the majority of syntax-related diagnostics, there are some
that require the type system, which will be present in `getSemanticDiagnostics`.

**Parameters:**
- `file-name`: `string` - A path to the file you want syntactic diagnostics for

**Returns:** `DiagnosticWithLocation[]`
sourceraw docstring

to-line-column-offsetcljs

(to-line-column-offset language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: LineAndCharacter

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `LineAndCharacter`
sourceraw docstring

todo-commentscljs

(todo-comments language-service file-name descriptors)

Parameters:

  • file-name: string
  • descriptors: TodoCommentDescriptor[]

Returns: TodoComment[]

**Parameters:**
- `file-name`: `string`
- `descriptors`: `TodoCommentDescriptor[]`

**Returns:** `TodoComment[]`
sourceraw docstring

toggle-line-commentcljs

(toggle-line-comment language-service file-name text-range)

Parameters:

  • file-name: string
  • text-range: TextRange

Returns: TextChange[]

**Parameters:**
- `file-name`: `string`
- `text-range`: `TextRange`

**Returns:** `TextChange[]`
sourceraw docstring

toggle-multiline-commentcljs

(toggle-multiline-comment language-service file-name text-range)

Parameters:

  • file-name: string
  • text-range: TextRange

Returns: TextChange[]

**Parameters:**
- `file-name`: `string`
- `text-range`: `TextRange`

**Returns:** `TextChange[]`
sourceraw docstring

type-definition-at-positioncljs

(type-definition-at-position language-service file-name position)

Parameters:

  • file-name: string
  • position: number

Returns: readonly DefinitionInfo[] | undefined

**Parameters:**
- `file-name`: `string`
- `position`: `number`

**Returns:** `readonly DefinitionInfo[] | undefined`
sourceraw docstring

uncomment-selectioncljs

(uncomment-selection language-service file-name text-range)

Parameters:

  • file-name: string
  • text-range: TextRange

Returns: TextChange[]

**Parameters:**
- `file-name`: `string`
- `text-range`: `TextRange`

**Returns:** `TextChange[]`
sourceraw docstring

valid-brace-completion-at-position?cljs

(valid-brace-completion-at-position? language-service
                                     file-name
                                     position
                                     opening-brace)

Parameters:

  • file-name: string
  • position: number
  • opening-brace: number

Returns: boolean

**Parameters:**
- `file-name`: `string`
- `position`: `number`
- `opening-brace`: `number`

**Returns:** `boolean`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close