TypeshadeLanguageService
이 페이지에서

TypeshadeLanguageService

클래스, 편집기 분류

Provides Typeshade diagnostics, completion, hover, and position mapping for editor integrations.

import { TypeshadeLanguageService } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

class TypeshadeLanguageService

생성자

new TypeshadeLanguageService(options: TypeshadeLanguageServiceOptions = {})

인스턴스 속성

fileName읽기 전용 string

File name used when parsing source text; carries no filesystem meaning.

인스턴스 메서드

getDiagnostics (source: string): readonly TypeshadeDiagnostic[]

Returns compiler diagnostics with zero-based ranges and UTF-16 spans suitable for editor markers.

getCompletions (source: string, position: TypeshadePosition): readonly TypeshadeCompletionItem[]

Returns context-aware Typeshade completion items at a zero-based editor position.

getHover (source: string, position: TypeshadePosition): TypeshadeHover | undefined

Returns hover documentation for known Typeshade types and attributes at a zero-based editor position.

getPosition (source: string, offset: number): TypeshadePosition

Converts a UTF-16 source offset into the zero-based position used by adapters; an offset past the end of the source clamps to the end.

getOffset (source: string, position: TypeshadePosition): number

Converts a zero-based editor position into a UTF-16 source offset; a position past the end of the source clamps to the end.

소스

src/language-service.ts, 122행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고