From afa5bb2b5797c1f76b70e31b5f487cda96bf15b0 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 10 Apr 2025 08:59:08 -0700 Subject: [PATCH 01/12] wip --- internal/ast/utilities.go | 5 +++ internal/checker/checker.go | 16 ++++---- internal/checker/jsx.go | 2 +- internal/checker/relater.go | 2 +- internal/checker/utilities.go | 6 +-- internal/core/compileroptions.go | 16 ++++++++ internal/parser/parser.go | 68 +++++++++++++++++++++++++++++++- 7 files changed, 99 insertions(+), 16 deletions(-) diff --git a/internal/ast/utilities.go b/internal/ast/utilities.go index 166d3063ed..d684fbed5b 100644 --- a/internal/ast/utilities.go +++ b/internal/ast/utilities.go @@ -2657,6 +2657,11 @@ func GetPragmaArgument(pragma *Pragma, name string) string { return "" } + +func IsJsxOpeningLikeElement(node *Node) bool { + return IsJsxOpeningElement(node) || IsJsxSelfClosingElement(node) +} + // Of the form: `const x = require("x")` or `const { x } = require("x")` or with `var` or `let` // The variable must not be exported and must not have a type annotation, even a jsdoc one. // The initializer must be a call to `require` with a string literal or a string literal-like argument. diff --git a/internal/checker/checker.go b/internal/checker/checker.go index d237878c9b..87450b16b9 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -8420,7 +8420,7 @@ type CallState struct { func (c *Checker) resolveCall(node *ast.Node, signatures []*Signature, candidatesOutArray *[]*Signature, checkMode CheckMode, callChainFlags SignatureFlags, headMessage *diagnostics.Message) *Signature { isTaggedTemplate := node.Kind == ast.KindTaggedTemplateExpression isDecorator := node.Kind == ast.KindDecorator - isJsxOpeningOrSelfClosingElement := isJsxOpeningLikeElement(node) + isJsxOpeningOrSelfClosingElement := ast.IsJsxOpeningLikeElement(node) isInstanceof := node.Kind == ast.KindBinaryExpression reportErrors := !c.isInferencePartiallyBlocked && candidatesOutArray == nil var s CallState @@ -8726,7 +8726,7 @@ func (c *Checker) hasCorrectArity(node *ast.Node, args []*ast.Node, signature *S argCount = c.getDecoratorArgumentCount(node, signature) case ast.IsBinaryExpression(node): argCount = 1 - case isJsxOpeningLikeElement(node): + case ast.IsJsxOpeningLikeElement(node): callIsIncomplete = node.Attributes().End() == node.End() if callIsIncomplete { return true @@ -8846,7 +8846,7 @@ func (c *Checker) checkTypeArguments(signature *Signature, typeArgumentNodes []* } func (c *Checker) isSignatureApplicable(node *ast.Node, args []*ast.Node, signature *Signature, relation *Relation, checkMode CheckMode, reportErrors bool, inferenceContext *InferenceContext, diagnosticOutput *[]*ast.Diagnostic) bool { - if isJsxOpeningLikeElement(node) { + if ast.IsJsxOpeningLikeElement(node) { return c.checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors, diagnosticOutput) } thisType := c.getThisTypeOfSignature(signature) @@ -8987,7 +8987,7 @@ func (c *Checker) getEffectiveCheckNode(argument *ast.Node) *ast.Node { } func (c *Checker) inferTypeArguments(node *ast.Node, signature *Signature, args []*ast.Node, checkMode CheckMode, context *InferenceContext) []*Type { - if isJsxOpeningLikeElement(node) { + if ast.IsJsxOpeningLikeElement(node) { return c.inferJsxTypeArguments(node, signature, checkMode, context) } // If a contextual type is available, infer from that type to the return type of the call expression. For @@ -26512,7 +26512,7 @@ func (c *Checker) markLinkedReferences(location *ast.Node, hint ReferenceHint, p c.markExportAssignmentAliasReferenced(location) return } - if isJsxOpeningLikeElement(location) || ast.IsJsxOpeningFragment(location) { + if ast.IsJsxOpeningLikeElement(location) || ast.IsJsxOpeningFragment(location) { c.markJsxAliasReferenced(location) return } @@ -26677,7 +26677,7 @@ func (c *Checker) markJsxAliasReferenced(node *ast.Node /*JsxOpeningLikeElement jsxFactoryRefErr := core.IfElse(c.compilerOptions.Jsx == core.JsxEmitReact, diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found, nil) jsxFactoryNamespace := c.getJsxNamespace(node) jsxFactoryLocation := node - if isJsxOpeningLikeElement(node) { + if ast.IsJsxOpeningLikeElement(node) { jsxFactoryLocation = node.TagName() } // allow null as jsxFragmentFactory @@ -27722,7 +27722,7 @@ func (c *Checker) getContextualTypeForArgumentAtIndex(callTarget *ast.Node, argI } else { signature = c.getResolvedSignature(callTarget, nil, CheckModeNormal) } - if isJsxOpeningLikeElement(callTarget) && argIndex == 0 { + if ast.IsJsxOpeningLikeElement(callTarget) && argIndex == 0 { return c.getEffectiveFirstArgumentForJsxSignature(signature, callTarget) } restIndex := len(signature.parameters) - 1 @@ -27976,7 +27976,7 @@ func (c *Checker) getEffectiveCallArguments(node *ast.Node) []*ast.Node { case ast.IsBinaryExpression(node): // Handles instanceof operator return []*ast.Node{node.AsBinaryExpression().Left} - case isJsxOpeningLikeElement(node): + case ast.IsJsxOpeningLikeElement(node): if len(node.Attributes().AsJsxAttributes().Properties.Nodes) != 0 || (ast.IsJsxOpeningElement(node) && len(node.Parent.Children().Nodes) != 0) { return []*ast.Node{node.Attributes()} } diff --git a/internal/checker/jsx.go b/internal/checker/jsx.go index 10a172eec6..507e5063e4 100644 --- a/internal/checker/jsx.go +++ b/internal/checker/jsx.go @@ -119,7 +119,7 @@ func (c *Checker) checkJsxAttributes(node *ast.Node, checkMode CheckMode) *Type } func (c *Checker) checkJsxOpeningLikeElementOrOpeningFragment(node *ast.Node) { - isNodeOpeningLikeElement := isJsxOpeningLikeElement(node) + isNodeOpeningLikeElement := ast.IsJsxOpeningLikeElement(node) if isNodeOpeningLikeElement { c.checkGrammarJsxElement(node) } diff --git a/internal/checker/relater.go b/internal/checker/relater.go index 65bbf5d8bd..f7b6fe7c4a 100644 --- a/internal/checker/relater.go +++ b/internal/checker/relater.go @@ -2693,7 +2693,7 @@ func (r *Relater) hasExcessProperties(source *Type, target *Type, reportErrors b if r.errorNode == nil { panic("No errorNode in hasExcessProperties") } - if ast.IsJsxAttributes(r.errorNode) || isJsxOpeningLikeElement(r.errorNode) || isJsxOpeningLikeElement(r.errorNode.Parent) { + if ast.IsJsxAttributes(r.errorNode) || ast.IsJsxOpeningLikeElement(r.errorNode) || ast.IsJsxOpeningLikeElement(r.errorNode.Parent) { // JsxAttributes has an object-literal flag and undergo same type-assignablity check as normal object-literal. // However, using an object-literal error message will be very confusing to the users so we give different a message. if prop.ValueDeclaration != nil && ast.IsJsxAttribute(prop.ValueDeclaration) && ast.GetSourceFileOfNode(r.errorNode) == ast.GetSourceFileOfNode(prop.ValueDeclaration.Name()) { diff --git a/internal/checker/utilities.go b/internal/checker/utilities.go index 61caddabee..a00a4ff920 100644 --- a/internal/checker/utilities.go +++ b/internal/checker/utilities.go @@ -1208,10 +1208,6 @@ func reverseAccessKind(a AccessKind) AccessKind { panic("Unhandled case in reverseAccessKind") } -func isJsxOpeningLikeElement(node *ast.Node) bool { - return ast.IsJsxOpeningElement(node) || ast.IsJsxSelfClosingElement(node) -} - // Deprecated in favor of `ast.IsObjectLiteralElement` func isObjectLiteralElementLike(node *ast.Node) bool { return ast.IsObjectLiteralElement(node) @@ -1325,7 +1321,7 @@ func isCallChain(node *ast.Node) bool { } func (c *Checker) callLikeExpressionMayHaveTypeArguments(node *ast.Node) bool { - return isCallOrNewExpression(node) || ast.IsTaggedTemplateExpression(node) || isJsxOpeningLikeElement(node) + return isCallOrNewExpression(node) || ast.IsTaggedTemplateExpression(node) || ast.IsJsxOpeningLikeElement(node) } func isSuperCall(n *ast.Node) bool { diff --git a/internal/core/compileroptions.go b/internal/core/compileroptions.go index 8e1b15e1b7..9c73e6b373 100644 --- a/internal/core/compileroptions.go +++ b/internal/core/compileroptions.go @@ -180,6 +180,18 @@ func (options *CompilerOptions) GetModuleResolutionKind() ModuleResolutionKind { } } +func (options *CompilerOptions) GetEmitModuleDetectionKind() ModuleDetectionKind { + if options.ModuleDetection != ModuleDetectionKindNone { + return options.ModuleDetection + } + switch options.GetEmitModuleKind() { + case ModuleKindNode16, ModuleKindNodeNext: + return ModuleDetectionKindForce + default: + return ModuleDetectionKindAuto + } +} + func (options *CompilerOptions) GetESModuleInterop() bool { if options.ESModuleInterop != TSUnknown { return options.ESModuleInterop == TSTrue @@ -325,7 +337,9 @@ type SourceFileAffectingCompilerOptions struct { AllowUnreachableCode Tristate AllowUnusedLabels Tristate BindInStrictMode bool + EmitModuleDetectionKind ModuleDetectionKind EmitScriptTarget ScriptTarget + JsxEmit JsxEmit NoFallthroughCasesInSwitch Tristate ShouldPreserveConstEnums bool } @@ -335,7 +349,9 @@ func (options *CompilerOptions) SourceFileAffecting() *SourceFileAffectingCompil AllowUnreachableCode: options.AllowUnreachableCode, AllowUnusedLabels: options.AllowUnusedLabels, BindInStrictMode: options.AlwaysStrict.IsTrue() || options.Strict.IsTrue(), + EmitModuleDetectionKind: options.GetEmitModuleDetectionKind(), EmitScriptTarget: options.GetEmitScriptTarget(), + JsxEmit: options.Jsx, NoFallthroughCasesInSwitch: options.NoFallthroughCasesInSwitch, ShouldPreserveConstEnums: options.ShouldPreserveConstEnums(), } diff --git a/internal/parser/parser.go b/internal/parser/parser.go index 76ac865373..b3b09a300a 100644 --- a/internal/parser/parser.go +++ b/internal/parser/parser.go @@ -343,7 +343,6 @@ func (p *Parser) finishSourceFile(result *ast.SourceFile, isDeclarationFile bool result.Pragmas = getCommentPragmas(&p.factory, p.sourceText) p.processPragmasIntoFields(result) result.SetDiagnostics(attachFileToDiagnostics(p.diagnostics, result)) - result.ExternalModuleIndicator = isFileProbablyExternalModule(result) // !!! result.CommonJSModuleIndicator = p.commonJSModuleIndicator result.IsDeclarationFile = isDeclarationFile result.LanguageVersion = p.languageVersion @@ -355,6 +354,73 @@ func (p *Parser) finishSourceFile(result *ast.SourceFile, isDeclarationFile bool result.TextCount = p.factory.TextCount() result.IdentifierCount = p.identifierCount result.SetJSDocCache(p.jsdocCache) + result.ExternalModuleIndicator = p.getExternalModuleIndicator(result, &core.SourceFileAffectingCompilerOptions{}) // TODO(jakebailey) +} + +func (p *Parser) getExternalModuleIndicator(file *ast.SourceFile, options *core.SourceFileAffectingCompilerOptions) *ast.Node { + // All detection kinds start by checking this. + if node := isFileProbablyExternalModule(file); node != nil { + return node + } + + switch options.EmitModuleDetectionKind { + case core.ModuleDetectionKindForce: + // All non-declaration files are modules, declaration files still do the usual isFileProbablyExternalModule + if !file.IsDeclarationFile { + return file.AsNode() + } + return nil + case core.ModuleDetectionKindLegacy: + // Files are modules if they have imports, exports, or import.meta + return nil + case core.ModuleDetectionKindAuto: + // If module is nodenext or node16, all esm format files are modules + // If jsx is react-jsx or react-jsxdev then jsx tags force module-ness + // otherwise, the presence of import or export statments (or import.meta) implies module-ness + if options.JsxEmit == core.JsxEmitReactJSX || options.JsxEmit == core.JsxEmitReactJSXDev { + if node := isFileModuleFromUsingJSXTag(file); node != nil { + return node + } + } + return isFileForcedToBeModuleByFormat(file, options) + default: + panic("Unhandled case in getExternalModuleIndicator") + } +} + +func isFileModuleFromUsingJSXTag(file *ast.SourceFile) *ast.Node { + if file.IsDeclarationFile { + return nil + } + return walkTreeForJSXTags(file.AsNode()) +} + +func walkTreeForJSXTags(node *ast.Node) *ast.Node { + var found *ast.Node + + var visitor func(n *ast.Node) bool + visitor = func(n *ast.Node) bool { + if found != nil { + return true + } + if node.SubtreeFacts()&ast.SubtreeContainsJsx == 0 { + return true + } + if ast.IsJsxOpeningElement(node) || ast.IsJsxFragment(node) { + found = node + return true + } + return node.ForEachChild(visitor) + } + visitor(node) + + return found +} + +func isFileForcedToBeModuleByFormat(file *ast.SourceFile, options *core.SourceFileAffectingCompilerOptions) *ast.Node { + panic("TODO") + + // GetImpliedNodeFormatForEmitWorker but we need the metadata???? } func (p *Parser) parseToplevelStatement(i int) *ast.Node { From 0f32cecde2f4ea4370315565673fd2d7e1d35070 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 29 May 2025 09:43:09 -0700 Subject: [PATCH 02/12] more wip --- internal/api/encoder/encoder_test.go | 8 +++++-- internal/astnav/tokens_test.go | 10 +++++--- internal/binder/binder_test.go | 8 +++---- internal/parser/parser.go | 24 ++++++++++--------- internal/parser/parser_test.go | 5 +++- .../testutil/parsetestutil/parsetestutil.go | 6 ++++- .../testutil/tsbaseline/js_emit_baseline.go | 2 +- 7 files changed, 40 insertions(+), 23 deletions(-) diff --git a/internal/api/encoder/encoder_test.go b/internal/api/encoder/encoder_test.go index ce616dfc26..fa3ddae221 100644 --- a/internal/api/encoder/encoder_test.go +++ b/internal/api/encoder/encoder_test.go @@ -18,9 +18,13 @@ import ( "gotest.tools/v3/assert" ) +var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ + EmitScriptTarget: core.ScriptTargetLatest, +} + func TestEncodeSourceFile(t *testing.T) { t.Parallel() - sourceFile := parser.ParseSourceFile("/test.ts", "/test.ts", "import { bar } from \"bar\";\nexport function foo(a: string, b: string): any {}\nfoo();", core.ScriptTargetESNext, scanner.JSDocParsingModeParseAll) + sourceFile := parser.ParseSourceFile("/test.ts", "/test.ts", "import { bar } from \"bar\";\nexport function foo(a: string, b: string): any {}\nfoo();", parseCompilerOptions, scanner.JSDocParsingModeParseAll) t.Run("baseline", func(t *testing.T) { t.Parallel() buf, err := encoder.EncodeSourceFile(sourceFile, "") @@ -42,7 +46,7 @@ func BenchmarkEncodeSourceFile(b *testing.B) { "/checker.ts", "/checker.ts", string(fileContent), - core.ScriptTargetESNext, + parseCompilerOptions, scanner.JSDocParsingModeParseAll, ) diff --git a/internal/astnav/tokens_test.go b/internal/astnav/tokens_test.go index 7ccd674924..e188517597 100644 --- a/internal/astnav/tokens_test.go +++ b/internal/astnav/tokens_test.go @@ -26,6 +26,10 @@ var testFiles = []string{ filepath.Join(repo.TypeScriptSubmodulePath, "src/services/mapCode.ts"), } +var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ + EmitScriptTarget: core.ScriptTargetLatest, +} + func TestGetTokenAtPosition(t *testing.T) { t.Parallel() repo.SkipIfNoTypeScriptSubmodule(t) @@ -53,7 +57,7 @@ func TestGetTokenAtPosition(t *testing.T) { return 0; } ` - file := parser.ParseSourceFile("/file.ts", "/file.ts", fileText, core.ScriptTargetLatest, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", fileText, parseCompilerOptions, scanner.JSDocParsingModeParseAll) assert.Equal(t, astnav.GetTokenAtPosition(file, 0), astnav.GetTokenAtPosition(file, 0)) }) } @@ -88,7 +92,7 @@ func baselineTokens(t *testing.T, testName string, includeEOF bool, getTSTokens positions[i] = i } tsTokens := getTSTokens(string(fileText), positions) - file := parser.ParseSourceFile("/file.ts", "/file.ts", string(fileText), core.ScriptTargetLatest, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", string(fileText), parseCompilerOptions, scanner.JSDocParsingModeParseAll) var output strings.Builder currentRange := core.NewTextRange(0, 0) @@ -421,7 +425,7 @@ export function isAnyDirectorySeparator(charCode: number): boolean { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { t.Parallel() - file := parser.ParseSourceFile("/file.ts", "/file.ts", testCase.fileContent, core.ScriptTargetLatest, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", testCase.fileContent, parseCompilerOptions, scanner.JSDocParsingModeParseAll) token := astnav.FindPrecedingToken(file, testCase.position) assert.Equal(t, token.Kind, testCase.expectedKind) }) diff --git a/internal/binder/binder_test.go b/internal/binder/binder_test.go index 2058632879..4077489d52 100644 --- a/internal/binder/binder_test.go +++ b/internal/binder/binder_test.go @@ -22,14 +22,14 @@ func BenchmarkBind(b *testing.B) { path := tspath.ToPath(fileName, "/", osvfs.FS().UseCaseSensitiveFileNames()) sourceText := f.ReadFile(b) + compilerOptions := &core.CompilerOptions{Target: core.ScriptTargetESNext, Module: core.ModuleKindNodeNext} + sourceAffecting := compilerOptions.SourceFileAffecting() + sourceFiles := make([]*ast.SourceFile, b.N) for i := range b.N { - sourceFiles[i] = parser.ParseSourceFile(fileName, path, sourceText, core.ScriptTargetESNext, scanner.JSDocParsingModeParseAll) + sourceFiles[i] = parser.ParseSourceFile(fileName, path, sourceText, sourceAffecting, scanner.JSDocParsingModeParseAll) } - compilerOptions := &core.CompilerOptions{Target: core.ScriptTargetESNext, Module: core.ModuleKindNodeNext} - sourceAffecting := compilerOptions.SourceFileAffecting() - // The above parses do a lot of work; ensure GC is finished before we start collecting performance data. // GC must be called twice to allow things to settle. runtime.GC() diff --git a/internal/parser/parser.go b/internal/parser/parser.go index b3b09a300a..b67d1d1709 100644 --- a/internal/parser/parser.go +++ b/internal/parser/parser.go @@ -52,6 +52,7 @@ type Parser struct { fileName string path tspath.Path sourceText string + options *core.SourceFileAffectingCompilerOptions languageVersion core.ScriptTarget scriptKind core.ScriptKind languageVariant core.LanguageVariant @@ -96,10 +97,10 @@ func putParser(p *Parser) { parserPool.Put(p) } -func ParseSourceFile(fileName string, path tspath.Path, sourceText string, languageVersion core.ScriptTarget, jsdocParsingMode scanner.JSDocParsingMode) *ast.SourceFile { +func ParseSourceFile(fileName string, path tspath.Path, sourceText string, options *core.SourceFileAffectingCompilerOptions, jsdocParsingMode scanner.JSDocParsingMode) *ast.SourceFile { p := getParser() defer putParser(p) - p.initializeState(fileName, path, sourceText, languageVersion, core.ScriptKindUnknown, jsdocParsingMode) + p.initializeState(fileName, path, sourceText, options, core.ScriptKindUnknown, jsdocParsingMode) p.nextToken() return p.parseSourceFileWorker() } @@ -107,7 +108,7 @@ func ParseSourceFile(fileName string, path tspath.Path, sourceText string, langu func ParseJSONText(fileName string, path tspath.Path, sourceText string) *ast.SourceFile { p := getParser() defer putParser(p) - p.initializeState(fileName, path, sourceText, core.ScriptTargetES2015, core.ScriptKindJSON, scanner.JSDocParsingModeParseAll) + p.initializeState(fileName, path, sourceText, &core.SourceFileAffectingCompilerOptions{EmitScriptTarget: core.ScriptTargetES2015}, core.ScriptKindJSON, scanner.JSDocParsingModeParseAll) p.nextToken() pos := p.nodePos() var statements *ast.NodeList @@ -183,13 +184,13 @@ func ParseJSONText(fileName string, path tspath.Path, sourceText string) *ast.So func ParseIsolatedEntityName(text string, languageVersion core.ScriptTarget) *ast.EntityName { p := getParser() defer putParser(p) - p.initializeState("", "", text, languageVersion, core.ScriptKindJS, scanner.JSDocParsingModeParseAll) + p.initializeState("", "", text, &core.SourceFileAffectingCompilerOptions{EmitScriptTarget: languageVersion}, core.ScriptKindJS, scanner.JSDocParsingModeParseAll) p.nextToken() entityName := p.parseEntityName(true, nil) return core.IfElse(p.token == ast.KindEndOfFile && len(p.diagnostics) == 0, entityName, nil) } -func (p *Parser) initializeState(fileName string, path tspath.Path, sourceText string, languageVersion core.ScriptTarget, scriptKind core.ScriptKind, jsdocParsingMode scanner.JSDocParsingMode) { +func (p *Parser) initializeState(fileName string, path tspath.Path, sourceText string, options *core.SourceFileAffectingCompilerOptions, scriptKind core.ScriptKind, jsdocParsingMode scanner.JSDocParsingMode) { if p.scanner == nil { p.scanner = scanner.NewScanner() } else { @@ -198,7 +199,8 @@ func (p *Parser) initializeState(fileName string, path tspath.Path, sourceText s p.fileName = fileName p.path = path p.sourceText = sourceText - p.languageVersion = languageVersion + p.options = options + p.languageVersion = options.EmitScriptTarget p.scriptKind = ensureScriptKind(fileName, scriptKind) p.languageVariant = ast.GetLanguageVariant(p.scriptKind) switch p.scriptKind { @@ -354,16 +356,16 @@ func (p *Parser) finishSourceFile(result *ast.SourceFile, isDeclarationFile bool result.TextCount = p.factory.TextCount() result.IdentifierCount = p.identifierCount result.SetJSDocCache(p.jsdocCache) - result.ExternalModuleIndicator = p.getExternalModuleIndicator(result, &core.SourceFileAffectingCompilerOptions{}) // TODO(jakebailey) + result.ExternalModuleIndicator = p.getExternalModuleIndicator(result) // TODO(jakebailey) } -func (p *Parser) getExternalModuleIndicator(file *ast.SourceFile, options *core.SourceFileAffectingCompilerOptions) *ast.Node { +func (p *Parser) getExternalModuleIndicator(file *ast.SourceFile) *ast.Node { // All detection kinds start by checking this. if node := isFileProbablyExternalModule(file); node != nil { return node } - switch options.EmitModuleDetectionKind { + switch p.options.EmitModuleDetectionKind { case core.ModuleDetectionKindForce: // All non-declaration files are modules, declaration files still do the usual isFileProbablyExternalModule if !file.IsDeclarationFile { @@ -377,12 +379,12 @@ func (p *Parser) getExternalModuleIndicator(file *ast.SourceFile, options *core. // If module is nodenext or node16, all esm format files are modules // If jsx is react-jsx or react-jsxdev then jsx tags force module-ness // otherwise, the presence of import or export statments (or import.meta) implies module-ness - if options.JsxEmit == core.JsxEmitReactJSX || options.JsxEmit == core.JsxEmitReactJSXDev { + if p.options.JsxEmit == core.JsxEmitReactJSX || p.options.JsxEmit == core.JsxEmitReactJSXDev { if node := isFileModuleFromUsingJSXTag(file); node != nil { return node } } - return isFileForcedToBeModuleByFormat(file, options) + return isFileForcedToBeModuleByFormat(file, p.options) default: panic("Unhandled case in getExternalModuleIndicator") } diff --git a/internal/parser/parser_test.go b/internal/parser/parser_test.go index 88d5d5f878..580c06c733 100644 --- a/internal/parser/parser_test.go +++ b/internal/parser/parser_test.go @@ -32,12 +32,15 @@ func BenchmarkParse(b *testing.B) { fileName := tspath.GetNormalizedAbsolutePath(f.Path(), "/") path := tspath.ToPath(fileName, "/", osvfs.FS().UseCaseSensitiveFileNames()) sourceText := f.ReadFile(b) + options := &core.SourceFileAffectingCompilerOptions{ + EmitScriptTarget: core.ScriptTargetESNext, + } for _, jsdoc := range jsdocModes { b.Run(jsdoc.name, func(b *testing.B) { jsdocMode := jsdoc.mode for b.Loop() { - ParseSourceFile(fileName, path, sourceText, core.ScriptTargetESNext, jsdocMode) + ParseSourceFile(fileName, path, sourceText, options, jsdocMode) } }) } diff --git a/internal/testutil/parsetestutil/parsetestutil.go b/internal/testutil/parsetestutil/parsetestutil.go index 880459327a..84814ccec4 100644 --- a/internal/testutil/parsetestutil/parsetestutil.go +++ b/internal/testutil/parsetestutil/parsetestutil.go @@ -12,10 +12,14 @@ import ( "github.com/microsoft/typescript-go/internal/tspath" ) +var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ + EmitScriptTarget: core.ScriptTargetLatest, +} + // Simplifies parsing an input string into a SourceFile for testing purposes. func ParseTypeScript(text string, jsx bool) *ast.SourceFile { fileName := core.IfElse(jsx, "/main.tsx", "/main.ts") - file := parser.ParseSourceFile(fileName, tspath.Path(fileName), text, core.ScriptTargetESNext, scanner.JSDocParsingModeParseNone) + file := parser.ParseSourceFile(fileName, tspath.Path(fileName), text, parseCompilerOptions, scanner.JSDocParsingModeParseNone) ast.SetParentInChildren(file.AsNode()) return file } diff --git a/internal/testutil/tsbaseline/js_emit_baseline.go b/internal/testutil/tsbaseline/js_emit_baseline.go index b377233b72..a238dbc978 100644 --- a/internal/testutil/tsbaseline/js_emit_baseline.go +++ b/internal/testutil/tsbaseline/js_emit_baseline.go @@ -65,7 +65,7 @@ func DoJSEmitBaseline( file.UnitName, tspath.Path(file.UnitName), file.Content, - options.GetEmitScriptTarget(), + options.SourceFileAffecting(), scanner.JSDocParsingModeParseAll) if len(fileParseResult.Diagnostics()) > 0 { jsCode.WriteString(getErrorBaseline(t, []*harnessutil.TestFile{file}, fileParseResult.Diagnostics(), false /*pretty*/)) From 452e75764f0ad34c2fee6545402d41cd357de234 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 29 May 2025 09:59:34 -0700 Subject: [PATCH 03/12] more wip --- internal/compiler/fileloader.go | 2 +- internal/compiler/host.go | 6 +++--- internal/compiler/program.go | 8 +++++++- internal/parser/parser.go | 5 +++-- internal/parser/parser_test.go | 6 +++++- internal/project/documentregistry.go | 5 ++--- internal/project/project.go | 2 +- internal/testutil/harnessutil/harnessutil.go | 8 ++++---- 8 files changed, 26 insertions(+), 16 deletions(-) diff --git a/internal/compiler/fileloader.go b/internal/compiler/fileloader.go index 41682f87f7..4a6c0fde5b 100644 --- a/internal/compiler/fileloader.go +++ b/internal/compiler/fileloader.go @@ -307,7 +307,7 @@ func (p *fileLoader) loadSourceFileMetaData(path tspath.Path) *ast.SourceFileMet func (p *fileLoader) parseSourceFile(fileName string) *ast.SourceFile { path := tspath.ToPath(fileName, p.host.GetCurrentDirectory(), p.host.FS().UseCaseSensitiveFileNames()) - sourceFile := p.host.GetSourceFile(fileName, path, p.compilerOptions.GetEmitScriptTarget()) + sourceFile := p.host.GetSourceFile(fileName, path) return sourceFile } diff --git a/internal/compiler/host.go b/internal/compiler/host.go index 3db76b350a..15c82fc590 100644 --- a/internal/compiler/host.go +++ b/internal/compiler/host.go @@ -16,7 +16,7 @@ type CompilerHost interface { GetCurrentDirectory() string NewLine() string Trace(msg string) - GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile + GetSourceFile(fileName string, path tspath.Path) *ast.SourceFile } type FileInfo struct { @@ -73,10 +73,10 @@ func (h *compilerHost) Trace(msg string) { //!!! TODO: implement } -func (h *compilerHost) GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile { +func (h *compilerHost) GetSourceFile(fileName string, path tspath.Path) *ast.SourceFile { text, _ := h.FS().ReadFile(fileName) if tspath.FileExtensionIs(fileName, tspath.ExtensionJson) { return parser.ParseJSONText(fileName, path, text) } - return parser.ParseSourceFile(fileName, path, text, languageVersion, scanner.JSDocParsingModeParseForTypeErrors) + return parser.ParseSourceFile(fileName, path, text, h.options.SourceFileAffecting(), scanner.JSDocParsingModeParseForTypeErrors) } diff --git a/internal/compiler/program.go b/internal/compiler/program.go index 090c937d4e..6bdb43b0ea 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -189,6 +189,12 @@ func NewProgram(options ProgramOptions) *Program { // tracing?.push(tracing.Phase.Program, "createProgram", { configFilePath: options.configFilePath, rootDir: options.rootDir }, /*separateBeginAndEnd*/ true); // performance.mark("beforeProgram"); + // TODO(jakebailey): !!! override host's options + p.host = options.Host + if p.host == nil { + panic("host required") + } + p.resolver = module.NewResolver(p.host, p.compilerOptions) var libs []string @@ -228,7 +234,7 @@ func NewProgram(options ProgramOptions) *Program { // In addition to a new program, return a boolean indicating whether the data of the old program was reused. func (p *Program) UpdateProgram(changedFilePath tspath.Path) (*Program, bool) { oldFile := p.filesByPath[changedFilePath] - newFile := p.host.GetSourceFile(oldFile.FileName(), changedFilePath, oldFile.LanguageVersion) + newFile := p.host.GetSourceFile(oldFile.FileName(), changedFilePath) if !canReplaceFileInProgram(oldFile, newFile) { return NewProgram(p.programOptions), false } diff --git a/internal/parser/parser.go b/internal/parser/parser.go index b67d1d1709..16d191384c 100644 --- a/internal/parser/parser.go +++ b/internal/parser/parser.go @@ -386,7 +386,7 @@ func (p *Parser) getExternalModuleIndicator(file *ast.SourceFile) *ast.Node { } return isFileForcedToBeModuleByFormat(file, p.options) default: - panic("Unhandled case in getExternalModuleIndicator") + return nil } } @@ -420,7 +420,8 @@ func walkTreeForJSXTags(node *ast.Node) *ast.Node { } func isFileForcedToBeModuleByFormat(file *ast.SourceFile, options *core.SourceFileAffectingCompilerOptions) *ast.Node { - panic("TODO") + return nil + // panic("TODO") // GetImpliedNodeFormatForEmitWorker but we need the metadata???? } diff --git a/internal/parser/parser_test.go b/internal/parser/parser_test.go index 580c06c733..95f729a799 100644 --- a/internal/parser/parser_test.go +++ b/internal/parser/parser_test.go @@ -133,6 +133,10 @@ func FuzzParser(f *testing.F) { return } - ParseSourceFile(fileName, path, sourceText, scriptTarget, jsdocParsingMode) + options := &core.SourceFileAffectingCompilerOptions{ + EmitScriptTarget: scriptTarget, + } + + ParseSourceFile(fileName, path, sourceText, options, jsdocParsingMode) }) } diff --git a/internal/project/documentregistry.go b/internal/project/documentregistry.go index f7ef511499..614241f74e 100644 --- a/internal/project/documentregistry.go +++ b/internal/project/documentregistry.go @@ -88,14 +88,13 @@ func (r *DocumentRegistry) getDocumentWorker( compilerOptions *core.CompilerOptions, key registryKey, ) *ast.SourceFile { - scriptTarget := core.IfElse(scriptInfo.scriptKind == core.ScriptKindJSON, core.ScriptTargetJSON, compilerOptions.GetEmitScriptTarget()) scriptInfoVersion := scriptInfo.Version() scriptInfoText := scriptInfo.Text() if entry, ok := r.documents.Load(key); ok { // We have an entry for this file. However, it may be for a different version of // the script snapshot. If so, update it appropriately. if entry.sourceFile.Version != scriptInfoVersion { - sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, scriptTarget, scanner.JSDocParsingModeParseAll) + sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, compilerOptions.SourceFileAffecting(), scanner.JSDocParsingModeParseAll) sourceFile.Version = scriptInfoVersion entry.mu.Lock() defer entry.mu.Unlock() @@ -105,7 +104,7 @@ func (r *DocumentRegistry) getDocumentWorker( return entry.sourceFile } else { // Have never seen this file with these settings. Create a new source file for it. - sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, scriptTarget, scanner.JSDocParsingModeParseAll) + sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, compilerOptions.SourceFileAffecting(), scanner.JSDocParsingModeParseAll) sourceFile.Version = scriptInfoVersion entry, _ := r.documents.LoadOrStore(key, ®istryEntry{ sourceFile: sourceFile, diff --git a/internal/project/project.go b/internal/project/project.go index 75be8ee20f..012ae7cf98 100644 --- a/internal/project/project.go +++ b/internal/project/project.go @@ -187,7 +187,7 @@ func (p *Project) GetCompilerOptions() *core.CompilerOptions { } // GetSourceFile implements compiler.CompilerHost. -func (p *Project) GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile { +func (p *Project) GetSourceFile(fileName string, path tspath.Path) *ast.SourceFile { scriptKind := p.getScriptKind(fileName) if scriptInfo := p.getOrCreateScriptInfoAndAttachToProject(fileName, scriptKind); scriptInfo != nil { var ( diff --git a/internal/testutil/harnessutil/harnessutil.go b/internal/testutil/harnessutil/harnessutil.go index b7d391bf31..68786ed663 100644 --- a/internal/testutil/harnessutil/harnessutil.go +++ b/internal/testutil/harnessutil/harnessutil.go @@ -445,14 +445,14 @@ type sourceFileCacheKey struct { text string } -func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile { +func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path) *ast.SourceFile { text, _ := h.FS().ReadFile(fileName) + sourceAffecting := h.options.SourceFileAffecting() key := sourceFileCacheKey{ - SourceFileAffectingCompilerOptions: *h.options.SourceFileAffecting(), + SourceFileAffectingCompilerOptions: *sourceAffecting, fileName: fileName, path: path, - languageVersion: languageVersion, text: text, } @@ -466,7 +466,7 @@ func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path, la sourceFile = parser.ParseJSONText(fileName, path, text) } else { // !!! JSDocParsingMode - sourceFile = parser.ParseSourceFile(fileName, path, text, languageVersion, scanner.JSDocParsingModeParseAll) + sourceFile = parser.ParseSourceFile(fileName, path, text, sourceAffecting, scanner.JSDocParsingModeParseAll) } result, _ := sourceFileCache.LoadOrStore(key, sourceFile) From 864482b8820220054a339600cefa74ac8c145b79 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 29 May 2025 12:07:57 -0700 Subject: [PATCH 04/12] Fix some crashes --- internal/checker/checker_test.go | 5 +++++ internal/compiler/host.go | 7 +++---- internal/compiler/program_test.go | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/internal/checker/checker_test.go b/internal/checker/checker_test.go index 8e101a750d..61d0fa6c39 100644 --- a/internal/checker/checker_test.go +++ b/internal/checker/checker_test.go @@ -40,6 +40,7 @@ foo.bar;` parsed, errors := tsoptions.GetParsedCommandLineOfConfigFile("/tsconfig.json", &core.CompilerOptions{}, host, nil) assert.Equal(t, len(errors), 0, "Expected no errors in parsed command line") + host = compiler.NewCachedFSCompilerHost(parsed.CompilerOptions(), cd, fs, bundled.LibPath()) p := compiler.NewProgramFromParsedCommandLine(parsed, host) p.BindSourceFiles() @@ -70,6 +71,8 @@ func TestCheckSrcCompiler(t *testing.T) { host := compiler.NewCompilerHost(nil, rootPath, fs, bundled.LibPath()) parsed, errors := tsoptions.GetParsedCommandLineOfConfigFile(tspath.CombinePaths(rootPath, "tsconfig.json"), &core.CompilerOptions{}, host, nil) assert.Equal(t, len(errors), 0, "Expected no errors in parsed command line") + host = compiler.NewCachedFSCompilerHost(parsed.CompilerOptions(), rootPath, fs, bundled.LibPath()) + p := compiler.NewProgramFromParsedCommandLine(parsed, host) p.CheckSourceFiles(t.Context()) } @@ -84,6 +87,8 @@ func BenchmarkNewChecker(b *testing.B) { host := compiler.NewCompilerHost(nil, rootPath, fs, bundled.LibPath()) parsed, errors := tsoptions.GetParsedCommandLineOfConfigFile(tspath.CombinePaths(rootPath, "tsconfig.json"), &core.CompilerOptions{}, host, nil) assert.Equal(b, len(errors), 0, "Expected no errors in parsed command line") + host = compiler.NewCachedFSCompilerHost(parsed.CompilerOptions(), rootPath, fs, bundled.LibPath()) + p := compiler.NewProgramFromParsedCommandLine(parsed, host) b.ReportAllocs() diff --git a/internal/compiler/host.go b/internal/compiler/host.go index 15c82fc590..8eaf37d775 100644 --- a/internal/compiler/host.go +++ b/internal/compiler/host.go @@ -54,10 +54,6 @@ func (h *compilerHost) DefaultLibraryPath() string { return h.defaultLibraryPath } -func (h *compilerHost) SetOptions(options *core.CompilerOptions) { - h.options = options -} - func (h *compilerHost) GetCurrentDirectory() string { return h.currentDirectory } @@ -78,5 +74,8 @@ func (h *compilerHost) GetSourceFile(fileName string, path tspath.Path) *ast.Sou if tspath.FileExtensionIs(fileName, tspath.ExtensionJson) { return parser.ParseJSONText(fileName, path, text) } + if h.options == nil { + panic("GetSourceFile called without CompilerOptions set") + } return parser.ParseSourceFile(fileName, path, text, h.options.SourceFileAffecting(), scanner.JSDocParsingModeParseForTypeErrors) } diff --git a/internal/compiler/program_test.go b/internal/compiler/program_test.go index 53fb7a8881..d9fbee543f 100644 --- a/internal/compiler/program_test.go +++ b/internal/compiler/program_test.go @@ -288,6 +288,7 @@ func BenchmarkNewProgram(b *testing.B) { parsed, errors := tsoptions.GetParsedCommandLineOfConfigFile(tspath.CombinePaths(rootPath, "tsconfig.json"), &core.CompilerOptions{}, host, nil) assert.Equal(b, len(errors), 0, "Expected no errors in parsed command line") + host = NewCompilerHost(parsed.CompilerOptions(), rootPath, fs, bundled.LibPath()) opts := ProgramOptions{ Host: host, From deae4d6b10b9b7c602388037ba5961eeac4e2620 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 29 May 2025 12:48:06 -0700 Subject: [PATCH 05/12] more --- internal/parser/parser.go | 10 ++-- ...,module=commonjs,moduledetection=force).js | 2 + ...le=commonjs,moduledetection=force).js.diff | 8 ++- ...ve,module=system,moduledetection=force).js | 2 + ...dule=system,moduledetection=force).js.diff | 2 + ...,module=commonjs,moduledetection=force).js | 2 + ...le=commonjs,moduledetection=force).js.diff | 8 ++- ...ct,module=system,moduledetection=force).js | 2 + ...dule=system,moduledetection=force).js.diff | 2 + ...commonjs,moduledetection=force).errors.txt | 39 +++++++++++++++ ...njs,moduledetection=force).errors.txt.diff | 43 ---------------- ...,module=commonjs,moduledetection=force).js | 2 + ...le=commonjs,moduledetection=force).js.diff | 8 ++- ...e=system,moduledetection=force).errors.txt | 39 +++++++++++++++ ...sx,module=system,moduledetection=force).js | 2 + ...dule=system,moduledetection=force).js.diff | 2 + ...commonjs,moduledetection=force).errors.txt | 39 +++++++++++++++ ...njs,moduledetection=force).errors.txt.diff | 43 ---------------- ...,module=commonjs,moduledetection=force).js | 2 + ...le=commonjs,moduledetection=force).js.diff | 8 ++- ...e=system,moduledetection=force).errors.txt | 39 +++++++++++++++ ...ev,module=system,moduledetection=force).js | 2 + ...dule=system,moduledetection=force).js.diff | 2 + .../isolatedModulesExternalModuleForced.js | 1 + ...solatedModulesExternalModuleForced.js.diff | 7 --- ...rce,nouncheckedsideeffectimports=false).js | 1 + ...ouncheckedsideeffectimports=false).js.diff | 1 + ...orce,nouncheckedsideeffectimports=true).js | 1 + ...nouncheckedsideeffectimports=true).js.diff | 1 + ...erenceWithMissingExports(module=node16).js | 1 + ...eWithMissingExports(module=node16).js.diff | 3 +- ...enceWithMissingExports(module=nodenext).js | 1 + ...ithMissingExports(module=nodenext).js.diff | 3 +- .../importMeta(module=commonjs,target=es5).js | 4 ++ ...rtMeta(module=commonjs,target=es5).js.diff | 15 +++--- ...portMeta(module=commonjs,target=esnext).js | 4 ++ ...eta(module=commonjs,target=esnext).js.diff | 20 -------- .../importMeta(module=es2020,target=es5).js | 2 + ...portMeta(module=es2020,target=es5).js.diff | 4 +- ...importMeta(module=es2020,target=esnext).js | 2 + ...tMeta(module=es2020,target=esnext).js.diff | 18 ------- .../importMeta(module=esnext,target=es5).js | 2 + ...portMeta(module=esnext,target=es5).js.diff | 4 +- ...importMeta(module=esnext,target=esnext).js | 2 + ...tMeta(module=esnext,target=esnext).js.diff | 18 ------- .../importMeta(module=system,target=es5).js | 4 ++ ...portMeta(module=system,target=es5).js.diff | 4 ++ ...importMeta(module=system,target=esnext).js | 4 ++ ...tMeta(module=system,target=esnext).js.diff | 4 ++ ...ortMetaNarrowing(module=es2020).errors.txt | 18 ------- ...taNarrowing(module=es2020).errors.txt.diff | 22 --------- .../importMetaNarrowing(module=es2020).js | 1 + ...importMetaNarrowing(module=es2020).js.diff | 7 --- ...importMetaNarrowing(module=es2020).symbols | 10 ++-- ...tMetaNarrowing(module=es2020).symbols.diff | 16 +++--- .../importMetaNarrowing(module=es2020).types | 12 ++--- ...ortMetaNarrowing(module=es2020).types.diff | 28 ----------- ...ortMetaNarrowing(module=esnext).errors.txt | 18 ------- ...taNarrowing(module=esnext).errors.txt.diff | 22 --------- .../importMetaNarrowing(module=esnext).js | 1 + ...importMetaNarrowing(module=esnext).js.diff | 7 --- ...importMetaNarrowing(module=esnext).symbols | 10 ++-- ...tMetaNarrowing(module=esnext).symbols.diff | 16 +++--- .../importMetaNarrowing(module=esnext).types | 12 ++--- ...ortMetaNarrowing(module=esnext).types.diff | 28 ----------- ...ortMetaNarrowing(module=system).errors.txt | 18 ------- .../importMetaNarrowing(module=system).js | 2 + ...importMetaNarrowing(module=system).js.diff | 2 + ...importMetaNarrowing(module=system).symbols | 10 ++-- ...tMetaNarrowing(module=system).symbols.diff | 16 +++--- .../importMetaNarrowing(module=system).types | 12 ++--- ...ortMetaNarrowing(module=system).types.diff | 28 ----------- .../moduleResolutionWithoutExtension5.js | 1 + .../moduleResolutionWithoutExtension5.js.diff | 7 --- .../moduleResolutionWithoutExtension8.js | 2 + .../moduleResolutionWithoutExtension8.js.diff | 10 ---- .../tsxReactEmit8(jsx=react-jsx).js | 1 + .../tsxReactEmit8(jsx=react-jsx).js.diff | 3 +- .../tsxReactEmit8(jsx=react-jsxdev).js | 1 + .../tsxReactEmit8(jsx=react-jsxdev).js.diff | 3 +- ...tem,moduledetection=force).errors.txt.diff | 49 +++++-------------- ...tem,moduledetection=force).errors.txt.diff | 49 +++++-------------- ...taNarrowing(module=system).errors.txt.diff | 22 --------- 83 files changed, 351 insertions(+), 552 deletions(-) create mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/isolatedModulesExternalModuleForced.js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=esnext).js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=esnext).js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=esnext).js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension5.js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension8.js.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/importMetaNarrowing(module=system).errors.txt.diff diff --git a/internal/parser/parser.go b/internal/parser/parser.go index 16d191384c..1948ee9bd3 100644 --- a/internal/parser/parser.go +++ b/internal/parser/parser.go @@ -397,11 +397,14 @@ func isFileModuleFromUsingJSXTag(file *ast.SourceFile) *ast.Node { return walkTreeForJSXTags(file.AsNode()) } +// This is a somewhat unavoidable full tree walk to locate a JSX tag - `import.meta` requires the same, +// but we avoid that walk (or parts of it) if at all possible using the `PossiblyContainsImportMeta` node flag. +// Unfortunately, there's no `NodeFlag` space to do the same for JSX. func walkTreeForJSXTags(node *ast.Node) *ast.Node { var found *ast.Node - var visitor func(n *ast.Node) bool - visitor = func(n *ast.Node) bool { + var visitor func(node *ast.Node) bool + visitor = func(node *ast.Node) bool { if found != nil { return true } @@ -420,9 +423,8 @@ func walkTreeForJSXTags(node *ast.Node) *ast.Node { } func isFileForcedToBeModuleByFormat(file *ast.SourceFile, options *core.SourceFileAffectingCompilerOptions) *ast.Node { + // !!! return nil - // panic("TODO") - // GetImpliedNodeFormatForEmitWorker but we need the metadata???? } diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js index ee94f217c1..1b6f086d88 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js @@ -23,6 +23,8 @@ class Component { } //// [commentsOnJSXExpressionsArePreserved.jsx] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); class Component { render() { return
diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js.diff index 3faf93c15b..393e0b6c34 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js.diff @@ -1,11 +1,9 @@ --- old.commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js +++ new.commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js -@@= skipped -22, +22 lines =@@ - } - +@@= skipped -24, +24 lines =@@ //// [commentsOnJSXExpressionsArePreserved.jsx] --"use strict"; --Object.defineProperty(exports, "__esModule", { value: true }); + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); -var Component = /** @class */ (function () { - function Component() { - } diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=force).js b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=force).js index ee94f217c1..1b6f086d88 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=force).js +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=force).js @@ -23,6 +23,8 @@ class Component { } //// [commentsOnJSXExpressionsArePreserved.jsx] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); class Component { render() { return
diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=force).js.diff index 701ac71957..3f065e095b 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=force).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=force).js.diff @@ -17,6 +17,8 @@ - Component.prototype.render = function () { - return
- {/* missing */} ++"use strict"; ++Object.defineProperty(exports, "__esModule", { value: true }); +class Component { + render() { + return
diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js index 98c57bcd03..14f18f1f54 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js @@ -23,6 +23,8 @@ class Component { } //// [commentsOnJSXExpressionsArePreserved.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); class Component { render() { return
diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js.diff index 8796b18838..7d1293717a 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js.diff @@ -1,11 +1,9 @@ --- old.commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js +++ new.commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js -@@= skipped -22, +22 lines =@@ - } - +@@= skipped -24, +24 lines =@@ //// [commentsOnJSXExpressionsArePreserved.js] --"use strict"; --Object.defineProperty(exports, "__esModule", { value: true }); + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); -var Component = /** @class */ (function () { - function Component() { +class Component { diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=system,moduledetection=force).js b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=system,moduledetection=force).js index 98c57bcd03..14f18f1f54 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=system,moduledetection=force).js +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=system,moduledetection=force).js @@ -23,6 +23,8 @@ class Component { } //// [commentsOnJSXExpressionsArePreserved.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); class Component { render() { return
diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=system,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=system,moduledetection=force).js.diff index 5d2bb3de12..46c4d0a87f 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=system,moduledetection=force).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=system,moduledetection=force).js.diff @@ -22,6 +22,8 @@ - } - }; -}); ++"use strict"; ++Object.defineProperty(exports, "__esModule", { value: true }); +class Component { + render() { + return
diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).errors.txt b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).errors.txt new file mode 100644 index 0000000000..f62e9505b4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).errors.txt @@ -0,0 +1,39 @@ +commentsOnJSXExpressionsArePreserved.tsx(5,16): error TS2875: This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + + +==== commentsOnJSXExpressionsArePreserved.tsx (1 errors) ==== + // file is intentionally not a module - this tests for a crash in the module/system transforms alongside the `react-jsx` and `react-jsxdev` outputs + namespace JSX {} + class Component { + render() { + return
+ ~~~~~ + {/* missing */} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + {null/* preserved */} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + { + ~~~~~~~~~~~~~ + // ??? 1 + ~~~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + { // ??? 2 + ~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + {// ??? 3 + ~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + { + ~~~~~~~~~~~~~ + // ??? 4 + ~~~~~~~~~~~~~~~~~~~~~~~~ + /* ??? 5 */} + ~~~~~~~~~~~~~~~~~~~~~~~~ +
; + ~~~~~~~~~~~~~~ +!!! error TS2875: This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).errors.txt.diff deleted file mode 100644 index a6b7fa8356..0000000000 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).errors.txt.diff +++ /dev/null @@ -1,43 +0,0 @@ ---- old.commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).errors.txt -+++ new.commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).errors.txt -@@= skipped -0, +0 lines =@@ --commentsOnJSXExpressionsArePreserved.tsx(5,16): error TS2875: This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. -- -- --==== commentsOnJSXExpressionsArePreserved.tsx (1 errors) ==== -- // file is intentionally not a module - this tests for a crash in the module/system transforms alongside the `react-jsx` and `react-jsxdev` outputs -- namespace JSX {} -- class Component { -- render() { -- return
-- ~~~~~ -- {/* missing */} -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- {null/* preserved */} -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- { -- ~~~~~~~~~~~~~ -- // ??? 1 -- ~~~~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- { // ??? 2 -- ~~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- {// ??? 3 -- ~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- { -- ~~~~~~~~~~~~~ -- // ??? 4 -- ~~~~~~~~~~~~~~~~~~~~~~~~ -- /* ??? 5 */} -- ~~~~~~~~~~~~~~~~~~~~~~~~ --
; -- ~~~~~~~~~~~~~~ --!!! error TS2875: This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. -- } -- } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js index 98c57bcd03..14f18f1f54 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js @@ -23,6 +23,8 @@ class Component { } //// [commentsOnJSXExpressionsArePreserved.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); class Component { render() { return
diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js.diff index d5effcb3ea..7564bc1505 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js.diff @@ -1,11 +1,9 @@ --- old.commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js +++ new.commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js -@@= skipped -22, +22 lines =@@ - } - +@@= skipped -24, +24 lines =@@ //// [commentsOnJSXExpressionsArePreserved.js] --"use strict"; --Object.defineProperty(exports, "__esModule", { value: true }); + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var Component = /** @class */ (function () { - function Component() { diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).errors.txt b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).errors.txt new file mode 100644 index 0000000000..f62e9505b4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).errors.txt @@ -0,0 +1,39 @@ +commentsOnJSXExpressionsArePreserved.tsx(5,16): error TS2875: This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + + +==== commentsOnJSXExpressionsArePreserved.tsx (1 errors) ==== + // file is intentionally not a module - this tests for a crash in the module/system transforms alongside the `react-jsx` and `react-jsxdev` outputs + namespace JSX {} + class Component { + render() { + return
+ ~~~~~ + {/* missing */} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + {null/* preserved */} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + { + ~~~~~~~~~~~~~ + // ??? 1 + ~~~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + { // ??? 2 + ~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + {// ??? 3 + ~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + { + ~~~~~~~~~~~~~ + // ??? 4 + ~~~~~~~~~~~~~~~~~~~~~~~~ + /* ??? 5 */} + ~~~~~~~~~~~~~~~~~~~~~~~~ +
; + ~~~~~~~~~~~~~~ +!!! error TS2875: This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).js b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).js index 98c57bcd03..14f18f1f54 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).js +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).js @@ -23,6 +23,8 @@ class Component { } //// [commentsOnJSXExpressionsArePreserved.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); class Component { render() { return
diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).js.diff index 9dcb913a85..628aebcd57 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).js.diff @@ -26,6 +26,8 @@ - } - }; -}); ++"use strict"; ++Object.defineProperty(exports, "__esModule", { value: true }); +class Component { + render() { + return
diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).errors.txt b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).errors.txt new file mode 100644 index 0000000000..d417296efa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).errors.txt @@ -0,0 +1,39 @@ +commentsOnJSXExpressionsArePreserved.tsx(5,16): error TS2875: This JSX tag requires the module path 'react/jsx-dev-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + + +==== commentsOnJSXExpressionsArePreserved.tsx (1 errors) ==== + // file is intentionally not a module - this tests for a crash in the module/system transforms alongside the `react-jsx` and `react-jsxdev` outputs + namespace JSX {} + class Component { + render() { + return
+ ~~~~~ + {/* missing */} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + {null/* preserved */} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + { + ~~~~~~~~~~~~~ + // ??? 1 + ~~~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + { // ??? 2 + ~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + {// ??? 3 + ~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + { + ~~~~~~~~~~~~~ + // ??? 4 + ~~~~~~~~~~~~~~~~~~~~~~~~ + /* ??? 5 */} + ~~~~~~~~~~~~~~~~~~~~~~~~ +
; + ~~~~~~~~~~~~~~ +!!! error TS2875: This JSX tag requires the module path 'react/jsx-dev-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).errors.txt.diff deleted file mode 100644 index 703410ed8d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).errors.txt.diff +++ /dev/null @@ -1,43 +0,0 @@ ---- old.commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).errors.txt -+++ new.commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).errors.txt -@@= skipped -0, +0 lines =@@ --commentsOnJSXExpressionsArePreserved.tsx(5,16): error TS2875: This JSX tag requires the module path 'react/jsx-dev-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. -- -- --==== commentsOnJSXExpressionsArePreserved.tsx (1 errors) ==== -- // file is intentionally not a module - this tests for a crash in the module/system transforms alongside the `react-jsx` and `react-jsxdev` outputs -- namespace JSX {} -- class Component { -- render() { -- return
-- ~~~~~ -- {/* missing */} -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- {null/* preserved */} -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- { -- ~~~~~~~~~~~~~ -- // ??? 1 -- ~~~~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- { // ??? 2 -- ~~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- {// ??? 3 -- ~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- { -- ~~~~~~~~~~~~~ -- // ??? 4 -- ~~~~~~~~~~~~~~~~~~~~~~~~ -- /* ??? 5 */} -- ~~~~~~~~~~~~~~~~~~~~~~~~ --
; -- ~~~~~~~~~~~~~~ --!!! error TS2875: This JSX tag requires the module path 'react/jsx-dev-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. -- } -- } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js index 98c57bcd03..14f18f1f54 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js @@ -23,6 +23,8 @@ class Component { } //// [commentsOnJSXExpressionsArePreserved.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); class Component { render() { return
diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js.diff index 53e2789a1f..6f171edbee 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js.diff @@ -1,11 +1,9 @@ --- old.commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js +++ new.commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js -@@= skipped -22, +22 lines =@@ - } - +@@= skipped -24, +24 lines =@@ //// [commentsOnJSXExpressionsArePreserved.js] --"use strict"; --Object.defineProperty(exports, "__esModule", { value: true }); + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_dev_runtime_1 = require("react/jsx-dev-runtime"); -var _jsxFileName = "commentsOnJSXExpressionsArePreserved.tsx"; -var Component = /** @class */ (function () { diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).errors.txt b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).errors.txt new file mode 100644 index 0000000000..d417296efa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).errors.txt @@ -0,0 +1,39 @@ +commentsOnJSXExpressionsArePreserved.tsx(5,16): error TS2875: This JSX tag requires the module path 'react/jsx-dev-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + + +==== commentsOnJSXExpressionsArePreserved.tsx (1 errors) ==== + // file is intentionally not a module - this tests for a crash in the module/system transforms alongside the `react-jsx` and `react-jsxdev` outputs + namespace JSX {} + class Component { + render() { + return
+ ~~~~~ + {/* missing */} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + {null/* preserved */} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + { + ~~~~~~~~~~~~~ + // ??? 1 + ~~~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + { // ??? 2 + ~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + {// ??? 3 + ~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ + { + ~~~~~~~~~~~~~ + // ??? 4 + ~~~~~~~~~~~~~~~~~~~~~~~~ + /* ??? 5 */} + ~~~~~~~~~~~~~~~~~~~~~~~~ +
; + ~~~~~~~~~~~~~~ +!!! error TS2875: This JSX tag requires the module path 'react/jsx-dev-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).js b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).js index 98c57bcd03..14f18f1f54 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).js +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).js @@ -23,6 +23,8 @@ class Component { } //// [commentsOnJSXExpressionsArePreserved.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); class Component { render() { return
diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).js.diff index 18abed9424..f6e1129e81 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).js.diff @@ -27,6 +27,8 @@ - } - }; -}); ++"use strict"; ++Object.defineProperty(exports, "__esModule", { value: true }); +class Component { + render() { + return
diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesExternalModuleForced.js b/testdata/baselines/reference/submodule/compiler/isolatedModulesExternalModuleForced.js index b0ef254bb5..c0959e7c9a 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesExternalModuleForced.js +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesExternalModuleForced.js @@ -5,3 +5,4 @@ var x; //// [file1.js] var x; +export {}; diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesExternalModuleForced.js.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesExternalModuleForced.js.diff deleted file mode 100644 index 6410e57204..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesExternalModuleForced.js.diff +++ /dev/null @@ -1,7 +0,0 @@ ---- old.isolatedModulesExternalModuleForced.js -+++ new.isolatedModulesExternalModuleForced.js -@@= skipped -4, +4 lines =@@ - - //// [file1.js] - var x; --export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=false).js b/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=false).js index 4d7ea3d766..ace184c122 100644 --- a/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=false).js +++ b/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=false).js @@ -9,5 +9,6 @@ console.log("Hello, world!"); //// [not-a-module.js] console.log("Hello, world!"); +export {}; //// [index.js] import "./not-a-module"; diff --git a/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=false).js.diff b/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=false).js.diff index 8a45af23a7..5e5fa4db51 100644 --- a/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=false).js.diff +++ b/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=false).js.diff @@ -7,6 +7,7 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); console.log("Hello, world!"); ++export {}; //// [index.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=true).js b/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=true).js index 4d7ea3d766..ace184c122 100644 --- a/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=true).js +++ b/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=true).js @@ -9,5 +9,6 @@ console.log("Hello, world!"); //// [not-a-module.js] console.log("Hello, world!"); +export {}; //// [index.js] import "./not-a-module"; diff --git a/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=true).js.diff b/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=true).js.diff index ffc639d695..a2e48aed98 100644 --- a/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=true).js.diff +++ b/testdata/baselines/reference/submodule/compiler/sideEffectImports3(moduledetection=force,nouncheckedsideeffectimports=true).js.diff @@ -7,6 +7,7 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); console.log("Hello, world!"); ++export {}; //// [index.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js index 89dd2c7541..c50644a728 100644 --- a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js +++ b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js @@ -16,3 +16,4 @@ const a: GlobalThing = { a: 0 }; //// [usage.js] /// const a = { a: 0 }; +export {}; diff --git a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js.diff b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js.diff index a61bab9ab4..b3c8006e48 100644 --- a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js.diff +++ b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js.diff @@ -7,4 +7,5 @@ -"use strict"; /// -Object.defineProperty(exports, "__esModule", { value: true }); - const a = { a: 0 }; \ No newline at end of file + const a = { a: 0 }; ++export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js index 89dd2c7541..c50644a728 100644 --- a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js +++ b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js @@ -16,3 +16,4 @@ const a: GlobalThing = { a: 0 }; //// [usage.js] /// const a = { a: 0 }; +export {}; diff --git a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js.diff b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js.diff index e5c1be43de..944abc168c 100644 --- a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js.diff +++ b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js.diff @@ -7,4 +7,5 @@ -"use strict"; /// -Object.defineProperty(exports, "__esModule", { value: true }); - const a = { a: 0 }; \ No newline at end of file + const a = { a: 0 }; ++export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=es5).js b/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=es5).js index de475ae6f3..507aff838e 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=es5).js +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=es5).js @@ -39,6 +39,8 @@ declare global { const { a, b, c } = import.meta.wellKnownProperty; //// [example.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); // Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example (async () => { const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); @@ -57,6 +59,8 @@ exports.x = import.meta; exports.y = import.metal; exports.z = import.import.import.malkovich; //// [scriptLookingFile01.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); let globalA = import.meta; let globalB = import.metal; let globalC = import.import.import.malkovich; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=es5).js.diff b/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=es5).js.diff index ae392c8abe..7b6e1f0306 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=es5).js.diff +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=es5).js.diff @@ -1,10 +1,9 @@ --- old.importMeta(module=commonjs,target=es5).js +++ new.importMeta(module=commonjs,target=es5).js -@@= skipped -38, +38 lines =@@ - const { a, b, c } = import.meta.wellKnownProperty; +@@= skipped -39, +39 lines =@@ //// [example.js] --"use strict"; + "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { @@ -41,7 +40,7 @@ - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; --Object.defineProperty(exports, "__esModule", { value: true }); + Object.defineProperty(exports, "__esModule", { value: true }); // Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example -(function () { return __awaiter(void 0, void 0, void 0, function () { - var response, blob, size, image; @@ -74,12 +73,10 @@ //// [moduleLookingFile01.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -@@= skipped -66, +18 lines =@@ - exports.y = import.metal; - exports.z = import.import.import.malkovich; +@@= skipped -67, +21 lines =@@ //// [scriptLookingFile01.js] --"use strict"; --Object.defineProperty(exports, "__esModule", { value: true }); + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); -var globalA = import.meta; -var globalB = import.metal; -var globalC = import.import.import.malkovich; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=esnext).js b/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=esnext).js index de475ae6f3..507aff838e 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=esnext).js +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=esnext).js @@ -39,6 +39,8 @@ declare global { const { a, b, c } = import.meta.wellKnownProperty; //// [example.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); // Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example (async () => { const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); @@ -57,6 +59,8 @@ exports.x = import.meta; exports.y = import.metal; exports.z = import.import.import.malkovich; //// [scriptLookingFile01.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); let globalA = import.meta; let globalB = import.metal; let globalC = import.import.import.malkovich; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=esnext).js.diff b/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=esnext).js.diff deleted file mode 100644 index 4ab82a6610..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=esnext).js.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.importMeta(module=commonjs,target=esnext).js -+++ new.importMeta(module=commonjs,target=esnext).js -@@= skipped -38, +38 lines =@@ - const { a, b, c } = import.meta.wellKnownProperty; - - //// [example.js] --"use strict"; --Object.defineProperty(exports, "__esModule", { value: true }); - // Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example - (async () => { - const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); -@@= skipped -20, +18 lines =@@ - exports.y = import.metal; - exports.z = import.import.import.malkovich; - //// [scriptLookingFile01.js] --"use strict"; --Object.defineProperty(exports, "__esModule", { value: true }); - let globalA = import.meta; - let globalB = import.metal; - let globalC = import.import.import.malkovich; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=es5).js b/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=es5).js index 4b6fa5436f..26c4c3e5cc 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=es5).js +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=es5).js @@ -49,6 +49,7 @@ const { a, b, c } = import.meta.wellKnownProperty; image.width = image.height = size; document.body.appendChild(image); })(); +export {}; //// [moduleLookingFile01.js] export let x = import.meta; export let y = import.metal; @@ -57,6 +58,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; let globalB = import.metal; let globalC = import.import.import.malkovich; +export {}; //// [assignmentTargets.js] export const foo = import.meta.blah = import.meta.blue = import.meta; import.meta = foo; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=es5).js.diff b/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=es5).js.diff index 8943973485..d899191cab 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=es5).js.diff +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=es5).js.diff @@ -60,7 +60,6 @@ - } - }); -}); })(); --export {}; +(async () => { + const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); + const blob = await response.blob(); @@ -70,6 +69,7 @@ + image.width = image.height = size; + document.body.appendChild(image); +})(); + export {}; //// [moduleLookingFile01.js] -export var x = import.meta; -export var y = import.metal; @@ -81,10 +81,10 @@ -var globalA = import.meta; -var globalB = import.metal; -var globalC = import.import.import.malkovich; --export {}; +let globalA = import.meta; +let globalB = import.metal; +let globalC = import.import.import.malkovich; + export {}; //// [assignmentTargets.js] -export var foo = import.meta.blah = import.meta.blue = import.meta; +export const foo = import.meta.blah = import.meta.blue = import.meta; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=esnext).js b/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=esnext).js index 4b6fa5436f..26c4c3e5cc 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=esnext).js +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=esnext).js @@ -49,6 +49,7 @@ const { a, b, c } = import.meta.wellKnownProperty; image.width = image.height = size; document.body.appendChild(image); })(); +export {}; //// [moduleLookingFile01.js] export let x = import.meta; export let y = import.metal; @@ -57,6 +58,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; let globalB = import.metal; let globalC = import.import.import.malkovich; +export {}; //// [assignmentTargets.js] export const foo = import.meta.blah = import.meta.blue = import.meta; import.meta = foo; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=esnext).js.diff b/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=esnext).js.diff deleted file mode 100644 index 70c9de4bc6..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=esnext).js.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.importMeta(module=es2020,target=esnext).js -+++ new.importMeta(module=es2020,target=esnext).js -@@= skipped -48, +48 lines =@@ - image.width = image.height = size; - document.body.appendChild(image); - })(); --export {}; - //// [moduleLookingFile01.js] - export let x = import.meta; - export let y = import.metal; -@@= skipped -9, +8 lines =@@ - let globalA = import.meta; - let globalB = import.metal; - let globalC = import.import.import.malkovich; --export {}; - //// [assignmentTargets.js] - export const foo = import.meta.blah = import.meta.blue = import.meta; - import.meta = foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=es5).js b/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=es5).js index 4b6fa5436f..26c4c3e5cc 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=es5).js +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=es5).js @@ -49,6 +49,7 @@ const { a, b, c } = import.meta.wellKnownProperty; image.width = image.height = size; document.body.appendChild(image); })(); +export {}; //// [moduleLookingFile01.js] export let x = import.meta; export let y = import.metal; @@ -57,6 +58,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; let globalB = import.metal; let globalC = import.import.import.malkovich; +export {}; //// [assignmentTargets.js] export const foo = import.meta.blah = import.meta.blue = import.meta; import.meta = foo; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=es5).js.diff b/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=es5).js.diff index 996c9612e2..256ffec641 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=es5).js.diff +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=es5).js.diff @@ -60,7 +60,6 @@ - } - }); -}); })(); --export {}; +(async () => { + const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); + const blob = await response.blob(); @@ -70,6 +69,7 @@ + image.width = image.height = size; + document.body.appendChild(image); +})(); + export {}; //// [moduleLookingFile01.js] -export var x = import.meta; -export var y = import.metal; @@ -81,10 +81,10 @@ -var globalA = import.meta; -var globalB = import.metal; -var globalC = import.import.import.malkovich; --export {}; +let globalA = import.meta; +let globalB = import.metal; +let globalC = import.import.import.malkovich; + export {}; //// [assignmentTargets.js] -export var foo = import.meta.blah = import.meta.blue = import.meta; +export const foo = import.meta.blah = import.meta.blue = import.meta; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=esnext).js b/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=esnext).js index 4b6fa5436f..26c4c3e5cc 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=esnext).js +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=esnext).js @@ -49,6 +49,7 @@ const { a, b, c } = import.meta.wellKnownProperty; image.width = image.height = size; document.body.appendChild(image); })(); +export {}; //// [moduleLookingFile01.js] export let x = import.meta; export let y = import.metal; @@ -57,6 +58,7 @@ export let z = import.import.import.malkovich; let globalA = import.meta; let globalB = import.metal; let globalC = import.import.import.malkovich; +export {}; //// [assignmentTargets.js] export const foo = import.meta.blah = import.meta.blue = import.meta; import.meta = foo; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=esnext).js.diff b/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=esnext).js.diff deleted file mode 100644 index 40da3e21bd..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=esnext).js.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.importMeta(module=esnext,target=esnext).js -+++ new.importMeta(module=esnext,target=esnext).js -@@= skipped -48, +48 lines =@@ - image.width = image.height = size; - document.body.appendChild(image); - })(); --export {}; - //// [moduleLookingFile01.js] - export let x = import.meta; - export let y = import.metal; -@@= skipped -9, +8 lines =@@ - let globalA = import.meta; - let globalB = import.metal; - let globalC = import.import.import.malkovich; --export {}; - //// [assignmentTargets.js] - export const foo = import.meta.blah = import.meta.blue = import.meta; - import.meta = foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=es5).js b/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=es5).js index de475ae6f3..507aff838e 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=es5).js +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=es5).js @@ -39,6 +39,8 @@ declare global { const { a, b, c } = import.meta.wellKnownProperty; //// [example.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); // Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example (async () => { const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); @@ -57,6 +59,8 @@ exports.x = import.meta; exports.y = import.metal; exports.z = import.import.import.malkovich; //// [scriptLookingFile01.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); let globalA = import.meta; let globalB = import.metal; let globalC = import.import.import.malkovich; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=es5).js.diff b/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=es5).js.diff index 419feffd69..cbe973734b 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=es5).js.diff +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=es5).js.diff @@ -69,6 +69,8 @@ - } - }; -}); ++"use strict"; ++Object.defineProperty(exports, "__esModule", { value: true }); +// Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example +(async () => { + const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); @@ -113,6 +115,8 @@ - } - }; -}); ++"use strict"; ++Object.defineProperty(exports, "__esModule", { value: true }); +let globalA = import.meta; +let globalB = import.metal; +let globalC = import.import.import.malkovich; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=esnext).js b/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=esnext).js index de475ae6f3..507aff838e 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=esnext).js +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=esnext).js @@ -39,6 +39,8 @@ declare global { const { a, b, c } = import.meta.wellKnownProperty; //// [example.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); // Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example (async () => { const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); @@ -57,6 +59,8 @@ exports.x = import.meta; exports.y = import.metal; exports.z = import.import.import.malkovich; //// [scriptLookingFile01.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); let globalA = import.meta; let globalB = import.metal; let globalC = import.import.import.malkovich; diff --git a/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=esnext).js.diff b/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=esnext).js.diff index 1beff551b6..7da51dcd84 100644 --- a/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=esnext).js.diff +++ b/testdata/baselines/reference/submodule/conformance/importMeta(module=system,target=esnext).js.diff @@ -23,6 +23,8 @@ - } - }; -}); ++"use strict"; ++Object.defineProperty(exports, "__esModule", { value: true }); +// Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example +(async () => { + const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString()); @@ -67,6 +69,8 @@ - } - }; -}); ++"use strict"; ++Object.defineProperty(exports, "__esModule", { value: true }); +let globalA = import.meta; +let globalB = import.metal; +let globalC = import.import.import.malkovich; diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).errors.txt b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).errors.txt deleted file mode 100644 index 81925bade8..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -importMetaNarrowing.ts(1,9): error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. -importMetaNarrowing.ts(3,17): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -importMetaNarrowing.ts(4,15): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. - - -==== importMetaNarrowing.ts (3 errors) ==== - declare global { interface ImportMeta {foo?: () => void} }; - ~~~~~~ -!!! error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. - - if (import.meta.foo) { - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. - import.meta.foo(); - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).errors.txt.diff deleted file mode 100644 index a9f935a454..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.importMetaNarrowing(module=es2020).errors.txt -+++ new.importMetaNarrowing(module=es2020).errors.txt -@@= skipped -0, +0 lines =@@ -- -+importMetaNarrowing.ts(1,9): error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. -+importMetaNarrowing.ts(3,17): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+importMetaNarrowing.ts(4,15): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+ -+ -+==== importMetaNarrowing.ts (3 errors) ==== -+ declare global { interface ImportMeta {foo?: () => void} }; -+ ~~~~~~ -+!!! error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. -+ -+ if (import.meta.foo) { -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+ import.meta.foo(); -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).js b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).js index 5bff3065b1..d535084eef 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).js +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).js @@ -13,3 +13,4 @@ if (import.meta.foo) { if (import.meta.foo) { import.meta.foo(); } +export {}; diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).js.diff b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).js.diff deleted file mode 100644 index 173d003006..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).js.diff +++ /dev/null @@ -1,7 +0,0 @@ ---- old.importMetaNarrowing(module=es2020).js -+++ new.importMetaNarrowing(module=es2020).js -@@= skipped -12, +12 lines =@@ - if (import.meta.foo) { - import.meta.foo(); - } --export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).symbols b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).symbols index 69b1cea41b..e537310eed 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).symbols +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).symbols @@ -3,15 +3,19 @@ === importMetaNarrowing.ts === declare global { interface ImportMeta {foo?: () => void} }; >global : Symbol(global, Decl(importMetaNarrowing.ts, 0, 0)) ->ImportMeta : Symbol(ImportMeta, Decl(importMetaNarrowing.ts, 0, 16)) +>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) >foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) if (import.meta.foo) { ->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) +>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) >meta : Symbol(meta) +>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) import.meta.foo(); ->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) +>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) >meta : Symbol(meta) +>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) } diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).symbols.diff b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).symbols.diff index ddb1ad02d4..08ef74117f 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).symbols.diff @@ -1,27 +1,27 @@ --- old.importMetaNarrowing(module=es2020).symbols +++ new.importMetaNarrowing(module=es2020).symbols -@@= skipped -2, +2 lines =@@ - === importMetaNarrowing.ts === +@@= skipped -3, +3 lines =@@ declare global { interface ImportMeta {foo?: () => void} }; >global : Symbol(global, Decl(importMetaNarrowing.ts, 0, 0)) -->ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) + >ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ->foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -+>ImportMeta : Symbol(ImportMeta, Decl(importMetaNarrowing.ts, 0, 16)) +>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) if (import.meta.foo) { ->import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ++>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) + >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ->meta : Symbol(ImportMetaExpression.meta) ->foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -+>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(meta) ++>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) import.meta.foo(); ->import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ++>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) + >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ->meta : Symbol(ImportMetaExpression.meta) ->foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -+>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(meta) ++>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) } diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).types b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).types index 503065b69e..0ef5112f5f 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).types +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).types @@ -2,20 +2,20 @@ === importMetaNarrowing.ts === declare global { interface ImportMeta {foo?: () => void} }; ->global : typeof global +>global : any >foo : (() => void) | undefined if (import.meta.foo) { ->import.meta.foo : any +>import.meta.foo : (() => void) | undefined >import.meta : ImportMeta >meta : ImportMeta ->foo : any +>foo : (() => void) | undefined import.meta.foo(); ->import.meta.foo() : any ->import.meta.foo : any +>import.meta.foo() : void +>import.meta.foo : () => void >import.meta : ImportMeta >meta : ImportMeta ->foo : any +>foo : () => void } diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).types.diff b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).types.diff deleted file mode 100644 index f45cbb9af9..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=es2020).types.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- old.importMetaNarrowing(module=es2020).types -+++ new.importMetaNarrowing(module=es2020).types -@@= skipped -1, +1 lines =@@ - - === importMetaNarrowing.ts === - declare global { interface ImportMeta {foo?: () => void} }; -->global : any -+>global : typeof global - >foo : (() => void) | undefined - - if (import.meta.foo) { -->import.meta.foo : (() => void) | undefined -+>import.meta.foo : any - >import.meta : ImportMeta - >meta : ImportMeta -->foo : (() => void) | undefined -+>foo : any - - import.meta.foo(); -->import.meta.foo() : void -->import.meta.foo : () => void -+>import.meta.foo() : any -+>import.meta.foo : any - >import.meta : ImportMeta - >meta : ImportMeta -->foo : () => void -+>foo : any - } diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).errors.txt b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).errors.txt deleted file mode 100644 index 81925bade8..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -importMetaNarrowing.ts(1,9): error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. -importMetaNarrowing.ts(3,17): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -importMetaNarrowing.ts(4,15): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. - - -==== importMetaNarrowing.ts (3 errors) ==== - declare global { interface ImportMeta {foo?: () => void} }; - ~~~~~~ -!!! error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. - - if (import.meta.foo) { - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. - import.meta.foo(); - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).errors.txt.diff deleted file mode 100644 index af9ce716b4..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.importMetaNarrowing(module=esnext).errors.txt -+++ new.importMetaNarrowing(module=esnext).errors.txt -@@= skipped -0, +0 lines =@@ -- -+importMetaNarrowing.ts(1,9): error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. -+importMetaNarrowing.ts(3,17): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+importMetaNarrowing.ts(4,15): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+ -+ -+==== importMetaNarrowing.ts (3 errors) ==== -+ declare global { interface ImportMeta {foo?: () => void} }; -+ ~~~~~~ -+!!! error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. -+ -+ if (import.meta.foo) { -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+ import.meta.foo(); -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).js b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).js index 5bff3065b1..d535084eef 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).js +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).js @@ -13,3 +13,4 @@ if (import.meta.foo) { if (import.meta.foo) { import.meta.foo(); } +export {}; diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).js.diff b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).js.diff deleted file mode 100644 index 99357a5197..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).js.diff +++ /dev/null @@ -1,7 +0,0 @@ ---- old.importMetaNarrowing(module=esnext).js -+++ new.importMetaNarrowing(module=esnext).js -@@= skipped -12, +12 lines =@@ - if (import.meta.foo) { - import.meta.foo(); - } --export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).symbols b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).symbols index 69b1cea41b..e537310eed 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).symbols +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).symbols @@ -3,15 +3,19 @@ === importMetaNarrowing.ts === declare global { interface ImportMeta {foo?: () => void} }; >global : Symbol(global, Decl(importMetaNarrowing.ts, 0, 0)) ->ImportMeta : Symbol(ImportMeta, Decl(importMetaNarrowing.ts, 0, 16)) +>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) >foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) if (import.meta.foo) { ->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) +>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) >meta : Symbol(meta) +>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) import.meta.foo(); ->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) +>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) >meta : Symbol(meta) +>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) } diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).symbols.diff b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).symbols.diff index b54558be1b..a6e2a438cf 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).symbols.diff @@ -1,27 +1,27 @@ --- old.importMetaNarrowing(module=esnext).symbols +++ new.importMetaNarrowing(module=esnext).symbols -@@= skipped -2, +2 lines =@@ - === importMetaNarrowing.ts === +@@= skipped -3, +3 lines =@@ declare global { interface ImportMeta {foo?: () => void} }; >global : Symbol(global, Decl(importMetaNarrowing.ts, 0, 0)) -->ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) + >ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ->foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -+>ImportMeta : Symbol(ImportMeta, Decl(importMetaNarrowing.ts, 0, 16)) +>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) if (import.meta.foo) { ->import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ++>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) + >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ->meta : Symbol(ImportMetaExpression.meta) ->foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -+>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(meta) ++>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) import.meta.foo(); ->import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ++>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) + >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ->meta : Symbol(ImportMetaExpression.meta) ->foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -+>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(meta) ++>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) } diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).types b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).types index 503065b69e..0ef5112f5f 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).types +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).types @@ -2,20 +2,20 @@ === importMetaNarrowing.ts === declare global { interface ImportMeta {foo?: () => void} }; ->global : typeof global +>global : any >foo : (() => void) | undefined if (import.meta.foo) { ->import.meta.foo : any +>import.meta.foo : (() => void) | undefined >import.meta : ImportMeta >meta : ImportMeta ->foo : any +>foo : (() => void) | undefined import.meta.foo(); ->import.meta.foo() : any ->import.meta.foo : any +>import.meta.foo() : void +>import.meta.foo : () => void >import.meta : ImportMeta >meta : ImportMeta ->foo : any +>foo : () => void } diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).types.diff b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).types.diff deleted file mode 100644 index e9bee9a64b..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=esnext).types.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- old.importMetaNarrowing(module=esnext).types -+++ new.importMetaNarrowing(module=esnext).types -@@= skipped -1, +1 lines =@@ - - === importMetaNarrowing.ts === - declare global { interface ImportMeta {foo?: () => void} }; -->global : any -+>global : typeof global - >foo : (() => void) | undefined - - if (import.meta.foo) { -->import.meta.foo : (() => void) | undefined -+>import.meta.foo : any - >import.meta : ImportMeta - >meta : ImportMeta -->foo : (() => void) | undefined -+>foo : any - - import.meta.foo(); -->import.meta.foo() : void -->import.meta.foo : () => void -+>import.meta.foo() : any -+>import.meta.foo : any - >import.meta : ImportMeta - >meta : ImportMeta -->foo : () => void -+>foo : any - } diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).errors.txt b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).errors.txt deleted file mode 100644 index 81925bade8..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -importMetaNarrowing.ts(1,9): error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. -importMetaNarrowing.ts(3,17): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -importMetaNarrowing.ts(4,15): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. - - -==== importMetaNarrowing.ts (3 errors) ==== - declare global { interface ImportMeta {foo?: () => void} }; - ~~~~~~ -!!! error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. - - if (import.meta.foo) { - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. - import.meta.foo(); - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).js b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).js index 5bff3065b1..7e2a81bf25 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).js +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).js @@ -9,6 +9,8 @@ if (import.meta.foo) { //// [importMetaNarrowing.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); ; if (import.meta.foo) { import.meta.foo(); diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).js.diff b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).js.diff index 67cf00443a..92beb24072 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).js.diff +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).js.diff @@ -17,6 +17,8 @@ - } - }; -}); ++"use strict"; ++Object.defineProperty(exports, "__esModule", { value: true }); +; +if (import.meta.foo) { + import.meta.foo(); diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).symbols b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).symbols index 69b1cea41b..e537310eed 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).symbols +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).symbols @@ -3,15 +3,19 @@ === importMetaNarrowing.ts === declare global { interface ImportMeta {foo?: () => void} }; >global : Symbol(global, Decl(importMetaNarrowing.ts, 0, 0)) ->ImportMeta : Symbol(ImportMeta, Decl(importMetaNarrowing.ts, 0, 16)) +>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) >foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) if (import.meta.foo) { ->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) +>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) >meta : Symbol(meta) +>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) import.meta.foo(); ->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) +>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) >meta : Symbol(meta) +>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) } diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).symbols.diff b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).symbols.diff index 5649d24f07..c3d5e4c8a5 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).symbols.diff @@ -1,27 +1,27 @@ --- old.importMetaNarrowing(module=system).symbols +++ new.importMetaNarrowing(module=system).symbols -@@= skipped -2, +2 lines =@@ - === importMetaNarrowing.ts === +@@= skipped -3, +3 lines =@@ declare global { interface ImportMeta {foo?: () => void} }; >global : Symbol(global, Decl(importMetaNarrowing.ts, 0, 0)) -->ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) + >ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ->foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -+>ImportMeta : Symbol(ImportMeta, Decl(importMetaNarrowing.ts, 0, 16)) +>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) if (import.meta.foo) { ->import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ++>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) + >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ->meta : Symbol(ImportMetaExpression.meta) ->foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -+>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(meta) ++>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) import.meta.foo(); ->import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -->import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ++>import.meta.foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) + >import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16)) ->meta : Symbol(ImportMetaExpression.meta) ->foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39)) -+>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) +>meta : Symbol(meta) ++>foo : Symbol(foo, Decl(importMetaNarrowing.ts, 0, 39)) } diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).types b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).types index 503065b69e..0ef5112f5f 100644 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).types +++ b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).types @@ -2,20 +2,20 @@ === importMetaNarrowing.ts === declare global { interface ImportMeta {foo?: () => void} }; ->global : typeof global +>global : any >foo : (() => void) | undefined if (import.meta.foo) { ->import.meta.foo : any +>import.meta.foo : (() => void) | undefined >import.meta : ImportMeta >meta : ImportMeta ->foo : any +>foo : (() => void) | undefined import.meta.foo(); ->import.meta.foo() : any ->import.meta.foo : any +>import.meta.foo() : void +>import.meta.foo : () => void >import.meta : ImportMeta >meta : ImportMeta ->foo : any +>foo : () => void } diff --git a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).types.diff b/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).types.diff deleted file mode 100644 index 104c366442..0000000000 --- a/testdata/baselines/reference/submodule/conformance/importMetaNarrowing(module=system).types.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- old.importMetaNarrowing(module=system).types -+++ new.importMetaNarrowing(module=system).types -@@= skipped -1, +1 lines =@@ - - === importMetaNarrowing.ts === - declare global { interface ImportMeta {foo?: () => void} }; -->global : any -+>global : typeof global - >foo : (() => void) | undefined - - if (import.meta.foo) { -->import.meta.foo : (() => void) | undefined -+>import.meta.foo : any - >import.meta : ImportMeta - >meta : ImportMeta -->foo : (() => void) | undefined -+>foo : any - - import.meta.foo(); -->import.meta.foo() : void -->import.meta.foo : () => void -+>import.meta.foo() : any -+>import.meta.foo : any - >import.meta : ImportMeta - >meta : ImportMeta -->foo : () => void -+>foo : any - } diff --git a/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension5.js b/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension5.js index 04388769a9..e6ae64f9b5 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension5.js +++ b/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension5.js @@ -7,3 +7,4 @@ import("./foo").then(x => x); // should error, ask for extension //// [buzz.mjs] // Extensionless relative path dynamic import in an ES module import("./foo").then(x => x); // should error, ask for extension +export {}; diff --git a/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension5.js.diff b/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension5.js.diff deleted file mode 100644 index 3d8dd9cccc..0000000000 --- a/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension5.js.diff +++ /dev/null @@ -1,7 +0,0 @@ ---- old.moduleResolutionWithoutExtension5.js -+++ new.moduleResolutionWithoutExtension5.js -@@= skipped -6, +6 lines =@@ - //// [buzz.mjs] - // Extensionless relative path dynamic import in an ES module - import("./foo").then(x => x); // should error, ask for extension --export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension8.js b/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension8.js index 7ac8e5da9a..ff4b9057a1 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension8.js +++ b/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension8.js @@ -5,5 +5,7 @@ import("./foo").then(x => x); // should error, ask for extension //// [bar.cjs] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); // Extensionless relative path dynamic import in a cjs module import("./foo").then(x => x); // should error, ask for extension diff --git a/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension8.js.diff b/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension8.js.diff deleted file mode 100644 index a405181495..0000000000 --- a/testdata/baselines/reference/submodule/conformance/moduleResolutionWithoutExtension8.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.moduleResolutionWithoutExtension8.js -+++ new.moduleResolutionWithoutExtension8.js -@@= skipped -4, +4 lines =@@ - import("./foo").then(x => x); // should error, ask for extension - - //// [bar.cjs] --"use strict"; --Object.defineProperty(exports, "__esModule", { value: true }); - // Extensionless relative path dynamic import in a cjs module - import("./foo").then(x => x); // should error, ask for extension \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsx).js b/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsx).js index f87603cb4d..1beb1199c6 100644 --- a/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsx).js +++ b/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsx).js @@ -11,3 +11,4 @@ ///
1
;
2
; +export {}; diff --git a/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsx).js.diff b/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsx).js.diff index 13c3f4861f..e0e3820002 100644 --- a/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsx).js.diff +++ b/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsx).js.diff @@ -9,4 +9,5 @@ -_jsx("div", { children: "1" }); -_jsx("div", { children: "2" }, "key-attr"); +
1
; -+
2
; \ No newline at end of file ++
2
; ++export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsxdev).js b/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsxdev).js index f87603cb4d..1beb1199c6 100644 --- a/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsxdev).js +++ b/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsxdev).js @@ -11,3 +11,4 @@ ///
1
;
2
; +export {}; diff --git a/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsxdev).js.diff b/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsxdev).js.diff index a75e62c137..7ffadc499a 100644 --- a/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsxdev).js.diff +++ b/testdata/baselines/reference/submodule/conformance/tsxReactEmit8(jsx=react-jsxdev).js.diff @@ -10,4 +10,5 @@ -_jsxDEV("div", { children: "1" }, void 0, false, { fileName: _jsxFileName, lineNumber: 1, columnNumber: 1 }, this); -_jsxDEV("div", { children: "2" }, "key-attr", false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 14 }, this); +
1
; -+
2
; \ No newline at end of file ++
2
; ++export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).errors.txt.diff index 809aef6d61..3f04165da7 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).errors.txt.diff @@ -2,42 +2,15 @@ +++ new.commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=system,moduledetection=force).errors.txt @@= skipped -0, +0 lines =@@ -commentsOnJSXExpressionsArePreserved.tsx(5,16): error TS2792: Cannot find module 'react/jsx-runtime'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -- -- --==== commentsOnJSXExpressionsArePreserved.tsx (1 errors) ==== -- // file is intentionally not a module - this tests for a crash in the module/system transforms alongside the `react-jsx` and `react-jsxdev` outputs -- namespace JSX {} -- class Component { -- render() { -- return
-- ~~~~~ -- {/* missing */} -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- {null/* preserved */} -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- { -- ~~~~~~~~~~~~~ -- // ??? 1 -- ~~~~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- { // ??? 2 -- ~~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- {// ??? 3 -- ~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- { -- ~~~~~~~~~~~~~ -- // ??? 4 -- ~~~~~~~~~~~~~~~~~~~~~~~~ -- /* ??? 5 */} -- ~~~~~~~~~~~~~~~~~~~~~~~~ --
; -- ~~~~~~~~~~~~~~ ++commentsOnJSXExpressionsArePreserved.tsx(5,16): error TS2875: This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + + + ==== commentsOnJSXExpressionsArePreserved.tsx (1 errors) ==== +@@= skipped -33, +33 lines =@@ + ~~~~~~~~~~~~~~~~~~~~~~~~ +
; + ~~~~~~~~~~~~~~ -!!! error TS2792: Cannot find module 'react/jsx-runtime'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -- } -- } -+ \ No newline at end of file ++!!! error TS2875: This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).errors.txt.diff index 5484764591..45623af100 100644 --- a/testdata/baselines/reference/submoduleAccepted/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).errors.txt.diff @@ -2,42 +2,15 @@ +++ new.commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=system,moduledetection=force).errors.txt @@= skipped -0, +0 lines =@@ -commentsOnJSXExpressionsArePreserved.tsx(5,16): error TS2792: Cannot find module 'react/jsx-dev-runtime'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -- -- --==== commentsOnJSXExpressionsArePreserved.tsx (1 errors) ==== -- // file is intentionally not a module - this tests for a crash in the module/system transforms alongside the `react-jsx` and `react-jsxdev` outputs -- namespace JSX {} -- class Component { -- render() { -- return
-- ~~~~~ -- {/* missing */} -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- {null/* preserved */} -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- { -- ~~~~~~~~~~~~~ -- // ??? 1 -- ~~~~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- { // ??? 2 -- ~~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- {// ??? 3 -- ~~~~~~~~~~~~~~~~~~~~~ -- } -- ~~~~~~~~~~~~~ -- { -- ~~~~~~~~~~~~~ -- // ??? 4 -- ~~~~~~~~~~~~~~~~~~~~~~~~ -- /* ??? 5 */} -- ~~~~~~~~~~~~~~~~~~~~~~~~ --
; -- ~~~~~~~~~~~~~~ ++commentsOnJSXExpressionsArePreserved.tsx(5,16): error TS2875: This JSX tag requires the module path 'react/jsx-dev-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + + + ==== commentsOnJSXExpressionsArePreserved.tsx (1 errors) ==== +@@= skipped -33, +33 lines =@@ + ~~~~~~~~~~~~~~~~~~~~~~~~ +
; + ~~~~~~~~~~~~~~ -!!! error TS2792: Cannot find module 'react/jsx-dev-runtime'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -- } -- } -+ \ No newline at end of file ++!!! error TS2875: This JSX tag requires the module path 'react/jsx-dev-runtime' to exist, but none could be found. Make sure you have types for the appropriate package installed. + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/importMetaNarrowing(module=system).errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/importMetaNarrowing(module=system).errors.txt.diff deleted file mode 100644 index 4900231eeb..0000000000 --- a/testdata/baselines/reference/submoduleAccepted/conformance/importMetaNarrowing(module=system).errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.importMetaNarrowing(module=system).errors.txt -+++ new.importMetaNarrowing(module=system).errors.txt -@@= skipped -0, +0 lines =@@ -- -+importMetaNarrowing.ts(1,9): error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. -+importMetaNarrowing.ts(3,17): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+importMetaNarrowing.ts(4,15): error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+ -+ -+==== importMetaNarrowing.ts (3 errors) ==== -+ declare global { interface ImportMeta {foo?: () => void} }; -+ ~~~~~~ -+!!! error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations. -+ -+ if (import.meta.foo) { -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+ import.meta.foo(); -+ ~~~ -+!!! error TS2339: Property 'foo' does not exist on type 'ImportMeta'. -+ } -+ \ No newline at end of file From 4ab2d1a7878fa1720bf60877133b038463d098c1 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 29 May 2025 13:32:10 -0700 Subject: [PATCH 06/12] more --- internal/parser/parser.go | 11 ++++++++-- ...tionIsolatedModulesCjsFileScope.errors.txt | 14 ------------- ...solatedModulesCjsFileScope.errors.txt.diff | 18 ----------------- ...uleDetectionIsolatedModulesCjsFileScope.js | 7 +++++-- ...tectionIsolatedModulesCjsFileScope.js.diff | 20 ------------------- 5 files changed, 14 insertions(+), 56 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.js.diff diff --git a/internal/parser/parser.go b/internal/parser/parser.go index 1948ee9bd3..886db701be 100644 --- a/internal/parser/parser.go +++ b/internal/parser/parser.go @@ -422,10 +422,17 @@ func walkTreeForJSXTags(node *ast.Node) *ast.Node { return found } +var isFileForcedToBeModuleByFormatExtensions = []string{tspath.ExtensionCjs, tspath.ExtensionCts, tspath.ExtensionMjs, tspath.ExtensionMts} + func isFileForcedToBeModuleByFormat(file *ast.SourceFile, options *core.SourceFileAffectingCompilerOptions) *ast.Node { - // !!! + // Excludes declaration files - they still require an explicit `export {}` or the like + // for back compat purposes. The only non-declaration files _not_ forced to be a module are `.js` files + // that aren't esm-mode (meaning not in a `type: module` scope). + // !!! TODO: !file.IsDeclarationFile && (getImpliedNodeFormatForEmitWorker(file, options) === ModuleKind.ESNext || ...) + if !file.IsDeclarationFile && tspath.FileExtensionIsOneOf(file.FileName(), isFileForcedToBeModuleByFormatExtensions) { + return file.AsNode() + } return nil - // GetImpliedNodeFormatForEmitWorker but we need the metadata???? } func (p *Parser) parseToplevelStatement(i int) *ast.Node { diff --git a/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.errors.txt deleted file mode 100644 index 589612b0e9..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -filename.cts(1,7): error TS2451: Cannot redeclare block-scoped variable 'a'. -filename.mts(1,7): error TS2451: Cannot redeclare block-scoped variable 'a'. - - -==== filename.cts (1 errors) ==== - const a = 2; - ~ -!!! error TS2451: Cannot redeclare block-scoped variable 'a'. -!!! related TS6203 filename.mts:1:7: 'a' was also declared here. -==== filename.mts (1 errors) ==== - const a = 2; - ~ -!!! error TS2451: Cannot redeclare block-scoped variable 'a'. -!!! related TS6203 filename.cts:1:7: 'a' was also declared here. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.errors.txt.diff deleted file mode 100644 index 185bedbe7a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.moduleDetectionIsolatedModulesCjsFileScope.errors.txt -+++ new.moduleDetectionIsolatedModulesCjsFileScope.errors.txt -@@= skipped -0, +0 lines =@@ -- -+filename.cts(1,7): error TS2451: Cannot redeclare block-scoped variable 'a'. -+filename.mts(1,7): error TS2451: Cannot redeclare block-scoped variable 'a'. -+ -+ -+==== filename.cts (1 errors) ==== -+ const a = 2; -+ ~ -+!!! error TS2451: Cannot redeclare block-scoped variable 'a'. -+!!! related TS6203 filename.mts:1:7: 'a' was also declared here. -+==== filename.mts (1 errors) ==== -+ const a = 2; -+ ~ -+!!! error TS2451: Cannot redeclare block-scoped variable 'a'. -+!!! related TS6203 filename.cts:1:7: 'a' was also declared here. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.js b/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.js index 666e68ee05..8d948790c9 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.js +++ b/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.js @@ -6,12 +6,15 @@ const a = 2; const a = 2; //// [filename.cjs] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); const a = 2; //// [filename.mjs] const a = 2; +export {}; //// [filename.d.cts] -declare const a = 2; +export {}; //// [filename.d.mts] -declare const a = 2; +export {}; diff --git a/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.js.diff b/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.js.diff deleted file mode 100644 index 9404771ec2..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleDetectionIsolatedModulesCjsFileScope.js.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.moduleDetectionIsolatedModulesCjsFileScope.js -+++ new.moduleDetectionIsolatedModulesCjsFileScope.js -@@= skipped -5, +5 lines =@@ - const a = 2; - - //// [filename.cjs] --"use strict"; --Object.defineProperty(exports, "__esModule", { value: true }); - const a = 2; - //// [filename.mjs] - const a = 2; --export {}; - - - //// [filename.d.cts] --export {}; -+declare const a = 2; - //// [filename.d.mts] --export {}; -+declare const a = 2; \ No newline at end of file From 1870b8fe38cd7eba776bee70170a8ab1b3e4463f Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 29 May 2025 15:52:45 -0700 Subject: [PATCH 07/12] Plumb it --- internal/api/encoder/encoder_test.go | 3 +- internal/ast/ast.go | 8 ++-- internal/ast/utilities.go | 15 ++++--- internal/astnav/tokens_test.go | 6 +-- internal/binder/binder_test.go | 2 +- internal/checker/checker.go | 3 +- internal/checker/grammarchecks.go | 4 +- internal/compiler/emitHost.go | 5 --- internal/compiler/fileloader.go | 12 ++---- internal/compiler/host.go | 6 +-- internal/compiler/program.go | 20 +++++---- internal/core/compileroptions.go | 2 + internal/parser/parser.go | 26 ++++++------ internal/parser/parser_test.go | 4 +- internal/printer/emithost.go | 3 -- .../printer/sourcefilemetadataprovider.go | 10 ----- internal/project/documentregistry.go | 19 +++++---- internal/project/project.go | 4 +- internal/testutil/harnessutil/harnessutil.go | 6 ++- .../testutil/parsetestutil/parsetestutil.go | 2 +- .../testutil/tsbaseline/js_emit_baseline.go | 4 +- internal/transformers/commonjsmodule.go | 41 +++++++++---------- internal/transformers/commonjsmodule_test.go | 10 +---- internal/transformers/esmodule.go | 17 ++++---- internal/transformers/esmodule_test.go | 4 +- internal/transformers/externalmoduleinfo.go | 11 ++--- internal/transformers/impliedmodule.go | 20 ++++----- internal/transformers/importelision_test.go | 4 -- internal/transformers/transformer.go | 10 ++--- 29 files changed, 129 insertions(+), 152 deletions(-) delete mode 100644 internal/printer/sourcefilemetadataprovider.go diff --git a/internal/api/encoder/encoder_test.go b/internal/api/encoder/encoder_test.go index fa3ddae221..d72fafe5ae 100644 --- a/internal/api/encoder/encoder_test.go +++ b/internal/api/encoder/encoder_test.go @@ -24,7 +24,7 @@ var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ func TestEncodeSourceFile(t *testing.T) { t.Parallel() - sourceFile := parser.ParseSourceFile("/test.ts", "/test.ts", "import { bar } from \"bar\";\nexport function foo(a: string, b: string): any {}\nfoo();", parseCompilerOptions, scanner.JSDocParsingModeParseAll) + sourceFile := parser.ParseSourceFile("/test.ts", "/test.ts", "import { bar } from \"bar\";\nexport function foo(a: string, b: string): any {}\nfoo();", parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) t.Run("baseline", func(t *testing.T) { t.Parallel() buf, err := encoder.EncodeSourceFile(sourceFile, "") @@ -47,6 +47,7 @@ func BenchmarkEncodeSourceFile(b *testing.B) { "/checker.ts", string(fileContent), parseCompilerOptions, + nil, scanner.JSDocParsingModeParseAll, ) diff --git a/internal/ast/ast.go b/internal/ast/ast.go index 0173465420..d45cb3ee4a 100644 --- a/internal/ast/ast.go +++ b/internal/ast/ast.go @@ -9964,6 +9964,9 @@ type SourceFile struct { CheckJsDirective *CheckJsDirective NodeCount int TextCount int + CommonJSModuleIndicator *Node + Metadata *SourceFileMetaData + ExternalModuleIndicator *Node // Fields set by binder @@ -9992,9 +9995,7 @@ type SourceFile struct { // !!! - CommonJSModuleIndicator *Node - ExternalModuleIndicator *Node - JSGlobalAugmentations SymbolTable + JSGlobalAugmentations SymbolTable } func (f *NodeFactory) NewSourceFile(text string, fileName string, path tspath.Path, statements *NodeList) *Node { @@ -10092,6 +10093,7 @@ func (node *SourceFile) copyFrom(other *SourceFile) { node.ReferencedFiles = other.ReferencedFiles node.TypeReferenceDirectives = other.TypeReferenceDirectives node.LibReferenceDirectives = other.LibReferenceDirectives + node.Metadata = other.Metadata node.CommonJSModuleIndicator = other.CommonJSModuleIndicator node.ExternalModuleIndicator = other.ExternalModuleIndicator node.JSGlobalAugmentations = other.JSGlobalAugmentations diff --git a/internal/ast/utilities.go b/internal/ast/utilities.go index d684fbed5b..ce0eedaca0 100644 --- a/internal/ast/utilities.go +++ b/internal/ast/utilities.go @@ -2410,17 +2410,17 @@ func GetImpliedNodeFormatForFile(path string, packageJsonType string) core.Modul return impliedNodeFormat } -func GetEmitModuleFormatOfFileWorker(sourceFile *SourceFile, options *core.CompilerOptions, sourceFileMetaData *SourceFileMetaData) core.ModuleKind { - result := GetImpliedNodeFormatForEmitWorker(sourceFile.FileName(), options, sourceFileMetaData) +func GetEmitModuleFormatOfFileWorker(sourceFile *SourceFile, options *core.CompilerOptions) core.ModuleKind { + result := GetImpliedNodeFormatForEmitWorker(sourceFile, options.GetEmitModuleKind()) if result != core.ModuleKindNone { return result } return options.GetEmitModuleKind() } -func GetImpliedNodeFormatForEmitWorker(fileName string, options *core.CompilerOptions, sourceFileMetaData *SourceFileMetaData) core.ModuleKind { - moduleKind := options.GetEmitModuleKind() - if core.ModuleKindNode16 <= moduleKind && moduleKind <= core.ModuleKindNodeNext { +func GetImpliedNodeFormatForEmitWorker(sourceFile *SourceFile, emitModuleKind core.ModuleKind) core.ModuleKind { + sourceFileMetaData := sourceFile.Metadata + if core.ModuleKindNode16 <= emitModuleKind && emitModuleKind <= core.ModuleKindNodeNext { if sourceFileMetaData == nil { return core.ModuleKindNone } @@ -2428,12 +2428,12 @@ func GetImpliedNodeFormatForEmitWorker(fileName string, options *core.CompilerOp } if sourceFileMetaData != nil && sourceFileMetaData.ImpliedNodeFormat == core.ModuleKindCommonJS && (sourceFileMetaData.PackageJsonType == "commonjs" || - tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionCjs, tspath.ExtensionCts})) { + tspath.FileExtensionIsOneOf(sourceFile.FileName(), []string{tspath.ExtensionCjs, tspath.ExtensionCts})) { return core.ModuleKindCommonJS } if sourceFileMetaData != nil && sourceFileMetaData.ImpliedNodeFormat == core.ModuleKindESNext && (sourceFileMetaData.PackageJsonType == "module" || - tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionMjs, tspath.ExtensionMts})) { + tspath.FileExtensionIsOneOf(sourceFile.FileName(), []string{tspath.ExtensionMjs, tspath.ExtensionMts})) { return core.ModuleKindESNext } return core.ModuleKindNone @@ -2657,7 +2657,6 @@ func GetPragmaArgument(pragma *Pragma, name string) string { return "" } - func IsJsxOpeningLikeElement(node *Node) bool { return IsJsxOpeningElement(node) || IsJsxSelfClosingElement(node) } diff --git a/internal/astnav/tokens_test.go b/internal/astnav/tokens_test.go index e188517597..1fcd233f20 100644 --- a/internal/astnav/tokens_test.go +++ b/internal/astnav/tokens_test.go @@ -57,7 +57,7 @@ func TestGetTokenAtPosition(t *testing.T) { return 0; } ` - file := parser.ParseSourceFile("/file.ts", "/file.ts", fileText, parseCompilerOptions, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", fileText, parseCompilerOptions, nil,scanner.JSDocParsingModeParseAll) assert.Equal(t, astnav.GetTokenAtPosition(file, 0), astnav.GetTokenAtPosition(file, 0)) }) } @@ -92,7 +92,7 @@ func baselineTokens(t *testing.T, testName string, includeEOF bool, getTSTokens positions[i] = i } tsTokens := getTSTokens(string(fileText), positions) - file := parser.ParseSourceFile("/file.ts", "/file.ts", string(fileText), parseCompilerOptions, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", string(fileText), parseCompilerOptions, nil,scanner.JSDocParsingModeParseAll) var output strings.Builder currentRange := core.NewTextRange(0, 0) @@ -425,7 +425,7 @@ export function isAnyDirectorySeparator(charCode: number): boolean { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { t.Parallel() - file := parser.ParseSourceFile("/file.ts", "/file.ts", testCase.fileContent, parseCompilerOptions, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", testCase.fileContent, parseCompilerOptions, nil,scanner.JSDocParsingModeParseAll) token := astnav.FindPrecedingToken(file, testCase.position) assert.Equal(t, token.Kind, testCase.expectedKind) }) diff --git a/internal/binder/binder_test.go b/internal/binder/binder_test.go index 4077489d52..776fc717f0 100644 --- a/internal/binder/binder_test.go +++ b/internal/binder/binder_test.go @@ -27,7 +27,7 @@ func BenchmarkBind(b *testing.B) { sourceFiles := make([]*ast.SourceFile, b.N) for i := range b.N { - sourceFiles[i] = parser.ParseSourceFile(fileName, path, sourceText, sourceAffecting, scanner.JSDocParsingModeParseAll) + sourceFiles[i] = parser.ParseSourceFile(fileName, path, sourceText, sourceAffecting, nil, scanner.JSDocParsingModeParseAll) } // The above parses do a lot of work; ensure GC is finished before we start collecting performance data. diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 87450b16b9..6f1d9f858c 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -527,7 +527,6 @@ type Program interface { GetEmitModuleFormatOfFile(sourceFile *ast.SourceFile) core.ModuleKind GetImpliedNodeFormatForEmit(sourceFile *ast.SourceFile) core.ModuleKind GetResolvedModule(currentSourceFile *ast.SourceFile, moduleReference string) *ast.SourceFile - GetSourceFileMetaData(path tspath.Path) *ast.SourceFileMetaData GetJSXRuntimeImportSpecifier(path tspath.Path) (moduleReference string, specifier *ast.Node) GetImportHelpersImportSpecifier(path tspath.Path) *ast.Node } @@ -10180,7 +10179,7 @@ func (c *Checker) checkNewTargetMetaProperty(node *ast.Node) *Type { func (c *Checker) checkImportMetaProperty(node *ast.Node) *Type { if c.moduleKind == core.ModuleKindNode16 || c.moduleKind == core.ModuleKindNodeNext { - sourceFileMetaData := c.program.GetSourceFileMetaData(ast.GetSourceFileOfNode(node).Path()) + sourceFileMetaData := ast.GetSourceFileOfNode(node).Metadata if sourceFileMetaData == nil || sourceFileMetaData.ImpliedNodeFormat != core.ModuleKindESNext { c.error(node, diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output) } diff --git a/internal/checker/grammarchecks.go b/internal/checker/grammarchecks.go index da139ed53b..08148d9459 100644 --- a/internal/checker/grammarchecks.go +++ b/internal/checker/grammarchecks.go @@ -1212,7 +1212,7 @@ func (c *Checker) checkGrammarForInOrForOfStatement(forInOrOfStatement *ast.ForI } switch c.moduleKind { case core.ModuleKindNode16, core.ModuleKindNodeNext: - sourceFileMetaData := c.program.GetSourceFileMetaData(sourceFile.Path()) + sourceFileMetaData := sourceFile.Metadata if sourceFileMetaData != nil && sourceFileMetaData.ImpliedNodeFormat == core.ModuleKindCommonJS { c.diagnostics.Add(createDiagnosticForNode(forInOrOfStatement.AwaitModifier, diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level)) break @@ -1715,7 +1715,7 @@ func (c *Checker) checkGrammarAwaitOrAwaitUsing(node *ast.Node) bool { switch c.moduleKind { case core.ModuleKindNode16, core.ModuleKindNodeNext: - sourceFileMetaData := c.program.GetSourceFileMetaData(sourceFile.Path()) + sourceFileMetaData := sourceFile.Metadata if sourceFileMetaData != nil && sourceFileMetaData.ImpliedNodeFormat == core.ModuleKindCommonJS { if !spanCalculated { span = scanner.GetRangeOfTokenAtPosition(sourceFile, node.Pos()) diff --git a/internal/compiler/emitHost.go b/internal/compiler/emitHost.go index 8690394062..936394e16f 100644 --- a/internal/compiler/emitHost.go +++ b/internal/compiler/emitHost.go @@ -29,7 +29,6 @@ type EmitHost interface { GetCurrentDirectory() string CommonSourceDirectory() string IsEmitBlocked(file string) bool - GetSourceFileMetaData(path tspath.Path) *ast.SourceFileMetaData GetEmitResolver(file *ast.SourceFile, skipDiagnostics bool) printer.EmitResolver } @@ -110,7 +109,3 @@ func (host *emitHost) GetEmitResolver(file *ast.SourceFile, skipDiagnostics bool defer done() return checker.GetEmitResolver(file, skipDiagnostics) } - -func (host *emitHost) GetSourceFileMetaData(path tspath.Path) *ast.SourceFileMetaData { - return host.program.GetSourceFileMetaData(path) -} diff --git a/internal/compiler/fileloader.go b/internal/compiler/fileloader.go index 4a6c0fde5b..b0f5da2010 100644 --- a/internal/compiler/fileloader.go +++ b/internal/compiler/fileloader.go @@ -40,7 +40,6 @@ type processedFiles struct { files []*ast.SourceFile missingFiles []string resolvedModules map[tspath.Path]module.ModeAwareCache[*module.ResolvedModule] - sourceFileMetaDatas map[tspath.Path]*ast.SourceFileMetaData jsxRuntimeImportSpecifiers map[tspath.Path]*jsxRuntimeImportSpecifier importHelpersImportSpecifiers map[tspath.Path]*ast.Node } @@ -91,7 +90,6 @@ func processAllProgramFiles( libFiles := make([]*ast.SourceFile, 0, totalFileCount) // totalFileCount here since we append files to it later to construct the final list resolvedModules := make(map[tspath.Path]module.ModeAwareCache[*module.ResolvedModule], totalFileCount) - sourceFileMetaDatas := make(map[tspath.Path]*ast.SourceFileMetaData, totalFileCount) var jsxRuntimeImportSpecifiers map[tspath.Path]*jsxRuntimeImportSpecifier var importHelpersImportSpecifiers map[tspath.Path]*ast.Node @@ -108,7 +106,6 @@ func processAllProgramFiles( } path := file.Path() resolvedModules[path] = task.resolutionsInFile - sourceFileMetaDatas[path] = task.metadata if task.jsxRuntimeImportSpecifier != nil { if jsxRuntimeImportSpecifiers == nil { jsxRuntimeImportSpecifiers = make(map[tspath.Path]*jsxRuntimeImportSpecifier, totalFileCount) @@ -129,7 +126,6 @@ func processAllProgramFiles( return processedFiles{ files: allFiles, resolvedModules: resolvedModules, - sourceFileMetaDatas: sourceFileMetaDatas, jsxRuntimeImportSpecifiers: jsxRuntimeImportSpecifiers, importHelpersImportSpecifiers: importHelpersImportSpecifiers, } @@ -235,7 +231,6 @@ type parseTask struct { isLib bool subTasks []*parseTask - metadata *ast.SourceFileMetaData resolutionsInFile module.ModeAwareCache[*module.ResolvedModule] importHelpersImportSpecifier *ast.Node jsxRuntimeImportSpecifier *jsxRuntimeImportSpecifier @@ -254,9 +249,6 @@ func (t *parseTask) start(loader *fileLoader) { } t.file = file - loader.wg.Queue(func() { - t.metadata = loader.loadSourceFileMetaData(file.Path()) - }) // !!! if noResolve, skip all of this t.subTasks = make([]*parseTask, 0, len(file.ReferencedFiles)+len(file.Imports())+len(file.ModuleAugmentations)) @@ -307,7 +299,9 @@ func (p *fileLoader) loadSourceFileMetaData(path tspath.Path) *ast.SourceFileMet func (p *fileLoader) parseSourceFile(fileName string) *ast.SourceFile { path := tspath.ToPath(fileName, p.host.GetCurrentDirectory(), p.host.FS().UseCaseSensitiveFileNames()) - sourceFile := p.host.GetSourceFile(fileName, path) + // TODO(jakebailey): we can do this concurently any time before parse + metadata := p.loadSourceFileMetaData(path) + sourceFile := p.host.GetSourceFile(fileName, path, metadata) return sourceFile } diff --git a/internal/compiler/host.go b/internal/compiler/host.go index 8eaf37d775..93a5dc2151 100644 --- a/internal/compiler/host.go +++ b/internal/compiler/host.go @@ -16,7 +16,7 @@ type CompilerHost interface { GetCurrentDirectory() string NewLine() string Trace(msg string) - GetSourceFile(fileName string, path tspath.Path) *ast.SourceFile + GetSourceFile(fileName string, path tspath.Path, metadata *ast.SourceFileMetaData) *ast.SourceFile } type FileInfo struct { @@ -69,7 +69,7 @@ func (h *compilerHost) Trace(msg string) { //!!! TODO: implement } -func (h *compilerHost) GetSourceFile(fileName string, path tspath.Path) *ast.SourceFile { +func (h *compilerHost) GetSourceFile(fileName string, path tspath.Path, metadata *ast.SourceFileMetaData) *ast.SourceFile { text, _ := h.FS().ReadFile(fileName) if tspath.FileExtensionIs(fileName, tspath.ExtensionJson) { return parser.ParseJSONText(fileName, path, text) @@ -77,5 +77,5 @@ func (h *compilerHost) GetSourceFile(fileName string, path tspath.Path) *ast.Sou if h.options == nil { panic("GetSourceFile called without CompilerOptions set") } - return parser.ParseSourceFile(fileName, path, text, h.options.SourceFileAffecting(), scanner.JSDocParsingModeParseForTypeErrors) + return parser.ParseSourceFile(fileName, path, text, h.options.SourceFileAffecting(), metadata, scanner.JSDocParsingModeParseForTypeErrors) } diff --git a/internal/compiler/program.go b/internal/compiler/program.go index 6bdb43b0ea..5afad96a82 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -234,7 +234,7 @@ func NewProgram(options ProgramOptions) *Program { // In addition to a new program, return a boolean indicating whether the data of the old program was reused. func (p *Program) UpdateProgram(changedFilePath tspath.Path) (*Program, bool) { oldFile := p.filesByPath[changedFilePath] - newFile := p.host.GetSourceFile(oldFile.FileName(), changedFilePath) + newFile := p.host.GetSourceFile(oldFile.FileName(), changedFilePath, oldFile.Metadata) // TODO(jakebailey): metadata could have changed if !canReplaceFileInProgram(oldFile, newFile) { return NewProgram(p.programOptions), false } @@ -286,7 +286,8 @@ func canReplaceFileInProgram(file1 *ast.SourceFile, file2 *ast.SourceFile) bool slices.EqualFunc(file1.ReferencedFiles, file2.ReferencedFiles, equalFileReferences) && slices.EqualFunc(file1.TypeReferenceDirectives, file2.TypeReferenceDirectives, equalFileReferences) && slices.EqualFunc(file1.LibReferenceDirectives, file2.LibReferenceDirectives, equalFileReferences) && - equalCheckJSDirectives(file1.CheckJsDirective, file2.CheckJsDirective) + equalCheckJSDirectives(file1.CheckJsDirective, file2.CheckJsDirective) && + equalMetaData(file1.Metadata, file2.Metadata) } func equalModuleSpecifiers(n1 *ast.Node, n2 *ast.Node) bool { @@ -305,6 +306,10 @@ func equalCheckJSDirectives(d1 *ast.CheckJsDirective, d2 *ast.CheckJsDirective) return d1 == nil && d2 == nil || d1 != nil && d2 != nil && d1.Enabled == d2.Enabled } +func equalMetaData(m1 *ast.SourceFileMetaData, m2 *ast.SourceFileMetaData) bool { + return m1 == nil && m2 == nil || m1 != nil && m2 != nil && *m1 == *m2 +} + func NewProgramFromParsedCommandLine(config *tsoptions.ParsedCommandLine, host CompilerHost) *Program { programOptions := ProgramOptions{ RootFiles: config.FileNames(), @@ -688,20 +693,19 @@ func (p *Program) InstantiationCount() int { return count } -func (p *Program) GetSourceFileMetaData(path tspath.Path) *ast.SourceFileMetaData { - return p.sourceFileMetaDatas[path] -} - func (p *Program) GetEmitModuleFormatOfFile(sourceFile *ast.SourceFile) core.ModuleKind { + // TODO(jakebailey): inline return p.GetEmitModuleFormatOfFileWorker(sourceFile, p.compilerOptions) } func (p *Program) GetEmitModuleFormatOfFileWorker(sourceFile *ast.SourceFile, options *core.CompilerOptions) core.ModuleKind { - return ast.GetEmitModuleFormatOfFileWorker(sourceFile, options, p.GetSourceFileMetaData(sourceFile.Path())) + // TODO(jakebailey): inline + return ast.GetEmitModuleFormatOfFileWorker(sourceFile, options) } func (p *Program) GetImpliedNodeFormatForEmit(sourceFile *ast.SourceFile) core.ResolutionMode { - return ast.GetImpliedNodeFormatForEmitWorker(sourceFile.FileName(), p.compilerOptions, p.GetSourceFileMetaData(sourceFile.Path())) + // TODO(jakebailey): inline + return ast.GetImpliedNodeFormatForEmitWorker(sourceFile, p.compilerOptions.GetEmitModuleKind()) } func (p *Program) CommonSourceDirectory() string { diff --git a/internal/core/compileroptions.go b/internal/core/compileroptions.go index 9c73e6b373..04c0e42412 100644 --- a/internal/core/compileroptions.go +++ b/internal/core/compileroptions.go @@ -338,6 +338,7 @@ type SourceFileAffectingCompilerOptions struct { AllowUnusedLabels Tristate BindInStrictMode bool EmitModuleDetectionKind ModuleDetectionKind + EmitModuleKind ModuleKind EmitScriptTarget ScriptTarget JsxEmit JsxEmit NoFallthroughCasesInSwitch Tristate @@ -351,6 +352,7 @@ func (options *CompilerOptions) SourceFileAffecting() *SourceFileAffectingCompil BindInStrictMode: options.AlwaysStrict.IsTrue() || options.Strict.IsTrue(), EmitModuleDetectionKind: options.GetEmitModuleDetectionKind(), EmitScriptTarget: options.GetEmitScriptTarget(), + EmitModuleKind: options.GetEmitModuleKind(), JsxEmit: options.Jsx, NoFallthroughCasesInSwitch: options.NoFallthroughCasesInSwitch, ShouldPreserveConstEnums: options.ShouldPreserveConstEnums(), diff --git a/internal/parser/parser.go b/internal/parser/parser.go index 886db701be..ec0bcc4c9e 100644 --- a/internal/parser/parser.go +++ b/internal/parser/parser.go @@ -53,6 +53,7 @@ type Parser struct { path tspath.Path sourceText string options *core.SourceFileAffectingCompilerOptions + metadata *ast.SourceFileMetaData languageVersion core.ScriptTarget scriptKind core.ScriptKind languageVariant core.LanguageVariant @@ -97,10 +98,10 @@ func putParser(p *Parser) { parserPool.Put(p) } -func ParseSourceFile(fileName string, path tspath.Path, sourceText string, options *core.SourceFileAffectingCompilerOptions, jsdocParsingMode scanner.JSDocParsingMode) *ast.SourceFile { +func ParseSourceFile(fileName string, path tspath.Path, sourceText string, options *core.SourceFileAffectingCompilerOptions, metadata *ast.SourceFileMetaData, jsdocParsingMode scanner.JSDocParsingMode) *ast.SourceFile { p := getParser() defer putParser(p) - p.initializeState(fileName, path, sourceText, options, core.ScriptKindUnknown, jsdocParsingMode) + p.initializeState(fileName, path, sourceText, options, metadata, core.ScriptKindUnknown, jsdocParsingMode) p.nextToken() return p.parseSourceFileWorker() } @@ -108,7 +109,7 @@ func ParseSourceFile(fileName string, path tspath.Path, sourceText string, optio func ParseJSONText(fileName string, path tspath.Path, sourceText string) *ast.SourceFile { p := getParser() defer putParser(p) - p.initializeState(fileName, path, sourceText, &core.SourceFileAffectingCompilerOptions{EmitScriptTarget: core.ScriptTargetES2015}, core.ScriptKindJSON, scanner.JSDocParsingModeParseAll) + p.initializeState(fileName, path, sourceText, &core.SourceFileAffectingCompilerOptions{EmitScriptTarget: core.ScriptTargetES2015}, nil, core.ScriptKindJSON, scanner.JSDocParsingModeParseAll) p.nextToken() pos := p.nodePos() var statements *ast.NodeList @@ -184,13 +185,13 @@ func ParseJSONText(fileName string, path tspath.Path, sourceText string) *ast.So func ParseIsolatedEntityName(text string, languageVersion core.ScriptTarget) *ast.EntityName { p := getParser() defer putParser(p) - p.initializeState("", "", text, &core.SourceFileAffectingCompilerOptions{EmitScriptTarget: languageVersion}, core.ScriptKindJS, scanner.JSDocParsingModeParseAll) + p.initializeState("", "", text, &core.SourceFileAffectingCompilerOptions{EmitScriptTarget: languageVersion}, nil, core.ScriptKindJS, scanner.JSDocParsingModeParseAll) p.nextToken() entityName := p.parseEntityName(true, nil) return core.IfElse(p.token == ast.KindEndOfFile && len(p.diagnostics) == 0, entityName, nil) } -func (p *Parser) initializeState(fileName string, path tspath.Path, sourceText string, options *core.SourceFileAffectingCompilerOptions, scriptKind core.ScriptKind, jsdocParsingMode scanner.JSDocParsingMode) { +func (p *Parser) initializeState(fileName string, path tspath.Path, sourceText string, options *core.SourceFileAffectingCompilerOptions, metadata *ast.SourceFileMetaData, scriptKind core.ScriptKind, jsdocParsingMode scanner.JSDocParsingMode) { if p.scanner == nil { p.scanner = scanner.NewScanner() } else { @@ -200,6 +201,7 @@ func (p *Parser) initializeState(fileName string, path tspath.Path, sourceText s p.path = path p.sourceText = sourceText p.options = options + p.metadata = metadata p.languageVersion = options.EmitScriptTarget p.scriptKind = ensureScriptKind(fileName, scriptKind) p.languageVariant = ast.GetLanguageVariant(p.scriptKind) @@ -356,16 +358,17 @@ func (p *Parser) finishSourceFile(result *ast.SourceFile, isDeclarationFile bool result.TextCount = p.factory.TextCount() result.IdentifierCount = p.identifierCount result.SetJSDocCache(p.jsdocCache) - result.ExternalModuleIndicator = p.getExternalModuleIndicator(result) // TODO(jakebailey) + result.Metadata = p.metadata + result.ExternalModuleIndicator = getExternalModuleIndicator(result, p.options) } -func (p *Parser) getExternalModuleIndicator(file *ast.SourceFile) *ast.Node { +func getExternalModuleIndicator(file *ast.SourceFile, options *core.SourceFileAffectingCompilerOptions) *ast.Node { // All detection kinds start by checking this. if node := isFileProbablyExternalModule(file); node != nil { return node } - switch p.options.EmitModuleDetectionKind { + switch options.EmitModuleDetectionKind { case core.ModuleDetectionKindForce: // All non-declaration files are modules, declaration files still do the usual isFileProbablyExternalModule if !file.IsDeclarationFile { @@ -379,12 +382,12 @@ func (p *Parser) getExternalModuleIndicator(file *ast.SourceFile) *ast.Node { // If module is nodenext or node16, all esm format files are modules // If jsx is react-jsx or react-jsxdev then jsx tags force module-ness // otherwise, the presence of import or export statments (or import.meta) implies module-ness - if p.options.JsxEmit == core.JsxEmitReactJSX || p.options.JsxEmit == core.JsxEmitReactJSXDev { + if options.JsxEmit == core.JsxEmitReactJSX || options.JsxEmit == core.JsxEmitReactJSXDev { if node := isFileModuleFromUsingJSXTag(file); node != nil { return node } } - return isFileForcedToBeModuleByFormat(file, p.options) + return isFileForcedToBeModuleByFormat(file, options) default: return nil } @@ -428,8 +431,7 @@ func isFileForcedToBeModuleByFormat(file *ast.SourceFile, options *core.SourceFi // Excludes declaration files - they still require an explicit `export {}` or the like // for back compat purposes. The only non-declaration files _not_ forced to be a module are `.js` files // that aren't esm-mode (meaning not in a `type: module` scope). - // !!! TODO: !file.IsDeclarationFile && (getImpliedNodeFormatForEmitWorker(file, options) === ModuleKind.ESNext || ...) - if !file.IsDeclarationFile && tspath.FileExtensionIsOneOf(file.FileName(), isFileForcedToBeModuleByFormatExtensions) { + if !file.IsDeclarationFile && (ast.GetImpliedNodeFormatForEmitWorker(file, options.EmitModuleKind) == core.ModuleKindESNext || tspath.FileExtensionIsOneOf(file.FileName(), isFileForcedToBeModuleByFormatExtensions)) { return file.AsNode() } return nil diff --git a/internal/parser/parser_test.go b/internal/parser/parser_test.go index 95f729a799..e99772f7b1 100644 --- a/internal/parser/parser_test.go +++ b/internal/parser/parser_test.go @@ -40,7 +40,7 @@ func BenchmarkParse(b *testing.B) { b.Run(jsdoc.name, func(b *testing.B) { jsdocMode := jsdoc.mode for b.Loop() { - ParseSourceFile(fileName, path, sourceText, options, jsdocMode) + ParseSourceFile(fileName, path, sourceText, options, nil, jsdocMode) } }) } @@ -137,6 +137,6 @@ func FuzzParser(f *testing.F) { EmitScriptTarget: scriptTarget, } - ParseSourceFile(fileName, path, sourceText, options, jsdocParsingMode) + ParseSourceFile(fileName, path, sourceText, options, nil, jsdocParsingMode) }) } diff --git a/internal/printer/emithost.go b/internal/printer/emithost.go index 3d12e45fe0..834889a8c3 100644 --- a/internal/printer/emithost.go +++ b/internal/printer/emithost.go @@ -3,7 +3,6 @@ package printer import ( "github.com/microsoft/typescript-go/internal/ast" "github.com/microsoft/typescript-go/internal/core" - "github.com/microsoft/typescript-go/internal/tspath" ) type WriteFileData struct { @@ -16,7 +15,6 @@ type WriteFileData struct { // NOTE: EmitHost operations must be thread-safe type EmitHost interface { - SourceFileMetaDataProvider Options() *core.CompilerOptions SourceFiles() []*ast.SourceFile UseCaseSensitiveFileNames() bool @@ -24,6 +22,5 @@ type EmitHost interface { CommonSourceDirectory() string IsEmitBlocked(file string) bool WriteFile(fileName string, text string, writeByteOrderMark bool, relatedSourceFiles []*ast.SourceFile, data *WriteFileData) error - GetSourceFileMetaData(path tspath.Path) *ast.SourceFileMetaData GetEmitResolver(file *ast.SourceFile, skipDiagnostics bool) EmitResolver } diff --git a/internal/printer/sourcefilemetadataprovider.go b/internal/printer/sourcefilemetadataprovider.go deleted file mode 100644 index fbecce9280..0000000000 --- a/internal/printer/sourcefilemetadataprovider.go +++ /dev/null @@ -1,10 +0,0 @@ -package printer - -import ( - "github.com/microsoft/typescript-go/internal/ast" - "github.com/microsoft/typescript-go/internal/tspath" -) - -type SourceFileMetaDataProvider interface { - GetSourceFileMetaData(path tspath.Path) *ast.SourceFileMetaData -} diff --git a/internal/project/documentregistry.go b/internal/project/documentregistry.go index 614241f74e..bc6139ea26 100644 --- a/internal/project/documentregistry.go +++ b/internal/project/documentregistry.go @@ -13,13 +13,15 @@ import ( type registryKey struct { core.SourceFileAffectingCompilerOptions + ast.SourceFileMetaData path tspath.Path scriptKind core.ScriptKind } -func newRegistryKey(options *core.CompilerOptions, path tspath.Path, scriptKind core.ScriptKind) registryKey { +func newRegistryKey(options *core.CompilerOptions, path tspath.Path, scriptKind core.ScriptKind, metadata *ast.SourceFileMetaData) registryKey { return registryKey{ SourceFileAffectingCompilerOptions: *options.SourceFileAffecting(), + SourceFileMetaData: *metadata, path: path, scriptKind: scriptKind, } @@ -54,18 +56,18 @@ type DocumentRegistry struct { // LanguageService instance over time, as well as across multiple instances. Here, we still // reuse files across multiple LanguageServices, but we only reuse them across Program updates // when the files haven't changed. -func (r *DocumentRegistry) AcquireDocument(scriptInfo *ScriptInfo, compilerOptions *core.CompilerOptions, oldSourceFile *ast.SourceFile, oldCompilerOptions *core.CompilerOptions) *ast.SourceFile { - key := newRegistryKey(compilerOptions, scriptInfo.path, scriptInfo.scriptKind) - document := r.getDocumentWorker(scriptInfo, compilerOptions, key) +func (r *DocumentRegistry) AcquireDocument(scriptInfo *ScriptInfo, compilerOptions *core.CompilerOptions, metadata *ast.SourceFileMetaData, oldSourceFile *ast.SourceFile, oldCompilerOptions *core.CompilerOptions) *ast.SourceFile { + key := newRegistryKey(compilerOptions, scriptInfo.path, scriptInfo.scriptKind, metadata) + document := r.getDocumentWorker(scriptInfo, compilerOptions, metadata, key) if oldSourceFile != nil && oldCompilerOptions != nil { - oldKey := newRegistryKey(oldCompilerOptions, scriptInfo.path, oldSourceFile.ScriptKind) + oldKey := newRegistryKey(oldCompilerOptions, scriptInfo.path, oldSourceFile.ScriptKind, oldSourceFile.Metadata) r.releaseDocumentWithKey(oldKey) } return document } func (r *DocumentRegistry) ReleaseDocument(file *ast.SourceFile, compilerOptions *core.CompilerOptions) { - key := newRegistryKey(compilerOptions, file.Path(), file.ScriptKind) + key := newRegistryKey(compilerOptions, file.Path(), file.ScriptKind, file.Metadata) r.releaseDocumentWithKey(key) } @@ -86,6 +88,7 @@ func (r *DocumentRegistry) releaseDocumentWithKey(key registryKey) { func (r *DocumentRegistry) getDocumentWorker( scriptInfo *ScriptInfo, compilerOptions *core.CompilerOptions, + metadata *ast.SourceFileMetaData, key registryKey, ) *ast.SourceFile { scriptInfoVersion := scriptInfo.Version() @@ -94,7 +97,7 @@ func (r *DocumentRegistry) getDocumentWorker( // We have an entry for this file. However, it may be for a different version of // the script snapshot. If so, update it appropriately. if entry.sourceFile.Version != scriptInfoVersion { - sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, compilerOptions.SourceFileAffecting(), scanner.JSDocParsingModeParseAll) + sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, compilerOptions.SourceFileAffecting(), metadata, scanner.JSDocParsingModeParseAll) sourceFile.Version = scriptInfoVersion entry.mu.Lock() defer entry.mu.Unlock() @@ -104,7 +107,7 @@ func (r *DocumentRegistry) getDocumentWorker( return entry.sourceFile } else { // Have never seen this file with these settings. Create a new source file for it. - sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, compilerOptions.SourceFileAffecting(), scanner.JSDocParsingModeParseAll) + sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, &key.SourceFileAffectingCompilerOptions, &key.SourceFileMetaData, scanner.JSDocParsingModeParseAll) sourceFile.Version = scriptInfoVersion entry, _ := r.documents.LoadOrStore(key, ®istryEntry{ sourceFile: sourceFile, diff --git a/internal/project/project.go b/internal/project/project.go index 012ae7cf98..630d37d3b6 100644 --- a/internal/project/project.go +++ b/internal/project/project.go @@ -187,7 +187,7 @@ func (p *Project) GetCompilerOptions() *core.CompilerOptions { } // GetSourceFile implements compiler.CompilerHost. -func (p *Project) GetSourceFile(fileName string, path tspath.Path) *ast.SourceFile { +func (p *Project) GetSourceFile(fileName string, path tspath.Path, metadata *ast.SourceFileMetaData) *ast.SourceFile { scriptKind := p.getScriptKind(fileName) if scriptInfo := p.getOrCreateScriptInfoAndAttachToProject(fileName, scriptKind); scriptInfo != nil { var ( @@ -198,7 +198,7 @@ func (p *Project) GetSourceFile(fileName string, path tspath.Path) *ast.SourceFi oldSourceFile = p.program.GetSourceFileByPath(scriptInfo.path) oldCompilerOptions = p.program.GetCompilerOptions() } - return p.host.DocumentRegistry().AcquireDocument(scriptInfo, p.compilerOptions, oldSourceFile, oldCompilerOptions) + return p.host.DocumentRegistry().AcquireDocument(scriptInfo, p.compilerOptions, metadata, oldSourceFile, oldCompilerOptions) } return nil } diff --git a/internal/testutil/harnessutil/harnessutil.go b/internal/testutil/harnessutil/harnessutil.go index 68786ed663..5831164e0a 100644 --- a/internal/testutil/harnessutil/harnessutil.go +++ b/internal/testutil/harnessutil/harnessutil.go @@ -439,18 +439,20 @@ var sourceFileCache collections.SyncMap[sourceFileCacheKey, *ast.SourceFile] type sourceFileCacheKey struct { core.SourceFileAffectingCompilerOptions + ast.SourceFileMetaData fileName string path tspath.Path languageVersion core.ScriptTarget text string } -func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path) *ast.SourceFile { +func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path, metadata *ast.SourceFileMetaData) *ast.SourceFile { text, _ := h.FS().ReadFile(fileName) sourceAffecting := h.options.SourceFileAffecting() key := sourceFileCacheKey{ SourceFileAffectingCompilerOptions: *sourceAffecting, + SourceFileMetaData: *metadata, fileName: fileName, path: path, text: text, @@ -466,7 +468,7 @@ func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path) *a sourceFile = parser.ParseJSONText(fileName, path, text) } else { // !!! JSDocParsingMode - sourceFile = parser.ParseSourceFile(fileName, path, text, sourceAffecting, scanner.JSDocParsingModeParseAll) + sourceFile = parser.ParseSourceFile(fileName, path, text, sourceAffecting, metadata, scanner.JSDocParsingModeParseAll) } result, _ := sourceFileCache.LoadOrStore(key, sourceFile) diff --git a/internal/testutil/parsetestutil/parsetestutil.go b/internal/testutil/parsetestutil/parsetestutil.go index 84814ccec4..76833960d0 100644 --- a/internal/testutil/parsetestutil/parsetestutil.go +++ b/internal/testutil/parsetestutil/parsetestutil.go @@ -19,7 +19,7 @@ var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ // Simplifies parsing an input string into a SourceFile for testing purposes. func ParseTypeScript(text string, jsx bool) *ast.SourceFile { fileName := core.IfElse(jsx, "/main.tsx", "/main.ts") - file := parser.ParseSourceFile(fileName, tspath.Path(fileName), text, parseCompilerOptions, scanner.JSDocParsingModeParseNone) + file := parser.ParseSourceFile(fileName, tspath.Path(fileName), text, parseCompilerOptions, nil, scanner.JSDocParsingModeParseNone) ast.SetParentInChildren(file.AsNode()) return file } diff --git a/internal/testutil/tsbaseline/js_emit_baseline.go b/internal/testutil/tsbaseline/js_emit_baseline.go index a238dbc978..e542c51fa8 100644 --- a/internal/testutil/tsbaseline/js_emit_baseline.go +++ b/internal/testutil/tsbaseline/js_emit_baseline.go @@ -66,7 +66,9 @@ func DoJSEmitBaseline( tspath.Path(file.UnitName), file.Content, options.SourceFileAffecting(), - scanner.JSDocParsingModeParseAll) + nil, // TODO(jakebailey): what should this be? + scanner.JSDocParsingModeParseAll, + ) if len(fileParseResult.Diagnostics()) > 0 { jsCode.WriteString(getErrorBaseline(t, []*harnessutil.TestFile{file}, fileParseResult.Diagnostics(), false /*pretty*/)) continue diff --git a/internal/transformers/commonjsmodule.go b/internal/transformers/commonjsmodule.go index a13ebd1448..90a876db1d 100644 --- a/internal/transformers/commonjsmodule.go +++ b/internal/transformers/commonjsmodule.go @@ -12,26 +12,25 @@ import ( type CommonJSModuleTransformer struct { Transformer - topLevelVisitor *ast.NodeVisitor // visits statements at top level of a module - topLevelNestedVisitor *ast.NodeVisitor // visits nested statements at top level of a module - discardedValueVisitor *ast.NodeVisitor // visits expressions whose values would be discarded at runtime - assignmentPatternVisitor *ast.NodeVisitor // visits assignment patterns in a destructuring assignment - compilerOptions *core.CompilerOptions - resolver binder.ReferenceResolver - sourceFileMetaDataProvider printer.SourceFileMetaDataProvider - moduleKind core.ModuleKind - languageVersion core.ScriptTarget - currentSourceFile *ast.SourceFile - currentModuleInfo *externalModuleInfo - parentNode *ast.Node // used for ancestor tracking via pushNode/popNode to detect expression identifiers - currentNode *ast.Node // used for ancestor tracking via pushNode/popNode to detect expression identifiers -} - -func NewCommonJSModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver, sourceFileMetaDataProvider printer.SourceFileMetaDataProvider) *Transformer { + topLevelVisitor *ast.NodeVisitor // visits statements at top level of a module + topLevelNestedVisitor *ast.NodeVisitor // visits nested statements at top level of a module + discardedValueVisitor *ast.NodeVisitor // visits expressions whose values would be discarded at runtime + assignmentPatternVisitor *ast.NodeVisitor // visits assignment patterns in a destructuring assignment + compilerOptions *core.CompilerOptions + resolver binder.ReferenceResolver + moduleKind core.ModuleKind + languageVersion core.ScriptTarget + currentSourceFile *ast.SourceFile + currentModuleInfo *externalModuleInfo + parentNode *ast.Node // used for ancestor tracking via pushNode/popNode to detect expression identifiers + currentNode *ast.Node // used for ancestor tracking via pushNode/popNode to detect expression identifiers +} + +func NewCommonJSModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver) *Transformer { if resolver == nil { resolver = binder.NewReferenceResolver(compilerOptions, binder.ReferenceResolverHooks{}) } - tx := &CommonJSModuleTransformer{compilerOptions: compilerOptions, resolver: resolver, sourceFileMetaDataProvider: sourceFileMetaDataProvider} + tx := &CommonJSModuleTransformer{compilerOptions: compilerOptions, resolver: resolver} tx.topLevelVisitor = emitContext.NewNodeVisitor(tx.visitTopLevel) tx.topLevelNestedVisitor = emitContext.NewNodeVisitor(tx.visitTopLevelNested) tx.discardedValueVisitor = emitContext.NewNodeVisitor(tx.visitDiscardedValue) @@ -363,7 +362,7 @@ func (tx *CommonJSModuleTransformer) transformCommonJSModule(node *ast.SourceFil result := tx.factory.UpdateSourceFile(node, statementList).AsSourceFile() tx.emitContext.AddEmitHelper(result.AsNode(), tx.emitContext.ReadEmitHelpers()...) - externalHelpersImportDeclaration := createExternalHelpersImportDeclarationIfNeeded(tx.emitContext, result, tx.compilerOptions, tx.sourceFileMetaDataProvider, false /*hasExportStarsToExportValues*/, false /*hasImportStar*/, false /*hasImportDefault*/) + externalHelpersImportDeclaration := createExternalHelpersImportDeclarationIfNeeded(tx.emitContext, result, tx.compilerOptions, false /*hasExportStarsToExportValues*/, false /*hasImportStar*/, false /*hasImportDefault*/) if externalHelpersImportDeclaration != nil { prologue, rest := tx.factory.SplitStandardPrologue(result.Statements.Nodes) custom, rest := tx.factory.SplitCustomPrologue(rest) @@ -1671,7 +1670,7 @@ func (tx *CommonJSModuleTransformer) visitCallExpression(node *ast.CallExpressio func (tx *CommonJSModuleTransformer) shouldTransformImportCall() bool { // !!! host.shouldTransformImportCall? - return shouldTransformImportCallWorker(tx.currentSourceFile, tx.compilerOptions, tx.sourceFileMetaDataProvider.GetSourceFileMetaData(tx.currentSourceFile.Path())) + return shouldTransformImportCallWorker(tx.currentSourceFile, tx.compilerOptions) } func (tx *CommonJSModuleTransformer) visitImportCallExpression(node *ast.CallExpression, rewriteOrShim bool) *ast.Node { @@ -1989,10 +1988,10 @@ func (tx *CommonJSModuleTransformer) getExports(name *ast.IdentifierNode) []*ast return nil } -func shouldTransformImportCallWorker(sourceFile *ast.SourceFile, options *core.CompilerOptions, sourceFileMetaData *ast.SourceFileMetaData) bool { +func shouldTransformImportCallWorker(sourceFile *ast.SourceFile, options *core.CompilerOptions) bool { moduleKind := options.GetEmitModuleKind() if core.ModuleKindNode16 <= moduleKind && moduleKind <= core.ModuleKindNodeNext || moduleKind == core.ModuleKindPreserve { return false } - return ast.GetEmitModuleFormatOfFileWorker(sourceFile, options, sourceFileMetaData) < core.ModuleKindES2015 + return ast.GetEmitModuleFormatOfFileWorker(sourceFile, options) < core.ModuleKindES2015 } diff --git a/internal/transformers/commonjsmodule_test.go b/internal/transformers/commonjsmodule_test.go index f9d2bda37f..c36b885079 100644 --- a/internal/transformers/commonjsmodule_test.go +++ b/internal/transformers/commonjsmodule_test.go @@ -9,15 +9,8 @@ import ( "github.com/microsoft/typescript-go/internal/printer" "github.com/microsoft/typescript-go/internal/testutil/emittestutil" "github.com/microsoft/typescript-go/internal/testutil/parsetestutil" - "github.com/microsoft/typescript-go/internal/tspath" ) -type fakeSourceFileMetaDataProvider struct{} - -func (p *fakeSourceFileMetaDataProvider) GetSourceFileMetaData(path tspath.Path) *ast.SourceFileMetaData { - return nil -} - func TestCommonJSModuleTransformer(t *testing.T) { t.Parallel() data := []struct { @@ -1035,10 +1028,9 @@ exports.a = a;`, emitContext := printer.NewEmitContext() resolver := binder.NewReferenceResolver(&compilerOptions, binder.ReferenceResolverHooks{}) - program := &fakeSourceFileMetaDataProvider{} file = NewRuntimeSyntaxTransformer(emitContext, &compilerOptions, resolver).TransformSourceFile(file) - file = NewCommonJSModuleTransformer(emitContext, &compilerOptions, resolver, program).TransformSourceFile(file) + file = NewCommonJSModuleTransformer(emitContext, &compilerOptions, resolver).TransformSourceFile(file) emittestutil.CheckEmit(t, emitContext, file, rec.output) }) } diff --git a/internal/transformers/esmodule.go b/internal/transformers/esmodule.go index c7d85b6064..39000dbd1e 100644 --- a/internal/transformers/esmodule.go +++ b/internal/transformers/esmodule.go @@ -11,12 +11,11 @@ import ( type ESModuleTransformer struct { Transformer - compilerOptions *core.CompilerOptions - resolver binder.ReferenceResolver - sourceFileMetaDataProvider printer.SourceFileMetaDataProvider - currentSourceFile *ast.SourceFile - importRequireStatements *importRequireStatements - helperNameSubstitutions map[string]*ast.IdentifierNode + compilerOptions *core.CompilerOptions + resolver binder.ReferenceResolver + currentSourceFile *ast.SourceFile + importRequireStatements *importRequireStatements + helperNameSubstitutions map[string]*ast.IdentifierNode } type importRequireStatements struct { @@ -24,11 +23,11 @@ type importRequireStatements struct { requireHelperName *ast.IdentifierNode } -func NewESModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver, sourceFileMetaDataProvider printer.SourceFileMetaDataProvider) *Transformer { +func NewESModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver) *Transformer { if resolver == nil { resolver = binder.NewReferenceResolver(compilerOptions, binder.ReferenceResolverHooks{}) } - tx := &ESModuleTransformer{compilerOptions: compilerOptions, resolver: resolver, sourceFileMetaDataProvider: sourceFileMetaDataProvider} + tx := &ESModuleTransformer{compilerOptions: compilerOptions, resolver: resolver} return tx.NewTransformer(tx.visit, emitContext) } @@ -65,7 +64,7 @@ func (tx *ESModuleTransformer) visitSourceFile(node *ast.SourceFile) *ast.Node { result := tx.visitor.VisitEachChild(node.AsNode()).AsSourceFile() tx.emitContext.AddEmitHelper(result.AsNode(), tx.emitContext.ReadEmitHelpers()...) - externalHelpersImportDeclaration := createExternalHelpersImportDeclarationIfNeeded(tx.emitContext, result, tx.compilerOptions, tx.sourceFileMetaDataProvider, false /*hasExportStarsToExportValues*/, false /*hasImportStar*/, false /*hasImportDefault*/) + externalHelpersImportDeclaration := createExternalHelpersImportDeclarationIfNeeded(tx.emitContext, result, tx.compilerOptions, false /*hasExportStarsToExportValues*/, false /*hasImportStar*/, false /*hasImportDefault*/) if externalHelpersImportDeclaration != nil || tx.importRequireStatements != nil { prologue, rest := tx.factory.SplitStandardPrologue(result.Statements.Nodes) statements := slices.Clone(prologue) diff --git a/internal/transformers/esmodule_test.go b/internal/transformers/esmodule_test.go index 2e3df4686e..f8b8d0d085 100644 --- a/internal/transformers/esmodule_test.go +++ b/internal/transformers/esmodule_test.go @@ -234,10 +234,8 @@ var __rewriteRelativeImportExtension;`, emitContext := printer.NewEmitContext() resolver := binder.NewReferenceResolver(&compilerOptions, binder.ReferenceResolverHooks{}) - program := &fakeSourceFileMetaDataProvider{} - file = NewRuntimeSyntaxTransformer(emitContext, &compilerOptions, resolver).TransformSourceFile(file) - file = NewESModuleTransformer(emitContext, &compilerOptions, resolver, program).TransformSourceFile(file) + file = NewESModuleTransformer(emitContext, &compilerOptions, resolver).TransformSourceFile(file) emittestutil.CheckEmit(t, emitContext, file, rec.output) }) } diff --git a/internal/transformers/externalmoduleinfo.go b/internal/transformers/externalmoduleinfo.go index 863c7c35ea..9f7a8059df 100644 --- a/internal/transformers/externalmoduleinfo.go +++ b/internal/transformers/externalmoduleinfo.go @@ -246,10 +246,11 @@ func (c *externalModuleInfoCollector) collectExportedVariableInfo(decl *ast.Node const externalHelpersModuleNameText = "tslib" -func createExternalHelpersImportDeclarationIfNeeded(emitContext *printer.EmitContext, sourceFile *ast.SourceFile, compilerOptions *core.CompilerOptions, sourceFileMetaDataProvider printer.SourceFileMetaDataProvider, hasExportStarsToExportValues bool, hasImportStar bool, hasImportDefault bool) *ast.Node /*ImportDeclaration | ImportEqualsDeclaration*/ { +func createExternalHelpersImportDeclarationIfNeeded(emitContext *printer.EmitContext, sourceFile *ast.SourceFile, compilerOptions *core.CompilerOptions, hasExportStarsToExportValues bool, hasImportStar bool, hasImportDefault bool) *ast.Node /*ImportDeclaration | ImportEqualsDeclaration*/ { if compilerOptions.ImportHelpers.IsTrue() && ast.IsEffectiveExternalModule(sourceFile, compilerOptions) { moduleKind := compilerOptions.GetEmitModuleKind() - impliedModuleKind := ast.GetImpliedNodeFormatForEmitWorker(sourceFile.FileName(), compilerOptions, sourceFileMetaDataProvider.GetSourceFileMetaData(sourceFile.Path())) + // TODO(jakebailey): we've already done this; maybe save in the source file? + impliedModuleKind := ast.GetImpliedNodeFormatForEmitWorker(sourceFile, moduleKind) helpers := getImportedHelpers(emitContext, sourceFile) if (moduleKind >= core.ModuleKindES2015 && moduleKind <= core.ModuleKindESNext) || impliedModuleKind == core.ModuleKindESNext || @@ -291,7 +292,7 @@ func createExternalHelpersImportDeclarationIfNeeded(emitContext *printer.EmitCon } } else { // When we emit to a non-ES module, generate a synthetic `import tslib = require("tslib")` to be further transformed. - externalHelpersModuleName := getOrCreateExternalHelpersModuleNameIfNeeded(emitContext, sourceFile, compilerOptions, helpers, hasExportStarsToExportValues, hasImportStar || hasImportDefault, sourceFileMetaDataProvider.GetSourceFileMetaData(sourceFile.Path())) + externalHelpersModuleName := getOrCreateExternalHelpersModuleNameIfNeeded(emitContext, sourceFile, compilerOptions, helpers, hasExportStarsToExportValues, hasImportStar || hasImportDefault) if externalHelpersModuleName != nil { externalHelpersImportDeclaration := emitContext.Factory.NewImportEqualsDeclaration( nil, /*modifiers*/ @@ -317,7 +318,7 @@ func getImportedHelpers(emitContext *printer.EmitContext, sourceFile *ast.Source return helpers } -func getOrCreateExternalHelpersModuleNameIfNeeded(emitContext *printer.EmitContext, node *ast.SourceFile, compilerOptions *core.CompilerOptions, helpers []*printer.EmitHelper, hasExportStarsToExportValues bool, hasImportStarOrImportDefault bool, sourceFileMetaData *ast.SourceFileMetaData) *ast.IdentifierNode { +func getOrCreateExternalHelpersModuleNameIfNeeded(emitContext *printer.EmitContext, node *ast.SourceFile, compilerOptions *core.CompilerOptions, helpers []*printer.EmitHelper, hasExportStarsToExportValues bool, hasImportStarOrImportDefault bool) *ast.IdentifierNode { externalHelpersModuleName := emitContext.GetExternalHelpersModuleName(node) if externalHelpersModuleName != nil { return externalHelpersModuleName @@ -325,7 +326,7 @@ func getOrCreateExternalHelpersModuleNameIfNeeded(emitContext *printer.EmitConte create := len(helpers) > 0 || (hasExportStarsToExportValues || compilerOptions.GetESModuleInterop() && hasImportStarOrImportDefault) && - ast.GetEmitModuleFormatOfFileWorker(node, compilerOptions, sourceFileMetaData) < core.ModuleKindSystem + ast.GetEmitModuleFormatOfFileWorker(node, compilerOptions) < core.ModuleKindSystem if create { externalHelpersModuleName = emitContext.Factory.NewUniqueName(externalHelpersModuleNameText) diff --git a/internal/transformers/impliedmodule.go b/internal/transformers/impliedmodule.go index 011239bdb1..df50386396 100644 --- a/internal/transformers/impliedmodule.go +++ b/internal/transformers/impliedmodule.go @@ -9,18 +9,17 @@ import ( type ImpliedModuleTransformer struct { Transformer - compilerOptions *core.CompilerOptions - resolver binder.ReferenceResolver - sourceFileMetaDataProvider printer.SourceFileMetaDataProvider - cjsTransformer *Transformer - esmTransformer *Transformer + compilerOptions *core.CompilerOptions + resolver binder.ReferenceResolver + cjsTransformer *Transformer + esmTransformer *Transformer } -func NewImpliedModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver, sourceFileMetaDataProvider printer.SourceFileMetaDataProvider) *Transformer { +func NewImpliedModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver) *Transformer { if resolver == nil { resolver = binder.NewReferenceResolver(compilerOptions, binder.ReferenceResolverHooks{}) } - tx := &ImpliedModuleTransformer{compilerOptions: compilerOptions, resolver: resolver, sourceFileMetaDataProvider: sourceFileMetaDataProvider} + tx := &ImpliedModuleTransformer{compilerOptions: compilerOptions, resolver: resolver} return tx.NewTransformer(tx.visit, emitContext) } @@ -42,12 +41,12 @@ func (tx *ImpliedModuleTransformer) visitSourceFile(node *ast.SourceFile) *ast.N var transformer *Transformer if format >= core.ModuleKindES2015 { if tx.esmTransformer == nil { - tx.esmTransformer = NewESModuleTransformer(tx.emitContext, tx.compilerOptions, tx.resolver, tx.sourceFileMetaDataProvider) + tx.esmTransformer = NewESModuleTransformer(tx.emitContext, tx.compilerOptions, tx.resolver) } transformer = tx.esmTransformer } else { if tx.cjsTransformer == nil { - tx.cjsTransformer = NewCommonJSModuleTransformer(tx.emitContext, tx.compilerOptions, tx.resolver, tx.sourceFileMetaDataProvider) + tx.cjsTransformer = NewCommonJSModuleTransformer(tx.emitContext, tx.compilerOptions, tx.resolver) } transformer = tx.cjsTransformer } @@ -57,5 +56,6 @@ func (tx *ImpliedModuleTransformer) visitSourceFile(node *ast.SourceFile) *ast.N func (tx *ImpliedModuleTransformer) getEmitModuleFormatOfFile(node *ast.SourceFile) core.ModuleKind { // !!! host.getEmitModuleFormatOfFile? - return ast.GetEmitModuleFormatOfFileWorker(node, tx.compilerOptions, tx.sourceFileMetaDataProvider.GetSourceFileMetaData(node.Path())) + // TODO(jakebailey): inline + return ast.GetEmitModuleFormatOfFileWorker(node, tx.compilerOptions) } diff --git a/internal/transformers/importelision_test.go b/internal/transformers/importelision_test.go index 90ede0aa18..f092ef6a3f 100644 --- a/internal/transformers/importelision_test.go +++ b/internal/transformers/importelision_test.go @@ -91,10 +91,6 @@ func (p *fakeProgram) GetResolvedModule(currentSourceFile *ast.SourceFile, modul return p.getResolvedModule(currentSourceFile, moduleReference) } -func (p *fakeProgram) GetSourceFileMetaData(path tspath.Path) *ast.SourceFileMetaData { - return nil -} - func (p *fakeProgram) GetImportHelpersImportSpecifier(path tspath.Path) *ast.Node { return nil } diff --git a/internal/transformers/transformer.go b/internal/transformers/transformer.go index 3e5d5b3005..6866a8ace4 100644 --- a/internal/transformers/transformer.go +++ b/internal/transformers/transformer.go @@ -42,11 +42,11 @@ func (tx *Transformer) TransformSourceFile(file *ast.SourceFile) *ast.SourceFile return tx.visitor.VisitSourceFile(file) } -func getModuleTransformer(emitContext *printer.EmitContext, options *core.CompilerOptions, resolver binder.ReferenceResolver, sourceFileMetaDataProvider printer.SourceFileMetaDataProvider) *Transformer { +func getModuleTransformer(emitContext *printer.EmitContext, options *core.CompilerOptions, resolver binder.ReferenceResolver) *Transformer { switch options.GetEmitModuleKind() { case core.ModuleKindPreserve: // `ESModuleTransformer` contains logic for preserving CJS input syntax in `--module preserve` - return NewESModuleTransformer(emitContext, options, resolver, sourceFileMetaDataProvider) + return NewESModuleTransformer(emitContext, options, resolver) case core.ModuleKindESNext, core.ModuleKindES2022, @@ -55,10 +55,10 @@ func getModuleTransformer(emitContext *printer.EmitContext, options *core.Compil core.ModuleKindNode16, core.ModuleKindNodeNext, core.ModuleKindCommonJS: - return NewImpliedModuleTransformer(emitContext, options, resolver, sourceFileMetaDataProvider) + return NewImpliedModuleTransformer(emitContext, options, resolver) default: - return NewCommonJSModuleTransformer(emitContext, options, resolver, sourceFileMetaDataProvider) + return NewCommonJSModuleTransformer(emitContext, options, resolver) } } @@ -106,6 +106,6 @@ func GetScriptTransformers(emitContext *printer.EmitContext, host printer.EmitHo // !!! transform other language targets // transform module syntax - tx = append(tx, getModuleTransformer(emitContext, options, referenceResolver, host)) + tx = append(tx, getModuleTransformer(emitContext, options, referenceResolver)) return tx } From 3e4b89db8e3c6d76c0a9cafb47dd15cc2914665e Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 29 May 2025 15:55:47 -0700 Subject: [PATCH 08/12] Fix --- internal/project/documentregistry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/project/documentregistry.go b/internal/project/documentregistry.go index bc6139ea26..3a2088fa87 100644 --- a/internal/project/documentregistry.go +++ b/internal/project/documentregistry.go @@ -107,7 +107,7 @@ func (r *DocumentRegistry) getDocumentWorker( return entry.sourceFile } else { // Have never seen this file with these settings. Create a new source file for it. - sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, &key.SourceFileAffectingCompilerOptions, &key.SourceFileMetaData, scanner.JSDocParsingModeParseAll) + sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, compilerOptions.SourceFileAffecting(), metadata, scanner.JSDocParsingModeParseAll) sourceFile.Version = scriptInfoVersion entry, _ := r.documents.LoadOrStore(key, ®istryEntry{ sourceFile: sourceFile, From c99d9059f9c2ff63fff18d3458d080cd8c887622 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 29 May 2025 16:06:40 -0700 Subject: [PATCH 09/12] Consolidate --- internal/checker/checker.go | 24 +++++++++++++++--------- internal/checker/grammarchecks.go | 4 ++-- internal/checker/nodebuilderimpl.go | 4 ++-- internal/compiler/program.go | 15 --------------- 4 files changed, 19 insertions(+), 28 deletions(-) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 6f1d9f858c..47f3d7b703 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -524,8 +524,6 @@ type Program interface { Options() *core.CompilerOptions SourceFiles() []*ast.SourceFile BindSourceFiles() - GetEmitModuleFormatOfFile(sourceFile *ast.SourceFile) core.ModuleKind - GetImpliedNodeFormatForEmit(sourceFile *ast.SourceFile) core.ModuleKind GetResolvedModule(currentSourceFile *ast.SourceFile, moduleReference string) *ast.SourceFile GetJSXRuntimeImportSpecifier(path tspath.Path) (moduleReference string, specifier *ast.Node) GetImportHelpersImportSpecifier(path tspath.Path) *ast.Node @@ -4869,7 +4867,7 @@ func (c *Checker) checkModuleDeclaration(node *ast.Node) { } } } - if c.compilerOptions.VerbatimModuleSyntax.IsTrue() && ast.IsSourceFile(node.Parent) && node.ModifierFlags()&ast.ModifierFlagsExport != 0 && c.program.GetEmitModuleFormatOfFile(node.Parent.AsSourceFile()) == core.ModuleKindCommonJS { + if c.compilerOptions.VerbatimModuleSyntax.IsTrue() && ast.IsSourceFile(node.Parent) && node.ModifierFlags()&ast.ModifierFlagsExport != 0 && c.getEmitModuleFormatOfFile(node.Parent.AsSourceFile()) == core.ModuleKindCommonJS { exportModifier := core.Find(node.ModifierNodes(), func(m *ast.Node) bool { return m.Kind == ast.KindExportKeyword }) c.error(exportModifier, diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled) } @@ -5268,7 +5266,7 @@ func (c *Checker) checkExportAssignment(node *ast.Node) { if !c.checkGrammarModifiers(node) && ast.IsExportAssignment(node) && node.AsExportAssignment().Modifiers() != nil { c.grammarErrorOnFirstToken(node, diagnostics.An_export_assignment_cannot_have_modifiers) } - isIllegalExportDefaultInCJS := !isExportEquals && node.Flags&ast.NodeFlagsAmbient == 0 && c.compilerOptions.VerbatimModuleSyntax.IsTrue() && c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS + isIllegalExportDefaultInCJS := !isExportEquals && node.Flags&ast.NodeFlagsAmbient == 0 && c.compilerOptions.VerbatimModuleSyntax.IsTrue() && c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS if ast.IsIdentifier(node.Expression()) { id := node.Expression() sym := c.getExportSymbolOfValueSymbolIfExported(c.resolveEntityName(id, ast.SymbolFlagsAll, true /*ignoreErrors*/, true /*dontResolveAlias*/, node)) @@ -5328,7 +5326,7 @@ func (c *Checker) checkExportAssignment(node *ast.Node) { } if isExportEquals { // Forbid export= in esm implementation files, and esm mode declaration files - if c.moduleKind >= core.ModuleKindES2015 && c.moduleKind != core.ModuleKindPreserve && ((node.Flags&ast.NodeFlagsAmbient != 0 && c.program.GetImpliedNodeFormatForEmit(ast.GetSourceFileOfNode(node)) == core.ModuleKindESNext) || (node.Flags&ast.NodeFlagsAmbient == 0 && c.program.GetImpliedNodeFormatForEmit(ast.GetSourceFileOfNode(node)) != core.ModuleKindCommonJS)) { + if c.moduleKind >= core.ModuleKindES2015 && c.moduleKind != core.ModuleKindPreserve && ((node.Flags&ast.NodeFlagsAmbient != 0 && c.getImpliedNodeFormatForEmit(ast.GetSourceFileOfNode(node)) == core.ModuleKindESNext) || (node.Flags&ast.NodeFlagsAmbient == 0 && c.getImpliedNodeFormatForEmit(ast.GetSourceFileOfNode(node)) != core.ModuleKindCommonJS)) { // export assignment is not supported in es6 modules c.grammarErrorOnNode(node, diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead) } else if c.moduleKind == core.ModuleKindSystem && node.Flags&ast.NodeFlagsAmbient == 0 { @@ -6378,9 +6376,9 @@ func (c *Checker) checkAliasSymbol(node *ast.Node) { } } } - if c.compilerOptions.VerbatimModuleSyntax.IsTrue() && !ast.IsImportEqualsDeclaration(node) && !ast.IsVariableDeclarationInitializedToRequire(node) && c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { + if c.compilerOptions.VerbatimModuleSyntax.IsTrue() && !ast.IsImportEqualsDeclaration(node) && !ast.IsVariableDeclarationInitializedToRequire(node) && c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { c.error(node, diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled) - } else if c.moduleKind == core.ModuleKindPreserve && !ast.IsImportEqualsDeclaration(node) && !ast.IsVariableDeclaration(node) && c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { + } else if c.moduleKind == core.ModuleKindPreserve && !ast.IsImportEqualsDeclaration(node) && !ast.IsVariableDeclaration(node) && c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { // In `--module preserve`, ESM input syntax emits ESM output syntax, but there will be times // when we look at the `impliedNodeFormat` of this file and decide it's CommonJS (i.e., currently, // only if the file extension is .cjs/.cts). To avoid that inconsistency, we disallow ESM syntax @@ -9968,7 +9966,7 @@ func (c *Checker) checkCollisionsForDeclarationName(node *ast.Node, name *ast.No func (c *Checker) checkCollisionWithRequireExportsInGeneratedCode(node *ast.Node, name *ast.Node) { // No need to check for require or exports for ES6 modules and later - if c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) >= core.ModuleKindES2015 { + if c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) >= core.ModuleKindES2015 { return } if name == nil || !c.needCollisionCheckForIdentifier(node, name, "require") && !c.needCollisionCheckForIdentifier(node, name, "exports") { @@ -14008,7 +14006,7 @@ func (c *Checker) canHaveSyntheticDefault(file *ast.Node, moduleSymbol *ast.Symb usageMode = c.getEmitSyntaxForModuleSpecifierExpression(usage) } if file != nil && usageMode != core.ModuleKindNone { - targetMode := c.program.GetImpliedNodeFormatForEmit(file.AsSourceFile()) + targetMode := c.getImpliedNodeFormatForEmit(file.AsSourceFile()) if usageMode == core.ModuleKindESNext && targetMode == core.ModuleKindCommonJS && core.ModuleKindNode16 <= c.moduleKind && c.moduleKind <= core.ModuleKindNodeNext { // In Node.js, CommonJS modules always have a synthetic default when imported into ESM return true @@ -30002,3 +30000,11 @@ func (c *Checker) GetEmitResolver(file *ast.SourceFile, skipDiagnostics bool) *e func (c *Checker) GetAliasedSymbol(symbol *ast.Symbol) *ast.Symbol { return c.resolveAlias(symbol) } + +func (c *Checker) getEmitModuleFormatOfFile(sourceFile *ast.SourceFile) core.ModuleKind { + return ast.GetEmitModuleFormatOfFileWorker(sourceFile, c.compilerOptions) +} + +func (c *Checker) getImpliedNodeFormatForEmit(sourceFile *ast.SourceFile) core.ResolutionMode { + return ast.GetImpliedNodeFormatForEmitWorker(sourceFile, c.compilerOptions.GetEmitModuleKind()) +} diff --git a/internal/checker/grammarchecks.go b/internal/checker/grammarchecks.go index 08148d9459..cf3d48ac8b 100644 --- a/internal/checker/grammarchecks.go +++ b/internal/checker/grammarchecks.go @@ -389,7 +389,7 @@ func (c *Checker) checkGrammarModifiers(node *ast.Node /*Union[HasModifiers, Has } flags |= ast.ModifierFlagsReadonly case ast.KindExportKeyword: - if c.compilerOptions.VerbatimModuleSyntax == core.TSTrue && node.Flags&ast.NodeFlagsAmbient == 0 && node.Kind != ast.KindTypeAliasDeclaration && node.Kind != ast.KindInterfaceDeclaration && node.Kind != ast.KindModuleDeclaration && node.Parent.Kind == ast.KindSourceFile && c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { + if c.compilerOptions.VerbatimModuleSyntax == core.TSTrue && node.Flags&ast.NodeFlagsAmbient == 0 && node.Kind != ast.KindTypeAliasDeclaration && node.Kind != ast.KindInterfaceDeclaration && node.Kind != ast.KindModuleDeclaration && node.Parent.Kind == ast.KindSourceFile && c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { return c.grammarErrorOnNode(modifier, diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled) } if flags&ast.ModifierFlagsExport != 0 { @@ -1611,7 +1611,7 @@ func (c *Checker) checkGrammarVariableDeclaration(node *ast.VariableDeclaration) return c.grammarErrorOnNode(node.ExclamationToken, message) } - if c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node.AsNode())) < core.ModuleKindSystem && (node.Parent.Parent.Flags&ast.NodeFlagsAmbient == 0) && ast.HasSyntacticModifier(node.Parent.Parent, ast.ModifierFlagsExport) { + if c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node.AsNode())) < core.ModuleKindSystem && (node.Parent.Parent.Flags&ast.NodeFlagsAmbient == 0) && ast.HasSyntacticModifier(node.Parent.Parent, ast.ModifierFlagsExport) { c.checkGrammarForEsModuleMarkerInBindingName(node.Name()) } diff --git a/internal/checker/nodebuilderimpl.go b/internal/checker/nodebuilderimpl.go index fe3a665e88..95f0c9b389 100644 --- a/internal/checker/nodebuilderimpl.go +++ b/internal/checker/nodebuilderimpl.go @@ -435,7 +435,7 @@ func (b *nodeBuilderImpl) symbolToTypeNode(symbol *ast.Symbol, mask ast.SymbolFl var attributes *ast.Node if b.ch.compilerOptions.GetModuleResolutionKind() == core.ModuleResolutionKindNode16 || b.ch.compilerOptions.GetModuleResolutionKind() == core.ModuleResolutionKindNodeNext { // An `import` type directed at an esm format file is only going to resolve in esm mode - set the esm mode assertion - if targetFile != nil && contextFile != nil && b.ch.program.GetEmitModuleFormatOfFile(targetFile) == core.ModuleKindESNext && b.ch.program.GetEmitModuleFormatOfFile(targetFile) != b.ch.program.GetEmitModuleFormatOfFile(contextFile) { + if targetFile != nil && contextFile != nil && b.ch.getEmitModuleFormatOfFile(targetFile) == core.ModuleKindESNext && b.ch.getEmitModuleFormatOfFile(targetFile) != b.ch.getEmitModuleFormatOfFile(contextFile) { specifier = b.getSpecifierForModuleSymbol(chain[0], core.ModuleKindESNext) attributes = b.f.NewImportAttributes( ast.KindWithKeyword, @@ -453,7 +453,7 @@ func (b *nodeBuilderImpl) symbolToTypeNode(symbol *ast.Symbol, mask ast.SymbolFl if b.ch.compilerOptions.GetModuleResolutionKind() == core.ModuleResolutionKindNode16 || b.ch.compilerOptions.GetModuleResolutionKind() == core.ModuleResolutionKindNodeNext { // We might be able to write a portable import type using a mode override; try specifier generation again, but with a different mode set swappedMode := core.ModuleKindESNext - if b.ch.program.GetEmitModuleFormatOfFile(contextFile) == core.ModuleKindESNext { + if b.ch.getEmitModuleFormatOfFile(contextFile) == core.ModuleKindESNext { swappedMode = core.ModuleKindCommonJS } specifier = b.getSpecifierForModuleSymbol(chain[0], swappedMode) diff --git a/internal/compiler/program.go b/internal/compiler/program.go index 5afad96a82..1c95df7956 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -693,21 +693,6 @@ func (p *Program) InstantiationCount() int { return count } -func (p *Program) GetEmitModuleFormatOfFile(sourceFile *ast.SourceFile) core.ModuleKind { - // TODO(jakebailey): inline - return p.GetEmitModuleFormatOfFileWorker(sourceFile, p.compilerOptions) -} - -func (p *Program) GetEmitModuleFormatOfFileWorker(sourceFile *ast.SourceFile, options *core.CompilerOptions) core.ModuleKind { - // TODO(jakebailey): inline - return ast.GetEmitModuleFormatOfFileWorker(sourceFile, options) -} - -func (p *Program) GetImpliedNodeFormatForEmit(sourceFile *ast.SourceFile) core.ResolutionMode { - // TODO(jakebailey): inline - return ast.GetImpliedNodeFormatForEmitWorker(sourceFile, p.compilerOptions.GetEmitModuleKind()) -} - func (p *Program) CommonSourceDirectory() string { p.commonSourceDirectoryOnce.Do(func() { var files []string From 1728821ec9fbf62f6d87966a989c5ccf779a44ac Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 29 May 2025 16:16:46 -0700 Subject: [PATCH 10/12] fmt --- internal/astnav/tokens_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/astnav/tokens_test.go b/internal/astnav/tokens_test.go index 1fcd233f20..208b137d60 100644 --- a/internal/astnav/tokens_test.go +++ b/internal/astnav/tokens_test.go @@ -57,7 +57,7 @@ func TestGetTokenAtPosition(t *testing.T) { return 0; } ` - file := parser.ParseSourceFile("/file.ts", "/file.ts", fileText, parseCompilerOptions, nil,scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", fileText, parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) assert.Equal(t, astnav.GetTokenAtPosition(file, 0), astnav.GetTokenAtPosition(file, 0)) }) } @@ -92,7 +92,7 @@ func baselineTokens(t *testing.T, testName string, includeEOF bool, getTSTokens positions[i] = i } tsTokens := getTSTokens(string(fileText), positions) - file := parser.ParseSourceFile("/file.ts", "/file.ts", string(fileText), parseCompilerOptions, nil,scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", string(fileText), parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) var output strings.Builder currentRange := core.NewTextRange(0, 0) @@ -425,7 +425,7 @@ export function isAnyDirectorySeparator(charCode: number): boolean { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { t.Parallel() - file := parser.ParseSourceFile("/file.ts", "/file.ts", testCase.fileContent, parseCompilerOptions, nil,scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", testCase.fileContent, parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) token := astnav.FindPrecedingToken(file, testCase.position) assert.Equal(t, token.Kind, testCase.expectedKind) }) From 362748bf94bda76d04f9e9dea73cf15dcbc60cde Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 7 Jun 2025 13:24:56 -0700 Subject: [PATCH 11/12] pull to main except parser --- internal/api/api.go | 5 + internal/api/encoder/encoder.go | 17 +- internal/api/encoder/encoder_test.go | 9 +- internal/api/server.go | 1 + internal/ast/ast.go | 141 +- internal/ast/kind.go | 3 + internal/ast/utilities.go | 218 +- internal/astnav/tokens.go | 4 + internal/astnav/tokens_test.go | 10 +- internal/binder/binder.go | 32 +- internal/binder/binder_test.go | 8 +- internal/binder/nameresolver.go | 10 +- internal/bundled/embed_generated.go | 8 + internal/bundled/libs/lib.decorators.d.ts | 28 +- internal/bundled/libs/lib.dom.d.ts | 2245 ++++++++++++++--- internal/bundled/libs/lib.dom.iterable.d.ts | 16 +- .../bundled/libs/lib.es2015.iterable.d.ts | 123 +- internal/bundled/libs/lib.es2020.bigint.d.ts | 50 +- internal/bundled/libs/lib.es2023.array.d.ts | 48 +- .../bundled/libs/lib.es2024.sharedmemory.d.ts | 2 +- internal/bundled/libs/lib.es5.d.ts | 111 +- internal/bundled/libs/lib.esnext.d.ts | 2 + internal/bundled/libs/lib.esnext.float16.d.ts | 443 ++++ .../bundled/libs/lib.esnext.iterator.d.ts | 2 +- internal/bundled/libs/lib.esnext.promise.d.ts | 34 + internal/bundled/libs/lib.webworker.d.ts | 658 ++++- .../bundled/libs/lib.webworker.iterable.d.ts | 13 +- internal/bundled/libs_generated.go | 2 + internal/checker/checker.go | 334 ++- internal/checker/checker_test.go | 20 +- internal/checker/emitresolver.go | 6 +- internal/checker/exports.go | 44 + internal/checker/flow.go | 13 +- internal/checker/grammarchecks.go | 35 +- internal/checker/jsx.go | 298 ++- internal/checker/nodebuilder.go | 15 +- internal/checker/nodebuilderimpl.go | 100 +- internal/checker/services.go | 79 +- internal/checker/types.go | 33 + internal/checker/utilities.go | 74 +- internal/compiler/emitHost.go | 24 +- internal/compiler/emitter.go | 136 +- internal/compiler/fileloader.go | 102 +- internal/compiler/host.go | 13 +- internal/compiler/program.go | 250 +- internal/compiler/program_test.go | 27 +- internal/core/compileroptions.go | 32 +- .../compileroptions_stringer_generated.go | 8 +- internal/core/core.go | 32 +- internal/core/languagevariant.go | 1 + internal/core/scriptkind.go | 1 + internal/core/text.go | 14 + internal/core/textchange.go | 10 + internal/core/tristate.go | 1 + internal/diagnostics/diagnostics.go | 1 + internal/diagnostics/diagnostics_generated.go | 2136 +++++++++++++++- internal/diagnostics/generate.go | 2 +- internal/execute/export_test.go | 5 +- internal/execute/outputs.go | 3 + internal/execute/system.go | 4 +- internal/execute/testsys_test.go | 7 + internal/execute/tsc.go | 33 +- internal/execute/watch.go | 5 +- internal/format/README.md | 26 + internal/format/api.go | 166 ++ internal/format/api_test.go | 123 + internal/format/context.go | 221 ++ internal/format/indent.go | 554 ++++ internal/format/rule.go | 109 + internal/format/rulecontext.go | 644 +++++ internal/format/rules.go | 446 ++++ internal/format/rulesmap.go | 156 ++ internal/format/scanner.go | 352 +++ internal/format/span.go | 1204 +++++++++ internal/format/util.go | 190 ++ .../fourslash/_scripts/convertFourslash.mts | 623 +++++ internal/fourslash/_scripts/failingTests.txt | 333 +++ internal/fourslash/_scripts/tsconfig.json | 7 + internal/fourslash/fourslash.go | 515 ++++ internal/fourslash/test_parser.go | 256 ++ .../tests/basicInterfaceMembers_test.go | 53 + .../tests/basicMultifileCompletions_test.go | 51 + .../tests/gen/asOperatorCompletion_test.go | 28 + ...ImportsWithRootDirsAndRootedPath01_test.go | 29 + .../gen/closedCommentsInConstructor_test.go | 19 + .../tests/gen/completionAsKeyword_test.go | 30 + .../gen/completionAtDottedNamespace_test.go | 26 + .../gen/completionCloneQuestionToken_test.go | 37 + ...tionEntryAfterASIExpressionInClass_test.go | 42 + ...ntryForArgumentConstrainedToString_test.go | 29 + ...orArrayElementConstrainedToString2_test.go | 28 + ...ForArrayElementConstrainedToString_test.go | 28 + ...nEntryForDeferredMappedTypeMembers_test.go | 34 + ...ntryForPropertyConstrainedToString_test.go | 28 + ...ntryForShorthandPropertyAssignment_test.go | 26 + .../tests/gen/completionExportFrom_test.go | 28 + ...pletionForComputedStringProperties_test.go | 32 + .../gen/completionForStringLiteral11_test.go | 30 + .../gen/completionForStringLiteral12_test.go | 29 + .../gen/completionForStringLiteral13_test.go | 34 + .../gen/completionForStringLiteral15_test.go | 28 + .../gen/completionForStringLiteral16_test.go | 40 + .../gen/completionForStringLiteral2_test.go | 53 + .../gen/completionForStringLiteral3_test.go | 42 + .../gen/completionForStringLiteral5_test.go | 32 + .../gen/completionForStringLiteral8_test.go | 28 + .../completionForStringLiteralExport_test.go | 65 + ...tionForStringLiteralFromSignature2_test.go | 28 + ...etionForStringLiteralFromSignature_test.go | 28 + .../completionForStringLiteralImport1_test.go | 64 + .../completionForStringLiteralImport2_test.go | 64 + ...orStringLiteralNonrelativeImport10_test.go | 41 + ...orStringLiteralNonrelativeImport12_test.go | 36 + ...orStringLiteralNonrelativeImport14_test.go | 61 + ...orStringLiteralNonrelativeImport16_test.go | 48 + ...orStringLiteralNonrelativeImport17_test.go | 37 + ...orStringLiteralNonrelativeImport18_test.go | 37 + ...ForStringLiteralNonrelativeImport2_test.go | 45 + ...ForStringLiteralNonrelativeImport3_test.go | 46 + ...ForStringLiteralNonrelativeImport4_test.go | 41 + ...ForStringLiteralNonrelativeImport7_test.go | 36 + ...ForStringLiteralNonrelativeImport8_test.go | 54 + ...ForStringLiteralNonrelativeImport9_test.go | 43 + ...ngLiteralNonrelativeImportTypings1_test.go | 39 + ...ngLiteralNonrelativeImportTypings2_test.go | 38 + ...ngLiteralNonrelativeImportTypings3_test.go | 38 + ...ionForStringLiteralRelativeImport4_test.go | 65 + ...ionForStringLiteralRelativeImport6_test.go | 47 + ...ngLiteralRelativeImportAllowJSTrue_test.go | 49 + ...nForStringLiteralWithDynamicImport_test.go | 64 + ...nForStringLiteral_quotePreference1_test.go | 36 + ...nForStringLiteral_quotePreference2_test.go | 29 + ...nForStringLiteral_quotePreference3_test.go | 29 + ...nForStringLiteral_quotePreference4_test.go | 27 + ...nForStringLiteral_quotePreference5_test.go | 27 + ...nForStringLiteral_quotePreference6_test.go | 27 + ...onForStringLiteral_quotePreference_test.go | 36 + .../gen/completionForStringLiteral_test.go | 39 + ...ionImportMetaWithGlobalDeclaration_test.go | 67 + .../tests/gen/completionImportMeta_test.go | 41 + ...tionImportModuleSpecifierEndingDts_test.go | 38 + ...etionImportModuleSpecifierEndingJs_test.go | 41 + ...tionImportModuleSpecifierEndingJsx_test.go | 40 + ...etionImportModuleSpecifierEndingTs_test.go | 40 + ...rtModuleSpecifierEndingTsxPreserve_test.go | 39 + ...mportModuleSpecifierEndingTsxReact_test.go | 39 + ...pecifierEndingUnsupportedExtension_test.go | 38 + .../completionInAugmentedClassModule_test.go | 28 + ...ionLikeBody_includesPrimitiveTypes_test.go | 46 + .../gen/completionInJSDocFunctionNew_test.go | 30 + .../gen/completionInJSDocFunctionThis_test.go | 30 + .../tests/gen/completionInJsDoc_test.go | 120 + .../tests/gen/completionInTypeOf1_test.go | 20 + .../tests/gen/completionInTypeOf2_test.go | 29 + ...etionInfoWithExplicitTypeArguments_test.go | 41 + ...ionInsideFunctionContainsArguments_test.go | 43 + ...xpressionWithInstantiatedClassType_test.go | 67 + .../tests/gen/completionJSDocNamePath_test.go | 32 + .../gen/completionListAfterAnyType_test.go | 32 + .../completionListAfterClassExtends_test.go | 34 + .../gen/completionListAfterFunction3_test.go | 38 + .../gen/completionListAfterFunction_test.go | 63 + ...ompletionListAfterInvalidCharacter_test.go | 31 + ...completionListAfterNumericLiteral1_test.go | 26 + .../completionListAfterNumericLiteral_test.go | 40 + .../completionListAfterObjectLiteral1_test.go | 26 + ...istAfterRegularExpressionLiteral02_test.go | 18 + ...istAfterRegularExpressionLiteral03_test.go | 28 + ...istAfterRegularExpressionLiteral04_test.go | 27 + ...istAfterRegularExpressionLiteral05_test.go | 18 + .../gen/completionListAfterSlash_test.go | 18 + ...ompletionListAfterSpreadOperator01_test.go | 27 + ...ionListAndMemberListOnCommentedDot_test.go | 28 + ...onListAndMemberListOnCommentedLine_test.go | 18 + ...AndMemberListOnCommentedWhiteSpace_test.go | 28 + .../completionListAtBeginningOfFile01_test.go | 30 + ...nningOfIdentifierInArrowFunction01_test.go | 26 + ...onListAtDeclarationOfParameterType_test.go | 34 + ...onListAtEndOfWordInArrowFunction01_test.go | 26 + ...onListAtEndOfWordInArrowFunction02_test.go | 27 + ...tifierDefinitionLocations_Generics_test.go | 22 + ...dentifierDefinitionLocations_catch_test.go | 19 + ...ntifierDefinitionLocations_classes_test.go | 19 + ...rDefinitionLocations_destructuring_test.go | 32 + ...erDefinitionLocations_enumMembers2_test.go | 18 + ...ierDefinitionLocations_enumMembers_test.go | 18 + ...dentifierDefinitionLocations_enums_test.go | 20 + ...ifierDefinitionLocations_functions_test.go | 19 + ...entifierDefinitionLocations_infers_test.go | 20 + ...fierDefinitionLocations_interfaces_test.go | 19 + ...efinitionLocations_varDeclarations_test.go | 21 + .../completionListAtInvalidLocations_test.go | 46 + .../gen/completionListAtNodeBoundary_test.go | 41 + .../gen/completionListAtThisType_test.go | 37 + .../gen/completionListBeforeKeyword_test.go | 40 + .../completionListBeforeNewScope01_test.go | 30 + .../completionListBeforeNewScope02_test.go | 30 + .../gen/completionListClassThisJS_test.go | 37 + .../gen/completionListEnumValues_test.go | 46 + .../completionListForExportEquals2_test.go | 34 + .../gen/completionListForExportEquals_test.go | 36 + ...AmbientModuleWithExportAssignment1_test.go | 23 + ...istForShorthandPropertyAssignment2_test.go | 26 + ...ListForShorthandPropertyAssignment_test.go | 26 + ...stForTransitivelyExportedMembers01_test.go | 52 + ...stForTransitivelyExportedMembers02_test.go | 52 + ...stForTransitivelyExportedMembers03_test.go | 52 + ...stForTransitivelyExportedMembers04_test.go | 53 + ...completionListForUnicodeEscapeName_test.go | 47 + ...ListImplementingInterfaceFunctions_test.go | 39 + ...nArrowFunctionInUnclosedCallSite01_test.go | 28 + .../completionListInClosedFunction01_test.go | 28 + .../completionListInClosedFunction02_test.go | 29 + .../completionListInClosedFunction03_test.go | 30 + .../completionListInClosedFunction04_test.go | 30 + .../completionListInClosedFunction05_test.go | 30 + .../completionListInClosedFunction06_test.go | 34 + .../completionListInClosedFunction07_test.go | 34 + ...osedObjectTypeLiteralInSignature01_test.go | 32 + ...osedObjectTypeLiteralInSignature02_test.go | 32 + ...osedObjectTypeLiteralInSignature03_test.go | 32 + ...osedObjectTypeLiteralInSignature04_test.go | 32 + .../gen/completionListInComments2_test.go | 17 + .../gen/completionListInComments_test.go | 18 + ...ionListInContextuallyTypedArgument_test.go | 41 + .../gen/completionListInEmptyFile_test.go | 27 + .../completionListInExportClause02_test.go | 33 + .../completionListInExportClause03_test.go | 34 + ...completionListInExtendsClauseAtEOF_test.go | 29 + .../completionListInImportClause01_test.go | 38 + .../completionListInImportClause02_test.go | 33 + .../completionListInImportClause03_test.go | 34 + .../completionListInImportClause05_test.go | 31 + .../completionListInImportClause06_test.go | 32 + ...iddleOfIdentifierInArrowFunction01_test.go | 26 + ...pletionListInNamespaceImportName01_test.go | 20 + ...letionListInObjectBindingPattern01_test.go | 32 + ...letionListInObjectBindingPattern02_test.go | 32 + ...letionListInObjectBindingPattern03_test.go | 23 + ...letionListInObjectBindingPattern04_test.go | 32 + ...letionListInObjectBindingPattern05_test.go | 32 + ...letionListInObjectBindingPattern06_test.go | 23 + ...letionListInObjectBindingPattern07_test.go | 36 + ...letionListInObjectBindingPattern08_test.go | 36 + ...letionListInObjectBindingPattern09_test.go | 36 + ...letionListInObjectBindingPattern10_test.go | 45 + ...letionListInObjectBindingPattern11_test.go | 31 + ...letionListInObjectBindingPattern12_test.go | 33 + ...letionListInObjectBindingPattern13_test.go | 37 + ...letionListInObjectBindingPattern14_test.go | 20 + ...letionListInObjectBindingPattern16_test.go | 38 + .../completionListInObjectLiteral2_test.go | 45 + .../completionListInObjectLiteral3_test.go | 32 + .../completionListInObjectLiteral4_test.go | 44 + .../completionListInObjectLiteral5_test.go | 74 + .../completionListInObjectLiteral6_test.go | 38 + .../completionListInObjectLiteral7_test.go | 35 + .../completionListInObjectLiteral8_test.go | 34 + ...tInObjectLiteralAssignmentPattern1_test.go | 27 + ...tInObjectLiteralAssignmentPattern2_test.go | 27 + ...tInObjectLiteralPropertyAssignment_test.go | 33 + ...teralThatIsParameterOfFunctionCall_test.go | 29 + .../gen/completionListInObjectLiteral_test.go | 35 + ...tionListInReturnWithContextualThis_test.go | 52 + ...nScope_doesNotIncludeAugmentations_test.go | 33 + .../tests/gen/completionListInScope_test.go | 103 + .../completionListInStringLiterals1_test.go | 27 + .../completionListInStringLiterals2_test.go | 28 + ...stInTemplateLiteralPartsNegatives1_test.go | 19 + ...nListInTypeLiteralInTypeParameter2_test.go | 35 + ...nListInTypeLiteralInTypeParameter3_test.go | 35 + ...nListInTypeLiteralInTypeParameter4_test.go | 35 + ...nListInTypeLiteralInTypeParameter5_test.go | 35 + ...nListInTypeLiteralInTypeParameter6_test.go | 35 + ...nListInTypeLiteralInTypeParameter7_test.go | 38 + ...nListInTypeLiteralInTypeParameter8_test.go | 67 + ...ionListInTypeParameterOfTypeAlias1_test.go | 40 + ...ionListInTypeParameterOfTypeAlias2_test.go | 31 + ...ionListInTypeParameterOfTypeAlias3_test.go | 17 + ...mpletionListInTypedObjectLiterals2_test.go | 30 + ...mpletionListInTypedObjectLiterals3_test.go | 30 + ...mpletionListInTypedObjectLiterals4_test.go | 33 + ...tLiteralsWithPartialPropertyNames2_test.go | 32 + ...ionListInUnclosedCommaExpression01_test.go | 27 + ...ionListInUnclosedCommaExpression02_test.go | 27 + ...onListInUnclosedDeleteExpression01_test.go | 27 + ...onListInUnclosedDeleteExpression02_test.go | 27 + ...nUnclosedElementAccessExpression01_test.go | 27 + ...nUnclosedElementAccessExpression02_test.go | 27 + .../completionListInUnclosedForLoop01_test.go | 26 + .../completionListInUnclosedForLoop02_test.go | 26 + ...completionListInUnclosedFunction01_test.go | 28 + ...completionListInUnclosedFunction02_test.go | 27 + ...completionListInUnclosedFunction03_test.go | 28 + ...completionListInUnclosedFunction04_test.go | 27 + ...completionListInUnclosedFunction05_test.go | 28 + ...completionListInUnclosedFunction06_test.go | 28 + ...completionListInUnclosedFunction07_test.go | 28 + ...completionListInUnclosedFunction08_test.go | 28 + ...completionListInUnclosedFunction09_test.go | 29 + ...completionListInUnclosedFunction10_test.go | 31 + ...completionListInUnclosedFunction11_test.go | 31 + ...completionListInUnclosedFunction12_test.go | 32 + ...completionListInUnclosedFunction13_test.go | 33 + ...completionListInUnclosedFunction14_test.go | 33 + ...completionListInUnclosedFunction15_test.go | 32 + ...completionListInUnclosedFunction16_test.go | 31 + ...completionListInUnclosedFunction17_test.go | 31 + ...completionListInUnclosedFunction18_test.go | 32 + ...completionListInUnclosedFunction19_test.go | 31 + ...tionListInUnclosedIndexSignature01_test.go | 28 + ...tionListInUnclosedIndexSignature03_test.go | 28 + ...osedObjectTypeLiteralInSignature01_test.go | 32 + ...osedObjectTypeLiteralInSignature02_test.go | 32 + ...osedObjectTypeLiteralInSignature03_test.go | 32 + ...osedObjectTypeLiteralInSignature04_test.go | 32 + ...onListInUnclosedSpreadExpression01_test.go | 27 + ...onListInUnclosedSpreadExpression02_test.go | 27 + ...tionListInUnclosedTaggedTemplate01_test.go | 27 + ...tionListInUnclosedTaggedTemplate02_test.go | 27 + ...completionListInUnclosedTemplate01_test.go | 27 + ...completionListInUnclosedTemplate02_test.go | 27 + ...onListInUnclosedTypeOfExpression01_test.go | 27 + ...onListInUnclosedTypeOfExpression02_test.go | 27 + ...tionListInUnclosedVoidExpression01_test.go | 27 + .../gen/completionListInferKeyword_test.go | 29 + ...etionListInstanceProtectedMembers2_test.go | 85 + ...etionListInstanceProtectedMembers3_test.go | 48 + ...etionListInstanceProtectedMembers4_test.go | 46 + ...MemberNames_withExistingIdentifier_test.go | 38 + ...ionListNewIdentifierBindingElement_test.go | 17 + ...stNewIdentifierVariableDeclaration_test.go | 17 + .../gen/completionListOnAliasedModule_test.go | 33 + .../gen/completionListOnAliases3_test.go | 32 + ...OnFunctionCallWithOptionalArgument_test.go | 27 + ...ompletionListOnMethodParameterName_test.go | 20 + .../gen/completionListOnParamInClass_test.go | 29 + .../tests/gen/completionListOnParam_test.go | 32 + .../tests/gen/completionListOnSuper_test.go | 40 + .../completionListOnVarBetweenModules_test.go | 36 + ...ListOutsideOfClosedArrowFunction01_test.go | 27 + ...ListOutsideOfClosedArrowFunction02_test.go | 27 + ...tsideOfClosedFunctionDeclaration01_test.go | 27 + .../completionListOutsideOfForLoop01_test.go | 26 + .../completionListOutsideOfForLoop02_test.go | 26 + .../gen/completionListPrivateMembers2_test.go | 41 + .../gen/completionListPrivateMembers3_test.go | 42 + .../gen/completionListPrivateMembers_test.go | 35 + ...mpletionListStaticProtectedMembers_test.go | 60 + ...nListStringParenthesizedExpression_test.go | 51 + ...pletionListStringParenthesizedType_test.go | 106 + .../gen/completionListSuperMembers_test.go | 48 + ...mpletionListWithAmbientDeclaration_test.go | 41 + .../tests/gen/completionListWithLabel_test.go | 55 + ...completionListWithUnresolvedModule_test.go | 30 + ...tionListWithoutVariableinitializer_test.go | 108 + .../completionList_getExportsOfModule_test.go | 31 + ...teralTypeAsIndexedAccessTypeObject_test.go | 45 + ...tQuestionDotWithUserPreferencesOff_test.go | 34 + .../gen/completionOfAwaitPromise4_test.go | 29 + .../gen/completionOfAwaitPromise6_test.go | 28 + .../completionPreferredSuggestions1_test.go | 73 + .../gen/completionSatisfiesKeyword_test.go | 30 + .../gen/completionTypeofExpressions_test.go | 37 + .../tests/gen/completionUsingKeyword_test.go | 42 + ...ithConditionalOperatorMissingColon_test.go | 27 + .../fourslash/tests/gen/completions03_test.go | 36 + ...mpletionsAfterAsyncInObjectLiteral_test.go | 26 + .../tests/gen/completionsAfterJSDoc_test.go | 30 + .../completionsAfterKeywordsInBlock_test.go | 75 + .../tests/gen/completionsAsserts_test.go | 26 + ...sAtIncompleteObjectLiteralProperty_test.go | 32 + .../gen/completionsAtTypeArguments_test.go | 31 + ...completionsBigIntShowNoCompletions_test.go | 27 + ...lassPropertiesAfterPrivateProperty_test.go | 32 + ...ionsCombineOverloads_restParameter_test.go | 42 + ...letionsCombineOverloads_returnType_test.go | 30 + .../gen/completionsCombineOverloads_test.go | 30 + .../gen/completionsConditionalMember_test.go | 40 + ...tKeywordWhenDefaultExportAvailable_test.go | 29 + .../gen/completionsDestructuring_test.go | 29 + .../gen/completionsDiscriminatedUnion_test.go | 28 + ...mpletionsDotDotDotInObjectLiteral1_test.go | 37 + ...sECMAPrivateMemberTriggerCharacter_test.go | 42 + ...etionsExternalModuleRenamedExports_test.go | 34 + ...LatterTypeParametersInConstraints1_test.go | 39 + ...ionsForRecursiveGenericTypesMember_test.go | 35 + ...sForSelfTypeParameterInConstraint1_test.go | 32 + .../gen/completionsGeneratorFunctions_test.go | 58 + .../completionsGenericIndexedAccess1_test.go | 31 + .../completionsGenericIndexedAccess2_test.go | 47 + .../completionsGenericIndexedAccess3_test.go | 52 + .../completionsGenericIndexedAccess4_test.go | 63 + .../completionsGenericIndexedAccess5_test.go | 46 + .../completionsGenericIndexedAccess6_test.go | 40 + .../completionsGenericUnconstrained_test.go | 32 + ...ionAttributesEmptyModuleSpecifier1_test.go | 32 + ...ionAttributesErrorModuleSpecifier1_test.go | 32 + ...mpletionsImportDefaultExportCrash1_test.go | 54 + ...Import_notFromUnrelatedNodeModules_test.go | 30 + ...completionsImport_promoteTypeOnly2_test.go | 32 + ...mpletionsImport_umdDefaultNoCrash2_test.go | 57 + .../gen/completionsInExport_invalid_test.go | 31 + .../tests/gen/completionsInRequire_test.go | 40 + ...mpletionsIndexSignatureConstraint1_test.go | 46 + .../gen/completionsInterfaceElement_test.go | 36 + ...TagAttributesEmptyModuleSpecifier1_test.go | 34 + ...TagAttributesErrorModuleSpecifier1_test.go | 34 + ...SDocImportTagEmptyModuleSpecifier1_test.go | 33 + .../gen/completionsJSDocNoCrash1_test.go | 44 + .../gen/completionsJSDocNoCrash3_test.go | 39 + .../completionsJsPropertyAssignment_test.go | 30 + .../gen/completionsJsxAttribute2_test.go | 70 + .../tests/gen/completionsKeyof_test.go | 40 + .../gen/completionsKeywordsExtends_test.go | 29 + ...alFromInferenceWithinInferredType1_test.go | 54 + ...alFromInferenceWithinInferredType2_test.go | 73 + ...alFromInferenceWithinInferredType3_test.go | 53 + ...onsLiteralMatchingGenericSignature_test.go | 30 + ...eralOnPropertyValueMatchingGeneric_test.go | 30 + .../completionsMergedDeclarations2_test.go | 46 + ...mpletionsNamespaceMergedWithObject_test.go | 40 + .../gen/completionsNamespaceName_test.go | 44 + .../tests/gen/completionsNewTarget_test.go | 44 + .../gen/completionsNonExistentImport_test.go | 27 + .../completionsObjectLiteralMethod6_test.go | 33 + ...pletionsObjectLiteralModuleExports_test.go | 33 + ...bjectLiteralUnionStringMappingType_test.go | 48 + ...ectLiteralUnionTemplateLiteralType_test.go | 48 + ...ObjectLiteralWithPartialConstraint_test.go | 124 + .../completionsOptionalKindModifier_test.go | 29 + .../gen/completionsOptionalMethod_test.go | 28 + .../gen/completionsOverridingMethod14_test.go | 35 + .../gen/completionsOverridingMethod17_test.go | 37 + .../gen/completionsOverridingMethod1_test.go | 36 + .../gen/completionsOverridingMethod3_test.go | 35 + .../gen/completionsOverridingMethod4_test.go | 51 + .../gen/completionsOverridingMethod9_test.go | 35 + .../completionsOverridingMethodCrash1_test.go | 35 + .../completionsOverridingProperties1_test.go | 35 + .../completionsPathsJsonModuleWithAmd_test.go | 31 + ...JsonModuleWithoutResolveJsonModule_test.go | 30 + .../gen/completionsPathsJsonModule_test.go | 31 + ...completionsPathsRelativeJsonModule_test.go | 31 + .../gen/completionsPaths_importType_test.go | 45 + .../tests/gen/completionsPaths_kinds_test.go | 41 + ...s_pathMapping_nonTrailingWildcard1_test.go | 70 + ...s_pathMapping_notInNestedDirectory_test.go | 36 + ...sPaths_pathMapping_parentDirectory_test.go | 38 + .../gen/completionsPaths_pathMapping_test.go | 50 + .../completionsPrivateProperties_Js_test.go | 41 + .../completionsPropertiesPriorities_test.go | 41 + ...ionsPropertiesWithPromiseUnionType_test.go | 35 + ...ompletionsQuotedObjectLiteralUnion_test.go | 36 + ...onsRecommended_nonAccessibleSymbol_test.go | 30 + .../gen/completionsRecommended_union_test.go | 39 + .../gen/completionsRecursiveNamespace_test.go | 20 + ...completionsRedeclareModuleAsGlobal_test.go | 43 + .../gen/completionsSelfDeclaring1_test.go | 39 + .../gen/completionsSelfDeclaring3_test.go | 54 + ...nsStringLiteral_fromTypeConstraint_test.go | 27 + ...letionsStringsWithTriggerCharacter_test.go | 99 + .../gen/completionsSymbolMembers_test.go | 44 + .../gen/completionsTriggerCharacter_test.go | 111 + ...pletionsUnionStringLiteralProperty_test.go | 86 + .../tests/gen/completionsUnion_test.go | 29 + .../gen/completionsUniqueSymbol1_test.go | 39 + .../gen/completionsWithDeprecatedTag3_test.go | 32 + ...ompletionsWithGenericStringLiteral_test.go | 28 + ...tionalPropertiesGenericConstructor_test.go | 37 + ...sWithOptionalPropertiesGenericDeep_test.go | 37 + ...hOptionalPropertiesGenericPartial2_test.go | 32 + ...hOptionalPropertiesGenericPartial3_test.go | 35 + ...thOptionalPropertiesGenericPartial_test.go | 35 + ...ionalPropertiesGenericValidBoolean_test.go | 33 + ...tionsWithOptionalPropertiesGeneric_test.go | 33 + .../completionsWithOptionalProperties_test.go | 36 + .../gen/completionsWithOverride1_test.go | 32 + .../gen/completionsWithOverride2_test.go | 36 + ...pletionsWithStringReplacementMode1_test.go | 45 + .../tests/gen/completionsWrappedClass_test.go | 39 + ...sivelyLargeArrayLiteralCompletions_test.go | 36 + .../gen/extendsKeywordCompletion1_test.go | 27 + .../gen/extendsKeywordCompletion2_test.go | 28 + .../tests/gen/forwardReference_test.go | 32 + .../gen/genericCloduleCompletionList_test.go | 29 + .../gen/getJavaScriptCompletions10_test.go | 31 + .../gen/getJavaScriptCompletions11_test.go | 30 + .../gen/getJavaScriptCompletions14_test.go | 33 + .../gen/getJavaScriptCompletions1_test.go | 30 + .../gen/getJavaScriptCompletions21_test.go | 32 + .../gen/getJavaScriptCompletions2_test.go | 30 + .../gen/getJavaScriptCompletions3_test.go | 30 + .../gen/getJavaScriptCompletions4_test.go | 30 + .../gen/getJavaScriptCompletions5_test.go | 34 + .../gen/getJavaScriptCompletions8_test.go | 32 + .../gen/getJavaScriptCompletions9_test.go | 32 + .../getJavaScriptCompletions_tsCheck_test.go | 32 + ...ackageJsonExportsSpecifierEndsInTs_test.go | 44 + ...nsPackageJsonExportsTrailingSlash1_test.go | 55 + ...tionsPackageJsonImportsConditions1_test.go | 39 + ...mpletionsPackageJsonImportsLength1_test.go | 76 + ...mpletionsPackageJsonImportsLength2_test.go | 76 + ...pletionsPackageJsonImportsPattern2_test.go | 37 + ...kageJsonImportsPattern_capsInPath1_test.go | 36 + ...kageJsonImportsPattern_capsInPath2_test.go | 36 + ...etionsPackageJsonImportsPattern_js_test.go | 36 + ...onsPackageJsonImportsPattern_js_ts_test.go | 36 + ...mpletionsPackageJsonImportsPattern_test.go | 36 + ...onsPackageJsonImportsPattern_ts_js_test.go | 36 + ...etionsPackageJsonImportsPattern_ts_test.go | 36 + ...onsPackageJsonImportsPattern_ts_ts_test.go | 36 + ...rtCompletionsPackageJsonImports_js_test.go | 36 + ...rtCompletionsPackageJsonImports_ts_test.go | 36 + .../gen/importCompletions_importsMap1_test.go | 49 + .../gen/importCompletions_importsMap2_test.go | 54 + .../gen/importCompletions_importsMap3_test.go | 54 + .../gen/importCompletions_importsMap4_test.go | 47 + .../gen/importCompletions_importsMap5_test.go | 48 + .../gen/importStatementCompletions4_test.go | 35 + ...tementCompletions_noPatternAmbient_test.go | 33 + ...tatementCompletions_pnpmTransitive_test.go | 38 + .../gen/importTypeMemberCompletions_test.go | 133 + .../tests/gen/javaScriptModules12_test.go | 85 + .../tests/gen/javaScriptModules14_test.go | 43 + .../tests/gen/javaScriptModules18_test.go | 30 + .../javaScriptModulesWithBackticks_test.go | 31 + .../tests/gen/javascriptModules23_test.go | 31 + .../tests/gen/javascriptModules25_test.go | 32 + ...javascriptModulesTypeImportAsValue_test.go | 34 + .../gen/javascriptModulesTypeImport_test.go | 39 + .../tests/gen/jsDocGenerics1_test.go | 45 + .../gen/jsdocImportTagCompletion1_test.go | 31 + .../tests/gen/jsdocNullableUnion_test.go | 57 + .../gen/jsdocOverloadTagCompletion_test.go | 31 + .../gen/jsdocParamTagSpecialKeywords_test.go | 33 + .../gen/jsdocParameterNameCompletion_test.go | 61 + .../tests/gen/jsdocPropTagCompletion_test.go | 29 + .../gen/jsdocSatisfiesTagCompletion2_test.go | 33 + .../jsdocTemplatePrototypeCompletions_test.go | 37 + .../tests/gen/jsdocTypedefTag1_test.go | 38 + .../tests/gen/jsdocTypedefTag2_test.go | 53 + .../tests/gen/jsxAriaLikeCompletions_test.go | 36 + .../tests/gen/lambdaThisMembers_test.go | 33 + ...emberCompletionOnRightSideOfImport_test.go | 17 + .../memberCompletionOnTypeParameters2_test.go | 39 + .../gen/memberListAfterDoubleDot_test.go | 17 + .../gen/memberListAfterSingleDot_test.go | 17 + .../tests/gen/memberListErrorRecovery_test.go | 30 + .../tests/gen/memberListInWithBlock2_test.go | 23 + .../tests/gen/memberListInWithBlock3_test.go | 27 + .../tests/gen/memberListInWithBlock_test.go | 36 + ...memberListOfEnumFromExternalModule_test.go | 31 + .../gen/memberListOfEnumInModule_test.go | 32 + .../memberListOfModuleBeforeKeyword_test.go | 38 + .../tests/gen/memberListOfModule_test.go | 37 + .../gen/memberListOnFunctionParameter_test.go | 30 + ...ListOnCommentsInsideObjectLiterals_test.go | 26 + ...CurrentOrLaterParametersInDefaults_test.go | 89 + .../gen/nodeModulesImportCompletions1_test.go | 66 + .../objectLiteralBindingInParameter_test.go | 40 + ...sAllowModuleAugmentationExtensions_test.go | 31 + ...eJsonExportsBundlerNoNodeCondition_test.go | 42 + ...PackageJsonExportsCustomConditions_test.go | 40 + ...etionsPackageJsonExportsWildcard10_test.go | 40 + ...etionsPackageJsonExportsWildcard11_test.go | 39 + ...etionsPackageJsonExportsWildcard12_test.go | 69 + ...letionsPackageJsonExportsWildcard1_test.go | 58 + ...letionsPackageJsonExportsWildcard5_test.go | 73 + ...letionsPackageJsonExportsWildcard6_test.go | 42 + ...letionsPackageJsonExportsWildcard7_test.go | 37 + ...letionsPackageJsonExportsWildcard8_test.go | 39 + ...letionsPackageJsonExportsWildcard9_test.go | 39 + ...eJsonImportsBundlerNoNodeCondition_test.go | 42 + ...PackageJsonImportsCustomConditions_test.go | 40 + ...onImportsIgnoreMatchingNodeModule1_test.go | 36 + ...onImportsIgnoreMatchingNodeModule2_test.go | 38 + ...geJsonImportsOnlyFromClosestScope1_test.go | 49 + ...ckageJsonImportsSrcNoDistWildcard1_test.go | 60 + ...ckageJsonImportsSrcNoDistWildcard5_test.go | 71 + ...ckageJsonImportsSrcNoDistWildcard6_test.go | 49 + ...ckageJsonImportsSrcNoDistWildcard7_test.go | 44 + ...ckageJsonImportsSrcNoDistWildcard8_test.go | 44 + ...ckageJsonImportsSrcNoDistWildcard9_test.go | 45 + ...etionsPackageJsonImportsWildcard10_test.go | 40 + ...etionsPackageJsonImportsWildcard11_test.go | 39 + ...etionsPackageJsonImportsWildcard12_test.go | 69 + ...letionsPackageJsonImportsWildcard1_test.go | 53 + ...letionsPackageJsonImportsWildcard5_test.go | 63 + ...letionsPackageJsonImportsWildcard6_test.go | 42 + ...letionsPackageJsonImportsWildcard7_test.go | 37 + ...letionsPackageJsonImportsWildcard8_test.go | 39 + ...letionsPackageJsonImportsWildcard9_test.go | 38 + .../pathCompletionsTypesVersionsLocal_test.go | 37 + ...hCompletionsTypesVersionsWildcard2_test.go | 45 + .../gen/satisfiesOperatorCompletion_test.go | 28 + ...ecialIntersectionsOrderIndependent_test.go | 29 + ...onalTypesUsingTemplateLiteralTypes_test.go | 61 + ...CompletionsImportOrExportSpecifier_test.go | 188 ++ .../gen/stringCompletionsVsEscaping_test.go | 101 + ...onalTypesUsingTemplateLiteralTypes_test.go | 33 + ...onsForOpenEndedTemplateLiteralType_test.go | 27 + ...letionsForStringEnumContextualType_test.go | 29 + ...ralCompletionsForTypeIndexedAccess_test.go | 37 + ...singInferenceResultFromPreviousArg_test.go | 52 + ...mpletionsInJsxAttributeInitializer_test.go | 53 + ...ompletionsInPositionTypedUsingRest_test.go | 45 + ...CompletionsInTypeArgForNonGeneric1_test.go | 21 + .../tests/gen/switchCompletions_test.go | 80 + ...thisPredicateFunctionCompletions02_test.go | 73 + ...lashRefPathCompletionAbsolutePaths_test.go | 54 + ...ripleSlashRefPathCompletionContext_test.go | 31 + ...thCompletionExtensionsAllowJSFalse_test.go | 43 + ...athCompletionExtensionsAllowJSTrue_test.go | 44 + ...leSlashRefPathCompletionHiddenFile_test.go | 43 + ...ipleSlashRefPathCompletionRootdirs_test.go | 50 + .../tests/gen/tsxCompletion10_test.go | 33 + .../tests/gen/tsxCompletion11_test.go | 32 + .../tests/gen/tsxCompletion12_test.go | 64 + .../tests/gen/tsxCompletion13_test.go | 72 + .../tests/gen/tsxCompletion14_test.go | 53 + .../tests/gen/tsxCompletion15_test.go | 150 ++ .../tests/gen/tsxCompletion1_test.go | 33 + .../tests/gen/tsxCompletion2_test.go | 34 + .../tests/gen/tsxCompletion3_test.go | 33 + .../tests/gen/tsxCompletion4_test.go | 34 + .../tests/gen/tsxCompletion5_test.go | 33 + .../tests/gen/tsxCompletion6_test.go | 33 + .../tests/gen/tsxCompletion7_test.go | 35 + .../tests/gen/tsxCompletion8_test.go | 33 + ...ctionExpressionOfChildrenCallback1_test.go | 51 + ...nctionExpressionOfChildrenCallback_test.go | 41 + .../gen/tsxCompletionNonTagLessThan_test.go | 40 + .../gen/tsxCompletionOnClosingTag1_test.go | 33 + .../gen/tsxCompletionOnClosingTag2_test.go | 44 + ...xCompletionOnClosingTagWithoutJSX1_test.go | 27 + ...xCompletionOnClosingTagWithoutJSX2_test.go | 38 + .../tsxCompletionsGenericComponent_test.go | 49 + .../tests/gen/typeArgCompletion_test.go | 32 + .../tests/gen/typeKeywordInFunction_test.go | 29 + .../tests/gen/typeOfKeywordCompletion_test.go | 27 + .../tests/gen/typeReferenceOnServer_test.go | 28 + .../gen/unclosedCommentsInConstructor_test.go | 19 + ...unclosedStringLiteralErrorRecovery_test.go | 30 + internal/fourslash/tests/gen/util_test.go | 7 + internal/fourslash/tests/util_test.go | 7 + internal/ls/completions.go | 311 ++- internal/ls/completions_test.go | 156 +- internal/ls/converters.go | 4 +- internal/ls/diagnostics.go | 47 +- internal/ls/findallreferences.go | 1489 +++++++++++ internal/ls/findallreferences_test.go | 258 ++ internal/ls/findallreferencesexport_test.go | 31 + internal/ls/format.go | 125 + internal/ls/signaturehelp.go | 1149 +++++++++ internal/ls/signaturehelp_test.go | 1057 ++++++++ internal/ls/types.go | 13 +- internal/ls/utilities.go | 1214 +++++++-- internal/lsp/lsproto/_generate/generate.mjs | 4 +- internal/lsp/lsproto/lsp_generated.go | 3 +- internal/lsp/server.go | 290 ++- internal/lsutil/asi.go | 104 + internal/lsutil/children.go | 142 ++ internal/module/types.go | 2 +- internal/modulespecifiers/preferences.go | 42 +- internal/modulespecifiers/specifiers.go | 183 +- internal/modulespecifiers/types.go | 16 +- internal/modulespecifiers/util.go | 2 +- internal/outputpaths/outputpaths.go | 201 ++ internal/printer/emitcontext.go | 33 +- internal/printer/emithost.go | 1 + internal/printer/utilities.go | 8 + internal/project/ata.go | 45 +- internal/project/ata_test.go | 47 +- internal/project/discovertypings.go | 4 +- internal/project/documentregistry.go | 77 +- internal/project/project.go | 327 ++- internal/project/projectlifetime_test.go | 168 ++ internal/project/scriptinfo.go | 82 +- internal/project/service.go | 416 ++- internal/project/service_test.go | 125 +- internal/project/watch.go | 30 +- internal/scanner/scanner.go | 34 +- internal/testrunner/compiler_runner.go | 29 +- internal/testrunner/compiler_runner_test.go | 2 +- internal/testrunner/runner.go | 2 +- internal/testrunner/test_case_parser.go | 148 +- internal/testrunner/test_case_parser_test.go | 8 +- internal/testutil/harnessutil/harnessutil.go | 106 +- .../testutil/parsetestutil/parsetestutil.go | 6 +- .../projecttestutil/clientmock_generated.go | 8 +- .../projecttestutil/projecttestutil.go | 36 +- .../testutil/tsbaseline/js_emit_baseline.go | 11 +- .../tsbaseline/type_symbol_baseline.go | 14 +- internal/transformers/commonjsmodule.go | 46 +- internal/transformers/commonjsmodule_test.go | 6 +- .../transformers/declarations/transform.go | 2 +- internal/transformers/esmodule.go | 17 +- internal/transformers/esmodule_test.go | 3 +- internal/transformers/externalmoduleinfo.go | 38 +- internal/transformers/impliedmodule.go | 23 +- internal/transformers/importelision_test.go | 40 +- internal/transformers/transformer.go | 10 +- internal/transformers/utilities.go | 5 +- internal/tsoptions/declscompiler.go | 17 + internal/tsoptions/enummaps.go | 3 + internal/tsoptions/parsedcommandline.go | 1 - internal/tsoptions/parsinghelpers.go | 4 + internal/tsoptions/tsconfigparsing_test.go | 1 + internal/tspath/extension.go | 17 + internal/tspath/path.go | 8 + internal/vfs/cachedvfs/cachedvfs.go | 84 +- internal/vfs/cachedvfs/cachedvfs_test.go | 140 + internal/vfs/vfs.go | 1 + internal/vfs/vfsmock/mock_generated.go | 12 +- 715 files changed, 42292 insertions(+), 2589 deletions(-) create mode 100644 internal/bundled/libs/lib.esnext.float16.d.ts create mode 100644 internal/bundled/libs/lib.esnext.promise.d.ts create mode 100644 internal/core/textchange.go create mode 100644 internal/format/README.md create mode 100644 internal/format/api.go create mode 100644 internal/format/api_test.go create mode 100644 internal/format/context.go create mode 100644 internal/format/indent.go create mode 100644 internal/format/rule.go create mode 100644 internal/format/rulecontext.go create mode 100644 internal/format/rules.go create mode 100644 internal/format/rulesmap.go create mode 100644 internal/format/scanner.go create mode 100644 internal/format/span.go create mode 100644 internal/format/util.go create mode 100644 internal/fourslash/_scripts/convertFourslash.mts create mode 100644 internal/fourslash/_scripts/failingTests.txt create mode 100644 internal/fourslash/_scripts/tsconfig.json create mode 100644 internal/fourslash/fourslash.go create mode 100644 internal/fourslash/test_parser.go create mode 100644 internal/fourslash/tests/basicInterfaceMembers_test.go create mode 100644 internal/fourslash/tests/basicMultifileCompletions_test.go create mode 100644 internal/fourslash/tests/gen/asOperatorCompletion_test.go create mode 100644 internal/fourslash/tests/gen/autoImportsWithRootDirsAndRootedPath01_test.go create mode 100644 internal/fourslash/tests/gen/closedCommentsInConstructor_test.go create mode 100644 internal/fourslash/tests/gen/completionAsKeyword_test.go create mode 100644 internal/fourslash/tests/gen/completionAtDottedNamespace_test.go create mode 100644 internal/fourslash/tests/gen/completionCloneQuestionToken_test.go create mode 100644 internal/fourslash/tests/gen/completionEntryAfterASIExpressionInClass_test.go create mode 100644 internal/fourslash/tests/gen/completionEntryForArgumentConstrainedToString_test.go create mode 100644 internal/fourslash/tests/gen/completionEntryForArrayElementConstrainedToString2_test.go create mode 100644 internal/fourslash/tests/gen/completionEntryForArrayElementConstrainedToString_test.go create mode 100644 internal/fourslash/tests/gen/completionEntryForDeferredMappedTypeMembers_test.go create mode 100644 internal/fourslash/tests/gen/completionEntryForPropertyConstrainedToString_test.go create mode 100644 internal/fourslash/tests/gen/completionEntryForShorthandPropertyAssignment_test.go create mode 100644 internal/fourslash/tests/gen/completionExportFrom_test.go create mode 100644 internal/fourslash/tests/gen/completionForComputedStringProperties_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral11_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral12_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral13_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral15_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral16_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral2_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral3_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral5_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral8_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralExport_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralFromSignature2_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralFromSignature_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralImport1_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralImport2_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport10_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport12_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport14_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport16_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport17_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport18_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport2_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport3_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport4_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport7_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport8_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport9_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings1_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings2_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings3_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralRelativeImport4_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralRelativeImport6_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralRelativeImportAllowJSTrue_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteralWithDynamicImport_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral_quotePreference1_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral_quotePreference2_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral_quotePreference3_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral_quotePreference4_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral_quotePreference5_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral_quotePreference6_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral_quotePreference_test.go create mode 100644 internal/fourslash/tests/gen/completionForStringLiteral_test.go create mode 100644 internal/fourslash/tests/gen/completionImportMetaWithGlobalDeclaration_test.go create mode 100644 internal/fourslash/tests/gen/completionImportMeta_test.go create mode 100644 internal/fourslash/tests/gen/completionImportModuleSpecifierEndingDts_test.go create mode 100644 internal/fourslash/tests/gen/completionImportModuleSpecifierEndingJs_test.go create mode 100644 internal/fourslash/tests/gen/completionImportModuleSpecifierEndingJsx_test.go create mode 100644 internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTs_test.go create mode 100644 internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTsxPreserve_test.go create mode 100644 internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTsxReact_test.go create mode 100644 internal/fourslash/tests/gen/completionImportModuleSpecifierEndingUnsupportedExtension_test.go create mode 100644 internal/fourslash/tests/gen/completionInAugmentedClassModule_test.go create mode 100644 internal/fourslash/tests/gen/completionInFunctionLikeBody_includesPrimitiveTypes_test.go create mode 100644 internal/fourslash/tests/gen/completionInJSDocFunctionNew_test.go create mode 100644 internal/fourslash/tests/gen/completionInJSDocFunctionThis_test.go create mode 100644 internal/fourslash/tests/gen/completionInJsDoc_test.go create mode 100644 internal/fourslash/tests/gen/completionInTypeOf1_test.go create mode 100644 internal/fourslash/tests/gen/completionInTypeOf2_test.go create mode 100644 internal/fourslash/tests/gen/completionInfoWithExplicitTypeArguments_test.go create mode 100644 internal/fourslash/tests/gen/completionInsideFunctionContainsArguments_test.go create mode 100644 internal/fourslash/tests/gen/completionInsideObjectLiteralExpressionWithInstantiatedClassType_test.go create mode 100644 internal/fourslash/tests/gen/completionJSDocNamePath_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterAnyType_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterClassExtends_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterFunction3_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterFunction_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterInvalidCharacter_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterNumericLiteral1_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterNumericLiteral_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterObjectLiteral1_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral02_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral03_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral04_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral05_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterSlash_test.go create mode 100644 internal/fourslash/tests/gen/completionListAfterSpreadOperator01_test.go create mode 100644 internal/fourslash/tests/gen/completionListAndMemberListOnCommentedDot_test.go create mode 100644 internal/fourslash/tests/gen/completionListAndMemberListOnCommentedLine_test.go create mode 100644 internal/fourslash/tests/gen/completionListAndMemberListOnCommentedWhiteSpace_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtBeginningOfFile01_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtBeginningOfIdentifierInArrowFunction01_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtDeclarationOfParameterType_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtEndOfWordInArrowFunction01_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtEndOfWordInArrowFunction02_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_Generics_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_catch_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_classes_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_destructuring_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_enumMembers2_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_enumMembers_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_enums_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_functions_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_infers_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_interfaces_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_varDeclarations_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtInvalidLocations_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtNodeBoundary_test.go create mode 100644 internal/fourslash/tests/gen/completionListAtThisType_test.go create mode 100644 internal/fourslash/tests/gen/completionListBeforeKeyword_test.go create mode 100644 internal/fourslash/tests/gen/completionListBeforeNewScope01_test.go create mode 100644 internal/fourslash/tests/gen/completionListBeforeNewScope02_test.go create mode 100644 internal/fourslash/tests/gen/completionListClassThisJS_test.go create mode 100644 internal/fourslash/tests/gen/completionListEnumValues_test.go create mode 100644 internal/fourslash/tests/gen/completionListForExportEquals2_test.go create mode 100644 internal/fourslash/tests/gen/completionListForExportEquals_test.go create mode 100644 internal/fourslash/tests/gen/completionListForNonExportedMemberInAmbientModuleWithExportAssignment1_test.go create mode 100644 internal/fourslash/tests/gen/completionListForShorthandPropertyAssignment2_test.go create mode 100644 internal/fourslash/tests/gen/completionListForShorthandPropertyAssignment_test.go create mode 100644 internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers01_test.go create mode 100644 internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers02_test.go create mode 100644 internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers03_test.go create mode 100644 internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers04_test.go create mode 100644 internal/fourslash/tests/gen/completionListForUnicodeEscapeName_test.go create mode 100644 internal/fourslash/tests/gen/completionListImplementingInterfaceFunctions_test.go create mode 100644 internal/fourslash/tests/gen/completionListInArrowFunctionInUnclosedCallSite01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInClosedFunction01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInClosedFunction02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInClosedFunction03_test.go create mode 100644 internal/fourslash/tests/gen/completionListInClosedFunction04_test.go create mode 100644 internal/fourslash/tests/gen/completionListInClosedFunction05_test.go create mode 100644 internal/fourslash/tests/gen/completionListInClosedFunction06_test.go create mode 100644 internal/fourslash/tests/gen/completionListInClosedFunction07_test.go create mode 100644 internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature03_test.go create mode 100644 internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature04_test.go create mode 100644 internal/fourslash/tests/gen/completionListInComments2_test.go create mode 100644 internal/fourslash/tests/gen/completionListInComments_test.go create mode 100644 internal/fourslash/tests/gen/completionListInContextuallyTypedArgument_test.go create mode 100644 internal/fourslash/tests/gen/completionListInEmptyFile_test.go create mode 100644 internal/fourslash/tests/gen/completionListInExportClause02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInExportClause03_test.go create mode 100644 internal/fourslash/tests/gen/completionListInExtendsClauseAtEOF_test.go create mode 100644 internal/fourslash/tests/gen/completionListInImportClause01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInImportClause02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInImportClause03_test.go create mode 100644 internal/fourslash/tests/gen/completionListInImportClause05_test.go create mode 100644 internal/fourslash/tests/gen/completionListInImportClause06_test.go create mode 100644 internal/fourslash/tests/gen/completionListInMiddleOfIdentifierInArrowFunction01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInNamespaceImportName01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern03_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern04_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern05_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern06_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern07_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern08_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern09_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern10_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern11_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern12_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern13_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern14_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectBindingPattern16_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteral2_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteral3_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteral4_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteral5_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteral6_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteral7_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteral8_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteralAssignmentPattern1_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteralAssignmentPattern2_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteralPropertyAssignment_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteralThatIsParameterOfFunctionCall_test.go create mode 100644 internal/fourslash/tests/gen/completionListInObjectLiteral_test.go create mode 100644 internal/fourslash/tests/gen/completionListInReturnWithContextualThis_test.go create mode 100644 internal/fourslash/tests/gen/completionListInScope_doesNotIncludeAugmentations_test.go create mode 100644 internal/fourslash/tests/gen/completionListInScope_test.go create mode 100644 internal/fourslash/tests/gen/completionListInStringLiterals1_test.go create mode 100644 internal/fourslash/tests/gen/completionListInStringLiterals2_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTemplateLiteralPartsNegatives1_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter2_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter3_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter4_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter5_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter6_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter7_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter8_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypeParameterOfTypeAlias1_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypeParameterOfTypeAlias2_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypeParameterOfTypeAlias3_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypedObjectLiterals2_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypedObjectLiterals3_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypedObjectLiterals4_test.go create mode 100644 internal/fourslash/tests/gen/completionListInTypedObjectLiteralsWithPartialPropertyNames2_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedCommaExpression01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedCommaExpression02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedDeleteExpression01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedDeleteExpression02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedElementAccessExpression01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedElementAccessExpression02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedForLoop01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedForLoop02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction03_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction04_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction05_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction06_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction07_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction08_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction09_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction10_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction11_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction12_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction13_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction14_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction15_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction16_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction17_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction18_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedFunction19_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedIndexSignature01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedIndexSignature03_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature03_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature04_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedSpreadExpression01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedSpreadExpression02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedTaggedTemplate01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedTaggedTemplate02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedTemplate01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedTemplate02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedTypeOfExpression01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedTypeOfExpression02_test.go create mode 100644 internal/fourslash/tests/gen/completionListInUnclosedVoidExpression01_test.go create mode 100644 internal/fourslash/tests/gen/completionListInferKeyword_test.go create mode 100644 internal/fourslash/tests/gen/completionListInstanceProtectedMembers2_test.go create mode 100644 internal/fourslash/tests/gen/completionListInstanceProtectedMembers3_test.go create mode 100644 internal/fourslash/tests/gen/completionListInstanceProtectedMembers4_test.go create mode 100644 internal/fourslash/tests/gen/completionListInvalidMemberNames_withExistingIdentifier_test.go create mode 100644 internal/fourslash/tests/gen/completionListNewIdentifierBindingElement_test.go create mode 100644 internal/fourslash/tests/gen/completionListNewIdentifierVariableDeclaration_test.go create mode 100644 internal/fourslash/tests/gen/completionListOnAliasedModule_test.go create mode 100644 internal/fourslash/tests/gen/completionListOnAliases3_test.go create mode 100644 internal/fourslash/tests/gen/completionListOnFunctionCallWithOptionalArgument_test.go create mode 100644 internal/fourslash/tests/gen/completionListOnMethodParameterName_test.go create mode 100644 internal/fourslash/tests/gen/completionListOnParamInClass_test.go create mode 100644 internal/fourslash/tests/gen/completionListOnParam_test.go create mode 100644 internal/fourslash/tests/gen/completionListOnSuper_test.go create mode 100644 internal/fourslash/tests/gen/completionListOnVarBetweenModules_test.go create mode 100644 internal/fourslash/tests/gen/completionListOutsideOfClosedArrowFunction01_test.go create mode 100644 internal/fourslash/tests/gen/completionListOutsideOfClosedArrowFunction02_test.go create mode 100644 internal/fourslash/tests/gen/completionListOutsideOfClosedFunctionDeclaration01_test.go create mode 100644 internal/fourslash/tests/gen/completionListOutsideOfForLoop01_test.go create mode 100644 internal/fourslash/tests/gen/completionListOutsideOfForLoop02_test.go create mode 100644 internal/fourslash/tests/gen/completionListPrivateMembers2_test.go create mode 100644 internal/fourslash/tests/gen/completionListPrivateMembers3_test.go create mode 100644 internal/fourslash/tests/gen/completionListPrivateMembers_test.go create mode 100644 internal/fourslash/tests/gen/completionListStaticProtectedMembers_test.go create mode 100644 internal/fourslash/tests/gen/completionListStringParenthesizedExpression_test.go create mode 100644 internal/fourslash/tests/gen/completionListStringParenthesizedType_test.go create mode 100644 internal/fourslash/tests/gen/completionListSuperMembers_test.go create mode 100644 internal/fourslash/tests/gen/completionListWithAmbientDeclaration_test.go create mode 100644 internal/fourslash/tests/gen/completionListWithLabel_test.go create mode 100644 internal/fourslash/tests/gen/completionListWithUnresolvedModule_test.go create mode 100644 internal/fourslash/tests/gen/completionListWithoutVariableinitializer_test.go create mode 100644 internal/fourslash/tests/gen/completionList_getExportsOfModule_test.go create mode 100644 internal/fourslash/tests/gen/completionListsStringLiteralTypeAsIndexedAccessTypeObject_test.go create mode 100644 internal/fourslash/tests/gen/completionNoAutoInsertQuestionDotWithUserPreferencesOff_test.go create mode 100644 internal/fourslash/tests/gen/completionOfAwaitPromise4_test.go create mode 100644 internal/fourslash/tests/gen/completionOfAwaitPromise6_test.go create mode 100644 internal/fourslash/tests/gen/completionPreferredSuggestions1_test.go create mode 100644 internal/fourslash/tests/gen/completionSatisfiesKeyword_test.go create mode 100644 internal/fourslash/tests/gen/completionTypeofExpressions_test.go create mode 100644 internal/fourslash/tests/gen/completionUsingKeyword_test.go create mode 100644 internal/fourslash/tests/gen/completionWithConditionalOperatorMissingColon_test.go create mode 100644 internal/fourslash/tests/gen/completions03_test.go create mode 100644 internal/fourslash/tests/gen/completionsAfterAsyncInObjectLiteral_test.go create mode 100644 internal/fourslash/tests/gen/completionsAfterJSDoc_test.go create mode 100644 internal/fourslash/tests/gen/completionsAfterKeywordsInBlock_test.go create mode 100644 internal/fourslash/tests/gen/completionsAsserts_test.go create mode 100644 internal/fourslash/tests/gen/completionsAtIncompleteObjectLiteralProperty_test.go create mode 100644 internal/fourslash/tests/gen/completionsAtTypeArguments_test.go create mode 100644 internal/fourslash/tests/gen/completionsBigIntShowNoCompletions_test.go create mode 100644 internal/fourslash/tests/gen/completionsClassPropertiesAfterPrivateProperty_test.go create mode 100644 internal/fourslash/tests/gen/completionsCombineOverloads_restParameter_test.go create mode 100644 internal/fourslash/tests/gen/completionsCombineOverloads_returnType_test.go create mode 100644 internal/fourslash/tests/gen/completionsCombineOverloads_test.go create mode 100644 internal/fourslash/tests/gen/completionsConditionalMember_test.go create mode 100644 internal/fourslash/tests/gen/completionsDefaultKeywordWhenDefaultExportAvailable_test.go create mode 100644 internal/fourslash/tests/gen/completionsDestructuring_test.go create mode 100644 internal/fourslash/tests/gen/completionsDiscriminatedUnion_test.go create mode 100644 internal/fourslash/tests/gen/completionsDotDotDotInObjectLiteral1_test.go create mode 100644 internal/fourslash/tests/gen/completionsECMAPrivateMemberTriggerCharacter_test.go create mode 100644 internal/fourslash/tests/gen/completionsExternalModuleRenamedExports_test.go create mode 100644 internal/fourslash/tests/gen/completionsForLatterTypeParametersInConstraints1_test.go create mode 100644 internal/fourslash/tests/gen/completionsForRecursiveGenericTypesMember_test.go create mode 100644 internal/fourslash/tests/gen/completionsForSelfTypeParameterInConstraint1_test.go create mode 100644 internal/fourslash/tests/gen/completionsGeneratorFunctions_test.go create mode 100644 internal/fourslash/tests/gen/completionsGenericIndexedAccess1_test.go create mode 100644 internal/fourslash/tests/gen/completionsGenericIndexedAccess2_test.go create mode 100644 internal/fourslash/tests/gen/completionsGenericIndexedAccess3_test.go create mode 100644 internal/fourslash/tests/gen/completionsGenericIndexedAccess4_test.go create mode 100644 internal/fourslash/tests/gen/completionsGenericIndexedAccess5_test.go create mode 100644 internal/fourslash/tests/gen/completionsGenericIndexedAccess6_test.go create mode 100644 internal/fourslash/tests/gen/completionsGenericUnconstrained_test.go create mode 100644 internal/fourslash/tests/gen/completionsImportDeclarationAttributesEmptyModuleSpecifier1_test.go create mode 100644 internal/fourslash/tests/gen/completionsImportDeclarationAttributesErrorModuleSpecifier1_test.go create mode 100644 internal/fourslash/tests/gen/completionsImportDefaultExportCrash1_test.go create mode 100644 internal/fourslash/tests/gen/completionsImport_notFromUnrelatedNodeModules_test.go create mode 100644 internal/fourslash/tests/gen/completionsImport_promoteTypeOnly2_test.go create mode 100644 internal/fourslash/tests/gen/completionsImport_umdDefaultNoCrash2_test.go create mode 100644 internal/fourslash/tests/gen/completionsInExport_invalid_test.go create mode 100644 internal/fourslash/tests/gen/completionsInRequire_test.go create mode 100644 internal/fourslash/tests/gen/completionsIndexSignatureConstraint1_test.go create mode 100644 internal/fourslash/tests/gen/completionsInterfaceElement_test.go create mode 100644 internal/fourslash/tests/gen/completionsJSDocImportTagAttributesEmptyModuleSpecifier1_test.go create mode 100644 internal/fourslash/tests/gen/completionsJSDocImportTagAttributesErrorModuleSpecifier1_test.go create mode 100644 internal/fourslash/tests/gen/completionsJSDocImportTagEmptyModuleSpecifier1_test.go create mode 100644 internal/fourslash/tests/gen/completionsJSDocNoCrash1_test.go create mode 100644 internal/fourslash/tests/gen/completionsJSDocNoCrash3_test.go create mode 100644 internal/fourslash/tests/gen/completionsJsPropertyAssignment_test.go create mode 100644 internal/fourslash/tests/gen/completionsJsxAttribute2_test.go create mode 100644 internal/fourslash/tests/gen/completionsKeyof_test.go create mode 100644 internal/fourslash/tests/gen/completionsKeywordsExtends_test.go create mode 100644 internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType1_test.go create mode 100644 internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType2_test.go create mode 100644 internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType3_test.go create mode 100644 internal/fourslash/tests/gen/completionsLiteralMatchingGenericSignature_test.go create mode 100644 internal/fourslash/tests/gen/completionsLiteralOnPropertyValueMatchingGeneric_test.go create mode 100644 internal/fourslash/tests/gen/completionsMergedDeclarations2_test.go create mode 100644 internal/fourslash/tests/gen/completionsNamespaceMergedWithObject_test.go create mode 100644 internal/fourslash/tests/gen/completionsNamespaceName_test.go create mode 100644 internal/fourslash/tests/gen/completionsNewTarget_test.go create mode 100644 internal/fourslash/tests/gen/completionsNonExistentImport_test.go create mode 100644 internal/fourslash/tests/gen/completionsObjectLiteralMethod6_test.go create mode 100644 internal/fourslash/tests/gen/completionsObjectLiteralModuleExports_test.go create mode 100644 internal/fourslash/tests/gen/completionsObjectLiteralUnionStringMappingType_test.go create mode 100644 internal/fourslash/tests/gen/completionsObjectLiteralUnionTemplateLiteralType_test.go create mode 100644 internal/fourslash/tests/gen/completionsObjectLiteralWithPartialConstraint_test.go create mode 100644 internal/fourslash/tests/gen/completionsOptionalKindModifier_test.go create mode 100644 internal/fourslash/tests/gen/completionsOptionalMethod_test.go create mode 100644 internal/fourslash/tests/gen/completionsOverridingMethod14_test.go create mode 100644 internal/fourslash/tests/gen/completionsOverridingMethod17_test.go create mode 100644 internal/fourslash/tests/gen/completionsOverridingMethod1_test.go create mode 100644 internal/fourslash/tests/gen/completionsOverridingMethod3_test.go create mode 100644 internal/fourslash/tests/gen/completionsOverridingMethod4_test.go create mode 100644 internal/fourslash/tests/gen/completionsOverridingMethod9_test.go create mode 100644 internal/fourslash/tests/gen/completionsOverridingMethodCrash1_test.go create mode 100644 internal/fourslash/tests/gen/completionsOverridingProperties1_test.go create mode 100644 internal/fourslash/tests/gen/completionsPathsJsonModuleWithAmd_test.go create mode 100644 internal/fourslash/tests/gen/completionsPathsJsonModuleWithoutResolveJsonModule_test.go create mode 100644 internal/fourslash/tests/gen/completionsPathsJsonModule_test.go create mode 100644 internal/fourslash/tests/gen/completionsPathsRelativeJsonModule_test.go create mode 100644 internal/fourslash/tests/gen/completionsPaths_importType_test.go create mode 100644 internal/fourslash/tests/gen/completionsPaths_kinds_test.go create mode 100644 internal/fourslash/tests/gen/completionsPaths_pathMapping_nonTrailingWildcard1_test.go create mode 100644 internal/fourslash/tests/gen/completionsPaths_pathMapping_notInNestedDirectory_test.go create mode 100644 internal/fourslash/tests/gen/completionsPaths_pathMapping_parentDirectory_test.go create mode 100644 internal/fourslash/tests/gen/completionsPaths_pathMapping_test.go create mode 100644 internal/fourslash/tests/gen/completionsPrivateProperties_Js_test.go create mode 100644 internal/fourslash/tests/gen/completionsPropertiesPriorities_test.go create mode 100644 internal/fourslash/tests/gen/completionsPropertiesWithPromiseUnionType_test.go create mode 100644 internal/fourslash/tests/gen/completionsQuotedObjectLiteralUnion_test.go create mode 100644 internal/fourslash/tests/gen/completionsRecommended_nonAccessibleSymbol_test.go create mode 100644 internal/fourslash/tests/gen/completionsRecommended_union_test.go create mode 100644 internal/fourslash/tests/gen/completionsRecursiveNamespace_test.go create mode 100644 internal/fourslash/tests/gen/completionsRedeclareModuleAsGlobal_test.go create mode 100644 internal/fourslash/tests/gen/completionsSelfDeclaring1_test.go create mode 100644 internal/fourslash/tests/gen/completionsSelfDeclaring3_test.go create mode 100644 internal/fourslash/tests/gen/completionsStringLiteral_fromTypeConstraint_test.go create mode 100644 internal/fourslash/tests/gen/completionsStringsWithTriggerCharacter_test.go create mode 100644 internal/fourslash/tests/gen/completionsSymbolMembers_test.go create mode 100644 internal/fourslash/tests/gen/completionsTriggerCharacter_test.go create mode 100644 internal/fourslash/tests/gen/completionsUnionStringLiteralProperty_test.go create mode 100644 internal/fourslash/tests/gen/completionsUnion_test.go create mode 100644 internal/fourslash/tests/gen/completionsUniqueSymbol1_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithDeprecatedTag3_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithGenericStringLiteral_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericConstructor_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericDeep_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial2_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial3_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericValidBoolean_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithOptionalPropertiesGeneric_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithOptionalProperties_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithOverride1_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithOverride2_test.go create mode 100644 internal/fourslash/tests/gen/completionsWithStringReplacementMode1_test.go create mode 100644 internal/fourslash/tests/gen/completionsWrappedClass_test.go create mode 100644 internal/fourslash/tests/gen/excessivelyLargeArrayLiteralCompletions_test.go create mode 100644 internal/fourslash/tests/gen/extendsKeywordCompletion1_test.go create mode 100644 internal/fourslash/tests/gen/extendsKeywordCompletion2_test.go create mode 100644 internal/fourslash/tests/gen/forwardReference_test.go create mode 100644 internal/fourslash/tests/gen/genericCloduleCompletionList_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions10_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions11_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions14_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions1_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions21_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions2_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions3_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions4_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions5_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions8_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions9_test.go create mode 100644 internal/fourslash/tests/gen/getJavaScriptCompletions_tsCheck_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonExportsSpecifierEndsInTs_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonExportsTrailingSlash1_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsConditions1_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsLength1_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsLength2_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern2_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_capsInPath1_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_capsInPath2_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_js_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_js_ts_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_js_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_ts_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImports_js_test.go create mode 100644 internal/fourslash/tests/gen/importCompletionsPackageJsonImports_ts_test.go create mode 100644 internal/fourslash/tests/gen/importCompletions_importsMap1_test.go create mode 100644 internal/fourslash/tests/gen/importCompletions_importsMap2_test.go create mode 100644 internal/fourslash/tests/gen/importCompletions_importsMap3_test.go create mode 100644 internal/fourslash/tests/gen/importCompletions_importsMap4_test.go create mode 100644 internal/fourslash/tests/gen/importCompletions_importsMap5_test.go create mode 100644 internal/fourslash/tests/gen/importStatementCompletions4_test.go create mode 100644 internal/fourslash/tests/gen/importStatementCompletions_noPatternAmbient_test.go create mode 100644 internal/fourslash/tests/gen/importStatementCompletions_pnpmTransitive_test.go create mode 100644 internal/fourslash/tests/gen/importTypeMemberCompletions_test.go create mode 100644 internal/fourslash/tests/gen/javaScriptModules12_test.go create mode 100644 internal/fourslash/tests/gen/javaScriptModules14_test.go create mode 100644 internal/fourslash/tests/gen/javaScriptModules18_test.go create mode 100644 internal/fourslash/tests/gen/javaScriptModulesWithBackticks_test.go create mode 100644 internal/fourslash/tests/gen/javascriptModules23_test.go create mode 100644 internal/fourslash/tests/gen/javascriptModules25_test.go create mode 100644 internal/fourslash/tests/gen/javascriptModulesTypeImportAsValue_test.go create mode 100644 internal/fourslash/tests/gen/javascriptModulesTypeImport_test.go create mode 100644 internal/fourslash/tests/gen/jsDocGenerics1_test.go create mode 100644 internal/fourslash/tests/gen/jsdocImportTagCompletion1_test.go create mode 100644 internal/fourslash/tests/gen/jsdocNullableUnion_test.go create mode 100644 internal/fourslash/tests/gen/jsdocOverloadTagCompletion_test.go create mode 100644 internal/fourslash/tests/gen/jsdocParamTagSpecialKeywords_test.go create mode 100644 internal/fourslash/tests/gen/jsdocParameterNameCompletion_test.go create mode 100644 internal/fourslash/tests/gen/jsdocPropTagCompletion_test.go create mode 100644 internal/fourslash/tests/gen/jsdocSatisfiesTagCompletion2_test.go create mode 100644 internal/fourslash/tests/gen/jsdocTemplatePrototypeCompletions_test.go create mode 100644 internal/fourslash/tests/gen/jsdocTypedefTag1_test.go create mode 100644 internal/fourslash/tests/gen/jsdocTypedefTag2_test.go create mode 100644 internal/fourslash/tests/gen/jsxAriaLikeCompletions_test.go create mode 100644 internal/fourslash/tests/gen/lambdaThisMembers_test.go create mode 100644 internal/fourslash/tests/gen/memberCompletionOnRightSideOfImport_test.go create mode 100644 internal/fourslash/tests/gen/memberCompletionOnTypeParameters2_test.go create mode 100644 internal/fourslash/tests/gen/memberListAfterDoubleDot_test.go create mode 100644 internal/fourslash/tests/gen/memberListAfterSingleDot_test.go create mode 100644 internal/fourslash/tests/gen/memberListErrorRecovery_test.go create mode 100644 internal/fourslash/tests/gen/memberListInWithBlock2_test.go create mode 100644 internal/fourslash/tests/gen/memberListInWithBlock3_test.go create mode 100644 internal/fourslash/tests/gen/memberListInWithBlock_test.go create mode 100644 internal/fourslash/tests/gen/memberListOfEnumFromExternalModule_test.go create mode 100644 internal/fourslash/tests/gen/memberListOfEnumInModule_test.go create mode 100644 internal/fourslash/tests/gen/memberListOfModuleBeforeKeyword_test.go create mode 100644 internal/fourslash/tests/gen/memberListOfModule_test.go create mode 100644 internal/fourslash/tests/gen/memberListOnFunctionParameter_test.go create mode 100644 internal/fourslash/tests/gen/noCompletionListOnCommentsInsideObjectLiterals_test.go create mode 100644 internal/fourslash/tests/gen/noCompletionsForCurrentOrLaterParametersInDefaults_test.go create mode 100644 internal/fourslash/tests/gen/nodeModulesImportCompletions1_test.go create mode 100644 internal/fourslash/tests/gen/objectLiteralBindingInParameter_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsAllowModuleAugmentationExtensions_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsBundlerNoNodeCondition_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsCustomConditions_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard10_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard11_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard12_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard1_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard5_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard6_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard7_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard8_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard9_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsBundlerNoNodeCondition_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsCustomConditions_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsOnlyFromClosestScope1_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard1_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard5_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard6_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard7_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard8_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard9_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard10_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard11_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard12_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard1_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard5_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard6_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard7_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard8_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard9_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsTypesVersionsLocal_test.go create mode 100644 internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard2_test.go create mode 100644 internal/fourslash/tests/gen/satisfiesOperatorCompletion_test.go create mode 100644 internal/fourslash/tests/gen/specialIntersectionsOrderIndependent_test.go create mode 100644 internal/fourslash/tests/gen/stringCompletionsFromGenericConditionalTypesUsingTemplateLiteralTypes_test.go create mode 100644 internal/fourslash/tests/gen/stringCompletionsImportOrExportSpecifier_test.go create mode 100644 internal/fourslash/tests/gen/stringCompletionsVsEscaping_test.go create mode 100644 internal/fourslash/tests/gen/stringLiteralCompletionsForGenericConditionalTypesUsingTemplateLiteralTypes_test.go create mode 100644 internal/fourslash/tests/gen/stringLiteralCompletionsForOpenEndedTemplateLiteralType_test.go create mode 100644 internal/fourslash/tests/gen/stringLiteralCompletionsForStringEnumContextualType_test.go create mode 100644 internal/fourslash/tests/gen/stringLiteralCompletionsForTypeIndexedAccess_test.go create mode 100644 internal/fourslash/tests/gen/stringLiteralCompletionsInArgUsingInferenceResultFromPreviousArg_test.go create mode 100644 internal/fourslash/tests/gen/stringLiteralCompletionsInJsxAttributeInitializer_test.go create mode 100644 internal/fourslash/tests/gen/stringLiteralCompletionsInPositionTypedUsingRest_test.go create mode 100644 internal/fourslash/tests/gen/stringLiteralTypeCompletionsInTypeArgForNonGeneric1_test.go create mode 100644 internal/fourslash/tests/gen/switchCompletions_test.go create mode 100644 internal/fourslash/tests/gen/thisPredicateFunctionCompletions02_test.go create mode 100644 internal/fourslash/tests/gen/tripleSlashRefPathCompletionAbsolutePaths_test.go create mode 100644 internal/fourslash/tests/gen/tripleSlashRefPathCompletionContext_test.go create mode 100644 internal/fourslash/tests/gen/tripleSlashRefPathCompletionExtensionsAllowJSFalse_test.go create mode 100644 internal/fourslash/tests/gen/tripleSlashRefPathCompletionExtensionsAllowJSTrue_test.go create mode 100644 internal/fourslash/tests/gen/tripleSlashRefPathCompletionHiddenFile_test.go create mode 100644 internal/fourslash/tests/gen/tripleSlashRefPathCompletionRootdirs_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion10_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion11_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion12_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion13_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion14_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion15_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion1_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion2_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion3_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion4_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion5_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion6_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion7_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletion8_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback1_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletionNonTagLessThan_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletionOnClosingTag1_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletionOnClosingTag2_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX1_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX2_test.go create mode 100644 internal/fourslash/tests/gen/tsxCompletionsGenericComponent_test.go create mode 100644 internal/fourslash/tests/gen/typeArgCompletion_test.go create mode 100644 internal/fourslash/tests/gen/typeKeywordInFunction_test.go create mode 100644 internal/fourslash/tests/gen/typeOfKeywordCompletion_test.go create mode 100644 internal/fourslash/tests/gen/typeReferenceOnServer_test.go create mode 100644 internal/fourslash/tests/gen/unclosedCommentsInConstructor_test.go create mode 100644 internal/fourslash/tests/gen/unclosedStringLiteralErrorRecovery_test.go create mode 100644 internal/fourslash/tests/gen/util_test.go create mode 100644 internal/fourslash/tests/util_test.go create mode 100644 internal/ls/findallreferences.go create mode 100644 internal/ls/findallreferences_test.go create mode 100644 internal/ls/findallreferencesexport_test.go create mode 100644 internal/ls/format.go create mode 100644 internal/ls/signaturehelp.go create mode 100644 internal/ls/signaturehelp_test.go create mode 100644 internal/lsutil/asi.go create mode 100644 internal/lsutil/children.go create mode 100644 internal/outputpaths/outputpaths.go create mode 100644 internal/project/projectlifetime_test.go diff --git a/internal/api/api.go b/internal/api/api.go index d03df66cd6..95e38fda6e 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -115,6 +115,11 @@ func (api *API) Log(s string) { api.options.Logger.Info(s) } +// Log implements ProjectHost. +func (api *API) Trace(s string) { + api.options.Logger.Info(s) +} + // NewLine implements ProjectHost. func (api *API) NewLine() string { return api.host.NewLine() diff --git a/internal/api/encoder/encoder.go b/internal/api/encoder/encoder.go index d143981778..55f49f809c 100644 --- a/internal/api/encoder/encoder.go +++ b/internal/api/encoder/encoder.go @@ -693,14 +693,8 @@ func getChildrenPropertyMask(node *ast.Node) uint8 { case ast.KindClassDeclaration: n := node.AsClassDeclaration() return (boolToByte(n.Modifiers() != nil) << 0) | (boolToByte(n.Name() != nil) << 1) | (boolToByte(n.TypeParameters != nil) << 2) | (boolToByte(n.HeritageClauses != nil) << 3) | (boolToByte(n.Members != nil) << 4) - case ast.KindJSDocPropertyTag: - n := node.AsJSDocPropertyTag() - if n.IsNameFirst { - return (boolToByte(n.Name() != nil) << 0) | (boolToByte(n.TypeExpression != nil) << 1) - } - return (boolToByte(n.TypeExpression != nil) << 0) | (boolToByte(n.Name() != nil) << 1) - case ast.KindJSDocParameterTag: - n := node.AsJSDocParameterTag() + case ast.KindJSDocParameterTag, ast.KindJSDocPropertyTag: + n := node.AsJSDocParameterOrPropertyTag() if n.IsNameFirst { return (boolToByte(n.TagName != nil) << 0) | (boolToByte(n.Name() != nil) << 1) | (boolToByte(n.TypeExpression != nil) << 2) | (boolToByte(n.Comment != nil) << 3) } @@ -745,11 +739,8 @@ func getNodeDefinedData(node *ast.Node) uint32 { case ast.KindObjectLiteralExpression: n := node.AsObjectLiteralExpression() return uint32(boolToByte(n.MultiLine)) << 24 - case ast.KindJSDocPropertyTag: - n := node.AsJSDocPropertyTag() - return uint32(boolToByte(n.IsBracketed))<<24 | uint32(boolToByte(n.IsNameFirst))<<25 - case ast.KindJSDocParameterTag: - n := node.AsJSDocParameterTag() + case ast.KindJSDocParameterTag, ast.KindJSDocPropertyTag: + n := node.AsJSDocParameterOrPropertyTag() return uint32(boolToByte(n.IsBracketed))<<24 | uint32(boolToByte(n.IsNameFirst))<<25 case ast.KindJsxText: n := node.AsJsxText() diff --git a/internal/api/encoder/encoder_test.go b/internal/api/encoder/encoder_test.go index d72fafe5ae..ce616dfc26 100644 --- a/internal/api/encoder/encoder_test.go +++ b/internal/api/encoder/encoder_test.go @@ -18,13 +18,9 @@ import ( "gotest.tools/v3/assert" ) -var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ - EmitScriptTarget: core.ScriptTargetLatest, -} - func TestEncodeSourceFile(t *testing.T) { t.Parallel() - sourceFile := parser.ParseSourceFile("/test.ts", "/test.ts", "import { bar } from \"bar\";\nexport function foo(a: string, b: string): any {}\nfoo();", parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) + sourceFile := parser.ParseSourceFile("/test.ts", "/test.ts", "import { bar } from \"bar\";\nexport function foo(a: string, b: string): any {}\nfoo();", core.ScriptTargetESNext, scanner.JSDocParsingModeParseAll) t.Run("baseline", func(t *testing.T) { t.Parallel() buf, err := encoder.EncodeSourceFile(sourceFile, "") @@ -46,8 +42,7 @@ func BenchmarkEncodeSourceFile(b *testing.B) { "/checker.ts", "/checker.ts", string(fileContent), - parseCompilerOptions, - nil, + core.ScriptTargetESNext, scanner.JSDocParsingModeParseAll, ) diff --git a/internal/api/server.go b/internal/api/server.go index 061e5d7bae..e6c5a6d575 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -18,6 +18,7 @@ import ( ) //go:generate go tool golang.org/x/tools/cmd/stringer -type=MessageType -output=stringer_generated.go +//go:generate go tool mvdan.cc/gofumpt -lang=go1.24 -w stringer_generated.go type MessageType uint8 diff --git a/internal/ast/ast.go b/internal/ast/ast.go index d59e95a47c..681e63c6e9 100644 --- a/internal/ast/ast.go +++ b/internal/ast/ast.go @@ -548,8 +548,8 @@ func (n *Node) Type() *Node { return n.AsTemplateLiteralTypeSpan().Type case KindJSDocTypeExpression: return n.AsJSDocTypeExpression().Type - case KindJSDocPropertyTag: - return n.AsJSDocPropertyTag().TypeExpression + case KindJSDocParameterTag, KindJSDocPropertyTag: + return n.AsJSDocParameterOrPropertyTag().TypeExpression case KindJSDocNullableType: return n.AsJSDocNullableType().Type case KindJSDocNonNullableType: @@ -623,8 +623,8 @@ func (n *Node) TagName() *Node { return n.AsJSDocCallbackTag().TagName case KindJSDocOverloadTag: return n.AsJSDocOverloadTag().TagName - case KindJSDocParameterTag: - return n.AsJSDocParameterTag().TagName + case KindJSDocParameterTag, KindJSDocPropertyTag: + return n.AsJSDocParameterOrPropertyTag().TagName case KindJSDocReturnTag: return n.AsJSDocReturnTag().TagName case KindJSDocThisTag: @@ -637,8 +637,6 @@ func (n *Node) TagName() *Node { return n.AsJSDocTypedefTag().TagName case KindJSDocSeeTag: return n.AsJSDocSeeTag().TagName - case KindJSDocPropertyTag: - return n.AsJSDocPropertyTag().TagName case KindJSDocSatisfiesTag: return n.AsJSDocSatisfiesTag().TagName case KindJSDocImportTag: @@ -709,8 +707,8 @@ func (n *Node) CommentList() *NodeList { return n.AsJSDocCallbackTag().Comment case KindJSDocOverloadTag: return n.AsJSDocOverloadTag().Comment - case KindJSDocParameterTag: - return n.AsJSDocParameterTag().Comment + case KindJSDocParameterTag, KindJSDocPropertyTag: + return n.AsJSDocParameterOrPropertyTag().Comment case KindJSDocReturnTag: return n.AsJSDocReturnTag().Comment case KindJSDocThisTag: @@ -723,8 +721,6 @@ func (n *Node) CommentList() *NodeList { return n.AsJSDocTypedefTag().Comment case KindJSDocSeeTag: return n.AsJSDocSeeTag().Comment - case KindJSDocPropertyTag: - return n.AsJSDocPropertyTag().Comment case KindJSDocSatisfiesTag: return n.AsJSDocSatisfiesTag().Comment case KindJSDocImportTag: @@ -1520,12 +1516,8 @@ func (n *Node) AsJSDocTemplateTag() *JSDocTemplateTag { return n.data.(*JSDocTemplateTag) } -func (n *Node) AsJSDocPropertyTag() *JSDocPropertyTag { - return n.data.(*JSDocPropertyTag) -} - -func (n *Node) AsJSDocParameterTag() *JSDocParameterTag { - return n.data.(*JSDocParameterTag) +func (n *Node) AsJSDocParameterOrPropertyTag() *JSDocParameterOrPropertyTag { + return n.data.(*JSDocParameterOrPropertyTag) } func (n *Node) AsJSDocReturnTag() *JSDocReturnTag { @@ -1846,7 +1838,7 @@ func IsDeclarationNode(node *Node) bool { return node.DeclarationData() != nil } -// DeclarationBase +// ExportableBase type ExportableBase struct { LocalSymbol *Symbol // Local symbol declared by node (initialized by binding only for exported nodes) @@ -5529,6 +5521,10 @@ func (node *RegularExpressionLiteral) Clone(f NodeFactoryCoercible) *Node { return cloneNode(f.AsNodeFactory().NewRegularExpressionLiteral(node.Text), node.AsNode(), f.AsNodeFactory().hooks) } +func IsRegularExpressionLiteral(node *Node) bool { + return node.Kind == KindRegularExpressionLiteral +} + // NoSubstitutionTemplateLiteral type NoSubstitutionTemplateLiteral struct { @@ -5988,6 +5984,10 @@ func (node *ConditionalExpression) computeSubtreeFacts() SubtreeFacts { propagateSubtreeFacts(node.WhenFalse) } +func IsConditionalExpression(node *Node) bool { + return node.Kind == KindConditionalExpression +} + // PropertyAccessExpression type PropertyAccessExpression struct { @@ -9194,8 +9194,8 @@ func (node *JSDocTemplateTag) Clone(f NodeFactoryCoercible) *Node { return cloneNode(f.AsNodeFactory().NewJSDocTemplateTag(node.TagName, node.Constraint, node.TypeParameters, node.Comment), node.AsNode(), f.AsNodeFactory().hooks) } -// JSDocPropertyTag -type JSDocPropertyTag struct { +// JSDocParameterOrPropertyTag +type JSDocParameterOrPropertyTag struct { JSDocTagBase name *EntityName IsBracketed bool @@ -9203,88 +9203,46 @@ type JSDocPropertyTag struct { IsNameFirst bool } -func (f *NodeFactory) NewJSDocPropertyTag(tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node { - data := &JSDocPropertyTag{} +type ( + JSDocParameterTag = JSDocParameterOrPropertyTag + JSDocPropertyTag = JSDocParameterOrPropertyTag +) + +func (f *NodeFactory) newJSDocParameterOrPropertyTag(kind Kind, tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node { + data := &JSDocParameterOrPropertyTag{} data.TagName = tagName data.name = name data.IsBracketed = isBracketed data.TypeExpression = typeExpression data.IsNameFirst = isNameFirst data.Comment = comment - return f.newNode(KindJSDocPropertyTag, data) -} - -func (f *NodeFactory) UpdateJSDocPropertyTag(node *JSDocPropertyTag, tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node { - if tagName != node.TagName || name != node.name || isBracketed != node.IsBracketed || typeExpression != node.TypeExpression || isNameFirst != node.IsNameFirst || comment != node.Comment { - return updateNode(f.NewJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node.AsNode(), f.hooks) - } - return node.AsNode() -} - -func (node *JSDocPropertyTag) ForEachChild(v Visitor) bool { - if node.IsNameFirst { - return visit(v, node.TagName) || visit(v, node.name) || visit(v, node.TypeExpression) || visitNodeList(v, node.Comment) - } else { - return visit(v, node.TagName) || visit(v, node.TypeExpression) || visit(v, node.name) || visitNodeList(v, node.Comment) - } -} - -func (node *JSDocPropertyTag) VisitEachChild(v *NodeVisitor) *Node { - tagName := v.visitNode(node.TagName) - var name, typeExpression *Node - if node.IsNameFirst { - name, typeExpression = v.visitNode(node.name), v.visitNode(node.TypeExpression) - } else { - typeExpression, name = v.visitNode(node.TypeExpression), v.visitNode(node.name) - } - return v.Factory.UpdateJSDocPropertyTag(node, tagName, name, node.IsBracketed, typeExpression, node.IsNameFirst, v.visitNodes(node.Comment)) -} - -func (node *JSDocPropertyTag) Clone(f NodeFactoryCoercible) *Node { - return cloneNode(f.AsNodeFactory().NewJSDocPropertyTag(node.TagName, node.Name(), node.IsBracketed, node.TypeExpression, node.IsNameFirst, node.Comment), node.AsNode(), f.AsNodeFactory().hooks) + return f.newNode(kind, data) } -func (node *JSDocPropertyTag) Name() *EntityName { return node.name } - -// JSDocParameterTag -type JSDocParameterTag struct { - JSDocTagBase - name *EntityName - IsBracketed bool - TypeExpression *TypeNode - IsNameFirst bool +func (f *NodeFactory) NewJSDocParameterTag(tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node { + return f.newJSDocParameterOrPropertyTag(KindJSDocParameterTag, tagName, name, isBracketed, typeExpression, isNameFirst, comment) } -func (f *NodeFactory) NewJSDocParameterTag(tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node { - data := &JSDocParameterTag{} - data.TagName = tagName - data.name = name - data.IsBracketed = isBracketed - data.TypeExpression = typeExpression - data.IsNameFirst = isNameFirst - data.Comment = comment - return f.newNode(KindJSDocParameterTag, data) +func (f *NodeFactory) NewJSDocPropertyTag(tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node { + return f.newJSDocParameterOrPropertyTag(KindJSDocPropertyTag, tagName, name, isBracketed, typeExpression, isNameFirst, comment) } -func (f *NodeFactory) UpdateJSDocParameterTag(node *JSDocParameterTag, tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node { +func (f *NodeFactory) UpdateJSDocParameterOrPropertyTag(kind Kind, node *JSDocParameterOrPropertyTag, tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node { if tagName != node.TagName || name != node.name || isBracketed != node.IsBracketed || typeExpression != node.TypeExpression || isNameFirst != node.IsNameFirst || comment != node.Comment { - return updateNode(f.NewJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node.AsNode(), f.hooks) + return updateNode(f.newJSDocParameterOrPropertyTag(kind, tagName, name, isBracketed, typeExpression, isNameFirst, comment), node.AsNode(), f.hooks) } return node.AsNode() } -func (node *JSDocParameterTag) ForEachChild(v Visitor) bool { - if visit(v, node.TagName) { - return true - } +func (node *JSDocParameterOrPropertyTag) ForEachChild(v Visitor) bool { if node.IsNameFirst { - return visit(v, node.name) || visit(v, node.TypeExpression) || visitNodeList(v, node.Comment) + return visit(v, node.TagName) || visit(v, node.name) || visit(v, node.TypeExpression) || visitNodeList(v, node.Comment) } else { - return visit(v, node.TypeExpression) || visit(v, node.name) || visitNodeList(v, node.Comment) + return visit(v, node.TagName) || visit(v, node.TypeExpression) || visit(v, node.name) || visitNodeList(v, node.Comment) } } -func (node *JSDocParameterTag) VisitEachChild(v *NodeVisitor) *Node { +func (node *JSDocParameterOrPropertyTag) VisitEachChild(v *NodeVisitor) *Node { tagName := v.visitNode(node.TagName) var name, typeExpression *Node if node.IsNameFirst { @@ -9292,14 +9250,14 @@ func (node *JSDocParameterTag) VisitEachChild(v *NodeVisitor) *Node { } else { typeExpression, name = v.visitNode(node.TypeExpression), v.visitNode(node.name) } - return v.Factory.UpdateJSDocParameterTag(node, tagName, name, node.IsBracketed, typeExpression, node.IsNameFirst, v.visitNodes(node.Comment)) + return v.Factory.UpdateJSDocParameterOrPropertyTag(node.Kind, node, tagName, name, node.IsBracketed, typeExpression, node.IsNameFirst, v.visitNodes(node.Comment)) } -func (node *JSDocParameterTag) Clone(f NodeFactoryCoercible) *Node { - return cloneNode(f.AsNodeFactory().NewJSDocParameterTag(node.TagName, node.Name(), node.IsBracketed, node.TypeExpression, node.IsNameFirst, node.Comment), node.AsNode(), f.AsNodeFactory().hooks) +func (node *JSDocParameterOrPropertyTag) Clone(f NodeFactoryCoercible) *Node { + return cloneNode(f.AsNodeFactory().newJSDocParameterOrPropertyTag(node.Kind, node.TagName, node.Name(), node.IsBracketed, node.TypeExpression, node.IsNameFirst, node.Comment), node.AsNode(), f.AsNodeFactory().hooks) } -func (node *JSDocParameterTag) Name() *EntityName { return node.name } +func (node *JSDocParameterOrPropertyTag) Name() *EntityName { return node.name } // JSDocReturnTag type JSDocReturnTag struct { @@ -9981,6 +9939,11 @@ type CheckJsDirective struct { Range CommentRange } +type HasFileName interface { + FileName() string + Path() tspath.Path +} + type SourceFile struct { NodeBase DeclarationBase @@ -10018,9 +9981,6 @@ type SourceFile struct { CheckJsDirective *CheckJsDirective NodeCount int TextCount int - CommonJSModuleIndicator *Node - Metadata *SourceFileMetaData - ExternalModuleIndicator *Node // Fields set by binder @@ -10038,10 +9998,6 @@ type SourceFile struct { lineMapMu sync.RWMutex lineMap []core.TextPos - // Fields set by document registry - - Version int - // Fields set by language service tokenCacheMu sync.Mutex @@ -10049,7 +10005,9 @@ type SourceFile struct { // !!! - JSGlobalAugmentations SymbolTable + CommonJSModuleIndicator *Node + ExternalModuleIndicator *Node + JSGlobalAugmentations SymbolTable } func (f *NodeFactory) NewSourceFile(text string, fileName string, path tspath.Path, statements *NodeList) *Node { @@ -10147,7 +10105,6 @@ func (node *SourceFile) copyFrom(other *SourceFile) { node.ReferencedFiles = other.ReferencedFiles node.TypeReferenceDirectives = other.TypeReferenceDirectives node.LibReferenceDirectives = other.LibReferenceDirectives - node.Metadata = other.Metadata node.CommonJSModuleIndicator = other.CommonJSModuleIndicator node.ExternalModuleIndicator = other.ExternalModuleIndicator node.JSGlobalAugmentations = other.JSGlobalAugmentations diff --git a/internal/ast/kind.go b/internal/ast/kind.go index 8d20479b33..735571a6d1 100644 --- a/internal/ast/kind.go +++ b/internal/ast/kind.go @@ -1,6 +1,7 @@ package ast //go:generate go tool golang.org/x/tools/cmd/stringer -type=Kind -output=kind_stringer_generated.go +//go:generate go tool mvdan.cc/gofumpt -lang=go1.24 -w kind_stringer_generated.go type Kind int16 @@ -423,4 +424,6 @@ const ( KindFirstContextualKeyword = KindAbstractKeyword KindLastContextualKeyword = KindOfKeyword KindComment = KindSingleLineCommentTrivia | KindMultiLineCommentTrivia + KindFirstTriviaToken = KindSingleLineCommentTrivia + KindLastTriviaToken = KindConflictMarkerTrivia ) diff --git a/internal/ast/utilities.go b/internal/ast/utilities.go index 1019bcf02f..ffe50784b6 100644 --- a/internal/ast/utilities.go +++ b/internal/ast/utilities.go @@ -126,6 +126,10 @@ func IsModifier(node *Node) bool { return IsModifierKind(node.Kind) } +func IsModifierLike(node *Node) bool { + return IsModifier(node) || IsDecorator(node) +} + func IsKeywordKind(token Kind) bool { return KindFirstKeyword <= token && token <= KindLastKeyword } @@ -885,7 +889,8 @@ func newParentInChildrenSetter() func(node *Node) bool { } state.visit = func(node *Node) bool { - if state.parent != nil { + if state.parent != nil && node.Parent != state.parent { + // Avoid data races on no-ops node.Parent = state.parent } saveParent := state.parent @@ -1035,6 +1040,25 @@ func IsStatic(node *Node) bool { return IsClassElement(node) && HasStaticModifier(node) || IsClassStaticBlockDeclaration(node) } +func CanHaveSymbol(node *Node) bool { + switch node.Kind { + case KindArrowFunction, KindBinaryExpression, KindBindingElement, KindCallExpression, KindCallSignature, + KindClassDeclaration, KindClassExpression, KindClassStaticBlockDeclaration, KindConstructor, KindConstructorType, + KindConstructSignature, KindElementAccessExpression, KindEnumDeclaration, KindEnumMember, KindExportAssignment, + KindExportDeclaration, KindExportSpecifier, KindFunctionDeclaration, KindFunctionExpression, KindFunctionType, + KindGetAccessor, KindImportClause, KindImportEqualsDeclaration, KindImportSpecifier, KindIndexSignature, + KindInterfaceDeclaration, KindJSExportAssignment, KindJSTypeAliasDeclaration, KindCommonJSExport, + KindJsxAttribute, KindJsxAttributes, KindJsxSpreadAttribute, KindMappedType, KindMethodDeclaration, + KindMethodSignature, KindModuleDeclaration, KindNamedTupleMember, KindNamespaceExport, KindNamespaceExportDeclaration, + KindNamespaceImport, KindNewExpression, KindNoSubstitutionTemplateLiteral, KindNumericLiteral, KindObjectLiteralExpression, + KindParameter, KindPropertyAccessExpression, KindPropertyAssignment, KindPropertyDeclaration, KindPropertySignature, + KindSetAccessor, KindShorthandPropertyAssignment, KindSourceFile, KindSpreadAssignment, KindStringLiteral, + KindTypeAliasDeclaration, KindTypeLiteral, KindTypeParameter, KindVariableDeclaration: + return true + } + return false +} + func CanHaveIllegalDecorators(node *Node) bool { switch node.Kind { case KindPropertyAssignment, KindShorthandPropertyAssignment, @@ -1255,6 +1279,10 @@ func IsExternalModuleImportEqualsDeclaration(node *Node) bool { return node.Kind == KindImportEqualsDeclaration && node.AsImportEqualsDeclaration().ModuleReference.Kind == KindExternalModuleReference } +func IsModuleOrEnumDeclaration(node *Node) bool { + return node.Kind == KindModuleDeclaration || node.Kind == KindEnumDeclaration +} + func IsLiteralImportTypeNode(node *Node) bool { return IsImportTypeNode(node) && IsLiteralTypeNode(node.AsImportTypeNode().Argument) && IsStringLiteral(node.AsImportTypeNode().Argument.AsLiteralTypeNode().Literal) } @@ -1296,6 +1324,27 @@ func IsThisParameter(node *Node) bool { return IsParameter(node) && node.Name() != nil && IsThisIdentifier(node.Name()) } +func IsBindableStaticAccessExpression(node *Node, excludeThisKeyword bool) bool { + return IsPropertyAccessExpression(node) && + (!excludeThisKeyword && node.Expression().Kind == KindThisKeyword || IsIdentifier(node.Name()) && IsBindableStaticNameExpression(node.Expression() /*excludeThisKeyword*/, true)) || + IsBindableStaticElementAccessExpression(node, excludeThisKeyword) +} + +func IsBindableStaticElementAccessExpression(node *Node, excludeThisKeyword bool) bool { + return IsLiteralLikeElementAccess(node) && + ((!excludeThisKeyword && node.Expression().Kind == KindThisKeyword) || + IsEntityNameExpression(node.Expression()) || + IsBindableStaticAccessExpression(node.Expression() /*excludeThisKeyword*/, true)) +} + +func IsLiteralLikeElementAccess(node *Node) bool { + return IsElementAccessExpression(node) && IsStringOrNumericLiteralLike(node.AsElementAccessExpression().ArgumentExpression) +} + +func IsBindableStaticNameExpression(node *Node, excludeThisKeyword bool) bool { + return IsEntityNameExpression(node) || IsBindableStaticAccessExpression(node, excludeThisKeyword) +} + // Does not handle signed numeric names like `a[+0]` - handling those would require handling prefix unary expressions // throughout late binding handling as well, which is awkward (but ultimately probably doable if there is demand) func GetElementOrPropertyAccessName(node *Node) *Node { @@ -1314,6 +1363,13 @@ func GetElementOrPropertyAccessName(node *Node) *Node { panic("Unhandled case in GetElementOrPropertyAccessName") } +func GetInitializerOfBinaryExpression(expr *BinaryExpression) *Expression { + for IsBinaryExpression(expr.Right) { + expr = expr.Right.AsBinaryExpression() + } + return expr.Right.Expression() +} + func IsExpressionWithTypeArgumentsInClassExtendsClause(node *Node) bool { return TryGetClassExtendingExpressionWithTypeArguments(node) != nil } @@ -1657,6 +1713,40 @@ func GetThisContainer(node *Node, includeArrowFunctions bool, includeClassComput } } +func GetSuperContainer(node *Node, stopOnFunctions bool) *Node { + for { + node = node.Parent + if node == nil { + return nil + } + switch node.Kind { + case KindComputedPropertyName: + node = node.Parent + break + case KindFunctionDeclaration, KindFunctionExpression, KindArrowFunction: + if !stopOnFunctions { + continue + } + // falls through + + case KindPropertyDeclaration, KindPropertySignature, KindMethodDeclaration, KindMethodSignature, KindConstructor, KindGetAccessor, KindSetAccessor, KindClassStaticBlockDeclaration: + return node + case KindDecorator: + // Decorators are always applied outside of the body of a class or method. + if node.Parent.Kind == KindParameter && IsClassElement(node.Parent.Parent) { + // If the decorator's parent is a Parameter, we resolve the this container from + // the grandparent class declaration. + node = node.Parent.Parent + } else if IsClassElement(node.Parent) { + // If the decorator's parent is a class element, we resolve the 'this' container + // from the parent class declaration. + node = node.Parent + } + break + } + } +} + func GetImmediatelyInvokedFunctionExpression(fn *Node) *Node { if IsFunctionExpressionOrArrowFunction(fn) { prev := fn @@ -1765,13 +1855,13 @@ func IsExpressionNode(node *Node) bool { for node.Parent.Kind == KindQualifiedName { node = node.Parent } - return IsTypeQueryNode(node.Parent) || isJSDocLinkLike(node.Parent) || isJSXTagName(node) + return IsTypeQueryNode(node.Parent) || IsJSDocLinkLike(node.Parent) || isJSXTagName(node) case KindJSDocMemberName: - return IsTypeQueryNode(node.Parent) || isJSDocLinkLike(node.Parent) || isJSXTagName(node) + return IsTypeQueryNode(node.Parent) || IsJSDocLinkLike(node.Parent) || isJSXTagName(node) case KindPrivateIdentifier: return IsBinaryExpression(node.Parent) && node.Parent.AsBinaryExpression().Left == node && node.Parent.AsBinaryExpression().OperatorToken.Kind == KindInKeyword case KindIdentifier: - if IsTypeQueryNode(node.Parent) || isJSDocLinkLike(node.Parent) || isJSXTagName(node) { + if IsTypeQueryNode(node.Parent) || IsJSDocLinkLike(node.Parent) || isJSXTagName(node) { return true } fallthrough @@ -1914,7 +2004,7 @@ func isPartOfTypeExpressionWithTypeArguments(node *Node) bool { return IsHeritageClause(parent) && (!IsClassLike(parent.Parent) || parent.AsHeritageClause().Token == KindImplementsKeyword) } -func isJSDocLinkLike(node *Node) bool { +func IsJSDocLinkLike(node *Node) bool { return NodeKindIs(node, KindJSDocLink, KindJSDocLinkCode, KindJSDocLinkPlain) } @@ -1948,7 +2038,10 @@ func IsComputedNonLiteralName(name *Node) bool { } func IsQuestionToken(node *Node) bool { - return node != nil && node.Kind == KindQuestionToken + if node == nil { + return false + } + return node.Kind == KindQuestionToken } func GetTextOfPropertyName(name *Node) string { @@ -1977,7 +2070,7 @@ func IsJSDocCommentContainingNode(node *Node) bool { node.Kind == KindJSDocText || node.Kind == KindJSDocTypeLiteral || node.Kind == KindJSDocSignature || - isJSDocLinkLike(node) || + IsJSDocLinkLike(node) || IsJSDocTag(node) } @@ -2410,17 +2503,17 @@ func GetImpliedNodeFormatForFile(path string, packageJsonType string) core.Modul return impliedNodeFormat } -func GetEmitModuleFormatOfFileWorker(sourceFile *SourceFile, options *core.CompilerOptions) core.ModuleKind { - result := GetImpliedNodeFormatForEmitWorker(sourceFile, options.GetEmitModuleKind()) +func GetEmitModuleFormatOfFileWorker(fileName string, options *core.CompilerOptions, sourceFileMetaData *SourceFileMetaData) core.ModuleKind { + result := GetImpliedNodeFormatForEmitWorker(fileName, options, sourceFileMetaData) if result != core.ModuleKindNone { return result } return options.GetEmitModuleKind() } -func GetImpliedNodeFormatForEmitWorker(sourceFile *SourceFile, emitModuleKind core.ModuleKind) core.ModuleKind { - sourceFileMetaData := sourceFile.Metadata - if core.ModuleKindNode16 <= emitModuleKind && emitModuleKind <= core.ModuleKindNodeNext { +func GetImpliedNodeFormatForEmitWorker(fileName string, options *core.CompilerOptions, sourceFileMetaData *SourceFileMetaData) core.ResolutionMode { + moduleKind := options.GetEmitModuleKind() + if core.ModuleKindNode16 <= moduleKind && moduleKind <= core.ModuleKindNodeNext { if sourceFileMetaData == nil { return core.ModuleKindNone } @@ -2428,12 +2521,12 @@ func GetImpliedNodeFormatForEmitWorker(sourceFile *SourceFile, emitModuleKind co } if sourceFileMetaData != nil && sourceFileMetaData.ImpliedNodeFormat == core.ModuleKindCommonJS && (sourceFileMetaData.PackageJsonType == "commonjs" || - tspath.FileExtensionIsOneOf(sourceFile.FileName(), []string{tspath.ExtensionCjs, tspath.ExtensionCts})) { + tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionCjs, tspath.ExtensionCts})) { return core.ModuleKindCommonJS } if sourceFileMetaData != nil && sourceFileMetaData.ImpliedNodeFormat == core.ModuleKindESNext && (sourceFileMetaData.PackageJsonType == "module" || - tspath.FileExtensionIsOneOf(sourceFile.FileName(), []string{tspath.ExtensionMjs, tspath.ExtensionMts})) { + tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionMjs, tspath.ExtensionMts})) { return core.ModuleKindESNext } return core.ModuleKindNone @@ -2657,10 +2750,6 @@ func GetPragmaArgument(pragma *Pragma, name string) string { return "" } -func IsJsxOpeningLikeElement(node *Node) bool { - return IsJsxOpeningElement(node) || IsJsxSelfClosingElement(node) -} - // Of the form: `const x = require("x")` or `const { x } = require("x")` or with `var` or `let` // The variable must not be exported and must not have a type annotation, even a jsdoc one. // The initializer must be a call to `require` with a string literal or a string literal-like argument. @@ -2774,9 +2863,19 @@ func GetLanguageVariant(scriptKind core.ScriptKind) core.LanguageVariant { func IsCallLikeExpression(node *Node) bool { switch node.Kind { - case KindJsxOpeningElement, KindJsxSelfClosingElement, KindCallExpression, KindNewExpression, + case KindJsxOpeningElement, KindJsxSelfClosingElement, KindJsxOpeningFragment, KindCallExpression, KindNewExpression, KindTaggedTemplateExpression, KindDecorator: return true + case KindBinaryExpression: + return node.AsBinaryExpression().OperatorToken.Kind == KindInstanceOfKeyword + } + return false +} + +func IsJsxCallLike(node *Node) bool { + switch node.Kind { + case KindJsxOpeningElement, KindJsxSelfClosingElement, KindJsxOpeningFragment: + return true } return false } @@ -3389,3 +3488,84 @@ func IsRightSideOfQualifiedNameOrPropertyAccess(node *Node) bool { } return false } + +func ShouldTransformImportCall(fileName string, options *core.CompilerOptions, impliedNodeFormatForEmit core.ModuleKind) bool { + moduleKind := options.GetEmitModuleKind() + if core.ModuleKindNode16 <= moduleKind && moduleKind <= core.ModuleKindNodeNext || moduleKind == core.ModuleKindPreserve { + return false + } + return impliedNodeFormatForEmit < core.ModuleKindES2015 +} + +func HasQuestionToken(node *Node) bool { + switch node.Kind { + case KindParameter: + return node.AsParameterDeclaration().QuestionToken != nil + case KindMethodDeclaration: + return IsQuestionToken(node.AsMethodDeclaration().PostfixToken) + case KindShorthandPropertyAssignment: + return IsQuestionToken(node.AsShorthandPropertyAssignment().PostfixToken) + case KindMethodSignature: + return IsQuestionToken(node.AsMethodSignatureDeclaration().PostfixToken) + case KindPropertySignature: + return IsQuestionToken(node.AsPropertySignatureDeclaration().PostfixToken) + case KindPropertyAssignment: + return IsQuestionToken(node.AsPropertyAssignment().PostfixToken) + case KindPropertyDeclaration: + return IsQuestionToken(node.AsPropertyDeclaration().PostfixToken) + } + return false +} + +func IsJsxOpeningLikeElement(node *Node) bool { + return IsJsxOpeningElement(node) || IsJsxSelfClosingElement(node) +} + +func GetInvokedExpression(node *Node) *Node { + switch node.Kind { + case KindTaggedTemplateExpression: + return node.AsTaggedTemplateExpression().Tag + case KindJsxOpeningElement, KindJsxSelfClosingElement: + return node.TagName() + case KindBinaryExpression: + return node.AsBinaryExpression().Right + case KindJsxOpeningFragment: + return node + default: + return node.Expression() + } +} + +func IsCallOrNewExpression(node *Node) bool { + return IsCallExpression(node) || IsNewExpression(node) +} + +func IndexOfNode(nodes []*Node, node *Node) int { + index, ok := slices.BinarySearchFunc(nodes, node, compareNodePositions) + if ok { + return index + } + return -1 +} + +func compareNodePositions(n1, n2 *Node) int { + return n1.Pos() - n2.Pos() +} + +func IsUnterminatedNode(node *Node) bool { + return IsLiteralKind(node.Kind) && IsUnterminatedLiteral(node) +} + +// Gets a value indicating whether a class element is either a static or an instance property declaration with an initializer. +func IsInitializedProperty(member *ClassElement) bool { + return member.Kind == KindPropertyDeclaration && + member.Initializer() != nil +} + +func IsTrivia(token Kind) bool { + return KindFirstTriviaToken <= token && token <= KindLastTriviaToken +} + +func HasDecorators(node *Node) bool { + return HasSyntacticModifier(node, ModifierFlagsDecorator) +} diff --git a/internal/astnav/tokens.go b/internal/astnav/tokens.go index e332874f2c..2a3572b7d1 100644 --- a/internal/astnav/tokens.go +++ b/internal/astnav/tokens.go @@ -14,6 +14,10 @@ func GetTouchingPropertyName(sourceFile *ast.SourceFile, position int) *ast.Node }) } +func GetTouchingToken(sourceFile *ast.SourceFile, position int) *ast.Node { + return getTokenAtPosition(sourceFile, position, false /*allowPositionInLeadingTrivia*/, nil) +} + func GetTokenAtPosition(sourceFile *ast.SourceFile, position int) *ast.Node { return getTokenAtPosition(sourceFile, position, true /*allowPositionInLeadingTrivia*/, nil) } diff --git a/internal/astnav/tokens_test.go b/internal/astnav/tokens_test.go index 208b137d60..7ccd674924 100644 --- a/internal/astnav/tokens_test.go +++ b/internal/astnav/tokens_test.go @@ -26,10 +26,6 @@ var testFiles = []string{ filepath.Join(repo.TypeScriptSubmodulePath, "src/services/mapCode.ts"), } -var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ - EmitScriptTarget: core.ScriptTargetLatest, -} - func TestGetTokenAtPosition(t *testing.T) { t.Parallel() repo.SkipIfNoTypeScriptSubmodule(t) @@ -57,7 +53,7 @@ func TestGetTokenAtPosition(t *testing.T) { return 0; } ` - file := parser.ParseSourceFile("/file.ts", "/file.ts", fileText, parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", fileText, core.ScriptTargetLatest, scanner.JSDocParsingModeParseAll) assert.Equal(t, astnav.GetTokenAtPosition(file, 0), astnav.GetTokenAtPosition(file, 0)) }) } @@ -92,7 +88,7 @@ func baselineTokens(t *testing.T, testName string, includeEOF bool, getTSTokens positions[i] = i } tsTokens := getTSTokens(string(fileText), positions) - file := parser.ParseSourceFile("/file.ts", "/file.ts", string(fileText), parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", string(fileText), core.ScriptTargetLatest, scanner.JSDocParsingModeParseAll) var output strings.Builder currentRange := core.NewTextRange(0, 0) @@ -425,7 +421,7 @@ export function isAnyDirectorySeparator(charCode: number): boolean { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { t.Parallel() - file := parser.ParseSourceFile("/file.ts", "/file.ts", testCase.fileContent, parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", testCase.fileContent, core.ScriptTargetLatest, scanner.JSDocParsingModeParseAll) token := astnav.FindPrecedingToken(file, testCase.position) assert.Equal(t, token.Kind, testCase.expectedKind) }) diff --git a/internal/binder/binder.go b/internal/binder/binder.go index 5e3dcdbcda..e295206b73 100644 --- a/internal/binder/binder.go +++ b/internal/binder/binder.go @@ -762,7 +762,10 @@ func (b *Binder) bind(node *ast.Node) bool { func (b *Binder) setJSDocParents(node *ast.Node) { for _, jsdoc := range node.JSDoc(b.file) { setParent(jsdoc, node) - ast.SetParentInChildren(jsdoc) + if jsdoc.Kind != ast.KindJSDocImportTag { + // JSDocImportTag children have parents set during parsing for module resolution purposes. + ast.SetParentInChildren(jsdoc) + } } } @@ -1892,13 +1895,16 @@ func (b *Binder) bindForStatement(node *ast.Node) { stmt := node.AsForStatement() preLoopLabel := b.setContinueTarget(node, b.createLoopLabel()) preBodyLabel := b.createBranchLabel() + preIncrementorLabel := b.createBranchLabel() postLoopLabel := b.createBranchLabel() b.bind(stmt.Initializer) topFlow := b.currentFlow b.currentFlow = preLoopLabel b.bindCondition(stmt.Condition, preBodyLabel, postLoopLabel) b.currentFlow = b.finishFlowLabel(preBodyLabel) - b.bindIterativeStatement(stmt.Statement, postLoopLabel, preLoopLabel) + b.bindIterativeStatement(stmt.Statement, postLoopLabel, preIncrementorLabel) + b.addAntecedent(preIncrementorLabel, b.currentFlow) + b.currentFlow = b.finishFlowLabel(preIncrementorLabel) b.bind(stmt.Incrementor) b.addAntecedent(preLoopLabel, b.currentFlow) b.addAntecedent(preLoopLabel, topFlow) @@ -2686,9 +2692,11 @@ func isNarrowingBinaryExpression(expr *ast.BinaryExpression) bool { case ast.KindEqualsToken, ast.KindBarBarEqualsToken, ast.KindAmpersandAmpersandEqualsToken, ast.KindQuestionQuestionEqualsToken: return containsNarrowableReference(expr.Left) case ast.KindEqualsEqualsToken, ast.KindExclamationEqualsToken, ast.KindEqualsEqualsEqualsToken, ast.KindExclamationEqualsEqualsToken: - return isNarrowableOperand(expr.Left) || isNarrowableOperand(expr.Right) || - isNarrowingTypeOfOperands(expr.Right, expr.Left) || isNarrowingTypeOfOperands(expr.Left, expr.Right) || - (ast.IsBooleanLiteral(expr.Right) && isNarrowingExpression(expr.Left) || ast.IsBooleanLiteral(expr.Left) && isNarrowingExpression(expr.Right)) + left := ast.SkipParentheses(expr.Left) + right := ast.SkipParentheses(expr.Right) + return isNarrowableOperand(left) || isNarrowableOperand(right) || + isNarrowingTypeOfOperands(right, left) || isNarrowingTypeOfOperands(left, right) || + (ast.IsBooleanLiteral(right) && isNarrowingExpression(left) || ast.IsBooleanLiteral(left) && isNarrowingExpression(right)) case ast.KindInstanceOfKeyword: return isNarrowableOperand(expr.Left) case ast.KindInKeyword: @@ -2876,9 +2884,15 @@ func GetErrorRangeForNode(sourceFile *ast.SourceFile, node *ast.Node) core.TextR } return scanner.GetRangeOfTokenAtPosition(sourceFile, pos) // This list is a work in progress. Add missing node kinds to improve their error spans + case ast.KindFunctionDeclaration, ast.KindMethodDeclaration: + if node.Flags&ast.NodeFlagsReparsed != 0 { + errorNode = node + break + } + fallthrough case ast.KindVariableDeclaration, ast.KindBindingElement, ast.KindClassDeclaration, ast.KindClassExpression, ast.KindInterfaceDeclaration, - ast.KindModuleDeclaration, ast.KindEnumDeclaration, ast.KindEnumMember, ast.KindFunctionDeclaration, ast.KindFunctionExpression, - ast.KindMethodDeclaration, ast.KindGetAccessor, ast.KindSetAccessor, ast.KindTypeAliasDeclaration, ast.KindJSTypeAliasDeclaration, ast.KindPropertyDeclaration, + ast.KindModuleDeclaration, ast.KindEnumDeclaration, ast.KindEnumMember, ast.KindFunctionExpression, + ast.KindGetAccessor, ast.KindSetAccessor, ast.KindTypeAliasDeclaration, ast.KindJSTypeAliasDeclaration, ast.KindPropertyDeclaration, ast.KindPropertySignature, ast.KindNamespaceImport: errorNode = ast.GetNameOfDeclaration(node) case ast.KindArrowFunction: @@ -2898,6 +2912,10 @@ func GetErrorRangeForNode(sourceFile *ast.SourceFile, node *ast.Node) core.TextR pos := scanner.SkipTrivia(sourceFile.Text(), node.AsSatisfiesExpression().Expression.End()) return scanner.GetRangeOfTokenAtPosition(sourceFile, pos) case ast.KindConstructor: + if node.Flags&ast.NodeFlagsReparsed != 0 { + errorNode = node + break + } scanner := scanner.GetScannerForSourceFile(sourceFile, node.Pos()) start := scanner.TokenStart() for scanner.Token() != ast.KindConstructorKeyword && scanner.Token() != ast.KindStringLiteral && scanner.Token() != ast.KindEndOfFile { diff --git a/internal/binder/binder_test.go b/internal/binder/binder_test.go index 776fc717f0..2058632879 100644 --- a/internal/binder/binder_test.go +++ b/internal/binder/binder_test.go @@ -22,14 +22,14 @@ func BenchmarkBind(b *testing.B) { path := tspath.ToPath(fileName, "/", osvfs.FS().UseCaseSensitiveFileNames()) sourceText := f.ReadFile(b) - compilerOptions := &core.CompilerOptions{Target: core.ScriptTargetESNext, Module: core.ModuleKindNodeNext} - sourceAffecting := compilerOptions.SourceFileAffecting() - sourceFiles := make([]*ast.SourceFile, b.N) for i := range b.N { - sourceFiles[i] = parser.ParseSourceFile(fileName, path, sourceText, sourceAffecting, nil, scanner.JSDocParsingModeParseAll) + sourceFiles[i] = parser.ParseSourceFile(fileName, path, sourceText, core.ScriptTargetESNext, scanner.JSDocParsingModeParseAll) } + compilerOptions := &core.CompilerOptions{Target: core.ScriptTargetESNext, Module: core.ModuleKindNodeNext} + sourceAffecting := compilerOptions.SourceFileAffecting() + // The above parses do a lot of work; ensure GC is finished before we start collecting performance data. // GC must be called twice to allow things to settle. runtime.GC() diff --git a/internal/binder/nameresolver.go b/internal/binder/nameresolver.go index ca8b26f28d..569b407cc9 100644 --- a/internal/binder/nameresolver.go +++ b/internal/binder/nameresolver.go @@ -40,7 +40,7 @@ loop: // (it refers to the constant type of the expression instead) return nil } - if isModuleOrEnumDeclaration(location) && lastLocation != nil && location.Name() == lastLocation { + if ast.IsModuleOrEnumDeclaration(location) && lastLocation != nil && location.Name() == lastLocation { // If lastLocation is the name of a namespace or enum, skip the parent since it will have is own locals that could // conflict. lastLocation = location @@ -99,7 +99,7 @@ loop: // name of that export default matches. result = moduleExports[ast.InternalSymbolNameDefault] if result != nil { - localSymbol := getLocalSymbolForExportDefault(result) + localSymbol := GetLocalSymbolForExportDefault(result) if localSymbol != nil && result.Flags&meaning != 0 && localSymbol.Name == name { break loop } @@ -448,11 +448,7 @@ func (r *NameResolver) argumentsSymbol() *ast.Symbol { return r.ArgumentsSymbol } -func isModuleOrEnumDeclaration(node *ast.Node) bool { - return node.Kind == ast.KindModuleDeclaration || node.Kind == ast.KindEnumDeclaration -} - -func getLocalSymbolForExportDefault(symbol *ast.Symbol) *ast.Symbol { +func GetLocalSymbolForExportDefault(symbol *ast.Symbol) *ast.Symbol { if !isExportDefaultSymbol(symbol) || len(symbol.Declarations) == 0 { return nil } diff --git a/internal/bundled/embed_generated.go b/internal/bundled/embed_generated.go index a39bcf2c87..24878235f7 100644 --- a/internal/bundled/embed_generated.go +++ b/internal/bundled/embed_generated.go @@ -187,12 +187,16 @@ var ( libs_lib_esnext_decorators_d_ts string //go:embed libs/lib.esnext.disposable.d.ts libs_lib_esnext_disposable_d_ts string + //go:embed libs/lib.esnext.float16.d.ts + libs_lib_esnext_float16_d_ts string //go:embed libs/lib.esnext.full.d.ts libs_lib_esnext_full_d_ts string //go:embed libs/lib.esnext.intl.d.ts libs_lib_esnext_intl_d_ts string //go:embed libs/lib.esnext.iterator.d.ts libs_lib_esnext_iterator_d_ts string + //go:embed libs/lib.esnext.promise.d.ts + libs_lib_esnext_promise_d_ts string //go:embed libs/lib.scripthost.d.ts libs_lib_scripthost_d_ts string //go:embed libs/lib.webworker.asynciterable.d.ts @@ -294,9 +298,11 @@ var embeddedContents = map[string]string{ "libs/lib.esnext.d.ts": libs_lib_esnext_d_ts, "libs/lib.esnext.decorators.d.ts": libs_lib_esnext_decorators_d_ts, "libs/lib.esnext.disposable.d.ts": libs_lib_esnext_disposable_d_ts, + "libs/lib.esnext.float16.d.ts": libs_lib_esnext_float16_d_ts, "libs/lib.esnext.full.d.ts": libs_lib_esnext_full_d_ts, "libs/lib.esnext.intl.d.ts": libs_lib_esnext_intl_d_ts, "libs/lib.esnext.iterator.d.ts": libs_lib_esnext_iterator_d_ts, + "libs/lib.esnext.promise.d.ts": libs_lib_esnext_promise_d_ts, "libs/lib.scripthost.d.ts": libs_lib_scripthost_d_ts, "libs/lib.webworker.asynciterable.d.ts": libs_lib_webworker_asynciterable_d_ts, "libs/lib.webworker.d.ts": libs_lib_webworker_d_ts, @@ -393,9 +399,11 @@ var libsEntries = []fs.DirEntry{ &fileInfo{name: "lib.esnext.d.ts", size: int64(len(libs_lib_esnext_d_ts))}, &fileInfo{name: "lib.esnext.decorators.d.ts", size: int64(len(libs_lib_esnext_decorators_d_ts))}, &fileInfo{name: "lib.esnext.disposable.d.ts", size: int64(len(libs_lib_esnext_disposable_d_ts))}, + &fileInfo{name: "lib.esnext.float16.d.ts", size: int64(len(libs_lib_esnext_float16_d_ts))}, &fileInfo{name: "lib.esnext.full.d.ts", size: int64(len(libs_lib_esnext_full_d_ts))}, &fileInfo{name: "lib.esnext.intl.d.ts", size: int64(len(libs_lib_esnext_intl_d_ts))}, &fileInfo{name: "lib.esnext.iterator.d.ts", size: int64(len(libs_lib_esnext_iterator_d_ts))}, + &fileInfo{name: "lib.esnext.promise.d.ts", size: int64(len(libs_lib_esnext_promise_d_ts))}, &fileInfo{name: "lib.scripthost.d.ts", size: int64(len(libs_lib_scripthost_d_ts))}, &fileInfo{name: "lib.webworker.asynciterable.d.ts", size: int64(len(libs_lib_webworker_asynciterable_d_ts))}, &fileInfo{name: "lib.webworker.d.ts", size: int64(len(libs_lib_webworker_d_ts))}, diff --git a/internal/bundled/libs/lib.decorators.d.ts b/internal/bundled/libs/lib.decorators.d.ts index 5ac09b8257..5ad7216a1a 100644 --- a/internal/bundled/libs/lib.decorators.d.ts +++ b/internal/bundled/libs/lib.decorators.d.ts @@ -110,9 +110,9 @@ interface ClassMethodDecoratorContext< }; /** - * Adds a callback to be invoked either before static initializers are run (when - * decorating a `static` element), or before instance initializers are run (when - * decorating a non-`static` element). + * Adds a callback to be invoked either after static methods are defined but before + * static initializers are run (when decorating a `static` element), or before instance + * initializers are run (when decorating a non-`static` element). * * @example * ```ts @@ -176,9 +176,9 @@ interface ClassGetterDecoratorContext< }; /** - * Adds a callback to be invoked either before static initializers are run (when - * decorating a `static` element), or before instance initializers are run (when - * decorating a non-`static` element). + * Adds a callback to be invoked either after static methods are defined but before + * static initializers are run (when decorating a `static` element), or before instance + * initializers are run (when decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; @@ -223,9 +223,9 @@ interface ClassSetterDecoratorContext< }; /** - * Adds a callback to be invoked either before static initializers are run (when - * decorating a `static` element), or before instance initializers are run (when - * decorating a non-`static` element). + * Adds a callback to be invoked either after static methods are defined but before + * static initializers are run (when decorating a `static` element), or before instance + * initializers are run (when decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; @@ -279,9 +279,8 @@ interface ClassAccessorDecoratorContext< }; /** - * Adds a callback to be invoked either before static initializers are run (when - * decorating a `static` element), or before instance initializers are run (when - * decorating a non-`static` element). + * Adds a callback to be invoked immediately after the auto `accessor` being + * decorated is initialized (regardless if the `accessor` is `static` or not). */ addInitializer(initializer: (this: This) => void): void; @@ -376,9 +375,8 @@ interface ClassFieldDecoratorContext< }; /** - * Adds a callback to be invoked either before static initializers are run (when - * decorating a `static` element), or before instance initializers are run (when - * decorating a non-`static` element). + * Adds a callback to be invoked immediately after the field being decorated + * is initialized (regardless if the field is `static` or not). */ addInitializer(initializer: (this: This) => void): void; diff --git a/internal/bundled/libs/lib.dom.d.ts b/internal/bundled/libs/lib.dom.d.ts index 9ecd352b10..edf900a5de 100644 --- a/internal/bundled/libs/lib.dom.d.ts +++ b/internal/bundled/libs/lib.dom.d.ts @@ -26,6 +26,19 @@ interface AddEventListenerOptions extends EventListenerOptions { signal?: AbortSignal; } +interface AddressErrors { + addressLine?: string; + city?: string; + country?: string; + dependentLocality?: string; + organization?: string; + phone?: string; + postalCode?: string; + recipient?: string; + region?: string; + sortingCode?: string; +} + interface AesCbcParams extends Algorithm { iv: BufferSource; } @@ -107,6 +120,59 @@ interface AudioContextOptions { sampleRate?: number; } +interface AudioDataCopyToOptions { + format?: AudioSampleFormat; + frameCount?: number; + frameOffset?: number; + planeIndex: number; +} + +interface AudioDataInit { + data: BufferSource; + format: AudioSampleFormat; + numberOfChannels: number; + numberOfFrames: number; + sampleRate: number; + timestamp: number; + transfer?: ArrayBuffer[]; +} + +interface AudioDecoderConfig { + codec: string; + description?: BufferSource; + numberOfChannels: number; + sampleRate: number; +} + +interface AudioDecoderInit { + error: WebCodecsErrorCallback; + output: AudioDataOutputCallback; +} + +interface AudioDecoderSupport { + config?: AudioDecoderConfig; + supported?: boolean; +} + +interface AudioEncoderConfig { + bitrate?: number; + bitrateMode?: BitrateMode; + codec: string; + numberOfChannels: number; + opus?: OpusEncoderConfig; + sampleRate: number; +} + +interface AudioEncoderInit { + error: WebCodecsErrorCallback; + output: EncodedAudioChunkOutputCallback; +} + +interface AudioEncoderSupport { + config?: AudioEncoderConfig; + supported?: boolean; +} + interface AudioNodeOptions { channelCount?: number; channelCountMode?: ChannelCountMode; @@ -137,12 +203,32 @@ interface AuthenticationExtensionsClientInputs { credProps?: boolean; hmacCreateSecret?: boolean; minPinLength?: boolean; + prf?: AuthenticationExtensionsPRFInputs; +} + +interface AuthenticationExtensionsClientInputsJSON { } interface AuthenticationExtensionsClientOutputs { appid?: boolean; credProps?: CredentialPropertiesOutput; hmacCreateSecret?: boolean; + prf?: AuthenticationExtensionsPRFOutputs; +} + +interface AuthenticationExtensionsPRFInputs { + eval?: AuthenticationExtensionsPRFValues; + evalByCredential?: Record; +} + +interface AuthenticationExtensionsPRFOutputs { + enabled?: boolean; + results?: AuthenticationExtensionsPRFValues; +} + +interface AuthenticationExtensionsPRFValues { + first: BufferSource; + second?: BufferSource; } interface AuthenticatorSelectionCriteria { @@ -208,6 +294,10 @@ interface CanvasRenderingContext2DSettings { willReadFrequently?: boolean; } +interface CaretPositionFromPointOptions { + shadowRoots?: ShadowRoot[]; +} + interface ChannelMergerOptions extends AudioNodeOptions { numberOfInputs?: number; } @@ -468,6 +558,18 @@ interface ElementDefinitionOptions { extends?: string; } +interface EncodedAudioChunkInit { + data: AllowSharedBufferSource; + duration?: number; + timestamp: number; + transfer?: ArrayBuffer[]; + type: EncodedAudioChunkType; +} + +interface EncodedAudioChunkMetadata { + decoderConfig?: AudioDecoderConfig; +} + interface EncodedVideoChunkInit { data: AllowSharedBufferSource; duration?: number; @@ -685,6 +787,26 @@ interface ImageDataSettings { colorSpace?: PredefinedColorSpace; } +interface ImageDecodeOptions { + completeFramesOnly?: boolean; + frameIndex?: number; +} + +interface ImageDecodeResult { + complete: boolean; + image: VideoFrame; +} + +interface ImageDecoderInit { + colorSpaceConversion?: ColorSpaceConversion; + data: ImageBufferSource; + desiredHeight?: number; + desiredWidth?: number; + preferAnimation?: boolean; + transfer?: ArrayBuffer[]; + type: string; +} + interface ImageEncodeOptions { quality?: number; type?: string; @@ -698,16 +820,6 @@ interface InputEventInit extends UIEventInit { targetRanges?: StaticRange[]; } -interface IntersectionObserverEntryInit { - boundingClientRect: DOMRectInit; - intersectionRatio: number; - intersectionRect: DOMRectInit; - isIntersecting: boolean; - rootBounds: DOMRectInit | null; - target: Element; - time: DOMHighResTimeStamp; -} - interface IntersectionObserverInit { root?: Element | Document | null; rootMargin?: string; @@ -917,6 +1029,7 @@ interface MediaStreamTrackEventInit extends EventInit { interface MediaTrackCapabilities { aspectRatio?: DoubleRange; autoGainControl?: boolean[]; + backgroundBlur?: boolean[]; channelCount?: ULongRange; deviceId?: string; displaySurface?: string; @@ -934,6 +1047,7 @@ interface MediaTrackCapabilities { interface MediaTrackConstraintSet { aspectRatio?: ConstrainDouble; autoGainControl?: ConstrainBoolean; + backgroundBlur?: ConstrainBoolean; channelCount?: ConstrainULong; deviceId?: ConstrainDOMString; displaySurface?: ConstrainDOMString; @@ -955,6 +1069,7 @@ interface MediaTrackConstraints extends MediaTrackConstraintSet { interface MediaTrackSettings { aspectRatio?: number; autoGainControl?: boolean; + backgroundBlur?: boolean; channelCount?: number; deviceId?: string; displaySurface?: string; @@ -972,6 +1087,7 @@ interface MediaTrackSettings { interface MediaTrackSupportedConstraints { aspectRatio?: boolean; autoGainControl?: boolean; + backgroundBlur?: boolean; channelCount?: boolean; deviceId?: boolean; displaySurface?: boolean; @@ -1066,6 +1182,15 @@ interface OptionalEffectTiming { playbackRate?: number; } +interface OpusEncoderConfig { + complexity?: number; + format?: OpusBitstreamFormat; + frameDuration?: number; + packetlossperc?: number; + usedtx?: boolean; + useinbandfec?: boolean; +} + interface OscillatorOptions extends AudioNodeOptions { detune?: number; frequency?: number; @@ -1073,6 +1198,15 @@ interface OscillatorOptions extends AudioNodeOptions { type?: OscillatorType; } +interface PageRevealEventInit extends EventInit { + viewTransition?: ViewTransition | null; +} + +interface PageSwapEventInit extends EventInit { + activation?: NavigationActivation | null; + viewTransition?: ViewTransition | null; +} + interface PageTransitionEventInit extends EventInit { persisted?: boolean; } @@ -1094,6 +1228,12 @@ interface PannerOptions extends AudioNodeOptions { rolloffFactor?: number; } +interface PayerErrors { + email?: string; + name?: string; + phone?: string; +} + interface PaymentCurrencyAmount { currency: string; value: string; @@ -1102,6 +1242,7 @@ interface PaymentCurrencyAmount { interface PaymentDetailsBase { displayItems?: PaymentItem[]; modifiers?: PaymentDetailsModifier[]; + shippingOptions?: PaymentShippingOption[]; } interface PaymentDetailsInit extends PaymentDetailsBase { @@ -1117,7 +1258,9 @@ interface PaymentDetailsModifier { } interface PaymentDetailsUpdate extends PaymentDetailsBase { + error?: string; paymentMethodErrors?: any; + shippingAddressErrors?: AddressErrors; total?: PaymentItem; } @@ -1137,12 +1280,28 @@ interface PaymentMethodData { supportedMethods: string; } +interface PaymentOptions { + requestPayerEmail?: boolean; + requestPayerName?: boolean; + requestPayerPhone?: boolean; + requestShipping?: boolean; + shippingType?: PaymentShippingType; +} + interface PaymentRequestUpdateEventInit extends EventInit { } +interface PaymentShippingOption { + amount: PaymentCurrencyAmount; + id: string; + label: string; + selected?: boolean; +} + interface PaymentValidationErrors { error?: string; - paymentMethod?: any; + payer?: PayerErrors; + shippingAddress?: AddressErrors; } interface Pbkdf2Params extends Algorithm { @@ -1192,6 +1351,8 @@ interface PlaneLayout { } interface PointerEventInit extends MouseEventInit { + altitudeAngle?: number; + azimuthAngle?: number; coalescedEvents?: PointerEvent[]; height?: number; isPrimary?: boolean; @@ -1257,12 +1418,31 @@ interface PublicKeyCredentialCreationOptions { user: PublicKeyCredentialUserEntity; } +interface PublicKeyCredentialCreationOptionsJSON { + attestation?: string; + authenticatorSelection?: AuthenticatorSelectionCriteria; + challenge: Base64URLString; + excludeCredentials?: PublicKeyCredentialDescriptorJSON[]; + extensions?: AuthenticationExtensionsClientInputsJSON; + hints?: string[]; + pubKeyCredParams: PublicKeyCredentialParameters[]; + rp: PublicKeyCredentialRpEntity; + timeout?: number; + user: PublicKeyCredentialUserEntityJSON; +} + interface PublicKeyCredentialDescriptor { id: BufferSource; transports?: AuthenticatorTransport[]; type: PublicKeyCredentialType; } +interface PublicKeyCredentialDescriptorJSON { + id: Base64URLString; + transports?: string[]; + type: string; +} + interface PublicKeyCredentialEntity { name: string; } @@ -1281,6 +1461,16 @@ interface PublicKeyCredentialRequestOptions { userVerification?: UserVerificationRequirement; } +interface PublicKeyCredentialRequestOptionsJSON { + allowCredentials?: PublicKeyCredentialDescriptorJSON[]; + challenge: Base64URLString; + extensions?: AuthenticationExtensionsClientInputsJSON; + hints?: string[]; + rpId?: string; + timeout?: number; + userVerification?: string; +} + interface PublicKeyCredentialRpEntity extends PublicKeyCredentialEntity { id?: string; } @@ -1290,6 +1480,12 @@ interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity { id: BufferSource; } +interface PublicKeyCredentialUserEntityJSON { + displayName: string; + id: Base64URLString; + name: string; +} + interface PushSubscriptionJSON { endpoint?: string; expirationTime?: EpochTimeStamp | null; @@ -1396,13 +1592,18 @@ interface RTCIceCandidateInit { interface RTCIceCandidatePairStats extends RTCStats { availableIncomingBitrate?: number; availableOutgoingBitrate?: number; + bytesDiscardedOnSend?: number; bytesReceived?: number; bytesSent?: number; + consentRequestsSent?: number; currentRoundTripTime?: number; lastPacketReceivedTimestamp?: DOMHighResTimeStamp; lastPacketSentTimestamp?: DOMHighResTimeStamp; localCandidateId: string; nominated?: boolean; + packetsDiscardedOnSend?: number; + packetsReceived?: number; + packetsSent?: number; remoteCandidateId: string; requestsReceived?: number; requestsSent?: number; @@ -1426,32 +1627,47 @@ interface RTCInboundRtpStreamStats extends RTCReceivedRtpStreamStats { concealmentEvents?: number; decoderImplementation?: string; estimatedPlayoutTimestamp?: DOMHighResTimeStamp; + fecBytesReceived?: number; fecPacketsDiscarded?: number; fecPacketsReceived?: number; + fecSsrc?: number; firCount?: number; frameHeight?: number; frameWidth?: number; + framesAssembledFromMultiplePackets?: number; framesDecoded?: number; framesDropped?: number; framesPerSecond?: number; framesReceived?: number; + framesRendered?: number; + freezeCount?: number; headerBytesReceived?: number; insertedSamplesForDeceleration?: number; jitterBufferDelay?: number; jitterBufferEmittedCount?: number; + jitterBufferMinimumDelay?: number; + jitterBufferTargetDelay?: number; keyFramesDecoded?: number; lastPacketReceivedTimestamp?: DOMHighResTimeStamp; mid?: string; nackCount?: number; packetsDiscarded?: number; + pauseCount?: number; + playoutId?: string; pliCount?: number; qpSum?: number; remoteId?: string; removedSamplesForAcceleration?: number; + retransmittedBytesReceived?: number; + retransmittedPacketsReceived?: number; + rtxSsrc?: number; silentConcealedSamples?: number; + totalAssemblyTime?: number; totalAudioEnergy?: number; totalDecodeTime?: number; + totalFreezesDuration?: number; totalInterFrameDelay?: number; + totalPausesDuration?: number; totalProcessingDelay?: number; totalSamplesDuration?: number; totalSamplesReceived?: number; @@ -1474,6 +1690,7 @@ interface RTCOfferOptions extends RTCOfferAnswerOptions { } interface RTCOutboundRtpStreamStats extends RTCSentRtpStreamStats { + active?: boolean; firCount?: number; frameHeight?: number; frameWidth?: number; @@ -1484,15 +1701,19 @@ interface RTCOutboundRtpStreamStats extends RTCSentRtpStreamStats { hugeFramesSent?: number; keyFramesEncoded?: number; mediaSourceId?: string; + mid?: string; nackCount?: number; pliCount?: number; qpSum?: number; + qualityLimitationDurations?: Record; + qualityLimitationReason?: RTCQualityLimitationReason; qualityLimitationResolutionChanges?: number; remoteId?: string; retransmittedBytesSent?: number; retransmittedPacketsSent?: number; rid?: string; rtxSsrc?: number; + scalabilityMode?: string; targetBitrate?: number; totalEncodeTime?: number; totalEncodedBytesTarget?: number; @@ -1630,9 +1851,16 @@ interface RTCTransportStats extends RTCStats { bytesReceived?: number; bytesSent?: number; dtlsCipher?: string; + dtlsRole?: RTCDtlsRole; dtlsState: RTCDtlsTransportState; + iceLocalUsernameFragment?: string; + iceRole?: RTCIceRole; + iceState?: RTCIceTransportState; localCertificateId?: string; + packetsReceived?: number; + packetsSent?: number; remoteCertificateId?: string; + selectedCandidatePairChanges?: number; selectedCandidatePairId?: string; srtpCipher?: string; tlsVersion?: string; @@ -2012,6 +2240,7 @@ interface VideoConfiguration { colorGamut?: ColorGamut; contentType: string; framerate: number; + hasAlphaChannel?: boolean; hdrMetadataType?: HdrMetadataType; height: number; scalabilityMode?: string; @@ -2047,6 +2276,7 @@ interface VideoEncoderConfig { bitrate?: number; bitrateMode?: VideoEncoderBitrateMode; codec: string; + contentHint?: string; displayHeight?: number; displayWidth?: number; framerate?: number; @@ -2058,9 +2288,14 @@ interface VideoEncoderConfig { } interface VideoEncoderEncodeOptions { + avc?: VideoEncoderEncodeOptionsForAvc; keyFrame?: boolean; } +interface VideoEncoderEncodeOptionsForAvc { + quantizer?: number | null; +} + interface VideoEncoderInit { error: WebCodecsErrorCallback; output: EncodedVideoChunkOutputCallback; @@ -2098,6 +2333,8 @@ interface VideoFrameCallbackMetadata { } interface VideoFrameCopyToOptions { + colorSpace?: PredefinedColorSpace; + format?: VideoPixelFormat; layout?: PlaneLayout[]; rect?: DOMRectInit; } @@ -2241,6 +2478,8 @@ interface ARIAMixin { ariaColCount: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndex) */ ariaColIndex: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndexText) */ + ariaColIndexText: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColSpan) */ ariaColSpan: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaCurrent) */ @@ -2280,6 +2519,8 @@ interface ARIAMixin { ariaPressed: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaReadOnly) */ ariaReadOnly: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRelevant) */ + ariaRelevant: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRequired) */ ariaRequired: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRoleDescription) */ @@ -2288,6 +2529,8 @@ interface ARIAMixin { ariaRowCount: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndex) */ ariaRowIndex: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndexText) */ + ariaRowIndexText: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowSpan) */ ariaRowSpan: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaSelected) */ @@ -2464,7 +2707,7 @@ interface Animatable { interface AnimationEventMap { "cancel": AnimationPlaybackEvent; "finish": AnimationPlaybackEvent; - "remove": Event; + "remove": AnimationPlaybackEvent; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation) */ @@ -2482,7 +2725,7 @@ interface Animation extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/finish_event) */ onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/remove_event) */ - onremove: ((this: Animation, ev: Event) => any) | null; + onremove: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/pending) */ readonly pending: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/playState) */ @@ -2714,6 +2957,74 @@ declare var AudioContext: { new(contextOptions?: AudioContextOptions): AudioContext; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData) */ +interface AudioData { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/duration) */ + readonly duration: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/format) */ + readonly format: AudioSampleFormat | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/numberOfChannels) */ + readonly numberOfChannels: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/numberOfFrames) */ + readonly numberOfFrames: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/sampleRate) */ + readonly sampleRate: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/timestamp) */ + readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/allocationSize) */ + allocationSize(options: AudioDataCopyToOptions): number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/clone) */ + clone(): AudioData; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/copyTo) */ + copyTo(destination: AllowSharedBufferSource, options: AudioDataCopyToOptions): void; +} + +declare var AudioData: { + prototype: AudioData; + new(init: AudioDataInit): AudioData; +}; + +interface AudioDecoderEventMap { + "dequeue": Event; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder) + */ +interface AudioDecoder extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/decodeQueueSize) */ + readonly decodeQueueSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/dequeue_event) */ + ondequeue: ((this: AudioDecoder, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/state) */ + readonly state: CodecState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/configure) */ + configure(config: AudioDecoderConfig): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/decode) */ + decode(chunk: EncodedAudioChunk): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/flush) */ + flush(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/reset) */ + reset(): void; + addEventListener(type: K, listener: (this: AudioDecoder, ev: AudioDecoderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: AudioDecoder, ev: AudioDecoderEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var AudioDecoder: { + prototype: AudioDecoder; + new(init: AudioDecoderInit): AudioDecoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/isConfigSupported_static) */ + isConfigSupported(config: AudioDecoderConfig): Promise; +}; + /** * AudioDestinationNode has no output (as it is the output, no more AudioNode can be linked after it in the audio graph) and one input. The number of channels in the input must be between 0 and the maxChannelCount value or an exception is raised. * @@ -2729,6 +3040,45 @@ declare var AudioDestinationNode: { new(): AudioDestinationNode; }; +interface AudioEncoderEventMap { + "dequeue": Event; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder) + */ +interface AudioEncoder extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/encodeQueueSize) */ + readonly encodeQueueSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/dequeue_event) */ + ondequeue: ((this: AudioEncoder, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/state) */ + readonly state: CodecState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/configure) */ + configure(config: AudioEncoderConfig): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/encode) */ + encode(data: AudioData): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/flush) */ + flush(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/reset) */ + reset(): void; + addEventListener(type: K, listener: (this: AudioEncoder, ev: AudioEncoderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: AudioEncoder, ev: AudioEncoderEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var AudioEncoder: { + prototype: AudioEncoder; + new(init: AudioEncoderInit): AudioEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/isConfigSupported_static) */ + isConfigSupported(config: AudioEncoderConfig): Promise; +}; + /** * The position and orientation of the unique person listening to the audio scene, and is used in audio spatialization. All PannerNodes spatialize in relation to the AudioListener stored in the BaseAudioContext.listener attribute. * @@ -2924,7 +3274,7 @@ declare var AudioWorklet: { }; interface AudioWorkletNodeEventMap { - "processorerror": Event; + "processorerror": ErrorEvent; } /** @@ -2934,7 +3284,7 @@ interface AudioWorkletNodeEventMap { */ interface AudioWorkletNode extends AudioNode { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode/processorerror_event) */ - onprocessorerror: ((this: AudioWorkletNode, ev: Event) => any) | null; + onprocessorerror: ((this: AudioWorkletNode, ev: ErrorEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode/parameters) */ readonly parameters: AudioParamMap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode/port) */ @@ -3151,6 +3501,8 @@ interface Blob { readonly type: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */ arrayBuffer(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes) */ + bytes(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ slice(start?: number, end?: number, contentType?: string): Blob; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */ @@ -3186,6 +3538,8 @@ interface Body { arrayBuffer(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */ blob(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes) */ + bytes(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */ formData(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */ @@ -3341,7 +3695,8 @@ declare var CSSCounterStyleRule: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFaceRule) */ interface CSSFontFaceRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFaceRule/style) */ - readonly style: CSSStyleDeclaration; + get style(): CSSStyleDeclaration; + set style(cssText: string); } declare var CSSFontFaceRule: { @@ -3412,8 +3767,9 @@ interface CSSImportRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/layerName) */ readonly layerName: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/media) */ - readonly media: MediaList; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/stylesheet) */ + get media(): MediaList; + set media(mediaText: string); + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/styleSheet) */ readonly styleSheet: CSSStyleSheet | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/supportsText) */ readonly supportsText: string | null; @@ -3433,7 +3789,8 @@ interface CSSKeyframeRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframeRule/keyText) */ keyText: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframeRule/style) */ - readonly style: CSSStyleDeclaration; + get style(): CSSStyleDeclaration; + set style(cssText: string); } declare var CSSKeyframeRule: { @@ -3449,6 +3806,7 @@ declare var CSSKeyframeRule: { interface CSSKeyframesRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/cssRules) */ readonly cssRules: CSSRuleList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/length) */ readonly length: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/name) */ name: string; @@ -3605,7 +3963,8 @@ declare var CSSMatrixComponent: { */ interface CSSMediaRule extends CSSConditionRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMediaRule/media) */ - readonly media: MediaList; + get media(): MediaList; + set media(mediaText: string); } declare var CSSMediaRule: { @@ -3630,6 +3989,18 @@ declare var CSSNamespaceRule: { new(): CSSNamespaceRule; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNestedDeclarations) */ +interface CSSNestedDeclarations extends CSSRule { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNestedDeclarations/style) */ + get style(): CSSStyleDeclaration; + set style(cssText: string); +} + +declare var CSSNestedDeclarations: { + prototype: CSSNestedDeclarations; + new(): CSSNestedDeclarations; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericArray) */ interface CSSNumericArray { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericArray/length) */ @@ -3683,7 +4054,8 @@ interface CSSPageRule extends CSSGroupingRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPageRule/selectorText) */ selectorText: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPageRule/style) */ - readonly style: CSSStyleDeclaration; + get style(): CSSStyleDeclaration; + set style(cssText: string); } declare var CSSPageRule: { @@ -3706,7 +4078,7 @@ declare var CSSPerspective: { interface CSSPropertyRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/inherits) */ readonly inherits: boolean; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/initialvalue) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/initialValue) */ readonly initialValue: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/name) */ readonly name: string; @@ -3890,6 +4262,7 @@ interface CSSStyleDeclaration { alignItems: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/align-self) */ alignSelf: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/alignment-baseline) */ alignmentBaseline: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/all) */ all: string; @@ -4073,6 +4446,8 @@ interface CSSStyleDeclaration { borderWidth: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/bottom) */ bottom: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/box-decoration-break) */ + boxDecorationBreak: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/box-shadow) */ boxShadow: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/box-sizing) */ @@ -4097,11 +4472,13 @@ interface CSSStyleDeclaration { clip: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/clip-path) */ clipPath: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/clip-rule) */ clipRule: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/color) */ color: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/color-interpolation) */ colorInterpolation: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/color-interpolation-filters) */ colorInterpolationFilters: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/color-scheme) */ colorScheme: string; @@ -4127,9 +4504,11 @@ interface CSSStyleDeclaration { columns: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/contain) */ contain: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-block-size) */ containIntrinsicBlockSize: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height) */ containIntrinsicHeight: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-inline-size) */ containIntrinsicInlineSize: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size) */ containIntrinsicSize: string; @@ -4157,18 +4536,25 @@ interface CSSStyleDeclaration { cssText: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cursor) */ cursor: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cx) */ cx: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cy) */ cy: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/d) */ d: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/direction) */ direction: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/display) */ display: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/dominant-baseline) */ dominantBaseline: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/empty-cells) */ emptyCells: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/fill) */ fill: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/fill-opacity) */ fillOpacity: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/fill-rule) */ fillRule: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/filter) */ filter: string; @@ -4188,7 +4574,9 @@ interface CSSStyleDeclaration { flexWrap: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/float) */ float: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/flood-color) */ floodColor: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/flood-opacity) */ floodOpacity: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font) */ font: string; @@ -4320,6 +4708,7 @@ interface CSSStyleDeclaration { readonly length: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/letter-spacing) */ letterSpacing: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/lighting-color) */ lightingColor: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/line-break) */ lineBreak: string; @@ -4355,9 +4744,13 @@ interface CSSStyleDeclaration { marginRight: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/margin-top) */ marginTop: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/marker) */ marker: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/marker-end) */ markerEnd: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/marker-mid) */ markerMid: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/marker-start) */ markerStart: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/mask) */ mask: string; @@ -4479,11 +4872,23 @@ interface CSSStyleDeclaration { paddingTop: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/page) */ page: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/page-break-after) */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/page-break-after) + */ pageBreakAfter: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/page-break-before) */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/page-break-before) + */ pageBreakBefore: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/page-break-inside) */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/page-break-inside) + */ pageBreakInside: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/paint-order) */ paintOrder: string; @@ -4507,6 +4912,7 @@ interface CSSStyleDeclaration { printColorAdjust: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/quotes) */ quotes: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/r) */ r: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/resize) */ resize: string; @@ -4516,9 +4922,13 @@ interface CSSStyleDeclaration { rotate: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/row-gap) */ rowGap: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/ruby-align) */ + rubyAlign: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/ruby-position) */ rubyPosition: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/rx) */ rx: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/ry) */ ry: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/scale) */ scale: string; @@ -4586,16 +4996,27 @@ interface CSSStyleDeclaration { shapeMargin: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/shape-outside) */ shapeOutside: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/shape-rendering) */ shapeRendering: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stop-color) */ stopColor: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stop-opacity) */ stopOpacity: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke) */ stroke: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-dasharray) */ strokeDasharray: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-dashoffset) */ strokeDashoffset: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-linecap) */ strokeLinecap: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-linejoin) */ strokeLinejoin: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-miterlimit) */ strokeMiterlimit: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-opacity) */ strokeOpacity: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-width) */ strokeWidth: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/tab-size) */ tabSize: string; @@ -4605,7 +5026,11 @@ interface CSSStyleDeclaration { textAlign: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-align-last) */ textAlignLast: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-anchor) */ textAnchor: string; + textBox: string; + textBoxEdge: string; + textBoxTrim: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-combine-upright) */ textCombineUpright: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-decoration) */ @@ -4680,9 +5105,11 @@ interface CSSStyleDeclaration { unicodeBidi: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/user-select) */ userSelect: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/vector-effect) */ vectorEffect: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/vertical-align) */ verticalAlign: string; + viewTransitionClass: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/view-transition-name) */ viewTransitionName: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/visibility) */ @@ -4915,11 +5342,7 @@ interface CSSStyleDeclaration { * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/justify-content) */ webkitJustifyContent: string; - /** - * @deprecated This is a legacy alias of `lineClamp`. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp) - */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp) */ webkitLineClamp: string; /** * @deprecated This is a legacy alias of `mask`. @@ -5105,11 +5528,17 @@ interface CSSStyleDeclaration { wordBreak: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/word-spacing) */ wordSpacing: string; - /** @deprecated */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/overflow-wrap) + */ wordWrap: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/writing-mode) */ writingMode: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/x) */ x: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/y) */ y: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/z-index) */ zIndex: string; @@ -5142,7 +5571,8 @@ interface CSSStyleRule extends CSSGroupingRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/selectorText) */ selectorText: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/style) */ - readonly style: CSSStyleDeclaration; + get style(): CSSStyleDeclaration; + set style(cssText: string); /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/styleMap) */ readonly styleMap: StylePropertyMap; } @@ -5322,6 +5752,16 @@ declare var CSSVariableReferenceValue: { new(variable: string, fallback?: CSSUnparsedValue | null): CSSVariableReferenceValue; }; +interface CSSViewTransitionRule extends CSSRule { + readonly navigation: string; + readonly types: ReadonlyArray; +} + +declare var CSSViewTransitionRule: { + prototype: CSSViewTransitionRule; + new(): CSSViewTransitionRule; +}; + /** * Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. * Available only in secure contexts. @@ -5557,11 +5997,9 @@ interface CanvasRect { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D) */ -interface CanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform, CanvasUserInterface { +interface CanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasSettings, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform, CanvasUserInterface { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/canvas) */ readonly canvas: HTMLCanvasElement; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getContextAttributes) */ - getContextAttributes(): CanvasRenderingContext2DSettings; } declare var CanvasRenderingContext2D: { @@ -5569,6 +6007,11 @@ declare var CanvasRenderingContext2D: { new(): CanvasRenderingContext2D; }; +interface CanvasSettings { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getContextAttributes) */ + getContextAttributes(): CanvasRenderingContext2DSettings; +} + interface CanvasShadowStyles { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/shadowBlur) */ shadowBlur: number; @@ -5647,6 +6090,18 @@ interface CanvasUserInterface { drawFocusIfNeeded(path: Path2D, element: Element): void; } +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CaretPosition) */ +interface CaretPosition { + readonly offset: number; + readonly offsetNode: Node; + getClientRect(): DOMRect | null; +} + +declare var CaretPosition: { + prototype: CaretPosition; + new(): CaretPosition; +}; + /** * The ChannelMergerNode interface, often used in conjunction with its opposite, ChannelSplitterNode, reunites different mono inputs into a single output. Each input is used to fill a channel of the output. This is useful for accessing each channels separately, e.g. for performing channel mixing where gain must be separately controlled on each channel. * @@ -5862,6 +6317,8 @@ declare var CompositionEvent: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */ interface CompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; } declare var CompressionStream: { @@ -6166,39 +6623,69 @@ declare var DOMImplementation: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix) */ interface DOMMatrix extends DOMMatrixReadOnly { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ a: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ b: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ c: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ d: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ e: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ f: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m11: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m12: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m13: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m14: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m21: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m22: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m23: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m24: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m31: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m32: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m33: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m34: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m41: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m42: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m43: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m44: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/invertSelf) */ invertSelf(): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/multiplySelf) */ multiplySelf(other?: DOMMatrixInit): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/preMultiplySelf) */ preMultiplySelf(other?: DOMMatrixInit): DOMMatrix; rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; rotateFromVectorSelf(x?: number, y?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/rotateSelf) */ rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/setMatrixValue) */ setMatrixValue(transformList: string): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/skewXSelf) */ skewXSelf(sx?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/skewYSelf) */ skewYSelf(sy?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/translateSelf) */ translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix; } @@ -6218,34 +6705,61 @@ declare var WebKitCSSMatrix: typeof DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly) */ interface DOMMatrixReadOnly { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly a: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly b: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly c: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly d: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly e: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly f: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/is2D) */ readonly is2D: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/isIdentity) */ readonly isIdentity: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m11: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m12: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m13: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m14: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m21: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m22: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m23: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m24: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m31: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m32: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m33: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m34: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m41: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m42: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m43: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m44: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipX) */ flipX(): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipY) */ flipY(): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/inverse) */ inverse(): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/multiply) */ multiply(other?: DOMMatrixInit): DOMMatrix; rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; @@ -6257,9 +6771,13 @@ interface DOMMatrixReadOnly { scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix; skewX(sx?: number): DOMMatrix; skewY(sy?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toFloat32Array) */ toFloat32Array(): Float32Array; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toFloat64Array) */ toFloat64Array(): Float64Array; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toJSON) */ toJSON(): any; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/transformPoint) */ transformPoint(point?: DOMPointInit): DOMPoint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/translate) */ translate(tx?: number, ty?: number, tz?: number): DOMMatrix; @@ -6331,6 +6849,7 @@ interface DOMPointReadOnly { readonly y: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/z) */ readonly z: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/matrixTransform) */ matrixTransform(matrix?: DOMMatrixInit): DOMPoint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/toJSON) */ toJSON(): any; @@ -6345,11 +6864,17 @@ declare var DOMPointReadOnly: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad) */ interface DOMQuad { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p1) */ readonly p1: DOMPoint; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p2) */ readonly p2: DOMPoint; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p3) */ readonly p3: DOMPoint; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p4) */ readonly p4: DOMPoint; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/getBounds) */ getBounds(): DOMRect; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/toJSON) */ toJSON(): any; } @@ -6362,9 +6887,13 @@ declare var DOMQuad: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect) */ interface DOMRect extends DOMRectReadOnly { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/height) */ height: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/width) */ width: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/x) */ x: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/y) */ y: number; } @@ -6378,8 +6907,11 @@ declare var DOMRect: { type SVGRect = DOMRect; declare var SVGRect: typeof DOMRect; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList) */ interface DOMRectList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList/length) */ readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList/item) */ item(index: number): DOMRect | null; [index: number]: DOMRect; } @@ -6407,6 +6939,7 @@ interface DOMRectReadOnly { readonly x: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/y) */ readonly y: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/toJSON) */ toJSON(): any; } @@ -6712,6 +7245,8 @@ declare var DataTransferItemList: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */ interface DecompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; } declare var DecompressionStream: { @@ -6974,6 +7509,8 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/forms) */ readonly forms: HTMLCollectionOf; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/fragmentDirective) */ + readonly fragmentDirective: FragmentDirective; /** * @deprecated * @@ -7038,7 +7575,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/location) */ get location(): Location; - set location(href: string | Location); + set location(href: string); /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/fullscreenchange_event) */ onfullscreenchange: ((this: Document, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/fullscreenerror_event) */ @@ -7118,6 +7655,8 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve adoptNode(node: T): T; /** @deprecated */ captureEvents(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/caretPositionFromPoint) */ + caretPositionFromPoint(x: number, y: number, options?: CaretPositionFromPointOptions): CaretPosition | null; /** @deprecated */ caretRangeFromPoint(x: number, y: number): Range | null; /** @@ -7194,7 +7733,11 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve createElementNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", qualifiedName: string): MathMLElement; createElementNS(namespaceURI: string | null, qualifiedName: string, options?: ElementCreationOptions): Element; createElementNS(namespace: string | null, qualifiedName: string, options?: string | ElementCreationOptions): Element; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/createEvent) */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/createEvent) + */ createEvent(eventInterface: "AnimationEvent"): AnimationEvent; createEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent; createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent; @@ -7228,9 +7771,9 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve createEvent(eventInterface: "MessageEvent"): MessageEvent; createEvent(eventInterface: "MouseEvent"): MouseEvent; createEvent(eventInterface: "MouseEvents"): MouseEvent; - createEvent(eventInterface: "MutationEvent"): MutationEvent; - createEvent(eventInterface: "MutationEvents"): MutationEvent; createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; + createEvent(eventInterface: "PageRevealEvent"): PageRevealEvent; + createEvent(eventInterface: "PageSwapEvent"): PageSwapEvent; createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent; createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent; createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; @@ -7383,7 +7926,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/importNode) */ - importNode(node: T, deep?: boolean): T; + importNode(node: T, subtree?: boolean): T; /** * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method. * @param url Specifies a MIME type for the document. @@ -7436,10 +7979,11 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/requestStorageAccess) */ requestStorageAccess(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/startViewTransition) */ - startViewTransition(callbackOptions?: UpdateCallback): ViewTransition; + startViewTransition(callbackOptions?: ViewTransitionUpdateCallback): ViewTransition; /** * Writes one or more HTML expressions to a document in the specified window. * @param content Specifies the text and HTML tags to write. + * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/write) */ @@ -7690,7 +8234,8 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/classList) */ - readonly classList: DOMTokenList; + get classList(): DOMTokenList; + set classList(value: string); /** * Returns the value of element's class content attribute. Can be set to change it. * @@ -7705,6 +8250,8 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp readonly clientTop: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) */ readonly clientWidth: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) */ + readonly currentCSSZoom: number; /** * Returns the value of element's id content attribute. Can be set to change it. * @@ -7733,7 +8280,8 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp outerHTML: string; readonly ownerDocument: Document; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/part) */ - readonly part: DOMTokenList; + get part(): DOMTokenList; + set part(value: string); /** * Returns the namespace prefix. * @@ -7949,7 +8497,8 @@ interface ElementCSSInlineStyle { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) */ readonly attributeStyleMap: StylePropertyMap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) */ - readonly style: CSSStyleDeclaration; + get style(): CSSStyleDeclaration; + set style(cssText: string); } interface ElementContentEditable { @@ -8036,6 +8585,25 @@ declare var ElementInternals: { new(): ElementInternals; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk) */ +interface EncodedAudioChunk { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/byteLength) */ + readonly byteLength: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/duration) */ + readonly duration: number | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/timestamp) */ + readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/type) */ + readonly type: EncodedAudioChunkType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/copyTo) */ + copyTo(destination: AllowSharedBufferSource): void; +} + +declare var EncodedAudioChunk: { + prototype: EncodedAudioChunk; + new(init: EncodedAudioChunkInit): EncodedAudioChunk; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk) */ interface EncodedVideoChunk { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/byteLength) */ @@ -8061,10 +8629,15 @@ declare var EncodedVideoChunk: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent) */ interface ErrorEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */ readonly colno: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */ readonly error: any; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */ readonly filename: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */ readonly lineno: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */ readonly message: string; } @@ -8631,23 +9204,23 @@ interface FontFace { declare var FontFace: { prototype: FontFace; - new(family: string, source: string | BinaryData, descriptors?: FontFaceDescriptors): FontFace; + new(family: string, source: string | BufferSource, descriptors?: FontFaceDescriptors): FontFace; }; interface FontFaceSetEventMap { - "loading": Event; - "loadingdone": Event; - "loadingerror": Event; + "loading": FontFaceSetLoadEvent; + "loadingdone": FontFaceSetLoadEvent; + "loadingerror": FontFaceSetLoadEvent; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */ interface FontFaceSet extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */ - onloading: ((this: FontFaceSet, ev: Event) => any) | null; + onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */ - onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingdone: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingerror_event) */ - onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingerror: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready) */ readonly ready: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status) */ @@ -8665,7 +9238,7 @@ interface FontFaceSet extends EventTarget { declare var FontFaceSet: { prototype: FontFaceSet; - new(initialFaces: FontFace[]): FontFaceSet; + new(): FontFaceSet; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */ @@ -8729,6 +9302,25 @@ declare var FormDataEvent: { new(type: string, eventInitDict: FormDataEventInit): FormDataEvent; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FragmentDirective) */ +interface FragmentDirective { +} + +declare var FragmentDirective: { + prototype: FragmentDirective; + new(): FragmentDirective; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError) + */ +interface GPUError { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message) */ + readonly message: string; +} + /** * A change in volume. It is an AudioNode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output. A GainNode always has exactly one input and one output, both with the same number of channels. * @@ -8815,6 +9407,7 @@ declare var GamepadEvent: { interface GamepadHapticActuator { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator/playEffect) */ playEffect(type: GamepadHapticEffectType, params?: GamepadEffectParameters): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator/reset) */ reset(): Promise; } @@ -9051,7 +9644,7 @@ interface GlobalEventHandlers { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/blur_event) */ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/cancel_event) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/cancel_event) */ oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** * Occurs when playback is possible, but would require further buffering. @@ -9078,7 +9671,7 @@ interface GlobalEventHandlers { onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/close_event) */ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/webglcontextlost_event) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/contextlost_event) */ oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** * Fires when the user clicks the right mouse button in the client area, opening the context menu. @@ -9403,7 +9996,7 @@ interface GlobalEventHandlers { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/timeupdate_event) */ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/toggle_event) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; @@ -9539,7 +10132,8 @@ interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils { */ rel: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/relList) */ - readonly relList: DOMTokenList; + get relList(): DOMTokenList; + set relList(value: string); /** * Sets or retrieves the relationship between the object and the destination of the link. * @deprecated @@ -9581,10 +10175,19 @@ declare var HTMLAnchorElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement) */ interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils { - /** Sets or retrieves a text alternative to the graphic. */ + /** + * Sets or retrieves a text alternative to the graphic. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement/alt) + */ alt: string; - /** Sets or retrieves the coordinates of the object. */ + /** + * Sets or retrieves the coordinates of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement/coords) + */ coords: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement/download) */ download: string; /** * Sets or gets whether clicks in this region cause action. @@ -9598,8 +10201,13 @@ interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement/rel) */ rel: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement/relList) */ - readonly relList: DOMTokenList; - /** Sets or retrieves the shape of the object. */ + get relList(): DOMTokenList; + set relList(value: string); + /** + * Sets or retrieves the shape of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement/shape) + */ shape: string; /** * Sets or retrieves the window or frame at which to target content. @@ -9663,7 +10271,11 @@ declare var HTMLBRElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLBaseElement) */ interface HTMLBaseElement extends HTMLElement { - /** Gets or sets the baseline URL on which relative links are based. */ + /** + * Gets or sets the baseline URL on which relative links are based. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLBaseElement/href) + */ href: string; /** * Sets or retrieves the window or frame at which to target content. @@ -9722,21 +10334,49 @@ declare var HTMLBodyElement: { interface HTMLButtonElement extends HTMLElement, PopoverInvokerElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/disabled) */ disabled: boolean; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/form) + */ readonly form: HTMLFormElement | null; - /** Overrides the action attribute (where the data on a form is sent) on the parent form element. */ + /** + * Overrides the action attribute (where the data on a form is sent) on the parent form element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/formAction) + */ formAction: string; - /** Used to override the encoding (formEnctype attribute) specified on the form element. */ + /** + * Used to override the encoding (formEnctype attribute) specified on the form element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/formEnctype) + */ formEnctype: string; - /** Overrides the submit method attribute previously specified on a form element. */ + /** + * Overrides the submit method attribute previously specified on a form element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/formMethod) + */ formMethod: string; - /** Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. */ + /** + * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/formNoValidate) + */ formNoValidate: boolean; - /** Overrides the target attribute on a form element. */ + /** + * Overrides the target attribute on a form element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/formTarget) + */ formTarget: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/labels) */ readonly labels: NodeListOf; - /** Sets or retrieves the name of the object. */ + /** + * Sets or retrieves the name of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/name) + */ name: string; /** * Gets the classification and default behavior of the button. @@ -9744,20 +10384,43 @@ interface HTMLButtonElement extends HTMLElement, PopoverInvokerElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/type) */ type: "submit" | "reset" | "button"; - /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */ - readonly validationMessage: string; - /** Returns a ValidityState object that represents the validity states of an element. */ + /** + * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/validationMessage) + */ + readonly validationMessage: string; + /** + * Returns a ValidityState object that represents the validity states of an element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/validity) + */ readonly validity: ValidityState; - /** Sets or retrieves the default or selected value of the control. */ + /** + * Sets or retrieves the default or selected value of the control. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/value) + */ value: string; - /** Returns whether an element will successfully validate based on forms validation rules and constraints. */ + /** + * Returns whether an element will successfully validate based on forms validation rules and constraints. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/willValidate) + */ readonly willValidate: boolean; - /** Returns whether a form will validate when it is submitted, without having to submit it. */ + /** + * Returns whether a form will validate when it is submitted, without having to submit it. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/checkValidity) + */ checkValidity(): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/reportValidity) */ reportValidity(): boolean; /** * Sets a custom error message that is displayed when a form is submitted. * @param error Sets a custom error message that is displayed when a form is submitted. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/setCustomValidity) */ setCustomValidity(error: string): void; addEventListener(type: K, listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -9803,14 +10466,14 @@ interface HTMLCanvasElement extends HTMLElement { getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null; getContext(contextId: string, options?: any): RenderingContext | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/toBlob) */ - toBlob(callback: BlobCallback, type?: string, quality?: any): void; + toBlob(callback: BlobCallback, type?: string, quality?: number): void; /** * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element. * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/toDataURL) */ - toDataURL(type?: string, quality?: any): string; + toDataURL(type?: string, quality?: number): string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/transferControlToOffscreen) */ transferControlToOffscreen(): OffscreenCanvas; addEventListener(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -9909,7 +10572,11 @@ declare var HTMLDataElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDataListElement) */ interface HTMLDataListElement extends HTMLElement { - /** Returns an HTMLCollection of the option elements of the datalist element. */ + /** + * Returns an HTMLCollection of the option elements of the datalist element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDataListElement/options) + */ readonly options: HTMLCollectionOf; addEventListener(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -9924,6 +10591,7 @@ declare var HTMLDataListElement: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement) */ interface HTMLDetailsElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/name) */ name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/open) */ open: boolean; @@ -10070,6 +10738,8 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit title: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) */ translate: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/writingSuggestions) */ + writingSuggestions: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/attachInternals) */ attachInternals(): ElementInternals; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/click) */ @@ -10079,7 +10749,7 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover) */ showPopover(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover) */ - togglePopover(force?: boolean): boolean; + togglePopover(options?: boolean): boolean; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -10116,6 +10786,7 @@ interface HTMLEmbedElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLEmbedElement/src) */ src: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLEmbedElement/type) */ type: string; /** * Sets or retrieves the width of the object. @@ -10123,6 +10794,7 @@ interface HTMLEmbedElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLEmbedElement/width) */ width: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLEmbedElement/getSVGDocument) */ getSVGDocument(): Document | null; addEventListener(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -10141,26 +10813,59 @@ declare var HTMLEmbedElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement) */ interface HTMLFieldSetElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/disabled) */ disabled: boolean; - /** Returns an HTMLCollection of the form controls in the element. */ + /** + * Returns an HTMLCollection of the form controls in the element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/elements) + */ readonly elements: HTMLCollection; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/form) + */ readonly form: HTMLFormElement | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/name) */ name: string; - /** Returns the string "fieldset". */ + /** + * Returns the string "fieldset". + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/type) + */ readonly type: string; - /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */ + /** + * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/validationMessage) + */ readonly validationMessage: string; - /** Returns a ValidityState object that represents the validity states of an element. */ + /** + * Returns a ValidityState object that represents the validity states of an element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/validity) + */ readonly validity: ValidityState; - /** Returns whether an element will successfully validate based on forms validation rules and constraints. */ + /** + * Returns whether an element will successfully validate based on forms validation rules and constraints. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/willValidate) + */ readonly willValidate: boolean; - /** Returns whether a form will validate when it is submitted, without having to submit it. */ + /** + * Returns whether a form will validate when it is submitted, without having to submit it. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/checkValidity) + */ checkValidity(): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/reportValidity) */ reportValidity(): boolean; /** * Sets a custom error message that is displayed when a form is submitted. * @param error Sets a custom error message that is displayed when a form is submitted. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/setCustomValidity) */ setCustomValidity(error: string): void; addEventListener(type: K, listener: (this: HTMLFieldSetElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -10251,7 +10956,11 @@ interface HTMLFormElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/action) */ action: string; - /** Specifies whether autocomplete is applied to an editable text field. */ + /** + * Specifies whether autocomplete is applied to an editable text field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/autocomplete) + */ autocomplete: AutoFillBase; /** * Retrieves a collection, in source order, of all controls in a given form. @@ -10289,17 +10998,26 @@ interface HTMLFormElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/name) */ name: string; - /** Designates a form that is not validated when submitted. */ + /** + * Designates a form that is not validated when submitted. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/noValidate) + */ noValidate: boolean; rel: string; - readonly relList: DOMTokenList; + get relList(): DOMTokenList; + set relList(value: string); /** * Sets or retrieves the window or frame at which to target content. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/target) */ target: string; - /** Returns whether a form will validate when it is submitted, without having to submit it. */ + /** + * Returns whether a form will validate when it is submitted, without having to submit it. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/checkValidity) + */ checkValidity(): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/reportValidity) */ reportValidity(): boolean; @@ -10679,7 +11397,8 @@ interface HTMLIFrameElement extends HTMLElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/referrerPolicy) */ referrerPolicy: ReferrerPolicy; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/sandbox) */ - readonly sandbox: DOMTokenList; + get sandbox(): DOMTokenList; + set sandbox(value: string); /** * Sets or retrieves whether the frame can be scrolled. * @deprecated @@ -10703,6 +11422,7 @@ interface HTMLIFrameElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/width) */ width: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIframeElement/getSVGDocument) */ getSVGDocument(): Document | null; addEventListener(type: K, listener: (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -10754,7 +11474,7 @@ interface HTMLImageElement extends HTMLElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/decoding) */ decoding: "async" | "sync" | "auto"; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority) */ - fetchPriority: string; + fetchPriority: "high" | "low" | "auto"; /** * Sets or retrieves the height of the object. * @@ -10862,23 +11582,48 @@ declare var HTMLImageElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement) */ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { - /** Sets or retrieves a comma-separated list of content types. */ + /** + * Sets or retrieves a comma-separated list of content types. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/accept) + */ accept: string; /** * Sets or retrieves how the object is aligned with adjacent text. * @deprecated */ align: string; - /** Sets or retrieves a text alternative to the graphic. */ + /** + * Sets or retrieves a text alternative to the graphic. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/alt) + */ alt: string; - /** Specifies whether autocomplete is applied to an editable text field. */ + /** + * Specifies whether autocomplete is applied to an editable text field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/autocomplete) + */ autocomplete: AutoFill; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/capture) */ capture: string; - /** Sets or retrieves the state of the check box or radio button. */ + /** + * Sets or retrieves the state of the check box or radio button. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/checked) + */ checked: boolean; - /** Sets or retrieves the state of the check box or radio button. */ + /** + * Sets or retrieves the state of the check box or radio button. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/defaultChecked) + */ defaultChecked: boolean; - /** Sets or retrieves the initial contents of the object. */ + /** + * Sets or retrieves the initial contents of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/defaultValue) + */ defaultValue: string; dirName: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/disabled) */ @@ -10889,32 +11634,81 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/files) */ files: FileList | null; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/form) + */ readonly form: HTMLFormElement | null; - /** Overrides the action attribute (where the data on a form is sent) on the parent form element. */ + /** + * Overrides the action attribute (where the data on a form is sent) on the parent form element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/formAction) + */ formAction: string; - /** Used to override the encoding (formEnctype attribute) specified on the form element. */ + /** + * Used to override the encoding (formEnctype attribute) specified on the form element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/formEnctype) + */ formEnctype: string; - /** Overrides the submit method attribute previously specified on a form element. */ + /** + * Overrides the submit method attribute previously specified on a form element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/formMethod) + */ formMethod: string; - /** Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. */ + /** + * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/formNoValidate) + */ formNoValidate: boolean; - /** Overrides the target attribute on a form element. */ + /** + * Overrides the target attribute on a form element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/formTarget) + */ formTarget: string; - /** Sets or retrieves the height of the object. */ + /** + * Sets or retrieves the height of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/height) + */ height: number; - /** When set, overrides the rendering of checkbox controls so that the current value is not visible. */ + /** + * When set, overrides the rendering of checkbox controls so that the current value is not visible. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/indeterminate) + */ indeterminate: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/labels) */ readonly labels: NodeListOf | null; - /** Specifies the ID of a pre-defined datalist of options for an input element. */ + /** + * Specifies the ID of a pre-defined datalist of options for an input element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/list) + */ readonly list: HTMLDataListElement | null; - /** Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field. */ + /** + * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/max) + */ max: string; - /** Sets or retrieves the maximum number of characters that the user can enter in a text control. */ + /** + * Sets or retrieves the maximum number of characters that the user can enter in a text control. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/maxLength) + */ maxLength: number; - /** Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field. */ + /** + * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/min) + */ min: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/minLength) */ minLength: number; /** * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. @@ -10922,14 +11716,31 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/multiple) */ multiple: boolean; - /** Sets or retrieves the name of the object. */ + /** + * Sets or retrieves the name of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/name) + */ name: string; - /** Gets or sets a string containing a regular expression that the user's input must match. */ + /** + * Gets or sets a string containing a regular expression that the user's input must match. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/pattern) + */ pattern: string; - /** Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. */ + /** + * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/placeholder) + */ placeholder: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/readOnly) */ readOnly: boolean; - /** When present, marks an element that can't be submitted without a value. */ + /** + * When present, marks an element that can't be submitted without a value. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/required) + */ required: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/selectionDirection) */ selectionDirection: "forward" | "backward" | "none" | null; @@ -10945,10 +11756,19 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/selectionStart) */ selectionStart: number | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/size) */ size: number; - /** The address or URL of the a media resource that is to be considered. */ + /** + * The address or URL of the a media resource that is to be considered. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/src) + */ src: string; - /** Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field. */ + /** + * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/step) + */ step: string; /** * Returns the content type of the object. @@ -10961,23 +11781,51 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { * @deprecated */ useMap: string; - /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */ + /** + * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/validationMessage) + */ readonly validationMessage: string; - /** Returns a ValidityState object that represents the validity states of an element. */ + /** + * Returns a ValidityState object that represents the validity states of an element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/validity) + */ readonly validity: ValidityState; - /** Returns the value of the data at the cursor's current position. */ + /** + * Returns the value of the data at the cursor's current position. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/value) + */ value: string; - /** Returns a Date object representing the form control's value, if applicable; otherwise, returns null. Can be set, to change the value. Throws an "InvalidStateError" DOMException if the control isn't date- or time-based. */ + /** + * Returns a Date object representing the form control's value, if applicable; otherwise, returns null. Can be set, to change the value. Throws an "InvalidStateError" DOMException if the control isn't date- or time-based. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/valueAsDate) + */ valueAsDate: Date | null; - /** Returns the input field value as a number. */ + /** + * Returns the input field value as a number. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/valueAsNumber) + */ valueAsNumber: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/webkitEntries) */ readonly webkitEntries: ReadonlyArray; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/webkitdirectory) */ webkitdirectory: boolean; - /** Sets or retrieves the width of the object. */ + /** + * Sets or retrieves the width of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/width) + */ width: number; - /** Returns whether an element will successfully validate based on forms validation rules and constraints. */ + /** + * Returns whether an element will successfully validate based on forms validation rules and constraints. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/willValidate) + */ readonly willValidate: boolean; /** * Returns whether a form will validate when it is submitted, without having to submit it. @@ -11047,7 +11895,11 @@ declare var HTMLInputElement: { interface HTMLLIElement extends HTMLElement { /** @deprecated */ type: string; - /** Sets or retrieves the value of a list item. */ + /** + * Sets or retrieves the value of a list item. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLIElement/value) + */ value: number; addEventListener(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -11103,7 +11955,11 @@ declare var HTMLLabelElement: { interface HTMLLegendElement extends HTMLElement { /** @deprecated */ align: string; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLegendElement/form) + */ readonly form: HTMLFormElement | null; addEventListener(type: K, listener: (this: HTMLLegendElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -11124,6 +11980,9 @@ declare var HTMLLegendElement: { interface HTMLLinkElement extends HTMLElement, LinkStyle { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/as) */ as: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/blocking) */ + get blocking(): DOMTokenList; + set blocking(value: string); /** * Sets or retrieves the character set used to encode the object. * @deprecated @@ -11134,8 +11993,12 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/disabled) */ disabled: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/fetchPriority) */ - fetchPriority: string; - /** Sets or retrieves a destination URL or an anchor point. */ + fetchPriority: "high" | "low" | "auto"; + /** + * Sets or retrieves a destination URL or an anchor point. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/href) + */ href: string; /** * Sets or retrieves the language code of the object. @@ -11147,7 +12010,11 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle { imageSrcset: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/integrity) */ integrity: string; - /** Sets or retrieves the media type. */ + /** + * Sets or retrieves the media type. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/media) + */ media: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/referrerPolicy) */ referrerPolicy: string; @@ -11158,13 +12025,16 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle { */ rel: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/relList) */ - readonly relList: DOMTokenList; + get relList(): DOMTokenList; + set relList(value: string); /** * Sets or retrieves the relationship between the object and the destination of the link. * @deprecated */ rev: string; - readonly sizes: DOMTokenList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/sizes) */ + get sizes(): DOMTokenList; + set sizes(value: string); /** * Sets or retrieves the window or frame at which to target content. * @deprecated @@ -11193,7 +12063,11 @@ declare var HTMLLinkElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMapElement) */ interface HTMLMapElement extends HTMLElement { - /** Retrieves a collection of the area objects defined for the given map object. */ + /** + * Retrieves a collection of the area objects defined for the given map object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMapElement/areas) + */ readonly areas: HTMLCollection; /** * Sets or retrieves the name of the object. @@ -11354,6 +12228,7 @@ interface HTMLMediaElement extends HTMLElement { readonly networkState: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/encrypted_event) */ onencrypted: ((this: HTMLMediaElement, ev: MediaEncryptedEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/waitingforkey_event) */ onwaitingforkey: ((this: HTMLMediaElement, ev: Event) => any) | null; /** * Gets a flag that specifies whether playback is paused. @@ -11367,7 +12242,11 @@ interface HTMLMediaElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/playbackRate) */ playbackRate: number; - /** Gets TimeRanges for the current media resource that has been played. */ + /** + * Gets TimeRanges for the current media resource that has been played. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/played) + */ readonly played: TimeRanges; /** * Gets or sets a value indicating what data should be preloaded, if any. @@ -11387,7 +12266,11 @@ interface HTMLMediaElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/seekable) */ readonly seekable: TimeRanges; - /** Gets a flag that indicates whether the client is currently moving to a new playback position in the media resource. */ + /** + * Gets a flag that indicates whether the client is currently moving to a new playback position in the media resource. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/seeking) + */ readonly seeking: boolean; /** * Available only in secure contexts. @@ -11411,6 +12294,7 @@ interface HTMLMediaElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/volume) */ volume: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/addTextTrack) */ addTextTrack(kind: TextTrackKind, label?: string, language?: string): TextTrack; /** * Returns a string that specifies whether the client can play a given media resource type. @@ -11544,13 +12428,19 @@ declare var HTMLMetaElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement) */ interface HTMLMeterElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/high) */ high: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/labels) */ readonly labels: NodeListOf; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/low) */ low: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/max) */ max: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/min) */ min: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/optimum) */ optimum: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/value) */ value: number; addEventListener(type: K, listener: (this: HTMLMeterElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -11569,9 +12459,17 @@ declare var HTMLMeterElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLModElement) */ interface HTMLModElement extends HTMLElement { - /** Sets or retrieves reference information about the object. */ + /** + * Sets or retrieves reference information about the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLModElement/cite) + */ cite: string; - /** Sets or retrieves the date and time of a modification to the object. */ + /** + * Sets or retrieves the date and time of a modification to the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLModElement/dateTime) + */ dateTime: string; addEventListener(type: K, listener: (this: HTMLModElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -11729,7 +12627,9 @@ interface HTMLObjectElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/checkValidity) */ checkValidity(): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/getSVGDocument) */ getSVGDocument(): Document | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/reportValidity) */ reportValidity(): boolean; /** * Sets a custom error message that is displayed when a form is submitted. @@ -11755,8 +12655,13 @@ declare var HTMLObjectElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptGroupElement) */ interface HTMLOptGroupElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptGroupElement/disabled) */ disabled: boolean; - /** Sets or retrieves a value that you can use to implement your own label functionality for the object. */ + /** + * Sets or retrieves a value that you can use to implement your own label functionality for the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptGroupElement/label) + */ label: string; addEventListener(type: K, listener: (this: HTMLOptGroupElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -11775,20 +12680,49 @@ declare var HTMLOptGroupElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement) */ interface HTMLOptionElement extends HTMLElement { - /** Sets or retrieves the status of an option. */ + /** + * Sets or retrieves the status of an option. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/defaultSelected) + */ defaultSelected: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/disabled) */ disabled: boolean; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/form) + */ readonly form: HTMLFormElement | null; - /** Sets or retrieves the ordinal position of an option in a list box. */ + /** + * Sets or retrieves the ordinal position of an option in a list box. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/index) + */ readonly index: number; - /** Sets or retrieves a value that you can use to implement your own label functionality for the object. */ + /** + * Sets or retrieves a value that you can use to implement your own label functionality for the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/label) + */ label: string; - /** Sets or retrieves whether the option in the list box is the default item. */ + /** + * Sets or retrieves whether the option in the list box is the default item. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/selected) + */ selected: boolean; - /** Sets or retrieves the text string specified by the option tag. */ + /** + * Sets or retrieves the text string specified by the option tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/text) + */ text: string; - /** Sets or retrieves the value which is returned to the server when the form control is submitted. */ + /** + * Sets or retrieves the value which is returned to the server when the form control is submitted. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/value) + */ value: string; addEventListener(type: K, listener: (this: HTMLOptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -11813,12 +12747,16 @@ interface HTMLOptionsCollection extends HTMLCollectionOf { * When set to a smaller number, truncates the number of option elements in the corresponding container. * * When set to a greater number, adds new blank option elements to that container. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection/length) */ length: number; /** * Returns the index of the first selected item, if any, or −1 if there is no selected item. * * Can be set, to change the selection. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection/selectedIndex) */ selectedIndex: number; /** @@ -11829,9 +12767,15 @@ interface HTMLOptionsCollection extends HTMLCollectionOf { * If before is omitted, null, or a number out of range, then element will be added at the end of the list. * * This method will throw a "HierarchyRequestError" DOMException if element is an ancestor of the element into which it is to be inserted. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection/add) */ add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): void; - /** Removes the item with index index from the collection. */ + /** + * Removes the item with index index from the collection. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection/remove) + */ remove(index: number): void; } @@ -11861,25 +12805,42 @@ interface HTMLOrSVGElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement) */ interface HTMLOutputElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/defaultValue) */ defaultValue: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/form) */ readonly form: HTMLFormElement | null; - readonly htmlFor: DOMTokenList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/htmlFor) */ + get htmlFor(): DOMTokenList; + set htmlFor(value: string); /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/labels) */ readonly labels: NodeListOf; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/name) */ name: string; - /** Returns the string "output". */ + /** + * Returns the string "output". + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/type) + */ readonly type: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/validationMessage) */ readonly validationMessage: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/validity) */ readonly validity: ValidityState; /** * Returns the element's current value. * * Can be set, to change the value. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/value) */ value: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/willValidate) */ readonly willValidate: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/checkValidity) */ checkValidity(): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/reportValidity) */ reportValidity(): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/setCustomValidity) */ setCustomValidity(error: string): void; addEventListener(type: K, listener: (this: HTMLOutputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -12035,7 +12996,11 @@ declare var HTMLProgressElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLQuoteElement) */ interface HTMLQuoteElement extends HTMLElement { - /** Sets or retrieves reference information about the object. */ + /** + * Sets or retrieves reference information about the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLQuoteElement/cite) + */ cite: string; addEventListener(type: K, listener: (this: HTMLQuoteElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -12056,6 +13021,9 @@ declare var HTMLQuoteElement: { interface HTMLScriptElement extends HTMLElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/async) */ async: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/blocking) */ + get blocking(): DOMTokenList; + set blocking(value: string); /** * Sets or retrieves the character set used to encode the object. * @deprecated @@ -12075,7 +13043,7 @@ interface HTMLScriptElement extends HTMLElement { */ event: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/fetchPriority) */ - fetchPriority: string; + fetchPriority: "high" | "low" | "auto"; /** * Sets or retrieves the object that is bound to the event script. * @deprecated @@ -12124,6 +13092,7 @@ declare var HTMLScriptElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement) */ interface HTMLSelectElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/autocomplete) */ autocomplete: AutoFill; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/disabled) */ disabled: boolean; @@ -12135,11 +13104,23 @@ interface HTMLSelectElement extends HTMLElement { readonly form: HTMLFormElement | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/labels) */ readonly labels: NodeListOf; - /** Sets or retrieves the number of objects in a collection. */ + /** + * Sets or retrieves the number of objects in a collection. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/length) + */ length: number; - /** Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. */ + /** + * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/multiple) + */ multiple: boolean; - /** Sets or retrieves the name of the object. */ + /** + * Sets or retrieves the name of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/name) + */ name: string; /** * Returns an HTMLOptionsCollection of the list of options. @@ -12147,7 +13128,11 @@ interface HTMLSelectElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/options) */ readonly options: HTMLOptionsCollection; - /** When present, marks an element that can't be submitted without a value. */ + /** + * When present, marks an element that can't be submitted without a value. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/required) + */ required: boolean; /** * Sets or retrieves the index of the selected option in a select object. @@ -12157,7 +13142,11 @@ interface HTMLSelectElement extends HTMLElement { selectedIndex: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/selectedOptions) */ readonly selectedOptions: HTMLCollectionOf; - /** Sets or retrieves the number of rows in the list box. */ + /** + * Sets or retrieves the number of rows in the list box. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/size) + */ size: number; /** * Retrieves the type of select control based on the value of the MULTIPLE attribute. @@ -12165,9 +13154,17 @@ interface HTMLSelectElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/type) */ readonly type: "select-one" | "select-multiple"; - /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */ + /** + * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/validationMessage) + */ readonly validationMessage: string; - /** Returns a ValidityState object that represents the validity states of an element. */ + /** + * Returns a ValidityState object that represents the validity states of an element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/validity) + */ readonly validity: ValidityState; /** * Sets or retrieves the value which is returned to the server when the form control is submitted. @@ -12175,7 +13172,11 @@ interface HTMLSelectElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/value) */ value: string; - /** Returns whether an element will successfully validate based on forms validation rules and constraints. */ + /** + * Returns whether an element will successfully validate based on forms validation rules and constraints. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/willValidate) + */ readonly willValidate: boolean; /** * Adds an element to the areas, controlRange, or options collection. @@ -12214,6 +13215,7 @@ interface HTMLSelectElement extends HTMLElement { */ remove(): void; remove(index: number): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/reportValidity) */ reportValidity(): boolean; /** * Sets a custom error message that is displayed when a form is submitted. @@ -12265,13 +13267,27 @@ declare var HTMLSlotElement: { interface HTMLSourceElement extends HTMLElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSourceElement/height) */ height: number; - /** Gets or sets the intended media type of the media source. */ + /** + * Gets or sets the intended media type of the media source. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSourceElement/media) + */ media: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSourceElement/sizes) */ sizes: string; - /** The address or URL of the a media resource that is to be considered. */ + /** + * The address or URL of the a media resource that is to be considered. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSourceElement/src) + */ src: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSourceElement/srcset) */ srcset: string; - /** Gets or sets the MIME type of a media resource. */ + /** + * Gets or sets the MIME type of a media resource. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSourceElement/type) + */ type: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSourceElement/width) */ width: number; @@ -12309,6 +13325,9 @@ declare var HTMLSpanElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLStyleElement) */ interface HTMLStyleElement extends HTMLElement, LinkStyle { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLStyleElement/blocking) */ + get blocking(): DOMTokenList; + set blocking(value: string); /** * Enables or disables the style sheet. * @@ -12348,6 +13367,8 @@ interface HTMLTableCaptionElement extends HTMLElement { /** * Sets or retrieves the alignment of the caption or legend. * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableCaptionElement/align) */ align: string; addEventListener(type: K, listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -12710,6 +13731,8 @@ interface HTMLTableRowElement extends HTMLElement { /** * Sets or retrieves how the object is aligned with adjacent text. * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/align) */ align: string; /** @@ -12748,7 +13771,11 @@ interface HTMLTableRowElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/sectionRowIndex) */ readonly sectionRowIndex: number; - /** @deprecated */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/vAlign) + */ vAlign: string; /** * Removes the specified cell from the table row, as well as from the cells collection. @@ -12784,6 +13811,8 @@ interface HTMLTableSectionElement extends HTMLElement { /** * Sets or retrieves a value that indicates the table alignment. * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/align) */ align: string; /** @@ -12801,10 +13830,14 @@ interface HTMLTableSectionElement extends HTMLElement { /** * Sets or retrieves the number of horizontal rows contained in the object. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/rows) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/rows) + */ + readonly rows: HTMLCollectionOf; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/vAlign) */ - readonly rows: HTMLCollectionOf; - /** @deprecated */ vAlign: string; /** * Removes the specified row (tr) from the element and from the rows collection. @@ -12868,35 +13901,84 @@ declare var HTMLTemplateElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement) */ interface HTMLTextAreaElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/autocomplete) */ autocomplete: AutoFill; - /** Sets or retrieves the width of the object. */ + /** + * Sets or retrieves the width of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/cols) + */ cols: number; - /** Sets or retrieves the initial contents of the object. */ + /** + * Sets or retrieves the initial contents of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/defaultValue) + */ defaultValue: string; dirName: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/disabled) */ disabled: boolean; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/form) + */ readonly form: HTMLFormElement | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/labels) */ readonly labels: NodeListOf; - /** Sets or retrieves the maximum number of characters that the user can enter in a text control. */ + /** + * Sets or retrieves the maximum number of characters that the user can enter in a text control. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/maxLength) + */ maxLength: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/minLength) */ minLength: number; - /** Sets or retrieves the name of the object. */ + /** + * Sets or retrieves the name of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/name) + */ name: string; - /** Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. */ + /** + * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/placeholder) + */ placeholder: string; - /** Sets or retrieves the value indicated whether the content of the object is read-only. */ + /** + * Sets or retrieves the value indicated whether the content of the object is read-only. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/readOnly) + */ readOnly: boolean; - /** When present, marks an element that can't be submitted without a value. */ + /** + * When present, marks an element that can't be submitted without a value. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/required) + */ required: boolean; - /** Sets or retrieves the number of horizontal rows contained in the object. */ + /** + * Sets or retrieves the number of horizontal rows contained in the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/rows) + */ rows: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionDirection) */ selectionDirection: "forward" | "backward" | "none"; - /** Gets or sets the end position or offset of a text selection. */ + /** + * Gets or sets the end position or offset of a text selection. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionEnd) + */ selectionEnd: number; - /** Gets or sets the starting position or offset of a text selection. */ + /** + * Gets or sets the starting position or offset of a text selection. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionStart) + */ selectionStart: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/textLength) */ readonly textLength: number; /** * Retrieves the type of control. @@ -12904,26 +13986,58 @@ interface HTMLTextAreaElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/type) */ readonly type: string; - /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */ + /** + * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/validationMessage) + */ readonly validationMessage: string; - /** Returns a ValidityState object that represents the validity states of an element. */ + /** + * Returns a ValidityState object that represents the validity states of an element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/validity) + */ readonly validity: ValidityState; - /** Retrieves or sets the text in the entry field of the textArea element. */ + /** + * Retrieves or sets the text in the entry field of the textArea element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/value) + */ value: string; - /** Returns whether an element will successfully validate based on forms validation rules and constraints. */ + /** + * Returns whether an element will successfully validate based on forms validation rules and constraints. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/willValidate) + */ readonly willValidate: boolean; - /** Sets or retrieves how to handle wordwrapping in the object. */ + /** + * Sets or retrieves how to handle wordwrapping in the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/wrap) + */ wrap: string; - /** Returns whether a form will validate when it is submitted, without having to submit it. */ + /** + * Returns whether a form will validate when it is submitted, without having to submit it. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/checkValidity) + */ checkValidity(): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/reportValidity) */ reportValidity(): boolean; - /** Highlights the input area of a form element. */ + /** + * Highlights the input area of a form element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/select) + */ select(): void; /** * Sets a custom error message that is displayed when a form is submitted. * @param error Sets a custom error message that is displayed when a form is submitted. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setCustomValidity) */ setCustomValidity(error: string): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setRangeText) */ setRangeText(replacement: string): void; setRangeText(replacement: string, start: number, end: number, selectionMode?: SelectionMode): void; /** @@ -12931,6 +14045,8 @@ interface HTMLTextAreaElement extends HTMLElement { * @param start The offset into the text field for the start of the selection. * @param end The offset into the text field for the end of the selection. * @param direction The direction in which the selection is performed. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setSelectionRange) */ setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void; addEventListener(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -12992,14 +14108,23 @@ declare var HTMLTitleElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement) */ interface HTMLTrackElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement/default) */ default: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement/kind) */ kind: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement/label) */ label: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement/readyState) */ readonly readyState: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement/src) */ src: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement/srclang) */ srclang: string; - /** Returns the TextTrack object corresponding to the text track of the track element. */ + /** + * Returns the TextTrack object corresponding to the text track of the track element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement/track) + */ readonly track: TextTrack; readonly NONE: 0; readonly LOADING: 1; @@ -13059,8 +14184,8 @@ declare var HTMLUnknownElement: { }; interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap { - "enterpictureinpicture": Event; - "leavepictureinpicture": Event; + "enterpictureinpicture": PictureInPictureEvent; + "leavepictureinpicture": PictureInPictureEvent; } /** @@ -13078,9 +14203,9 @@ interface HTMLVideoElement extends HTMLMediaElement { */ height: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/enterpictureinpicture_event) */ - onenterpictureinpicture: ((this: HTMLVideoElement, ev: Event) => any) | null; + onenterpictureinpicture: ((this: HTMLVideoElement, ev: PictureInPictureEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/leavepictureinpicture_event) */ - onleavepictureinpicture: ((this: HTMLVideoElement, ev: Event) => any) | null; + onleavepictureinpicture: ((this: HTMLVideoElement, ev: PictureInPictureEvent) => any) | null; /** Gets or sets the playsinline of the video element. for example, On iPhone, video elements will now be allowed to play inline, and will not automatically enter fullscreen mode when playback begins. */ playsInline: boolean; /** @@ -13859,7 +14984,7 @@ interface IDBTransaction extends EventTarget { /** * Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/ObjectStoreNames) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/objectStoreNames) */ readonly objectStoreNames: DOMStringList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ @@ -13967,7 +15092,11 @@ declare var ImageBitmap: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext) */ interface ImageBitmapRenderingContext { - /** Returns the canvas element that the context is bound to. */ + /** + * Returns the canvas element that the context is bound to. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext/canvas) + */ readonly canvas: HTMLCanvasElement | OffscreenCanvas; /** * Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound. @@ -14016,6 +15145,70 @@ declare var ImageData: { new(data: Uint8ClampedArray, sw: number, sh?: number, settings?: ImageDataSettings): ImageData; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder) + */ +interface ImageDecoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/complete) */ + readonly complete: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/completed) */ + readonly completed: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/tracks) */ + readonly tracks: ImageTrackList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/type) */ + readonly type: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/decode) */ + decode(options?: ImageDecodeOptions): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/reset) */ + reset(): void; +} + +declare var ImageDecoder: { + prototype: ImageDecoder; + new(init: ImageDecoderInit): ImageDecoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/isTypeSupported_static) */ + isTypeSupported(type: string): Promise; +}; + +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrack) */ +interface ImageTrack { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrack/animated) */ + readonly animated: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrack/frameCount) */ + readonly frameCount: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrack/repetitionCount) */ + readonly repetitionCount: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrack/selected) */ + selected: boolean; +} + +declare var ImageTrack: { + prototype: ImageTrack; + new(): ImageTrack; +}; + +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrackList) */ +interface ImageTrackList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrackList/length) */ + readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrackList/ready) */ + readonly ready: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrackList/selectedIndex) */ + readonly selectedIndex: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrackList/selectedTrack) */ + readonly selectedTrack: ImageTrack | null; + [index: number]: ImageTrack; +} + +declare var ImageTrackList: { + prototype: ImageTrackList; + new(): ImageTrackList; +}; + interface ImportMeta { url: string; resolve(specifier: string): string; @@ -14106,7 +15299,7 @@ interface IntersectionObserverEntry { declare var IntersectionObserverEntry: { prototype: IntersectionObserverEntry; - new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry; + new(): IntersectionObserverEntry; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/KHR_parallel_shader_compile) */ @@ -14367,7 +15560,7 @@ declare var LockManager: { }; interface MIDIAccessEventMap { - "statechange": Event; + "statechange": MIDIConnectionEvent; } /** @@ -14379,7 +15572,7 @@ interface MIDIAccess extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/inputs) */ readonly inputs: MIDIInputMap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/statechange_event) */ - onstatechange: ((this: MIDIAccess, ev: Event) => any) | null; + onstatechange: ((this: MIDIAccess, ev: MIDIConnectionEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/outputs) */ readonly outputs: MIDIOutputMap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/sysexEnabled) */ @@ -14787,6 +15980,7 @@ declare var MediaKeySystemAccess: { interface MediaKeys { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeys/createSession) */ createSession(sessionType?: MediaKeySessionType): MediaKeySession; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeys/getStatusForPolicy) */ getStatusForPolicy(policy?: MediaKeysPolicy): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeys/setServerCertificate) */ setServerCertificate(serverCertificate: BufferSource): Promise; @@ -14889,7 +16083,7 @@ declare var MediaQueryListEvent: { interface MediaRecorderEventMap { "dataavailable": BlobEvent; - "error": Event; + "error": ErrorEvent; "pause": Event; "resume": Event; "start": Event; @@ -14905,7 +16099,7 @@ interface MediaRecorder extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/dataavailable_event) */ ondataavailable: ((this: MediaRecorder, ev: BlobEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/error_event) */ - onerror: ((this: MediaRecorder, ev: Event) => any) | null; + onerror: ((this: MediaRecorder, ev: ErrorEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/pause_event) */ onpause: ((this: MediaRecorder, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/resume_event) */ @@ -15229,7 +16423,23 @@ declare var MessageEvent: { new(type: string, eventInitDict?: MessageEventInit): MessageEvent; }; -interface MessagePortEventMap { +interface MessageEventTargetEventMap { + "message": MessageEvent; + "messageerror": MessageEvent; +} + +interface MessageEventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ + onmessage: ((this: T, ev: MessageEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ + onmessageerror: ((this: T, ev: MessageEvent) => any) | null; + addEventListener(type: K, listener: (this: T, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: T, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +interface MessagePortEventMap extends MessageEventTargetEventMap { "message": MessageEvent; "messageerror": MessageEvent; } @@ -15239,11 +16449,7 @@ interface MessagePortEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort) */ -interface MessagePort extends EventTarget { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/message_event) */ - onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/messageerror_event) */ - onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null; +interface MessagePort extends EventTarget, MessageEventTarget { /** * Disconnects the port, so that it is no longer active. * @@ -15396,63 +16602,6 @@ declare var MouseEvent: { new(type: string, eventInitDict?: MouseEventInit): MouseEvent; }; -/** - * Provides event properties that are specific to modifications to the Document Object Model (DOM) hierarchy and nodes. - * @deprecated DOM4 [DOM] provides a new mechanism using a MutationObserver interface which addresses the use cases that mutation events solve, but in a more performant manner. Thus, this specification describes mutation events for reference and completeness of legacy behavior, but deprecates the use of the MutationEvent interface. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent) - */ -interface MutationEvent extends Event { - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/attrChange) - */ - readonly attrChange: number; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/attrName) - */ - readonly attrName: string; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/newValue) - */ - readonly newValue: string; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/prevValue) - */ - readonly prevValue: string; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/relatedNode) - */ - readonly relatedNode: Node | null; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/initMutationEvent) - */ - initMutationEvent(typeArg: string, bubblesArg?: boolean, cancelableArg?: boolean, relatedNodeArg?: Node | null, prevValueArg?: string, newValueArg?: string, attrNameArg?: string, attrChangeArg?: number): void; - readonly MODIFICATION: 1; - readonly ADDITION: 2; - readonly REMOVAL: 3; -} - -/** @deprecated */ -declare var MutationEvent: { - prototype: MutationEvent; - new(): MutationEvent; - readonly MODIFICATION: 1; - readonly ADDITION: 2; - readonly REMOVAL: 3; -}; - /** * Provides the ability to watch for changes being made to the DOM tree. It is designed as a replacement for the older Mutation Events feature which was part of the DOM3 Events specification. * @@ -15583,6 +16732,52 @@ declare var NamedNodeMap: { new(): NamedNodeMap; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationActivation) */ +interface NavigationActivation { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationActivation/entry) */ + readonly entry: NavigationHistoryEntry; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationActivation/from) */ + readonly from: NavigationHistoryEntry | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationActivation/navigationType) */ + readonly navigationType: NavigationType; +} + +declare var NavigationActivation: { + prototype: NavigationActivation; + new(): NavigationActivation; +}; + +interface NavigationHistoryEntryEventMap { + "dispose": Event; +} + +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationHistoryEntry) */ +interface NavigationHistoryEntry extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationHistoryEntry/id) */ + readonly id: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationHistoryEntry/index) */ + readonly index: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationHistoryEntry/key) */ + readonly key: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationHistoryEntry/dispose_event) */ + ondispose: ((this: NavigationHistoryEntry, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationHistoryEntry/sameDocument) */ + readonly sameDocument: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationHistoryEntry/url) */ + readonly url: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationHistoryEntry/getState) */ + getState(): any; + addEventListener(type: K, listener: (this: NavigationHistoryEntry, ev: NavigationHistoryEntryEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: NavigationHistoryEntry, ev: NavigationHistoryEntryEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var NavigationHistoryEntry: { + prototype: NavigationHistoryEntry; + new(): NavigationHistoryEntry; +}; + /** * Available only in secure contexts. * @@ -15907,7 +17102,7 @@ interface Node extends EventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/cloneNode) */ - cloneNode(deep?: boolean): Node; + cloneNode(subtree?: boolean): Node; /** * Returns a bitmask indicating the position of other relative to node. * @@ -16262,7 +17457,7 @@ interface OES_vertex_array_object { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/bindVertexArrayOES) */ bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/createVertexArrayOES) */ - createVertexArrayOES(): WebGLVertexArrayObjectOES | null; + createVertexArrayOES(): WebGLVertexArrayObjectOES; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/deleteVertexArrayOES) */ deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/isVertexArrayOES) */ @@ -16395,6 +17590,7 @@ declare var OffscreenCanvas: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvasRenderingContext2D) */ interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/canvas) */ readonly canvas: OffscreenCanvas; } @@ -16439,6 +17635,30 @@ declare var OverconstrainedError: { new(constraint: string, message?: string): OverconstrainedError; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PageRevealEvent) */ +interface PageRevealEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PageRevealEvent/viewTransition) */ + readonly viewTransition: ViewTransition | null; +} + +declare var PageRevealEvent: { + prototype: PageRevealEvent; + new(type: string, eventInitDict?: PageRevealEventInit): PageRevealEvent; +}; + +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PageSwapEvent) */ +interface PageSwapEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PageSwapEvent/activation) */ + readonly activation: NavigationActivation | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PageSwapEvent/viewTransition) */ + readonly viewTransition: ViewTransition | null; +} + +declare var PageSwapEvent: { + prototype: PageSwapEvent; + new(type: string, eventInitDict?: PageSwapEventInit): PageSwapEvent; +}; + /** * The PageTransitionEvent is fired when a document is being loaded or unloaded. * @@ -16608,6 +17828,37 @@ declare var Path2D: { new(path?: Path2D | string): Path2D; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress) */ +interface PaymentAddress { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/addressLine) */ + readonly addressLine: ReadonlyArray; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/city) */ + readonly city: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/country) */ + readonly country: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/dependentLocality) */ + readonly dependentLocality: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/organization) */ + readonly organization: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/phone) */ + readonly phone: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/postalCode) */ + readonly postalCode: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/recipient) */ + readonly recipient: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/region) */ + readonly region: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/sortingCode) */ + readonly sortingCode: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/toJSON) */ + toJSON(): any; +} + +declare var PaymentAddress: { + prototype: PaymentAddress; + new(): PaymentAddress; +}; + /** * Available only in secure contexts. * @@ -16626,7 +17877,9 @@ declare var PaymentMethodChangeEvent: { }; interface PaymentRequestEventMap { - "paymentmethodchange": Event; + "paymentmethodchange": PaymentMethodChangeEvent; + "shippingaddresschange": PaymentRequestUpdateEvent; + "shippingoptionchange": PaymentRequestUpdateEvent; } /** @@ -16639,7 +17892,37 @@ interface PaymentRequest extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/id) */ readonly id: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/paymentmethodchange_event) */ - onpaymentmethodchange: ((this: PaymentRequest, ev: Event) => any) | null; + onpaymentmethodchange: ((this: PaymentRequest, ev: PaymentMethodChangeEvent) => any) | null; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/shippingaddresschange_event) + */ + onshippingaddresschange: ((this: PaymentRequest, ev: PaymentRequestUpdateEvent) => any) | null; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/shippingoptionchange_event) + */ + onshippingoptionchange: ((this: PaymentRequest, ev: PaymentRequestUpdateEvent) => any) | null; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/shippingAddress) + */ + readonly shippingAddress: PaymentAddress | null; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/shippingOption) + */ + readonly shippingOption: string | null; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/shippingType) + */ + readonly shippingType: PaymentShippingType | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/abort) */ abort(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/canMakePayment) */ @@ -16654,7 +17937,7 @@ interface PaymentRequest extends EventTarget { declare var PaymentRequest: { prototype: PaymentRequest; - new(methodData: PaymentMethodData[], details: PaymentDetailsInit): PaymentRequest; + new(methodData: PaymentMethodData[], details: PaymentDetailsInit, options?: PaymentOptions): PaymentRequest; }; /** @@ -16673,6 +17956,10 @@ declare var PaymentRequestUpdateEvent: { new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent; }; +interface PaymentResponseEventMap { + "payerdetailchange": PaymentRequestUpdateEvent; +} + /** * This Payment Request API interface is returned after a user selects a payment method and approves a payment request. * Available only in secure contexts. @@ -16684,14 +17971,30 @@ interface PaymentResponse extends EventTarget { readonly details: any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/methodName) */ readonly methodName: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/payerdetailchange_event) */ + onpayerdetailchange: ((this: PaymentResponse, ev: PaymentRequestUpdateEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/payerEmail) */ + readonly payerEmail: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/payerName) */ + readonly payerName: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/payerPhone) */ + readonly payerPhone: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/requestId) */ readonly requestId: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/shippingAddress) */ + readonly shippingAddress: PaymentAddress | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/shippingOption) */ + readonly shippingOption: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/complete) */ complete(result?: PaymentComplete): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/retry) */ retry(errorFields?: PaymentValidationErrors): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/toJSON) */ toJSON(): any; + addEventListener(type: K, listener: (this: PaymentResponse, ev: PaymentResponseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: PaymentResponse, ev: PaymentResponseEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var PaymentResponse: { @@ -16983,6 +18286,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { readonly responseEnd: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart) */ readonly responseStart: DOMHighResTimeStamp; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStatus) */ + readonly responseStatus: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart) */ readonly secureConnectionStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/serverTiming) */ @@ -17318,6 +18623,10 @@ declare var PluginArray: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent) */ interface PointerEvent extends MouseEvent { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/altitudeAngle) */ + readonly altitudeAngle: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/azimuthAngle) */ + readonly azimuthAngle: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/height) */ readonly height: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/isPrimary) */ @@ -17359,6 +18668,7 @@ declare var PointerEvent: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PopStateEvent) */ interface PopStateEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PopStateEvent/hasUAVisualTransition) */ readonly hasUAVisualTransition: boolean; /** * Returns a copy of the information that was provided to pushState() or replaceState(). @@ -17443,15 +18753,22 @@ interface PublicKeyCredential extends Credential { readonly response: AuthenticatorResponse; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/getClientExtensionResults) */ getClientExtensionResults(): AuthenticationExtensionsClientOutputs; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/toJSON) */ + toJSON(): PublicKeyCredentialJSON; } declare var PublicKeyCredential: { prototype: PublicKeyCredential; new(): PublicKeyCredential; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isConditionalMediationAvailable) */ + getClientCapabilities(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isConditionalMediationAvailable_static) */ isConditionalMediationAvailable(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable_static) */ isUserVerifyingPlatformAuthenticatorAvailable(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/parseCreationOptionsFromJSON_static) */ + parseCreationOptionsFromJSON(options: PublicKeyCredentialCreationOptionsJSON): PublicKeyCredentialCreationOptions; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/parseRequestOptionsFromJSON_static) */ + parseRequestOptionsFromJSON(options: PublicKeyCredentialRequestOptionsJSON): PublicKeyCredentialRequestOptions; }; /** @@ -17576,7 +18893,7 @@ interface RTCDataChannelEventMap { "bufferedamountlow": Event; "close": Event; "closing": Event; - "error": Event; + "error": RTCErrorEvent; "message": MessageEvent; "open": Event; } @@ -17606,7 +18923,7 @@ interface RTCDataChannel extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/closing_event) */ onclosing: ((this: RTCDataChannel, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/error_event) */ - onerror: ((this: RTCDataChannel, ev: Event) => any) | null; + onerror: ((this: RTCDataChannel, ev: RTCErrorEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/message_event) */ onmessage: ((this: RTCDataChannel, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/open_event) */ @@ -17647,7 +18964,7 @@ declare var RTCDataChannelEvent: { }; interface RTCDtlsTransportEventMap { - "error": Event; + "error": RTCErrorEvent; "statechange": Event; } @@ -17656,7 +18973,7 @@ interface RTCDtlsTransport extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDtlsTransport/iceTransport) */ readonly iceTransport: RTCIceTransport; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDtlsTransport/error_event) */ - onerror: ((this: RTCDtlsTransport, ev: Event) => any) | null; + onerror: ((this: RTCDtlsTransport, ev: RTCErrorEvent) => any) | null; onstatechange: ((this: RTCDtlsTransport, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDtlsTransport/state) */ readonly state: RTCDtlsTransportState; @@ -17878,9 +19195,9 @@ interface RTCPeerConnection extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/signalingState) */ readonly signalingState: RTCSignalingState; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/addIceCandidate) */ - addIceCandidate(candidate?: RTCIceCandidateInit): Promise; + addIceCandidate(candidate?: RTCIceCandidateInit | null): Promise; /** @deprecated */ - addIceCandidate(candidate: RTCIceCandidateInit, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback): Promise; + addIceCandidate(candidate: RTCIceCandidateInit | null, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/addTrack) */ addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/addTransceiver) */ @@ -18284,7 +19601,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { declare var ReadableStreamBYOBReader: { prototype: ReadableStreamBYOBReader; - new(stream: ReadableStream): ReadableStreamBYOBReader; + new(stream: ReadableStream): ReadableStreamBYOBReader; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */ @@ -18334,7 +19651,7 @@ declare var ReadableStreamDefaultReader: { interface ReadableStreamGenericReader { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/closed) */ - readonly closed: Promise; + readonly closed: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/cancel) */ cancel(reason?: any): Promise; } @@ -18450,7 +19767,11 @@ interface Request extends Body { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/integrity) */ readonly integrity: string; - /** Returns a boolean indicating whether or not request can outlive the global in which it was created. */ + /** + * Returns a boolean indicating whether or not request can outlive the global in which it was created. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive) + */ readonly keepalive: boolean; /** * Returns request's HTTP method, which is "GET" by default. @@ -18592,7 +19913,8 @@ declare var Response: { */ interface SVGAElement extends SVGGraphicsElement, SVGURIReference { rel: string; - readonly relList: DOMTokenList; + get relList(): DOMTokenList; + set relList(value: string); /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement/target) */ readonly target: SVGAnimatedString; addEventListener(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -18612,11 +19934,17 @@ declare var SVGAElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle) */ interface SVGAngle { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/unitType) */ readonly unitType: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/value) */ value: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/valueAsString) */ valueAsString: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/valueInSpecifiedUnits) */ valueInSpecifiedUnits: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/convertToSpecifiedUnits) */ convertToSpecifiedUnits(unitType: number): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/newValueSpecifiedUnits) */ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void; readonly SVG_ANGLETYPE_UNKNOWN: 0; readonly SVG_ANGLETYPE_UNSPECIFIED: 1; @@ -18680,7 +20008,9 @@ declare var SVGAnimateTransformElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedAngle) */ interface SVGAnimatedAngle { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedAngle/animVal) */ readonly animVal: SVGAngle; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedAngle/baseVal) */ readonly baseVal: SVGAngle; } @@ -18695,7 +20025,9 @@ declare var SVGAnimatedAngle: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedBoolean) */ interface SVGAnimatedBoolean { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedBoolean/animVal) */ readonly animVal: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedBoolean/baseVal) */ baseVal: boolean; } @@ -18727,7 +20059,9 @@ declare var SVGAnimatedEnumeration: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedInteger) */ interface SVGAnimatedInteger { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedInteger/animVal) */ readonly animVal: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedInteger/baseVal) */ baseVal: number; } @@ -18759,7 +20093,9 @@ declare var SVGAnimatedLength: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedLengthList) */ interface SVGAnimatedLengthList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedLengthList/animVal) */ readonly animVal: SVGLengthList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedLengthList/baseVal) */ readonly baseVal: SVGLengthList; } @@ -18774,7 +20110,9 @@ declare var SVGAnimatedLengthList: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedNumber) */ interface SVGAnimatedNumber { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedNumber/animVal) */ readonly animVal: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedNumber/baseVal) */ baseVal: number; } @@ -18789,7 +20127,9 @@ declare var SVGAnimatedNumber: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedNumberList) */ interface SVGAnimatedNumberList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedNumberList/animVal) */ readonly animVal: SVGNumberList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedNumberList/baseVal) */ readonly baseVal: SVGNumberList; } @@ -18799,7 +20139,9 @@ declare var SVGAnimatedNumberList: { }; interface SVGAnimatedPoints { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGPolygonElement/animatedPoints) */ readonly animatedPoints: SVGPointList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGPolygonElement/points) */ readonly points: SVGPointList; } @@ -18809,7 +20151,9 @@ interface SVGAnimatedPoints { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedPreserveAspectRatio) */ interface SVGAnimatedPreserveAspectRatio { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedPreserveAspectRatio/animVal) */ readonly animVal: SVGPreserveAspectRatio; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedPreserveAspectRatio/baseVal) */ readonly baseVal: SVGPreserveAspectRatio; } @@ -18824,7 +20168,9 @@ declare var SVGAnimatedPreserveAspectRatio: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedRect) */ interface SVGAnimatedRect { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedRect/animVal) */ readonly animVal: DOMRectReadOnly; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedRect/baseVal) */ readonly baseVal: DOMRect; } @@ -18856,7 +20202,9 @@ declare var SVGAnimatedString: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedTransformList) */ interface SVGAnimatedTransformList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedTransformList/animVal) */ readonly animVal: SVGTransformList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimatedTransformList/baseVal) */ readonly baseVal: SVGTransformList; } @@ -18869,12 +20217,19 @@ declare var SVGAnimatedTransformList: { interface SVGAnimationElement extends SVGElement, SVGTests { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimationElement/targetElement) */ readonly targetElement: SVGElement | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimationElement/beginElement) */ beginElement(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimationElement/beginElementAt) */ beginElementAt(offset: number): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimationElement/endElement) */ endElement(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimationElement/endElementAt) */ endElementAt(offset: number): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimationElement/getCurrentTime) */ getCurrentTime(): number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimationElement/getSimpleDuration) */ getSimpleDuration(): number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimationElement/getStartTime) */ getStartTime(): number; addEventListener(type: K, listener: (this: SVGAnimationElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -18937,12 +20292,19 @@ declare var SVGClipPathElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGComponentTransferFunctionElement) */ interface SVGComponentTransferFunctionElement extends SVGElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGComponentTransferFunctionElement/amplitude) */ readonly amplitude: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGComponentTransferFunctionElement/exponent) */ readonly exponent: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGComponentTransferFunctionElement/intercept) */ readonly intercept: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGComponentTransferFunctionElement/offset) */ readonly offset: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGComponentTransferFunctionElement/slope) */ readonly slope: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGComponentTransferFunctionElement/tableValues) */ readonly tableValues: SVGAnimatedNumberList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGComponentTransferFunctionElement/type) */ readonly type: SVGAnimatedEnumeration; readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: 0; readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: 1; @@ -19012,7 +20374,9 @@ interface SVGElementEventMap extends ElementEventMap, GlobalEventHandlersEventMa interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement { /** @deprecated */ readonly className: any; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGElement/ownerSVGElement) */ readonly ownerSVGElement: SVGSVGElement | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGElement/viewportElement) */ readonly viewportElement: SVGElement | null; addEventListener(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -19106,8 +20470,11 @@ declare var SVGFEBlendElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEColorMatrixElement) */ interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEColorMatrixElement/in1) */ readonly in1: SVGAnimatedString; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEColorMatrixElement/type) */ readonly type: SVGAnimatedEnumeration; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEColorMatrixElement/values) */ readonly values: SVGAnimatedNumberList; readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: 0; readonly SVG_FECOLORMATRIX_TYPE_MATRIX: 1; @@ -19229,10 +20596,15 @@ declare var SVGFEConvolveMatrixElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEDiffuseLightingElement) */ interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEDiffuseLightingElement/diffuseConstant) */ readonly diffuseConstant: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEDiffuseLightingElement/in1) */ readonly in1: SVGAnimatedString; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEDiffuseLightingElement/kernelUnitLengthX) */ readonly kernelUnitLengthX: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEDiffuseLightingElement/kernelUnitLengthY) */ readonly kernelUnitLengthY: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEDiffuseLightingElement/surfaceScale) */ readonly surfaceScale: SVGAnimatedNumber; addEventListener(type: K, listener: (this: SVGFEDiffuseLightingElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -19283,7 +20655,9 @@ declare var SVGFEDisplacementMapElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEDistantLightElement) */ interface SVGFEDistantLightElement extends SVGElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEDistantLightElement/azimuth) */ readonly azimuth: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEDistantLightElement/elevation) */ readonly elevation: SVGAnimatedNumber; addEventListener(type: K, listener: (this: SVGFEDistantLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -19406,9 +20780,13 @@ declare var SVGFEFuncRElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEGaussianBlurElement) */ interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEGaussianBlurElement/in1) */ readonly in1: SVGAnimatedString; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEGaussianBlurElement/stdDeviationX) */ readonly stdDeviationX: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEGaussianBlurElement/stdDeviationY) */ readonly stdDeviationY: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEGaussianBlurElement/setStdDeviation) */ setStdDeviation(stdDeviationX: number, stdDeviationY: number): void; addEventListener(type: K, listener: (this: SVGFEGaussianBlurElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -19462,6 +20840,7 @@ declare var SVGFEMergeElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEMergeNodeElement) */ interface SVGFEMergeNodeElement extends SVGElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEMergeNodeElement/in1) */ readonly in1: SVGAnimatedString; addEventListener(type: K, listener: (this: SVGFEMergeNodeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -19480,9 +20859,13 @@ declare var SVGFEMergeNodeElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEMorphologyElement) */ interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEMorphologyElement/in1) */ readonly in1: SVGAnimatedString; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEMorphologyElement/operator) */ readonly operator: SVGAnimatedEnumeration; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEMorphologyElement/radiusX) */ readonly radiusX: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEMorphologyElement/radiusY) */ readonly radiusY: SVGAnimatedNumber; readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: 0; readonly SVG_MORPHOLOGY_OPERATOR_ERODE: 1; @@ -19527,8 +20910,11 @@ declare var SVGFEOffsetElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEPointLightElement) */ interface SVGFEPointLightElement extends SVGElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEPointLightElement/x) */ readonly x: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEPointLightElement/y) */ readonly y: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFEPointLightElement/z) */ readonly z: SVGAnimatedNumber; addEventListener(type: K, listener: (this: SVGFEPointLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -19547,11 +20933,15 @@ declare var SVGFEPointLightElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFESpecularLightingElement) */ interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFESpecularLightingElement/in1) */ readonly in1: SVGAnimatedString; readonly kernelUnitLengthX: SVGAnimatedNumber; readonly kernelUnitLengthY: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFESpecularLightingElement/specularConstant) */ readonly specularConstant: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFESpecularLightingElement/specularExponent) */ readonly specularExponent: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFESpecularLightingElement/surfaceScale) */ readonly surfaceScale: SVGAnimatedNumber; addEventListener(type: K, listener: (this: SVGFESpecularLightingElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -19575,8 +20965,11 @@ interface SVGFESpotLightElement extends SVGElement { readonly pointsAtY: SVGAnimatedNumber; readonly pointsAtZ: SVGAnimatedNumber; readonly specularExponent: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFESpotLightElement/x) */ readonly x: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFESpotLightElement/y) */ readonly y: SVGAnimatedNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFESpotLightElement/z) */ readonly z: SVGAnimatedNumber; addEventListener(type: K, listener: (this: SVGFESpotLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -19648,11 +21041,17 @@ declare var SVGFETurbulenceElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFilterElement) */ interface SVGFilterElement extends SVGElement, SVGURIReference { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFilterElement/filterUnits) */ readonly filterUnits: SVGAnimatedEnumeration; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFilterElement/height) */ readonly height: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFilterElement/primitiveUnits) */ readonly primitiveUnits: SVGAnimatedEnumeration; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFilterElement/width) */ readonly width: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFilterElement/x) */ readonly x: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGFilterElement/y) */ readonly y: SVGAnimatedLength; addEventListener(type: K, listener: (this: SVGFilterElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -19747,8 +21146,11 @@ declare var SVGGeometryElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGGradientElement) */ interface SVGGradientElement extends SVGElement, SVGURIReference { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGGradientElement/gradientTransform) */ readonly gradientTransform: SVGAnimatedTransformList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGGradientElement/gradientUnits) */ readonly gradientUnits: SVGAnimatedEnumeration; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGGradientElement/spreadMethod) */ readonly spreadMethod: SVGAnimatedEnumeration; readonly SVG_SPREADMETHOD_UNKNOWN: 0; readonly SVG_SPREADMETHOD_PAD: 1; @@ -19866,14 +21268,23 @@ declare var SVGLength: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList) */ interface SVGLengthList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/length) */ readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/numberOfItems) */ readonly numberOfItems: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/appendItem) */ appendItem(newItem: SVGLength): SVGLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/clear) */ clear(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/getItem) */ getItem(index: number): SVGLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/initialize) */ initialize(newItem: SVGLength): SVGLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/insertItemBefore) */ insertItemBefore(newItem: SVGLength, index: number): SVGLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/removeItem) */ removeItem(index: number): SVGLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/replaceItem) */ replaceItem(newItem: SVGLength, index: number): SVGLength; [index: number]: SVGLength; } @@ -19889,9 +21300,13 @@ declare var SVGLengthList: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLineElement) */ interface SVGLineElement extends SVGGeometryElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLineElement/x1) */ readonly x1: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLineElement/x2) */ readonly x2: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLineElement/y1) */ readonly y1: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLineElement/y2) */ readonly y2: SVGAnimatedLength; addEventListener(type: K, listener: (this: SVGLineElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -19910,9 +21325,13 @@ declare var SVGLineElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLinearGradientElement) */ interface SVGLinearGradientElement extends SVGGradientElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLinearGradientElement/x1) */ readonly x1: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLinearGradientElement/x2) */ readonly x2: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLinearGradientElement/y1) */ readonly y1: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLinearGradientElement/y2) */ readonly y2: SVGAnimatedLength; addEventListener(type: K, listener: (this: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -20047,14 +21466,23 @@ declare var SVGNumber: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGNumberList) */ interface SVGNumberList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGNumberList/length) */ readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGNumberList/numberOfItems) */ readonly numberOfItems: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGNumberList/appendItem) */ appendItem(newItem: SVGNumber): SVGNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGNumberList/clear) */ clear(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGNumberList/getItem) */ getItem(index: number): SVGNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGNumberList/initialize) */ initialize(newItem: SVGNumber): SVGNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGNumberList/insertItemBefore) */ insertItemBefore(newItem: SVGNumber, index: number): SVGNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGNumberList/removeItem) */ removeItem(index: number): SVGNumber; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGNumberList/replaceItem) */ replaceItem(newItem: SVGNumber, index: number): SVGNumber; [index: number]: SVGNumber; } @@ -20088,8 +21516,11 @@ declare var SVGPathElement: { */ interface SVGPatternElement extends SVGElement, SVGFitToViewBox, SVGURIReference { readonly height: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGPatternElement/patternContentUnits) */ readonly patternContentUnits: SVGAnimatedEnumeration; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGPatternElement/patternTransform) */ readonly patternTransform: SVGAnimatedTransformList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGPatternElement/patternUnits) */ readonly patternUnits: SVGAnimatedEnumeration; readonly width: SVGAnimatedLength; readonly x: SVGAnimatedLength; @@ -20216,11 +21647,16 @@ declare var SVGPreserveAspectRatio: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRadialGradientElement) */ interface SVGRadialGradientElement extends SVGGradientElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRadialGradientElement/cx) */ readonly cx: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRadialGradientElement/cy) */ readonly cy: SVGAnimatedLength; readonly fr: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRadialGradientElement/fx) */ readonly fx: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRadialGradientElement/fy) */ readonly fy: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRadialGradientElement/r) */ readonly r: SVGAnimatedLength; addEventListener(type: K, listener: (this: SVGRadialGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -20239,11 +21675,17 @@ declare var SVGRadialGradientElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRectElement) */ interface SVGRectElement extends SVGGeometryElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRectElement/height) */ readonly height: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRectElement/rx) */ readonly rx: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRectElement/ry) */ readonly ry: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRectElement/width) */ readonly width: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRectElement/x) */ readonly x: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGRectElement/y) */ readonly y: SVGAnimatedLength; addEventListener(type: K, listener: (this: SVGRectElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -20346,6 +21788,7 @@ declare var SVGSetElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGStopElement) */ interface SVGStopElement extends SVGElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGStopElement/offset) */ readonly offset: SVGAnimatedNumber; addEventListener(type: K, listener: (this: SVGStopElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -20461,7 +21904,9 @@ declare var SVGTSpanElement: { }; interface SVGTests { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimationElement/requiredExtensions) */ readonly requiredExtensions: SVGStringList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAnimationElement/systemLanguage) */ readonly systemLanguage: SVGStringList; } @@ -20471,15 +21916,25 @@ interface SVGTests { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextContentElement) */ interface SVGTextContentElement extends SVGGraphicsElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextContentElement/lengthAdjust) */ readonly lengthAdjust: SVGAnimatedEnumeration; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextContentElement/textLength) */ readonly textLength: SVGAnimatedLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextContentElement/getCharNumAtPosition) */ getCharNumAtPosition(point?: DOMPointInit): number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextContentElement/getComputedTextLength) */ getComputedTextLength(): number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextContentElement/getEndPositionOfChar) */ getEndPositionOfChar(charnum: number): DOMPoint; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextContentElement/getExtentOfChar) */ getExtentOfChar(charnum: number): DOMRect; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextContentElement/getNumberOfChars) */ getNumberOfChars(): number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextContentElement/getRotationOfChar) */ getRotationOfChar(charnum: number): number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextContentElement/getStartPositionOfChar) */ getStartPositionOfChar(charnum: number): DOMPoint; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextContentElement/getSubStringLength) */ getSubStringLength(charnum: number, nchars: number): number; /** @deprecated */ selectSubString(charnum: number, nchars: number): void; @@ -20523,8 +21978,11 @@ declare var SVGTextElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextPathElement) */ interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextPathElement/method) */ readonly method: SVGAnimatedEnumeration; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextPathElement/spacing) */ readonly spacing: SVGAnimatedEnumeration; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTextPathElement/startOffset) */ readonly startOffset: SVGAnimatedLength; readonly TEXTPATH_METHODTYPE_UNKNOWN: 0; readonly TEXTPATH_METHODTYPE_ALIGN: 1; @@ -20594,14 +22052,23 @@ declare var SVGTitleElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransform) */ interface SVGTransform { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransform/angle) */ readonly angle: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransform/matrix) */ readonly matrix: DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransform/type) */ readonly type: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransform/setMatrix) */ setMatrix(matrix?: DOMMatrix2DInit): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransform/setRotate) */ setRotate(angle: number, cx: number, cy: number): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransform/setScale) */ setScale(sx: number, sy: number): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransform/setSkewX) */ setSkewX(angle: number): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransform/setSkewY) */ setSkewY(angle: number): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransform/setTranslate) */ setTranslate(tx: number, ty: number): void; readonly SVG_TRANSFORM_UNKNOWN: 0; readonly SVG_TRANSFORM_MATRIX: 1; @@ -20630,16 +22097,27 @@ declare var SVGTransform: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList) */ interface SVGTransformList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList/length) */ readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList/numberOfItems) */ readonly numberOfItems: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList/appendItem) */ appendItem(newItem: SVGTransform): SVGTransform; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList/clear) */ clear(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList/consolidate) */ consolidate(): SVGTransform | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList/createSVGTransformFromMatrix) */ createSVGTransformFromMatrix(matrix?: DOMMatrix2DInit): SVGTransform; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList/getItem) */ getItem(index: number): SVGTransform; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList/initialize) */ initialize(newItem: SVGTransform): SVGTransform; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList/insertItemBefore) */ insertItemBefore(newItem: SVGTransform, index: number): SVGTransform; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList/removeItem) */ removeItem(index: number): SVGTransform; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGTransformList/replaceItem) */ replaceItem(newItem: SVGTransform, index: number): SVGTransform; [index: number]: SVGTransform; } @@ -20650,6 +22128,7 @@ declare var SVGTransformList: { }; interface SVGURIReference { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement/href) */ readonly href: SVGAnimatedString; } @@ -20868,7 +22347,7 @@ interface Selection { containsNode(node: Node, allowPartialContainment?: boolean): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Selection/deleteFromDocument) */ deleteFromDocument(): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Selection/removeAllRanges) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Selection/empty) */ empty(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Selection/extend) */ extend(node: Node, offset?: number): void; @@ -20884,7 +22363,7 @@ interface Selection { selectAllChildren(node: Node): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Selection/setBaseAndExtent) */ setBaseAndExtent(anchorNode: Node, anchorOffset: number, focusNode: Node, focusOffset: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Selection/collapse) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Selection/setPosition) */ setPosition(node: Node | null, offset?: number): void; toString(): string; } @@ -21547,7 +23026,8 @@ interface StyleSheet { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet/href) */ readonly href: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet/media) */ - readonly media: MediaList; + get media(): MediaList; + set media(mediaText: string); /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet/ownerNode) */ readonly ownerNode: Element | ProcessingInstruction | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StyleSheet/parentStyleSheet) */ @@ -21606,7 +23086,7 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */ - deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; + deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length?: number | null): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */ @@ -21618,7 +23098,7 @@ interface SubtleCrypto { exportKey(format: Exclude, key: CryptoKey): Promise; exportKey(format: KeyFormat, key: CryptoKey): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */ - generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; + generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; @@ -21771,11 +23251,27 @@ declare var TextEncoderStream: { new(): TextEncoderStream; }; +/** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEvent) + */ interface TextEvent extends UIEvent { + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEvent/data) + */ readonly data: string; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEvent/initTextEvent) + */ initTextEvent(type: string, bubbles?: boolean, cancelable?: boolean, view?: Window | null, data?: string): void; } +/** @deprecated */ declare var TextEvent: { prototype: TextEvent; new(): TextEvent; @@ -22057,7 +23553,7 @@ interface TextTrackList extends EventTarget { onaddtrack: ((this: TextTrackList, ev: TrackEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextTrackList/change_event) */ onchange: ((this: TextTrackList, ev: Event) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextTrackList/removeTrack_event) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextTrackList/removetrack_event) */ onremovetrack: ((this: TextTrackList, ev: TrackEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextTrackList/getTrackById) */ getTrackById(id: string): TextTrack | null; @@ -22442,7 +23938,7 @@ declare var URLSearchParams: { interface UserActivation { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/UserActivation/hasBeenActive) */ readonly hasBeenActive: boolean; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/UserActivation/hasBeenActive) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/UserActivation/isActive) */ readonly isActive: boolean; } @@ -22511,6 +24007,7 @@ declare var VTTRegion: { interface ValidityState { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/badInput) */ readonly badInput: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/customError) */ readonly customError: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/patternMismatch) */ readonly patternMismatch: boolean; @@ -22526,6 +24023,7 @@ interface ValidityState { readonly tooShort: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/typeMismatch) */ readonly typeMismatch: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/valid) */ readonly valid: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/valueMissing) */ readonly valueMissing: boolean; @@ -22699,11 +24197,12 @@ declare var VideoPlaybackQuality: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTransition) */ interface ViewTransition { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTransition/finished) */ - readonly finished: Promise; + readonly finished: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTransition/ready) */ - readonly ready: Promise; + readonly ready: Promise; + types: ViewTransitionTypeSet; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTransition/updateCallbackDone) */ - readonly updateCallbackDone: Promise; + readonly updateCallbackDone: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTransition/skipTransition) */ skipTransition(): void; } @@ -22713,6 +24212,15 @@ declare var ViewTransition: { new(): ViewTransition; }; +interface ViewTransitionTypeSet { + forEach(callbackfn: (value: string, key: string, parent: ViewTransitionTypeSet) => void, thisArg?: any): void; +} + +declare var ViewTransitionTypeSet: { + prototype: ViewTransitionTypeSet; + new(): ViewTransitionTypeSet; +}; + interface VisualViewportEventMap { "resize": Event; "scroll": Event; @@ -23578,7 +25086,7 @@ interface WebGL2RenderingContextBase { clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clientWaitSync) */ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexImage2D) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexImage3D) */ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void; compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: number, srcLengthOverride?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexSubImage3D) */ @@ -23589,13 +25097,13 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/copyTexSubImage3D) */ copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createQuery) */ - createQuery(): WebGLQuery | null; + createQuery(): WebGLQuery; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createSampler) */ - createSampler(): WebGLSampler | null; + createSampler(): WebGLSampler; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createTransformFeedback) */ - createTransformFeedback(): WebGLTransformFeedback | null; + createTransformFeedback(): WebGLTransformFeedback; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createVertexArray) */ - createVertexArray(): WebGLVertexArrayObject | null; + createVertexArray(): WebGLVertexArrayObject; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteQuery) */ deleteQuery(query: WebGLQuery | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteSampler) */ @@ -24000,11 +25508,11 @@ interface WebGL2RenderingContextBase { } interface WebGL2RenderingContextOverloads { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferData) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/bufferData) */ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void; bufferData(target: GLenum, srcData: AllowSharedBufferSource | null, usage: GLenum): void; bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: number, length?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferSubData) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/bufferSubData) */ bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: AllowSharedBufferSource): void; bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexImage2D) */ @@ -24045,7 +25553,7 @@ interface WebGL2RenderingContextOverloads { uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; @@ -24461,12 +25969,14 @@ declare var WebGLRenderingContext: { interface WebGLRenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/canvas) */ readonly canvas: HTMLCanvasElement | OffscreenCanvas; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/drawingBufferColorSpace) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawingBufferColorSpace) */ drawingBufferColorSpace: PredefinedColorSpace; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/drawingBufferHeight) */ readonly drawingBufferHeight: GLsizei; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/drawingBufferWidth) */ readonly drawingBufferWidth: GLsizei; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/unpackColorSpace) */ + unpackColorSpace: PredefinedColorSpace; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/activeTexture) */ activeTexture(texture: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/attachShader) */ @@ -24510,17 +26020,17 @@ interface WebGLRenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/copyTexSubImage2D) */ copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createBuffer) */ - createBuffer(): WebGLBuffer | null; + createBuffer(): WebGLBuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createFramebuffer) */ - createFramebuffer(): WebGLFramebuffer | null; + createFramebuffer(): WebGLFramebuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createProgram) */ - createProgram(): WebGLProgram | null; + createProgram(): WebGLProgram; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createRenderbuffer) */ - createRenderbuffer(): WebGLRenderbuffer | null; + createRenderbuffer(): WebGLRenderbuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createShader) */ createShader(type: GLenum): WebGLShader | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createTexture) */ - createTexture(): WebGLTexture | null; + createTexture(): WebGLTexture; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/cullFace) */ cullFace(mode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/deleteBuffer) */ @@ -24665,6 +26175,7 @@ interface WebGLRenderingContextBase { isShader(shader: WebGLShader | null): GLboolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/isTexture) */ isTexture(texture: WebGLTexture | null): GLboolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/lineWidth) */ lineWidth(width: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/linkProgram) */ linkProgram(program: WebGLProgram): void; @@ -25282,7 +26793,7 @@ interface WebTransport { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams) */ readonly incomingUnidirectionalStreams: ReadableStream; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready) */ - readonly ready: Promise; + readonly ready: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/close) */ close(closeInfo?: WebTransportCloseInfo): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createBidirectionalStream) */ @@ -25448,7 +26959,7 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler readonly length: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/location) */ get location(): Location; - set location(href: string | Location); + set location(href: string); /** * Returns true if the location bar is visible; otherwise, returns false. * @@ -25501,17 +27012,9 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler readonly outerHeight: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/outerWidth) */ readonly outerWidth: number; - /** - * @deprecated This is a legacy alias of `scrollX`. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scrollX) - */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scrollX) */ readonly pageXOffset: number; - /** - * @deprecated This is a legacy alias of `scrollY`. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scrollY) - */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scrollY) */ readonly pageYOffset: number; /** * Refers to either the parent WindowProxy, or itself. @@ -25688,7 +27191,9 @@ interface WindowEventHandlersEventMap { "offline": Event; "online": Event; "pagehide": PageTransitionEvent; + "pagereveal": Event; "pageshow": PageTransitionEvent; + "pageswap": Event; "popstate": PopStateEvent; "rejectionhandled": PromiseRejectionEvent; "storage": StorageEvent; @@ -25721,8 +27226,12 @@ interface WindowEventHandlers { ononline: ((this: WindowEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/pagehide_event) */ onpagehide: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/pagereveal_event) */ + onpagereveal: ((this: WindowEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/pageshow_event) */ onpageshow: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/pageswap_event) */ + onpageswap: ((this: WindowEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/popstate_event) */ onpopstate: ((this: WindowEventHandlers, ev: PopStateEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) */ @@ -25771,24 +27280,24 @@ interface WindowOrWorkerGlobalScope { atob(data: string): string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */ btoa(data: string): string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearInterval) */ clearInterval(id: number | undefined): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout) */ clearTimeout(id: number | undefined): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/createImageBitmap) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap) */ createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ fetch(input: RequestInfo | URL, init?: RequestInit): Promise; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ reportError(e: any): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setInterval) */ setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setTimeout) */ setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/structuredClone) */ structuredClone(value: T, options?: StructuredSerializeOptions): T; } @@ -25797,9 +27306,7 @@ interface WindowSessionStorage { readonly sessionStorage: Storage; } -interface WorkerEventMap extends AbstractWorkerEventMap { - "message": MessageEvent; - "messageerror": MessageEvent; +interface WorkerEventMap extends AbstractWorkerEventMap, MessageEventTargetEventMap { } /** @@ -25807,11 +27314,7 @@ interface WorkerEventMap extends AbstractWorkerEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker) */ -interface Worker extends EventTarget, AbstractWorker { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker/message_event) */ - onmessage: ((this: Worker, ev: MessageEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker/messageerror_event) */ - onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null; +interface Worker extends EventTarget, AbstractWorker, MessageEventTarget { /** * Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned. * @@ -25904,11 +27407,11 @@ declare var WritableStreamDefaultController: { */ interface WritableStreamDefaultWriter { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */ - readonly closed: Promise; + readonly closed: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */ readonly desiredSize: number | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */ - readonly ready: Promise; + readonly ready: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */ abort(reason?: any): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */ @@ -26167,7 +27670,11 @@ declare var XPathEvaluator: { interface XPathEvaluatorBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/createExpression) */ createExpression(expression: string, resolver?: XPathNSResolver | null): XPathExpression; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/createNSResolver) */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/createNSResolver) + */ createNSResolver(nodeResolver: Node): Node; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/evaluate) */ evaluate(expression: string, contextNode: Node, resolver?: XPathNSResolver | null, type?: number, result?: XPathResult | null): XPathResult; @@ -26276,7 +27783,7 @@ interface Console { clear(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */ count(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countreset_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */ countReset(label?: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */ debug(...data: any[]): void; @@ -26288,9 +27795,9 @@ interface Console { error(...data: any[]): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */ group(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupcollapsed_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */ groupCollapsed(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupend_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */ groupEnd(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */ info(...data: any[]): void; @@ -26300,9 +27807,9 @@ interface Console { table(tabularData?: any, properties?: string[]): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */ time(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeend_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */ timeEnd(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timelog_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */ timeLog(label?: string, ...data: any[]): void; timeStamp(label?: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */ @@ -26601,6 +28108,10 @@ declare namespace WebAssembly { function validate(bytes: BufferSource): boolean; } +interface AudioDataOutputCallback { + (output: AudioData): void; +} + interface BlobCallback { (blob: Blob | null): void; } @@ -26617,6 +28128,10 @@ interface DecodeSuccessCallback { (decodedData: AudioBuffer): void; } +interface EncodedAudioChunkOutputCallback { + (output: EncodedAudioChunk, metadata?: EncodedAudioChunkMetadata): void; +} + interface EncodedVideoChunkOutputCallback { (chunk: EncodedVideoChunk, metadata?: EncodedVideoChunkMetadata): void; } @@ -26753,10 +28268,6 @@ interface UnderlyingSourceStartCallback { (controller: ReadableStreamController): any; } -interface UpdateCallback { - (): any; -} - interface VideoFrameOutputCallback { (output: VideoFrame): void; } @@ -26765,6 +28276,10 @@ interface VideoFrameRequestCallback { (now: DOMHighResTimeStamp, metadata: VideoFrameCallbackMetadata): void; } +interface ViewTransitionUpdateCallback { + (): any; +} + interface VoidFunction { (): void; } @@ -27132,17 +28647,9 @@ declare var orientation: number; declare var outerHeight: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/outerWidth) */ declare var outerWidth: number; -/** - * @deprecated This is a legacy alias of `scrollX`. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scrollX) - */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scrollX) */ declare var pageXOffset: number; -/** - * @deprecated This is a legacy alias of `scrollY`. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scrollY) - */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scrollY) */ declare var pageYOffset: number; /** * Refers to either the parent WindowProxy, or itself. @@ -27333,7 +28840,7 @@ declare var onbeforetoggle: ((this: Window, ev: Event) => any) | null; * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/blur_event) */ declare var onblur: ((this: Window, ev: FocusEvent) => any) | null; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/cancel_event) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/cancel_event) */ declare var oncancel: ((this: Window, ev: Event) => any) | null; /** * Occurs when playback is possible, but would require further buffering. @@ -27360,7 +28867,7 @@ declare var onchange: ((this: Window, ev: Event) => any) | null; declare var onclick: ((this: Window, ev: MouseEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/close_event) */ declare var onclose: ((this: Window, ev: Event) => any) | null; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/webglcontextlost_event) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/contextlost_event) */ declare var oncontextlost: ((this: Window, ev: Event) => any) | null; /** * Fires when the user clicks the right mouse button in the client area, opening the context menu. @@ -27685,7 +29192,7 @@ declare var onsuspend: ((this: Window, ev: Event) => any) | null; * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/timeupdate_event) */ declare var ontimeupdate: ((this: Window, ev: Event) => any) | null; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/toggle_event) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */ declare var ontoggle: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */ declare var ontouchcancel: ((this: Window, ev: TouchEvent) => any) | null | undefined; @@ -27767,8 +29274,12 @@ declare var onoffline: ((this: Window, ev: Event) => any) | null; declare var ononline: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/pagehide_event) */ declare var onpagehide: ((this: Window, ev: PageTransitionEvent) => any) | null; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/pagereveal_event) */ +declare var onpagereveal: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/pageshow_event) */ declare var onpageshow: ((this: Window, ev: PageTransitionEvent) => any) | null; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/pageswap_event) */ +declare var onpageswap: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/popstate_event) */ declare var onpopstate: ((this: Window, ev: PopStateEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) */ @@ -27807,24 +29318,24 @@ declare var performance: Performance; declare function atob(data: string): string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */ declare function btoa(data: string): string; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearInterval) */ declare function clearInterval(id: number | undefined): void; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout) */ declare function clearTimeout(id: number | undefined): void; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/createImageBitmap) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap) */ declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ declare function reportError(e: any): void; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setInterval) */ declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setTimeout) */ declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/structuredClone) */ declare function structuredClone(value: T, options?: StructuredSerializeOptions): T; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/sessionStorage) */ declare var sessionStorage: Storage; @@ -27837,8 +29348,8 @@ type AllowSharedBufferSource = ArrayBuffer | ArrayBufferView; type AutoFill = AutoFillBase | `${OptionalPrefixToken}${OptionalPrefixToken}${AutoFillField}${OptionalPostfixToken}`; type AutoFillField = AutoFillNormalField | `${OptionalPrefixToken}${AutoFillContactField}`; type AutoFillSection = `section-${string}`; +type Base64URLString = string; type BigInteger = Uint8Array; -type BinaryData = ArrayBuffer | ArrayBufferView; type BlobPart = BufferSource | Blob | string; type BodyInit = ReadableStream | XMLHttpRequestBodyInit; type BufferSource = ArrayBufferView | ArrayBuffer; @@ -27878,6 +29389,7 @@ type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; type ImageBitmapSource = CanvasImageSource | Blob | ImageData; +type ImageBufferSource = AllowSharedBufferSource | ReadableStream; type Int32List = Int32Array | GLint[]; type LineAndPositionSetting = number | AutoKeyword; type MediaProvider = MediaStream | MediaSource | Blob; @@ -27890,6 +29402,8 @@ type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type OptionalPostfixToken = ` ${T}` | ""; type OptionalPrefixToken = `${T} ` | ""; type PerformanceEntryList = PerformanceEntry[]; +type PublicKeyCredentialClientCapabilities = Record; +type PublicKeyCredentialJSON = any; type RTCRtpTransform = RTCRtpScriptTransform; type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; @@ -27899,7 +29413,7 @@ type ReportList = Report[]; type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; -type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | VideoFrame | ArrayBuffer; +type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; type Uint32List = Uint32Array | GLuint[]; type VibratePattern = number | number[]; type WindowProxy = Window; @@ -27912,6 +29426,7 @@ type AppendMode = "segments" | "sequence"; type AttestationConveyancePreference = "direct" | "enterprise" | "indirect" | "none"; type AudioContextLatencyCategory = "balanced" | "interactive" | "playback"; type AudioContextState = "closed" | "running" | "suspended"; +type AudioSampleFormat = "f32" | "f32-planar" | "s16" | "s16-planar" | "s32" | "s32-planar" | "u8" | "u8-planar"; type AuthenticatorAttachment = "cross-platform" | "platform"; type AuthenticatorTransport = "ble" | "hybrid" | "internal" | "nfc" | "usb"; type AutoFillAddressKind = "billing" | "shipping"; @@ -27925,6 +29440,7 @@ type AutomationRate = "a-rate" | "k-rate"; type AvcBitstreamFormat = "annexb" | "avc"; type BinaryType = "arraybuffer" | "blob"; type BiquadFilterType = "allpass" | "bandpass" | "highpass" | "highshelf" | "lowpass" | "lowshelf" | "notch" | "peaking"; +type BitrateMode = "constant" | "variable"; type CSSMathOperator = "clamp" | "invert" | "max" | "min" | "negate" | "product" | "sum"; type CSSNumericBaseType = "angle" | "flex" | "frequency" | "length" | "percent" | "resolution" | "time"; type CanPlayTypeResult = "" | "maybe" | "probably"; @@ -27954,6 +29470,7 @@ type DisplayCaptureSurfaceType = "browser" | "monitor" | "window"; type DistanceModelType = "exponential" | "inverse" | "linear"; type DocumentReadyState = "complete" | "interactive" | "loading"; type DocumentVisibilityState = "hidden" | "visible"; +type EncodedAudioChunkType = "delta" | "key"; type EncodedVideoChunkType = "delta" | "key"; type EndOfStreamError = "decode" | "network"; type EndingType = "native" | "transparent"; @@ -27999,15 +29516,18 @@ type MediaSessionAction = "nexttrack" | "pause" | "play" | "previoustrack" | "se type MediaSessionPlaybackState = "none" | "paused" | "playing"; type MediaStreamTrackState = "ended" | "live"; type NavigationTimingType = "back_forward" | "navigate" | "prerender" | "reload"; +type NavigationType = "push" | "reload" | "replace" | "traverse"; type NotificationDirection = "auto" | "ltr" | "rtl"; type NotificationPermission = "default" | "denied" | "granted"; type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu"; +type OpusBitstreamFormat = "ogg" | "opus"; type OrientationType = "landscape-primary" | "landscape-secondary" | "portrait-primary" | "portrait-secondary"; type OscillatorType = "custom" | "sawtooth" | "sine" | "square" | "triangle"; type OverSampleType = "2x" | "4x" | "none"; type PanningModelType = "HRTF" | "equalpower"; type PaymentComplete = "fail" | "success" | "unknown"; -type PermissionName = "geolocation" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "xr-spatial-tracking"; +type PaymentShippingType = "delivery" | "pickup" | "shipping"; +type PermissionName = "camera" | "geolocation" | "microphone" | "midi" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "storage-access"; type PermissionState = "denied" | "granted" | "prompt"; type PlaybackDirection = "alternate" | "alternate-reverse" | "normal" | "reverse"; type PositionAlignSetting = "auto" | "center" | "line-left" | "line-right"; @@ -28019,6 +29539,7 @@ type PushEncryptionKeyName = "auth" | "p256dh"; type RTCBundlePolicy = "balanced" | "max-bundle" | "max-compat"; type RTCDataChannelState = "closed" | "closing" | "connecting" | "open"; type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-resolution"; +type RTCDtlsRole = "client" | "server" | "unknown"; type RTCDtlsTransportState = "closed" | "connected" | "connecting" | "failed" | "new"; type RTCEncodedVideoFrameType = "delta" | "empty" | "key"; type RTCErrorDetailType = "data-channel-failure" | "dtls-failure" | "fingerprint-failure" | "hardware-encoder-error" | "hardware-encoder-not-available" | "sctp-failure" | "sdp-syntax-error"; @@ -28028,11 +29549,13 @@ type RTCIceConnectionState = "checking" | "closed" | "completed" | "connected" | type RTCIceGathererState = "complete" | "gathering" | "new"; type RTCIceGatheringState = "complete" | "gathering" | "new"; type RTCIceProtocol = "tcp" | "udp"; +type RTCIceRole = "controlled" | "controlling" | "unknown"; type RTCIceTcpCandidateType = "active" | "passive" | "so"; type RTCIceTransportPolicy = "all" | "relay"; type RTCIceTransportState = "checking" | "closed" | "completed" | "connected" | "disconnected" | "failed" | "new"; type RTCPeerConnectionState = "closed" | "connected" | "connecting" | "disconnected" | "failed" | "new"; type RTCPriorityType = "high" | "low" | "medium" | "very-low"; +type RTCQualityLimitationReason = "bandwidth" | "cpu" | "none" | "other"; type RTCRtcpMuxPolicy = "require"; type RTCRtpTransceiverDirection = "inactive" | "recvonly" | "sendonly" | "sendrecv" | "stopped"; type RTCSctpTransportState = "closed" | "connected" | "connecting"; diff --git a/internal/bundled/libs/lib.dom.iterable.d.ts b/internal/bundled/libs/lib.dom.iterable.d.ts index b4cec2ce2d..ba62c82b4a 100644 --- a/internal/bundled/libs/lib.dom.iterable.d.ts +++ b/internal/bundled/libs/lib.dom.iterable.d.ts @@ -20,11 +20,6 @@ and limitations under the License. /// Window Iterable APIs ///////////////////////////// -interface AbortSignal { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */ - any(signals: Iterable): AbortSignal; -} - interface AudioParam { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime) */ setValueCurveAtTime(values: Iterable, startTime: number, duration: number): AudioParam; @@ -194,6 +189,10 @@ interface IDBObjectStore { createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; } +interface ImageTrackList { + [Symbol.iterator](): ArrayIterator; +} + interface MIDIInputMap extends ReadonlyMap { } @@ -331,7 +330,7 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */ - generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; + generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable): Promise; @@ -368,6 +367,9 @@ interface URLSearchParams { values(): URLSearchParamsIterator; } +interface ViewTransitionTypeSet extends Set { +} + interface WEBGL_draw_buffers { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) */ drawBuffersWEBGL(buffers: Iterable): void; @@ -446,7 +448,7 @@ interface WebGL2RenderingContextOverloads { uniform4fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ uniform4iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; diff --git a/internal/bundled/libs/lib.es2015.iterable.d.ts b/internal/bundled/libs/lib.es2015.iterable.d.ts index e5cdcd2411..b464e850ce 100644 --- a/internal/bundled/libs/lib.es2015.iterable.d.ts +++ b/internal/bundled/libs/lib.es2015.iterable.d.ts @@ -196,10 +196,12 @@ interface SetIterator extends IteratorObject { /** Iterates over values in the set. */ [Symbol.iterator](): SetIterator; + /** * Returns an iterable of [v,v] pairs for every value `v` in the set. */ entries(): SetIterator<[T, T]>; + /** * Despite its name, returns an iterable of the values in the set. */ @@ -272,14 +274,17 @@ interface String { interface Int8Array { [Symbol.iterator](): ArrayIterator; + /** * Returns an array of key, value pairs for every entry in the array */ entries(): ArrayIterator<[number, number]>; + /** * Returns an list of keys in the array */ keys(): ArrayIterator; + /** * Returns an list of values in the array */ @@ -291,30 +296,32 @@ interface Int8ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. + * @param elements An iterable object to convert to an array. */ - from(arrayLike: Iterable): Int8Array; + from(elements: Iterable): Int8Array; + /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param elements An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; } interface Uint8Array { [Symbol.iterator](): ArrayIterator; + /** * Returns an array of key, value pairs for every entry in the array */ entries(): ArrayIterator<[number, number]>; + /** * Returns an list of keys in the array */ keys(): ArrayIterator; + /** * Returns an list of values in the array */ @@ -326,22 +333,22 @@ interface Uint8ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. + * @param elements An iterable object to convert to an array. */ - from(arrayLike: Iterable): Uint8Array; + from(elements: Iterable): Uint8Array; + /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param elements An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; } interface Uint8ClampedArray { [Symbol.iterator](): ArrayIterator; + /** * Returns an array of key, value pairs for every entry in the array */ @@ -363,18 +370,17 @@ interface Uint8ClampedArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. + * @param elements An iterable object to convert to an array. */ - from(arrayLike: Iterable): Uint8ClampedArray; + from(elements: Iterable): Uint8ClampedArray; + /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param elements An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } interface Int16Array { @@ -400,30 +406,32 @@ interface Int16ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. + * @param elements An iterable object to convert to an array. */ - from(arrayLike: Iterable): Int16Array; + from(elements: Iterable): Int16Array; + /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param elements An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; } interface Uint16Array { [Symbol.iterator](): ArrayIterator; + /** * Returns an array of key, value pairs for every entry in the array */ entries(): ArrayIterator<[number, number]>; + /** * Returns an list of keys in the array */ keys(): ArrayIterator; + /** * Returns an list of values in the array */ @@ -435,30 +443,32 @@ interface Uint16ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. + * @param elements An iterable object to convert to an array. */ - from(arrayLike: Iterable): Uint16Array; + from(elements: Iterable): Uint16Array; + /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param elements An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; } interface Int32Array { [Symbol.iterator](): ArrayIterator; + /** * Returns an array of key, value pairs for every entry in the array */ entries(): ArrayIterator<[number, number]>; + /** * Returns an list of keys in the array */ keys(): ArrayIterator; + /** * Returns an list of values in the array */ @@ -470,30 +480,32 @@ interface Int32ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. + * @param elements An iterable object to convert to an array. */ - from(arrayLike: Iterable): Int32Array; + from(elements: Iterable): Int32Array; + /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param elements An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; } interface Uint32Array { [Symbol.iterator](): ArrayIterator; + /** * Returns an array of key, value pairs for every entry in the array */ entries(): ArrayIterator<[number, number]>; + /** * Returns an list of keys in the array */ keys(): ArrayIterator; + /** * Returns an list of values in the array */ @@ -505,30 +517,32 @@ interface Uint32ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. + * @param elements An iterable object to convert to an array. */ - from(arrayLike: Iterable): Uint32Array; + from(elements: Iterable): Uint32Array; + /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param elements An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; } interface Float32Array { [Symbol.iterator](): ArrayIterator; + /** * Returns an array of key, value pairs for every entry in the array */ entries(): ArrayIterator<[number, number]>; + /** * Returns an list of keys in the array */ keys(): ArrayIterator; + /** * Returns an list of values in the array */ @@ -540,30 +554,32 @@ interface Float32ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. + * @param elements An iterable object to convert to an array. */ - from(arrayLike: Iterable): Float32Array; + from(elements: Iterable): Float32Array; + /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param elements An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; } interface Float64Array { [Symbol.iterator](): ArrayIterator; + /** * Returns an array of key, value pairs for every entry in the array */ entries(): ArrayIterator<[number, number]>; + /** * Returns an list of keys in the array */ keys(): ArrayIterator; + /** * Returns an list of values in the array */ @@ -575,16 +591,15 @@ interface Float64ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. + * @param elements An iterable object to convert to an array. */ - from(arrayLike: Iterable): Float64Array; + from(elements: Iterable): Float64Array; + /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param elements An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; } diff --git a/internal/bundled/libs/lib.es2020.bigint.d.ts b/internal/bundled/libs/lib.es2020.bigint.d.ts index 187772ec62..cff11e7c6d 100644 --- a/internal/bundled/libs/lib.es2020.bigint.d.ts +++ b/internal/bundled/libs/lib.es2020.bigint.d.ts @@ -391,6 +391,8 @@ interface BigInt64ArrayConstructor { new (length?: number): BigInt64Array; new (array: ArrayLike | Iterable): BigInt64Array; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array; + new (array: ArrayLike | ArrayBuffer): BigInt64Array; /** The size in bytes of each element in the array. */ readonly BYTES_PER_ELEMENT: number; @@ -403,18 +405,31 @@ interface BigInt64ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. + * @param arrayLike An array-like object to convert to an array. */ from(arrayLike: ArrayLike): BigInt64Array; + /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigInt64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; } declare var BigInt64Array: BigInt64ArrayConstructor; @@ -667,6 +682,8 @@ interface BigUint64ArrayConstructor { new (length?: number): BigUint64Array; new (array: ArrayLike | Iterable): BigUint64Array; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array; + new (array: ArrayLike | ArrayBuffer): BigUint64Array; /** The size in bytes of each element in the array. */ readonly BYTES_PER_ELEMENT: number; @@ -679,12 +696,31 @@ interface BigUint64ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): BigUint64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): BigUint64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike): BigUint64Array; - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; + from(elements: Iterable, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; } declare var BigUint64Array: BigUint64ArrayConstructor; diff --git a/internal/bundled/libs/lib.es2023.array.d.ts b/internal/bundled/libs/lib.es2023.array.d.ts index 2fe8b55a0c..dd42883a6f 100644 --- a/internal/bundled/libs/lib.es2023.array.d.ts +++ b/internal/bundled/libs/lib.es2023.array.d.ts @@ -49,7 +49,7 @@ interface Array { * Returns a copy of an array with its elements sorted. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. * ```ts * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] * ``` @@ -127,7 +127,7 @@ interface ReadonlyArray { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. * ```ts * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] * ``` @@ -211,8 +211,8 @@ interface Int8Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Int8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] + * const myNums = Int8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] * ``` */ toSorted(compareFn?: (a: number, b: number) => number): Int8Array; @@ -275,8 +275,8 @@ interface Uint8Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Uint8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] + * const myNums = Uint8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] * ``` */ toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; @@ -347,8 +347,8 @@ interface Uint8ClampedArray { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] + * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] * ``` */ toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; @@ -411,8 +411,8 @@ interface Int16Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Int16Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] + * const myNums = Int16Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] * ``` */ toSorted(compareFn?: (a: number, b: number) => number): Int16Array; @@ -483,8 +483,8 @@ interface Uint16Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Uint16Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] + * const myNums = Uint16Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] * ``` */ toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; @@ -547,8 +547,8 @@ interface Int32Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Int32Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] + * const myNums = Int32Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] * ``` */ toSorted(compareFn?: (a: number, b: number) => number): Int32Array; @@ -619,8 +619,8 @@ interface Uint32Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Uint32Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] + * const myNums = Uint32Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] * ``` */ toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; @@ -691,8 +691,8 @@ interface Float32Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] + * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] * ``` */ toSorted(compareFn?: (a: number, b: number) => number): Float32Array; @@ -763,8 +763,8 @@ interface Float64Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] + * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] * ``` */ toSorted(compareFn?: (a: number, b: number) => number): Float64Array; @@ -835,8 +835,8 @@ interface BigInt64Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] + * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] * ``` */ toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; @@ -907,8 +907,8 @@ interface BigUint64Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] + * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] * ``` */ toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; diff --git a/internal/bundled/libs/lib.es2024.sharedmemory.d.ts b/internal/bundled/libs/lib.es2024.sharedmemory.d.ts index 1d6bb455a9..2c3cf94aca 100644 --- a/internal/bundled/libs/lib.es2024.sharedmemory.d.ts +++ b/internal/bundled/libs/lib.es2024.sharedmemory.d.ts @@ -46,7 +46,7 @@ interface SharedArrayBuffer { * * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable) */ - get growable(): number; + get growable(): boolean; /** * If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not. diff --git a/internal/bundled/libs/lib.es5.d.ts b/internal/bundled/libs/lib.es5.d.ts index f0ff2f8656..b857512790 100644 --- a/internal/bundled/libs/lib.es5.d.ts +++ b/internal/bundled/libs/lib.es5.d.ts @@ -696,7 +696,7 @@ interface Math { */ atan(x: number): number; /** - * Returns the angle (in radians) from the X axis to a point. + * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point. * @param y A numeric expression representing the cartesian y-coordinate. * @param x A numeric expression representing the cartesian x-coordinate. */ @@ -1260,8 +1260,8 @@ interface ReadonlyArray { some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; /** * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; /** @@ -1384,7 +1384,7 @@ interface Array { * This method mutates the array and returns a reference to the same array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` @@ -1451,8 +1451,8 @@ interface Array { some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; /** * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; /** @@ -1958,9 +1958,9 @@ interface Int8Array { /** * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the + * @param callbackfn A function that accepts up to three arguments. forEach calls the * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; @@ -1969,7 +1969,7 @@ interface Int8Array { * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. + * search starts at index 0. */ indexOf(searchElement: number, fromIndex?: number): number; @@ -2121,6 +2121,7 @@ interface Int8ArrayConstructor { new (length: number): Int8Array; new (array: ArrayLike): Int8Array; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array; new (array: ArrayLike | ArrayBuffer): Int8Array; /** @@ -2136,13 +2137,13 @@ interface Int8ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. */ from(arrayLike: ArrayLike): Int8Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ @@ -2239,9 +2240,9 @@ interface Uint8Array { /** * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the + * @param callbackfn A function that accepts up to three arguments. forEach calls the * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; @@ -2250,7 +2251,7 @@ interface Uint8Array { * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. + * search starts at index 0. */ indexOf(searchElement: number, fromIndex?: number): number; @@ -2402,6 +2403,7 @@ interface Uint8ArrayConstructor { new (length: number): Uint8Array; new (array: ArrayLike): Uint8Array; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array; new (array: ArrayLike | ArrayBuffer): Uint8Array; /** @@ -2417,13 +2419,13 @@ interface Uint8ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. */ from(arrayLike: ArrayLike): Uint8Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ @@ -2520,9 +2522,9 @@ interface Uint8ClampedArray void, thisArg?: any): void; @@ -2531,7 +2533,7 @@ interface Uint8ClampedArray; new (array: ArrayLike): Uint8ClampedArray; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray; new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; /** @@ -2698,13 +2701,13 @@ interface Uint8ClampedArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. */ from(arrayLike: ArrayLike): Uint8ClampedArray; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ @@ -2801,9 +2804,9 @@ interface Int16Array { /** * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the + * @param callbackfn A function that accepts up to three arguments. forEach calls the * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; @@ -2811,7 +2814,7 @@ interface Int16Array { * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. + * search starts at index 0. */ indexOf(searchElement: number, fromIndex?: number): number; @@ -2963,6 +2966,7 @@ interface Int16ArrayConstructor { new (length: number): Int16Array; new (array: ArrayLike): Int16Array; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array; new (array: ArrayLike | ArrayBuffer): Int16Array; /** @@ -2978,13 +2982,13 @@ interface Int16ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. */ from(arrayLike: ArrayLike): Int16Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ @@ -3081,9 +3085,9 @@ interface Uint16Array { /** * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the + * @param callbackfn A function that accepts up to three arguments. forEach calls the * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; @@ -3092,7 +3096,7 @@ interface Uint16Array { * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. + * search starts at index 0. */ indexOf(searchElement: number, fromIndex?: number): number; @@ -3244,6 +3248,7 @@ interface Uint16ArrayConstructor { new (length: number): Uint16Array; new (array: ArrayLike): Uint16Array; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array; new (array: ArrayLike | ArrayBuffer): Uint16Array; /** @@ -3259,13 +3264,13 @@ interface Uint16ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. */ from(arrayLike: ArrayLike): Uint16Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ @@ -3361,9 +3366,9 @@ interface Int32Array { /** * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the + * @param callbackfn A function that accepts up to three arguments. forEach calls the * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; @@ -3372,7 +3377,7 @@ interface Int32Array { * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. + * search starts at index 0. */ indexOf(searchElement: number, fromIndex?: number): number; @@ -3524,6 +3529,7 @@ interface Int32ArrayConstructor { new (length: number): Int32Array; new (array: ArrayLike): Int32Array; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array; new (array: ArrayLike | ArrayBuffer): Int32Array; /** @@ -3539,13 +3545,13 @@ interface Int32ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. */ from(arrayLike: ArrayLike): Int32Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ @@ -3642,9 +3648,9 @@ interface Uint32Array { /** * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the + * @param callbackfn A function that accepts up to three arguments. forEach calls the * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; @@ -3652,7 +3658,7 @@ interface Uint32Array { * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. + * search starts at index 0. */ indexOf(searchElement: number, fromIndex?: number): number; @@ -3804,6 +3810,7 @@ interface Uint32ArrayConstructor { new (length: number): Uint32Array; new (array: ArrayLike): Uint32Array; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array; new (array: ArrayLike | ArrayBuffer): Uint32Array; /** @@ -3819,13 +3826,13 @@ interface Uint32ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. */ from(arrayLike: ArrayLike): Uint32Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ @@ -3922,9 +3929,9 @@ interface Float32Array { /** * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the + * @param callbackfn A function that accepts up to three arguments. forEach calls the * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; @@ -3933,7 +3940,7 @@ interface Float32Array { * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. + * search starts at index 0. */ indexOf(searchElement: number, fromIndex?: number): number; @@ -4085,6 +4092,7 @@ interface Float32ArrayConstructor { new (length: number): Float32Array; new (array: ArrayLike): Float32Array; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array; new (array: ArrayLike | ArrayBuffer): Float32Array; /** @@ -4100,13 +4108,13 @@ interface Float32ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. */ from(arrayLike: ArrayLike): Float32Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ @@ -4203,9 +4211,9 @@ interface Float64Array { /** * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the + * @param callbackfn A function that accepts up to three arguments. forEach calls the * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; @@ -4214,7 +4222,7 @@ interface Float64Array { * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. + * search starts at index 0. */ indexOf(searchElement: number, fromIndex?: number): number; @@ -4366,6 +4374,7 @@ interface Float64ArrayConstructor { new (length: number): Float64Array; new (array: ArrayLike): Float64Array; new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array; + new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array; new (array: ArrayLike | ArrayBuffer): Float64Array; /** @@ -4381,13 +4390,13 @@ interface Float64ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. */ from(arrayLike: ArrayLike): Float64Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param arrayLike An array-like object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ diff --git a/internal/bundled/libs/lib.esnext.d.ts b/internal/bundled/libs/lib.esnext.d.ts index 37b5ea5ed6..c3da2fa6e2 100644 --- a/internal/bundled/libs/lib.esnext.d.ts +++ b/internal/bundled/libs/lib.esnext.d.ts @@ -23,3 +23,5 @@ and limitations under the License. /// /// /// +/// +/// diff --git a/internal/bundled/libs/lib.esnext.float16.d.ts b/internal/bundled/libs/lib.esnext.float16.d.ts new file mode 100644 index 0000000000..7062792dce --- /dev/null +++ b/internal/bundled/libs/lib.esnext.float16.d.ts @@ -0,0 +1,443 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + +/// + +/// +/// + +/** + * A typed array of 16-bit float values. The contents are initialized to 0. If the requested number + * of bytes could not be allocated an exception is raised. + */ +interface Float16Array { + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; + + /** + * The ArrayBuffer instance referenced by the array. + */ + readonly buffer: TArrayBuffer; + + /** + * The length in bytes of the array. + */ + readonly byteLength: number; + + /** + * The offset in bytes of the array. + */ + readonly byteOffset: number; + + /** + * Returns the item located at the specified index. + * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. + */ + at(index: number): number | undefined; + + /** + * Returns the this object after copying a section of the array identified by start and end + * to the same array starting at position target + * @param target If target is negative, it is treated as length+target where length is the + * length of the array. + * @param start If start is negative, it is treated as length+start. If end is negative, it + * is treated as length+end. + * @param end If not specified, length of the this object is used as its default value. + */ + copyWithin(target: number, start: number, end?: number): this; + + /** + * Determines whether all the members of an array satisfy the specified test. + * @param predicate A function that accepts up to three arguments. The every method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value false, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + + /** + * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array + * @param value value to fill array section with + * @param start index to start filling the array at. If start is negative, it is treated as + * length+start where length is the length of the array. + * @param end index to stop filling the array at. If end is negative, it is treated as + * length+end. + */ + fill(value: number, start?: number, end?: number): this; + + /** + * Returns the elements of an array that meet the condition specified in a callback function. + * @param predicate A function that accepts up to three arguments. The filter method calls + * the predicate function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array; + + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + + /** + * Returns the index of the first element in the array where predicate is true, and -1 + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, + * findIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + + /** + * Returns the value of the last element in the array where predicate is true, and undefined + * otherwise. + * @param predicate findLast calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, findLast + * immediately returns that element value. Otherwise, findLast returns undefined. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => value is S, + thisArg?: any, + ): S | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number | undefined; + + /** + * Returns the index of the last element in the array where predicate is true, and -1 + * otherwise. + * @param predicate findLastIndex calls predicate once for each element of the array, in descending + * order, until it finds one where predicate returns true. If such an element is found, + * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. + * @param thisArg If provided, it will be used as the this value for each invocation of + * predicate. If it is not provided, undefined is used instead. + */ + findLastIndex( + predicate: ( + value: number, + index: number, + array: this, + ) => unknown, + thisArg?: any, + ): number; + + /** + * Performs the specified action for each element in an array. + * @param callbackfn A function that accepts up to three arguments. forEach calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + + /** + * Determines whether an array includes a certain element, returning true or false as appropriate. + * @param searchElement The element to search for. + * @param fromIndex The position in this array at which to begin searching for searchElement. + */ + includes(searchElement: number, fromIndex?: number): boolean; + + /** + * Returns the index of the first occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + indexOf(searchElement: number, fromIndex?: number): number; + + /** + * Adds all the elements of an array separated by the specified separator string. + * @param separator A string used to separate one element of an array from the next in the + * resulting String. If omitted, the array elements are separated with a comma. + */ + join(separator?: string): string; + + /** + * Returns the index of the last occurrence of a value in an array. + * @param searchElement The value to locate in the array. + * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the + * search starts at index 0. + */ + lastIndexOf(searchElement: number, fromIndex?: number): number; + + /** + * The length of the array. + */ + readonly length: number; + + /** + * Calls a defined callback function on each element of an array, and returns an array that + * contains the results. + * @param callbackfn A function that accepts up to three arguments. The map method calls the + * callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. + * If thisArg is omitted, undefined is used as the this value. + */ + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array; + + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + + /** + * Calls the specified callback function for all the elements in an array. The return value of + * the callback function is the accumulated result, and is provided as an argument in the next + * call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduce method calls the + * callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an + * argument instead of an array value. + */ + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; + + /** + * Calls the specified callback function for all the elements in an array, in descending order. + * The return value of the callback function is the accumulated result, and is provided as an + * argument in the next call to the callback function. + * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls + * the callbackfn function one time for each element in the array. + * @param initialValue If initialValue is specified, it is used as the initial value to start + * the accumulation. The first call to the callbackfn function provides this value as an argument + * instead of an array value. + */ + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; + + /** + * Reverses the elements in an Array. + */ + reverse(): this; + + /** + * Sets a value or an array of values. + * @param array A typed or untyped array of values to set. + * @param offset The index in the current array at which the values are to be written. + */ + set(array: ArrayLike, offset?: number): void; + + /** + * Returns a section of an array. + * @param start The beginning of the specified portion of the array. + * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + */ + slice(start?: number, end?: number): Float16Array; + + /** + * Determines whether the specified callback function returns true for any element of an array. + * @param predicate A function that accepts up to three arguments. The some method calls + * the predicate function for each element in the array until the predicate returns a value + * which is coercible to the Boolean value true, or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the predicate function. + * If thisArg is omitted, undefined is used as the this value. + */ + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + + /** + * Sorts an array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if first argument is less than second argument, zero if they're equal and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` + */ + sort(compareFn?: (a: number, b: number) => number): this; + + /** + * Gets a new Float16Array view of the ArrayBuffer store for this array, referencing the elements + * at begin, inclusive, up to end, exclusive. + * @param begin The index of the beginning of the array. + * @param end The index of the end of the array. + */ + subarray(begin?: number, end?: number): Float16Array; + + /** + * Converts a number to a string by using the current locale. + */ + toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float16Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending order. + * ```ts + * const myNums = Float16Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float16Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float16Array; + + /** + * Returns a string representation of an array. + */ + toString(): string; + + /** Returns the primitive value of the specified object. */ + valueOf(): this; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float16Array; + + [index: number]: number; + + [Symbol.iterator](): ArrayIterator; + + /** + * Returns an array of key, value pairs for every entry in the array + */ + entries(): ArrayIterator<[number, number]>; + + /** + * Returns an list of keys in the array + */ + keys(): ArrayIterator; + + /** + * Returns an list of values in the array + */ + values(): ArrayIterator; + + readonly [Symbol.toStringTag]: "Float16Array"; +} + +interface Float16ArrayConstructor { + readonly prototype: Float16Array; + new (length?: number): Float16Array; + new (array: ArrayLike | Iterable): Float16Array; + new (buffer: TArrayBuffer, byteOffset?: number, length?: number): Float16Array; + + /** + * The size in bytes of each element in the array. + */ + readonly BYTES_PER_ELEMENT: number; + + /** + * Returns a new array from a set of elements. + * @param items A set of elements to include in the new array object. + */ + of(...items: number[]): Float16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + */ + from(arrayLike: ArrayLike): Float16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + */ + from(elements: Iterable): Float16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param elements An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ + from(elements: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float16Array; +} +declare var Float16Array: Float16ArrayConstructor; + +interface Math { + /** + * Returns the nearest half precision float representation of a number. + * @param x A numeric expression. + */ + f16round(x: number): number; +} + +interface DataView { + /** + * Gets the Float16 value at the specified byte offset from the start of the view. There is + * no alignment constraint; multi-byte values may be fetched from any offset. + * @param byteOffset The place in the buffer at which the value should be retrieved. + * @param littleEndian If false or undefined, a big-endian value should be read. + */ + getFloat16(byteOffset: number, littleEndian?: boolean): number; + + /** + * Stores an Float16 value at the specified byte offset from the start of the view. + * @param byteOffset The place in the buffer at which the value should be set. + * @param value The value to set. + * @param littleEndian If false or undefined, a big-endian value should be written. + */ + setFloat16(byteOffset: number, value: number, littleEndian?: boolean): void; +} diff --git a/internal/bundled/libs/lib.esnext.iterator.d.ts b/internal/bundled/libs/lib.esnext.iterator.d.ts index 9833442792..76346324ad 100644 --- a/internal/bundled/libs/lib.esnext.iterator.d.ts +++ b/internal/bundled/libs/lib.esnext.iterator.d.ts @@ -101,7 +101,7 @@ declare global { /** * Performs the specified action for each element in the iterator. - * @param callbackfn A function that accepts up to two arguments. forEach calls the callbackfn function one time for each element in the iterator. + * @param callbackfn A function that accepts up to two arguments. forEach calls the callbackfn function one time for each element in the iterator. */ forEach(callbackfn: (value: T, index: number) => void): void; diff --git a/internal/bundled/libs/lib.esnext.promise.d.ts b/internal/bundled/libs/lib.esnext.promise.d.ts new file mode 100644 index 0000000000..d2ffcc48f2 --- /dev/null +++ b/internal/bundled/libs/lib.esnext.promise.d.ts @@ -0,0 +1,34 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + +/// + +interface PromiseConstructor { + /** + * Takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result + * in a Promise. + * + * @param callbackFn A function that is called synchronously. It can do anything: either return + * a value, throw an error, or return a promise. + * @param args Additional arguments, that will be passed to the callback. + * + * @returns A Promise that is: + * - Already fulfilled, if the callback synchronously returns a value. + * - Already rejected, if the callback synchronously throws an error. + * - Asynchronously fulfilled or rejected, if the callback returns a promise. + */ + try(callbackFn: (...args: U) => T | PromiseLike, ...args: U): Promise>; +} diff --git a/internal/bundled/libs/lib.webworker.d.ts b/internal/bundled/libs/lib.webworker.d.ts index ba727932e7..dd6a69e764 100644 --- a/internal/bundled/libs/lib.webworker.d.ts +++ b/internal/bundled/libs/lib.webworker.d.ts @@ -65,6 +65,59 @@ interface AudioConfiguration { spatialRendering?: boolean; } +interface AudioDataCopyToOptions { + format?: AudioSampleFormat; + frameCount?: number; + frameOffset?: number; + planeIndex: number; +} + +interface AudioDataInit { + data: BufferSource; + format: AudioSampleFormat; + numberOfChannels: number; + numberOfFrames: number; + sampleRate: number; + timestamp: number; + transfer?: ArrayBuffer[]; +} + +interface AudioDecoderConfig { + codec: string; + description?: BufferSource; + numberOfChannels: number; + sampleRate: number; +} + +interface AudioDecoderInit { + error: WebCodecsErrorCallback; + output: AudioDataOutputCallback; +} + +interface AudioDecoderSupport { + config?: AudioDecoderConfig; + supported?: boolean; +} + +interface AudioEncoderConfig { + bitrate?: number; + bitrateMode?: BitrateMode; + codec: string; + numberOfChannels: number; + opus?: OpusEncoderConfig; + sampleRate: number; +} + +interface AudioEncoderInit { + error: WebCodecsErrorCallback; + output: EncodedAudioChunkOutputCallback; +} + +interface AudioEncoderSupport { + config?: AudioEncoderConfig; + supported?: boolean; +} + interface AvcEncoderConfig { format?: AvcBitstreamFormat; } @@ -181,6 +234,18 @@ interface EcdsaParams extends Algorithm { hash: HashAlgorithmIdentifier; } +interface EncodedAudioChunkInit { + data: AllowSharedBufferSource; + duration?: number; + timestamp: number; + transfer?: ArrayBuffer[]; + type: EncodedAudioChunkType; +} + +interface EncodedAudioChunkMetadata { + decoderConfig?: AudioDecoderConfig; +} + interface EncodedVideoChunkInit { data: AllowSharedBufferSource; duration?: number; @@ -227,7 +292,7 @@ interface ExtendableMessageEventInit extends ExtendableEventInit { interface FetchEventInit extends ExtendableEventInit { clientId?: string; - handled?: Promise; + handled?: Promise; preloadResponse?: Promise; replacesClientId?: string; request: Request; @@ -335,6 +400,26 @@ interface ImageDataSettings { colorSpace?: PredefinedColorSpace; } +interface ImageDecodeOptions { + completeFramesOnly?: boolean; + frameIndex?: number; +} + +interface ImageDecodeResult { + complete: boolean; + image: VideoFrame; +} + +interface ImageDecoderInit { + colorSpaceConversion?: ColorSpaceConversion; + data: ImageBufferSource; + desiredHeight?: number; + desiredWidth?: number; + preferAnimation?: boolean; + transfer?: ArrayBuffer[]; + type: string; +} + interface ImageEncodeOptions { quality?: number; type?: string; @@ -448,6 +533,15 @@ interface NotificationOptions { tag?: string; } +interface OpusEncoderConfig { + complexity?: number; + format?: OpusBitstreamFormat; + frameDuration?: number; + packetlossperc?: number; + usedtx?: boolean; + useinbandfec?: boolean; +} + interface Pbkdf2Params extends Algorithm { hash: HashAlgorithmIdentifier; iterations: number; @@ -768,6 +862,7 @@ interface VideoConfiguration { colorGamut?: ColorGamut; contentType: string; framerate: number; + hasAlphaChannel?: boolean; hdrMetadataType?: HdrMetadataType; height: number; scalabilityMode?: string; @@ -803,6 +898,7 @@ interface VideoEncoderConfig { bitrate?: number; bitrateMode?: VideoEncoderBitrateMode; codec: string; + contentHint?: string; displayHeight?: number; displayWidth?: number; framerate?: number; @@ -814,9 +910,14 @@ interface VideoEncoderConfig { } interface VideoEncoderEncodeOptions { + avc?: VideoEncoderEncodeOptionsForAvc; keyFrame?: boolean; } +interface VideoEncoderEncodeOptionsForAvc { + quantizer?: number | null; +} + interface VideoEncoderInit { error: WebCodecsErrorCallback; output: EncodedVideoChunkOutputCallback; @@ -841,6 +942,8 @@ interface VideoFrameBufferInit { } interface VideoFrameCopyToOptions { + colorSpace?: PredefinedColorSpace; + format?: VideoPixelFormat; layout?: PlaneLayout[]; rect?: DOMRectInit; } @@ -1008,6 +1111,113 @@ interface AnimationFrameProvider { requestAnimationFrame(callback: FrameRequestCallback): number; } +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData) */ +interface AudioData { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/duration) */ + readonly duration: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/format) */ + readonly format: AudioSampleFormat | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/numberOfChannels) */ + readonly numberOfChannels: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/numberOfFrames) */ + readonly numberOfFrames: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/sampleRate) */ + readonly sampleRate: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/timestamp) */ + readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/allocationSize) */ + allocationSize(options: AudioDataCopyToOptions): number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/clone) */ + clone(): AudioData; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/copyTo) */ + copyTo(destination: AllowSharedBufferSource, options: AudioDataCopyToOptions): void; +} + +declare var AudioData: { + prototype: AudioData; + new(init: AudioDataInit): AudioData; +}; + +interface AudioDecoderEventMap { + "dequeue": Event; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder) + */ +interface AudioDecoder extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/decodeQueueSize) */ + readonly decodeQueueSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/dequeue_event) */ + ondequeue: ((this: AudioDecoder, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/state) */ + readonly state: CodecState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/configure) */ + configure(config: AudioDecoderConfig): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/decode) */ + decode(chunk: EncodedAudioChunk): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/flush) */ + flush(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/reset) */ + reset(): void; + addEventListener(type: K, listener: (this: AudioDecoder, ev: AudioDecoderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: AudioDecoder, ev: AudioDecoderEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var AudioDecoder: { + prototype: AudioDecoder; + new(init: AudioDecoderInit): AudioDecoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/isConfigSupported_static) */ + isConfigSupported(config: AudioDecoderConfig): Promise; +}; + +interface AudioEncoderEventMap { + "dequeue": Event; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder) + */ +interface AudioEncoder extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/encodeQueueSize) */ + readonly encodeQueueSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/dequeue_event) */ + ondequeue: ((this: AudioEncoder, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/state) */ + readonly state: CodecState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/configure) */ + configure(config: AudioEncoderConfig): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/encode) */ + encode(data: AudioData): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/flush) */ + flush(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/reset) */ + reset(): void; + addEventListener(type: K, listener: (this: AudioEncoder, ev: AudioEncoderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: AudioEncoder, ev: AudioEncoderEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var AudioEncoder: { + prototype: AudioEncoder; + new(init: AudioEncoderInit): AudioEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/isConfigSupported_static) */ + isConfigSupported(config: AudioEncoderConfig): Promise; +}; + /** * A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. * @@ -1020,6 +1230,8 @@ interface Blob { readonly type: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */ arrayBuffer(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes) */ + bytes(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ slice(start?: number, end?: number, contentType?: string): Blob; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */ @@ -1042,6 +1254,8 @@ interface Body { arrayBuffer(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */ blob(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes) */ + bytes(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */ formData(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */ @@ -1805,6 +2019,8 @@ declare var CloseEvent: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */ interface CompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; } declare var CompressionStream: { @@ -1974,38 +2190,67 @@ declare var DOMException: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix) */ interface DOMMatrix extends DOMMatrixReadOnly { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ a: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ b: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ c: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ d: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ e: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ f: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m11: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m12: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m13: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m14: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m21: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m22: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m23: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m24: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m31: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m32: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m33: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m34: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m41: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m42: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m43: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m44: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/invertSelf) */ invertSelf(): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/multiplySelf) */ multiplySelf(other?: DOMMatrixInit): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/preMultiplySelf) */ preMultiplySelf(other?: DOMMatrixInit): DOMMatrix; rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; rotateFromVectorSelf(x?: number, y?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/rotateSelf) */ rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/skewXSelf) */ skewXSelf(sx?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/skewYSelf) */ skewYSelf(sy?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/translateSelf) */ translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix; } @@ -2019,34 +2264,61 @@ declare var DOMMatrix: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly) */ interface DOMMatrixReadOnly { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly a: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly b: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly c: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly d: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly e: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly f: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/is2D) */ readonly is2D: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/isIdentity) */ readonly isIdentity: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m11: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m12: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m13: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m14: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m21: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m22: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m23: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m24: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m31: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m32: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m33: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m34: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m41: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m42: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m43: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m44: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipX) */ flipX(): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipY) */ flipY(): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/inverse) */ inverse(): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/multiply) */ multiply(other?: DOMMatrixInit): DOMMatrix; rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; @@ -2058,9 +2330,13 @@ interface DOMMatrixReadOnly { scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix; skewX(sx?: number): DOMMatrix; skewY(sy?: number): DOMMatrix; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toFloat32Array) */ toFloat32Array(): Float32Array; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toFloat64Array) */ toFloat64Array(): Float64Array; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toJSON) */ toJSON(): any; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/transformPoint) */ transformPoint(point?: DOMPointInit): DOMPoint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/translate) */ translate(tx?: number, ty?: number, tz?: number): DOMMatrix; @@ -2103,6 +2379,7 @@ interface DOMPointReadOnly { readonly y: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/z) */ readonly z: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/matrixTransform) */ matrixTransform(matrix?: DOMMatrixInit): DOMPoint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/toJSON) */ toJSON(): any; @@ -2117,11 +2394,17 @@ declare var DOMPointReadOnly: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad) */ interface DOMQuad { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p1) */ readonly p1: DOMPoint; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p2) */ readonly p2: DOMPoint; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p3) */ readonly p3: DOMPoint; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p4) */ readonly p4: DOMPoint; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/getBounds) */ getBounds(): DOMRect; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/toJSON) */ toJSON(): any; } @@ -2134,9 +2417,13 @@ declare var DOMQuad: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect) */ interface DOMRect extends DOMRectReadOnly { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/height) */ height: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/width) */ width: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/x) */ x: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/y) */ y: number; } @@ -2165,6 +2452,7 @@ interface DOMRectReadOnly { readonly x: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/y) */ readonly y: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/toJSON) */ toJSON(): any; } @@ -2209,6 +2497,8 @@ declare var DOMStringList: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */ interface DecompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; } declare var DecompressionStream: { @@ -2216,10 +2506,10 @@ declare var DecompressionStream: { new(format: CompressionFormat): DecompressionStream; }; -interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { +interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap, MessageEventTargetEventMap { "message": MessageEvent; "messageerror": MessageEvent; - "rtctransform": Event; + "rtctransform": RTCTransformEvent; } /** @@ -2227,19 +2517,15 @@ interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope) */ -interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFrameProvider { +interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFrameProvider, MessageEventTarget { /** * Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/name) */ readonly name: string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ - onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ - onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/rtctransform_event) */ - onrtctransform: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; + onrtctransform: ((this: DedicatedWorkerGlobalScope, ev: RTCTransformEvent) => any) | null; /** * Aborts dedicatedWorkerGlobal. * @@ -2344,6 +2630,25 @@ interface EXT_texture_norm16 { readonly RGBA16_SNORM_EXT: 0x8F9B; } +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk) */ +interface EncodedAudioChunk { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/byteLength) */ + readonly byteLength: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/duration) */ + readonly duration: number | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/timestamp) */ + readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/type) */ + readonly type: EncodedAudioChunkType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/copyTo) */ + copyTo(destination: AllowSharedBufferSource): void; +} + +declare var EncodedAudioChunk: { + prototype: EncodedAudioChunk; + new(init: EncodedAudioChunkInit): EncodedAudioChunk; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk) */ interface EncodedVideoChunk { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/byteLength) */ @@ -2369,10 +2674,15 @@ declare var EncodedVideoChunk: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent) */ interface ErrorEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */ readonly colno: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */ readonly error: any; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */ readonly filename: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */ readonly lineno: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */ readonly message: string; } @@ -2665,7 +2975,7 @@ interface FetchEvent extends ExtendableEvent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/clientId) */ readonly clientId: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/handled) */ - readonly handled: Promise; + readonly handled: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/preloadResponse) */ readonly preloadResponse: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */ @@ -2944,23 +3254,23 @@ interface FontFace { declare var FontFace: { prototype: FontFace; - new(family: string, source: string | BinaryData, descriptors?: FontFaceDescriptors): FontFace; + new(family: string, source: string | BufferSource, descriptors?: FontFaceDescriptors): FontFace; }; interface FontFaceSetEventMap { - "loading": Event; - "loadingdone": Event; - "loadingerror": Event; + "loading": FontFaceSetLoadEvent; + "loadingdone": FontFaceSetLoadEvent; + "loadingerror": FontFaceSetLoadEvent; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */ interface FontFaceSet extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */ - onloading: ((this: FontFaceSet, ev: Event) => any) | null; + onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */ - onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingdone: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingerror_event) */ - onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingerror: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready) */ readonly ready: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status) */ @@ -2978,7 +3288,7 @@ interface FontFaceSet extends EventTarget { declare var FontFaceSet: { prototype: FontFaceSet; - new(initialFaces: FontFace[]): FontFaceSet; + new(): FontFaceSet; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */ @@ -3027,6 +3337,16 @@ declare var FormData: { new(): FormData; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError) + */ +interface GPUError { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message) */ + readonly message: string; +} + interface GenericTransformStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/readable) */ readonly readable: ReadableStream; @@ -3689,7 +4009,7 @@ interface IDBTransaction extends EventTarget { /** * Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/ObjectStoreNames) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/objectStoreNames) */ readonly objectStoreNames: DOMStringList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ @@ -3816,6 +4136,70 @@ declare var ImageData: { new(data: Uint8ClampedArray, sw: number, sh?: number, settings?: ImageDataSettings): ImageData; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder) + */ +interface ImageDecoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/complete) */ + readonly complete: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/completed) */ + readonly completed: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/tracks) */ + readonly tracks: ImageTrackList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/type) */ + readonly type: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/decode) */ + decode(options?: ImageDecodeOptions): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/reset) */ + reset(): void; +} + +declare var ImageDecoder: { + prototype: ImageDecoder; + new(init: ImageDecoderInit): ImageDecoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageDecoder/isTypeSupported_static) */ + isTypeSupported(type: string): Promise; +}; + +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrack) */ +interface ImageTrack { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrack/animated) */ + readonly animated: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrack/frameCount) */ + readonly frameCount: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrack/repetitionCount) */ + readonly repetitionCount: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrack/selected) */ + selected: boolean; +} + +declare var ImageTrack: { + prototype: ImageTrack; + new(): ImageTrack; +}; + +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrackList) */ +interface ImageTrackList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrackList/length) */ + readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrackList/ready) */ + readonly ready: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrackList/selectedIndex) */ + readonly selectedIndex: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageTrackList/selectedTrack) */ + readonly selectedTrack: ImageTrack | null; + [index: number]: ImageTrack; +} + +declare var ImageTrackList: { + prototype: ImageTrackList; + new(): ImageTrackList; +}; + interface ImportMeta { url: string; resolve(specifier: string): string; @@ -3964,7 +4348,23 @@ declare var MessageEvent: { new(type: string, eventInitDict?: MessageEventInit): MessageEvent; }; -interface MessagePortEventMap { +interface MessageEventTargetEventMap { + "message": MessageEvent; + "messageerror": MessageEvent; +} + +interface MessageEventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ + onmessage: ((this: T, ev: MessageEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ + onmessageerror: ((this: T, ev: MessageEvent) => any) | null; + addEventListener(type: K, listener: (this: T, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: T, ev: MessageEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +interface MessagePortEventMap extends MessageEventTargetEventMap { "message": MessageEvent; "messageerror": MessageEvent; } @@ -3974,11 +4374,7 @@ interface MessagePortEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort) */ -interface MessagePort extends EventTarget { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/message_event) */ - onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/messageerror_event) */ - onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null; +interface MessagePort extends EventTarget, MessageEventTarget { /** * Disconnects the port, so that it is no longer active. * @@ -4254,7 +4650,7 @@ interface OES_vertex_array_object { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/bindVertexArrayOES) */ bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/createVertexArrayOES) */ - createVertexArrayOES(): WebGLVertexArrayObjectOES | null; + createVertexArrayOES(): WebGLVertexArrayObjectOES; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/deleteVertexArrayOES) */ deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/isVertexArrayOES) */ @@ -4340,6 +4736,7 @@ declare var OffscreenCanvas: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvasRenderingContext2D) */ interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/canvas) */ readonly canvas: OffscreenCanvas; } @@ -4533,6 +4930,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { readonly responseEnd: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart) */ readonly responseStart: DOMHighResTimeStamp; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStatus) */ + readonly responseStatus: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart) */ readonly secureConnectionStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/serverTiming) */ @@ -4683,6 +5082,8 @@ interface PushMessageData { arrayBuffer(): ArrayBuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/blob) */ blob(): Blob; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/bytes) */ + bytes(): Uint8Array; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/json) */ json(): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/text) */ @@ -4737,6 +5138,69 @@ declare var PushSubscriptionOptions: { new(): PushSubscriptionOptions; }; +interface RTCDataChannelEventMap { + "bufferedamountlow": Event; + "close": Event; + "closing": Event; + "error": Event; + "message": MessageEvent; + "open": Event; +} + +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel) */ +interface RTCDataChannel extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/binaryType) */ + binaryType: BinaryType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/bufferedAmount) */ + readonly bufferedAmount: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/bufferedAmountLowThreshold) */ + bufferedAmountLowThreshold: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/id) */ + readonly id: number | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/label) */ + readonly label: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/maxPacketLifeTime) */ + readonly maxPacketLifeTime: number | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/maxRetransmits) */ + readonly maxRetransmits: number | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/negotiated) */ + readonly negotiated: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/bufferedamountlow_event) */ + onbufferedamountlow: ((this: RTCDataChannel, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/close_event) */ + onclose: ((this: RTCDataChannel, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/closing_event) */ + onclosing: ((this: RTCDataChannel, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/error_event) */ + onerror: ((this: RTCDataChannel, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/message_event) */ + onmessage: ((this: RTCDataChannel, ev: MessageEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/open_event) */ + onopen: ((this: RTCDataChannel, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/ordered) */ + readonly ordered: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/protocol) */ + readonly protocol: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/readyState) */ + readonly readyState: RTCDataChannelState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/send) */ + send(data: string): void; + send(data: Blob): void; + send(data: ArrayBuffer): void; + send(data: ArrayBufferView): void; + addEventListener(type: K, listener: (this: RTCDataChannel, ev: RTCDataChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: RTCDataChannel, ev: RTCDataChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var RTCDataChannel: { + prototype: RTCDataChannel; + new(): RTCDataChannel; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame) */ interface RTCEncodedAudioFrame { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame/data) */ @@ -4857,7 +5321,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { declare var ReadableStreamBYOBReader: { prototype: ReadableStreamBYOBReader; - new(stream: ReadableStream): ReadableStreamBYOBReader; + new(stream: ReadableStream): ReadableStreamBYOBReader; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */ @@ -4907,7 +5371,7 @@ declare var ReadableStreamDefaultReader: { interface ReadableStreamGenericReader { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/closed) */ - readonly closed: Promise; + readonly closed: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/cancel) */ cancel(reason?: any): Promise; } @@ -4990,7 +5454,11 @@ interface Request extends Body { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/integrity) */ readonly integrity: string; - /** Returns a boolean indicating whether or not request can outlive the global in which it was created. */ + /** + * Returns a boolean indicating whether or not request can outlive the global in which it was created. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive) + */ readonly keepalive: boolean; /** * Returns request's HTTP method, which is "GET" by default. @@ -5368,7 +5836,7 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */ - deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; + deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length?: number | null): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */ @@ -5380,7 +5848,7 @@ interface SubtleCrypto { exportKey(format: Exclude, key: CryptoKey): Promise; exportKey(format: KeyFormat, key: CryptoKey): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */ - generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; + generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; @@ -6626,7 +7094,7 @@ interface WebGL2RenderingContextBase { clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clientWaitSync) */ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexImage2D) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexImage3D) */ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void; compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: number, srcLengthOverride?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexSubImage3D) */ @@ -6637,13 +7105,13 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/copyTexSubImage3D) */ copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createQuery) */ - createQuery(): WebGLQuery | null; + createQuery(): WebGLQuery; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createSampler) */ - createSampler(): WebGLSampler | null; + createSampler(): WebGLSampler; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createTransformFeedback) */ - createTransformFeedback(): WebGLTransformFeedback | null; + createTransformFeedback(): WebGLTransformFeedback; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createVertexArray) */ - createVertexArray(): WebGLVertexArrayObject | null; + createVertexArray(): WebGLVertexArrayObject; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteQuery) */ deleteQuery(query: WebGLQuery | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteSampler) */ @@ -7048,11 +7516,11 @@ interface WebGL2RenderingContextBase { } interface WebGL2RenderingContextOverloads { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferData) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/bufferData) */ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void; bufferData(target: GLenum, srcData: AllowSharedBufferSource | null, usage: GLenum): void; bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: number, length?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferSubData) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/bufferSubData) */ bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: AllowSharedBufferSource): void; bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexImage2D) */ @@ -7093,7 +7561,7 @@ interface WebGL2RenderingContextOverloads { uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; @@ -7507,12 +7975,14 @@ declare var WebGLRenderingContext: { }; interface WebGLRenderingContextBase { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/drawingBufferColorSpace) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawingBufferColorSpace) */ drawingBufferColorSpace: PredefinedColorSpace; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/drawingBufferHeight) */ readonly drawingBufferHeight: GLsizei; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/drawingBufferWidth) */ readonly drawingBufferWidth: GLsizei; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/unpackColorSpace) */ + unpackColorSpace: PredefinedColorSpace; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/activeTexture) */ activeTexture(texture: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/attachShader) */ @@ -7556,17 +8026,17 @@ interface WebGLRenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/copyTexSubImage2D) */ copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createBuffer) */ - createBuffer(): WebGLBuffer | null; + createBuffer(): WebGLBuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createFramebuffer) */ - createFramebuffer(): WebGLFramebuffer | null; + createFramebuffer(): WebGLFramebuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createProgram) */ - createProgram(): WebGLProgram | null; + createProgram(): WebGLProgram; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createRenderbuffer) */ - createRenderbuffer(): WebGLRenderbuffer | null; + createRenderbuffer(): WebGLRenderbuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createShader) */ createShader(type: GLenum): WebGLShader | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createTexture) */ - createTexture(): WebGLTexture | null; + createTexture(): WebGLTexture; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/cullFace) */ cullFace(mode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/deleteBuffer) */ @@ -7711,6 +8181,7 @@ interface WebGLRenderingContextBase { isShader(shader: WebGLShader | null): GLboolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/isTexture) */ isTexture(texture: WebGLTexture | null): GLboolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/lineWidth) */ lineWidth(width: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/linkProgram) */ linkProgram(program: WebGLProgram): void; @@ -8328,7 +8799,7 @@ interface WebTransport { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams) */ readonly incomingUnidirectionalStreams: ReadableStream; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready) */ - readonly ready: Promise; + readonly ready: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/close) */ close(closeInfo?: WebTransportCloseInfo): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createBidirectionalStream) */ @@ -8447,30 +8918,28 @@ interface WindowOrWorkerGlobalScope { atob(data: string): string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */ btoa(data: string): string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearInterval) */ clearInterval(id: number | undefined): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout) */ clearTimeout(id: number | undefined): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/createImageBitmap) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap) */ createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ fetch(input: RequestInfo | URL, init?: RequestInit): Promise; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ reportError(e: any): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setInterval) */ setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setTimeout) */ setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/structuredClone) */ structuredClone(value: T, options?: StructuredSerializeOptions): T; } -interface WorkerEventMap extends AbstractWorkerEventMap { - "message": MessageEvent; - "messageerror": MessageEvent; +interface WorkerEventMap extends AbstractWorkerEventMap, MessageEventTargetEventMap { } /** @@ -8478,11 +8947,7 @@ interface WorkerEventMap extends AbstractWorkerEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker) */ -interface Worker extends EventTarget, AbstractWorker { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker/message_event) */ - onmessage: ((this: Worker, ev: MessageEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker/messageerror_event) */ - onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null; +interface Worker extends EventTarget, AbstractWorker, MessageEventTarget { /** * Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned. * @@ -8611,6 +9076,12 @@ interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, N readonly mediaCapabilities: MediaCapabilities; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/permissions) */ readonly permissions: Permissions; + /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/serviceWorker) + */ + readonly serviceWorker: ServiceWorkerContainer; } declare var WorkerNavigator: { @@ -8663,11 +9134,11 @@ declare var WritableStreamDefaultController: { */ interface WritableStreamDefaultWriter { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */ - readonly closed: Promise; + readonly closed: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */ readonly desiredSize: number | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */ - readonly ready: Promise; + readonly ready: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */ abort(reason?: any): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */ @@ -8878,7 +9349,7 @@ interface Console { clear(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */ count(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countreset_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */ countReset(label?: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */ debug(...data: any[]): void; @@ -8890,9 +9361,9 @@ interface Console { error(...data: any[]): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */ group(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupcollapsed_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */ groupCollapsed(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupend_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */ groupEnd(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */ info(...data: any[]): void; @@ -8902,9 +9373,9 @@ interface Console { table(tabularData?: any, properties?: string[]): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */ time(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeend_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */ timeEnd(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timelog_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */ timeLog(label?: string, ...data: any[]): void; timeStamp(label?: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */ @@ -9074,6 +9545,14 @@ declare namespace WebAssembly { function validate(bytes: BufferSource): boolean; } +interface AudioDataOutputCallback { + (output: AudioData): void; +} + +interface EncodedAudioChunkOutputCallback { + (output: EncodedAudioChunk, metadata?: EncodedAudioChunkMetadata): void; +} + interface EncodedVideoChunkOutputCallback { (chunk: EncodedVideoChunk, metadata?: EncodedVideoChunkMetadata): void; } @@ -9160,12 +9639,8 @@ interface WebCodecsErrorCallback { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/name) */ declare var name: string; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ -declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ -declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/rtctransform_event) */ -declare var onrtctransform: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; +declare var onrtctransform: ((this: DedicatedWorkerGlobalScope, ev: RTCTransformEvent) => any) | null; /** * Aborts dedicatedWorkerGlobal. * @@ -9251,29 +9726,33 @@ declare var performance: Performance; declare function atob(data: string): string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */ declare function btoa(data: string): string; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearInterval) */ declare function clearInterval(id: number | undefined): void; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout) */ declare function clearTimeout(id: number | undefined): void; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/createImageBitmap) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/createImageBitmap) */ declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ declare function reportError(e: any): void; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setInterval) */ declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setTimeout) */ declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/structuredClone) */ declare function structuredClone(value: T, options?: StructuredSerializeOptions): T; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame) */ declare function cancelAnimationFrame(handle: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame) */ declare function requestAnimationFrame(callback: FrameRequestCallback): number; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ +declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ +declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; declare function addEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; declare function removeEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -9281,7 +9760,6 @@ declare function removeEventListener(type: string, listener: EventListenerOrEven type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBuffer | ArrayBufferView; type BigInteger = Uint8Array; -type BinaryData = ArrayBuffer | ArrayBufferView; type BlobPart = BufferSource | Blob | string; type BodyInit = ReadableStream | XMLHttpRequestBodyInit; type BufferSource = ArrayBufferView | ArrayBuffer; @@ -9312,6 +9790,7 @@ type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; type ImageBitmapSource = CanvasImageSource | Blob | ImageData; +type ImageBufferSource = AllowSharedBufferSource | ReadableStream; type Int32List = Int32Array | GLint[]; type MessageEventSource = MessagePort | ServiceWorker; type NamedCurve = string; @@ -9326,12 +9805,14 @@ type ReportList = Report[]; type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; -type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | VideoFrame | ArrayBuffer; +type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type AlphaOption = "discard" | "keep"; +type AudioSampleFormat = "f32" | "f32-planar" | "s16" | "s16-planar" | "s32" | "s32-planar" | "u8" | "u8-planar"; type AvcBitstreamFormat = "annexb" | "avc"; type BinaryType = "arraybuffer" | "blob"; +type BitrateMode = "constant" | "variable"; type CSSMathOperator = "clamp" | "invert" | "max" | "min" | "negate" | "product" | "sum"; type CSSNumericBaseType = "angle" | "flex" | "frequency" | "length" | "percent" | "resolution" | "time"; type CanvasDirection = "inherit" | "ltr" | "rtl"; @@ -9350,6 +9831,7 @@ type ColorGamut = "p3" | "rec2020" | "srgb"; type ColorSpaceConversion = "default" | "none"; type CompressionFormat = "deflate" | "deflate-raw" | "gzip"; type DocumentVisibilityState = "hidden" | "visible"; +type EncodedAudioChunkType = "delta" | "key"; type EncodedVideoChunkType = "delta" | "key"; type EndingType = "native" | "transparent"; type FileSystemHandleKind = "directory" | "file"; @@ -9376,11 +9858,13 @@ type MediaEncodingType = "record" | "webrtc"; type NotificationDirection = "auto" | "ltr" | "rtl"; type NotificationPermission = "default" | "denied" | "granted"; type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu"; -type PermissionName = "geolocation" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "xr-spatial-tracking"; +type OpusBitstreamFormat = "ogg" | "opus"; +type PermissionName = "camera" | "geolocation" | "microphone" | "midi" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "storage-access"; type PermissionState = "denied" | "granted" | "prompt"; type PredefinedColorSpace = "display-p3" | "srgb"; type PremultiplyAlpha = "default" | "none" | "premultiply"; type PushEncryptionKeyName = "auth" | "p256dh"; +type RTCDataChannelState = "closed" | "closing" | "connecting" | "open"; type RTCEncodedVideoFrameType = "delta" | "empty" | "key"; type ReadableStreamReaderMode = "byob"; type ReadableStreamType = "bytes"; diff --git a/internal/bundled/libs/lib.webworker.iterable.d.ts b/internal/bundled/libs/lib.webworker.iterable.d.ts index be864068e7..a571b7d3b2 100644 --- a/internal/bundled/libs/lib.webworker.iterable.d.ts +++ b/internal/bundled/libs/lib.webworker.iterable.d.ts @@ -20,11 +20,6 @@ and limitations under the License. /// Worker Iterable APIs ///////////////////////////// -interface AbortSignal { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */ - any(signals: Iterable): AbortSignal; -} - interface CSSNumericArray { [Symbol.iterator](): ArrayIterator; entries(): ArrayIterator<[number, CSSNumericValue]>; @@ -120,6 +115,10 @@ interface IDBObjectStore { createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; } +interface ImageTrackList { + [Symbol.iterator](): ArrayIterator; +} + interface MessageEvent { /** @deprecated */ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; @@ -140,7 +139,7 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */ - generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; + generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable): Promise; @@ -243,7 +242,7 @@ interface WebGL2RenderingContextOverloads { uniform4fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ uniform4iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; diff --git a/internal/bundled/libs_generated.go b/internal/bundled/libs_generated.go index 79c5512b41..7dfd5cab7c 100644 --- a/internal/bundled/libs_generated.go +++ b/internal/bundled/libs_generated.go @@ -93,9 +93,11 @@ var LibNames = []string{ "lib.esnext.d.ts", "lib.esnext.decorators.d.ts", "lib.esnext.disposable.d.ts", + "lib.esnext.float16.d.ts", "lib.esnext.full.d.ts", "lib.esnext.intl.d.ts", "lib.esnext.iterator.d.ts", + "lib.esnext.promise.d.ts", "lib.scripthost.d.ts", "lib.webworker.asynciterable.d.ts", "lib.webworker.d.ts", diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 1872f56f4d..9b02f1e0be 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -470,7 +470,6 @@ const ( IterationUseSpreadFlag IterationUse = 1 << 5 IterationUseDestructuringFlag IterationUse = 1 << 6 IterationUsePossiblyOutOfBounds IterationUse = 1 << 7 - IterationUseReportError IterationUse = 1 << 8 // Spread, Destructuring, Array element assignment IterationUseElement = IterationUseAllowsSyncIterablesFlag IterationUseSpread = IterationUseAllowsSyncIterablesFlag | IterationUseSpreadFlag @@ -481,7 +480,7 @@ const ( IterationUseAsyncYieldStar = IterationUseAllowsSyncIterablesFlag | IterationUseAllowsAsyncIterablesFlag | IterationUseYieldStarFlag IterationUseGeneratorReturnType = IterationUseAllowsSyncIterablesFlag IterationUseAsyncGeneratorReturnType = IterationUseAllowsAsyncIterablesFlag - IterationUseCacheFlags = IterationUseAllowsSyncIterablesFlag | IterationUseAllowsAsyncIterablesFlag | IterationUseForOfFlag | IterationUseReportError + IterationUseCacheFlags = IterationUseAllowsSyncIterablesFlag | IterationUseAllowsAsyncIterablesFlag | IterationUseForOfFlag ) type IterationTypes struct { @@ -502,6 +501,7 @@ type IterationTypesResolver struct { iteratorSymbolName string getGlobalIteratorType func() *Type getGlobalIterableType func() *Type + getGlobalIterableTypeChecked func() *Type getGlobalIterableIteratorType func() *Type getGlobalIterableIteratorTypeChecked func() *Type getGlobalIteratorObjectType func() *Type @@ -527,11 +527,14 @@ type Program interface { BindSourceFiles() FileExists(fileName string) bool GetSourceFile(fileName string) *ast.SourceFile - GetResolvedModule(currentSourceFile *ast.SourceFile, moduleReference string, mode core.ResolutionMode) *module.ResolvedModule + GetEmitModuleFormatOfFile(sourceFile ast.HasFileName) core.ModuleKind + GetEmitSyntaxForUsageLocation(sourceFile ast.HasFileName, usageLocation *ast.StringLiteralLike) core.ResolutionMode + GetImpliedNodeFormatForEmit(sourceFile ast.HasFileName) core.ModuleKind + GetResolvedModule(currentSourceFile ast.HasFileName, moduleReference string, mode core.ResolutionMode) *module.ResolvedModule GetResolvedModules() map[tspath.Path]module.ModeAwareCache[*module.ResolvedModule] + GetSourceFileMetaData(path tspath.Path) *ast.SourceFileMetaData GetJSXRuntimeImportSpecifier(path tspath.Path) (moduleReference string, specifier *ast.Node) GetImportHelpersImportSpecifier(path tspath.Path) *ast.Node - GetModeForUsageLocation(sourceFile *ast.SourceFile, location *ast.Node) core.ResolutionMode } type Host interface { @@ -698,6 +701,7 @@ type Checker struct { permissiveMapper *TypeMapper emptyObjectType *Type emptyJsxObjectType *Type + emptyFreshJsxObjectType *Type emptyTypeLiteralType *Type unknownEmptyObjectType *Type unknownUnionType *Type @@ -809,6 +813,7 @@ type Checker struct { getGlobalGeneratorType func() *Type getGlobalAsyncIteratorType func() *Type getGlobalAsyncIterableType func() *Type + getGlobalAsyncIterableTypeChecked func() *Type getGlobalAsyncIterableIteratorType func() *Type getGlobalAsyncIterableIteratorTypeChecked func() *Type getGlobalAsyncIteratorObjectType func() *Type @@ -964,6 +969,7 @@ func NewChecker(program Program) *Checker { c.permissiveMapper = newFunctionTypeMapper(c.permissiveMapperWorker) c.emptyObjectType = c.newAnonymousType(nil /*symbol*/, nil, nil, nil, nil) c.emptyJsxObjectType = c.newAnonymousType(nil /*symbol*/, nil, nil, nil, nil) + c.emptyFreshJsxObjectType = c.newAnonymousType(nil /*symbol*/, nil, nil, nil, nil) c.emptyTypeLiteralType = c.newAnonymousType(c.newSymbol(ast.SymbolFlagsTypeLiteral, ast.InternalSymbolNameType), nil, nil, nil, nil) c.unknownEmptyObjectType = c.newAnonymousType(nil /*symbol*/, nil, nil, nil, nil) c.unknownUnionType = c.createUnknownUnionType() @@ -1034,6 +1040,7 @@ func NewChecker(program Program) *Checker { c.getGlobalGeneratorType = c.getGlobalTypeResolver("Generator", 3 /*arity*/, false /*reportErrors*/) c.getGlobalAsyncIteratorType = c.getGlobalTypeResolver("AsyncIterator", 3 /*arity*/, false /*reportErrors*/) c.getGlobalAsyncIterableType = c.getGlobalTypeResolver("AsyncIterable", 3 /*arity*/, false /*reportErrors*/) + c.getGlobalAsyncIterableTypeChecked = c.getGlobalTypeResolver("AsyncIterable", 3 /*arity*/, true /*reportErrors*/) c.getGlobalAsyncIterableIteratorType = c.getGlobalTypeResolver("AsyncIterableIterator", 3 /*arity*/, false /*reportErrors*/) c.getGlobalAsyncIterableIteratorTypeChecked = c.getGlobalTypeResolver("AsyncIterableIterator", 3 /*arity*/, true /*reportErrors*/) c.getGlobalAsyncIteratorObjectType = c.getGlobalTypeResolver("AsyncIteratorObject", 3 /*arity*/, false /*reportErrors*/) @@ -1203,6 +1210,7 @@ func (c *Checker) initializeIterationResolvers() { iteratorSymbolName: "iterator", getGlobalIteratorType: c.getGlobalIteratorType, getGlobalIterableType: c.getGlobalIterableType, + getGlobalIterableTypeChecked: c.getGlobalIterableTypeChecked, getGlobalIterableIteratorType: c.getGlobalIterableIteratorType, getGlobalIterableIteratorTypeChecked: c.getGlobalIterableIteratorTypeChecked, getGlobalIteratorObjectType: c.getGlobalIteratorObjectType, @@ -1219,6 +1227,7 @@ func (c *Checker) initializeIterationResolvers() { iteratorSymbolName: "asyncIterator", getGlobalIteratorType: c.getGlobalAsyncIteratorType, getGlobalIterableType: c.getGlobalAsyncIterableType, + getGlobalIterableTypeChecked: c.getGlobalAsyncIterableTypeChecked, getGlobalIterableIteratorType: c.getGlobalAsyncIterableIteratorType, getGlobalIterableIteratorTypeChecked: c.getGlobalAsyncIterableIteratorTypeChecked, getGlobalIteratorObjectType: c.getGlobalAsyncIteratorObjectType, @@ -1827,12 +1836,12 @@ func (c *Checker) isBlockScopedNameDeclaredBeforeUse(declaration *ast.Node, usag switch { case declaration.Kind == ast.KindBindingElement: // still might be illegal if declaration and usage are both binding elements (eg var [a = b, b = b] = [1, 2]) - errorBindingElement := getAncestor(usage, ast.KindBindingElement) + errorBindingElement := ast.FindAncestorKind(usage, ast.KindBindingElement) if errorBindingElement != nil { return ast.FindAncestor(errorBindingElement, ast.IsBindingElement) != ast.FindAncestor(declaration, ast.IsBindingElement) || declaration.Pos() < errorBindingElement.Pos() } // or it might be illegal if usage happens before parent variable is declared (eg var [a] = a) - return c.isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, ast.KindVariableDeclaration), usage) + return c.isBlockScopedNameDeclaredBeforeUse(ast.FindAncestorKind(declaration, ast.KindVariableDeclaration), usage) case declaration.Kind == ast.KindVariableDeclaration: // still might be illegal if usage is in the initializer of the variable declaration (eg var a = a) return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage, declContainer) @@ -2466,6 +2475,9 @@ func (c *Checker) checkParameter(node *ast.Node) { paramName = node.Name().Text() } if ast.HasSyntacticModifier(node, ast.ModifierFlagsParameterPropertyModifier) { + if c.compilerOptions.ErasableSyntaxOnly.IsTrue() { + c.error(node, diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled) + } if !(ast.IsConstructorDeclaration(fn) && ast.NodeIsPresent(fn.Body())) { c.error(node, diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation) } @@ -3406,7 +3418,7 @@ func (c *Checker) checkFunctionOrConstructorSymbol(symbol *ast.Symbol) { } else { duplicateFunctionDeclaration = true } - } else if previousDeclaration != nil && previousDeclaration.Parent == node.Parent && previousDeclaration.End() != node.Pos() { + } else if previousDeclaration != nil && previousDeclaration.Parent == node.Parent && previousDeclaration.End() != node.Pos() && previousDeclaration.Flags&ast.NodeFlagsReparsed == 0 { reportImplementationExpectedError(previousDeclaration) } if bodyIsPresent { @@ -3876,16 +3888,7 @@ func (c *Checker) checkReturnStatement(node *ast.Node) { } } else if c.getReturnTypeFromAnnotation(container) != nil { unwrappedReturnType := core.OrElse(c.unwrapReturnType(returnType, functionFlags), returnType) - unwrappedExprType := exprType - if functionFlags&FunctionFlagsAsync != 0 { - unwrappedExprType = c.checkAwaitedType(exprType, false /*withAlias*/, node, diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member) - } - if unwrappedReturnType != nil { - // If the function has a return type, but promisedType is - // undefined, an error will be reported in checkAsyncFunctionReturnType - // so we don't need to report one here. - c.checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, exprNode, nil, nil) - } + c.checkReturnExpression(container, unwrappedReturnType, node, node.Expression(), exprType, false) } } else if !ast.IsConstructorDeclaration(container) && c.compilerOptions.NoImplicitReturns.IsTrue() && !c.isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType) { // The function has a return type, but the return statement doesn't have an expression. @@ -3893,6 +3896,33 @@ func (c *Checker) checkReturnStatement(node *ast.Node) { } } +// When checking an arrow expression such as `(x) => exp`, then `node` is the expression `exp`. +// Otherwise, `node` is a return statement. +func (c *Checker) checkReturnExpression(container *ast.Node, unwrappedReturnType *Type, node *ast.Node, expr *ast.Node, exprType *Type, inConditionalExpression bool) { + unwrappedExprType := exprType + functionFlags := getFunctionFlags(container) + if expr != nil { + unwrappedExpr := ast.SkipParentheses(expr) + if ast.IsConditionalExpression(unwrappedExpr) { + whenTrue := unwrappedExpr.AsConditionalExpression().WhenTrue + whenFalse := unwrappedExpr.AsConditionalExpression().WhenFalse + c.checkReturnExpression(container, unwrappedReturnType, node, whenTrue, c.checkExpression(whenTrue), true /*inConditionalExpression*/) + c.checkReturnExpression(container, unwrappedReturnType, node, whenFalse, c.checkExpression(whenFalse), true /*inConditionalExpression*/) + return + } + } + inReturnStatement := node.Kind == ast.KindReturnStatement + if functionFlags&FunctionFlagsAsync != 0 { + unwrappedExprType = c.checkAwaitedType(exprType, false /*withAlias*/, node, diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member) + } + effectiveExpr := expr // The effective expression for diagnostics purposes. + if expr != nil { + effectiveExpr = c.getEffectiveCheckNode(expr) + } + errorNode := core.IfElse(inReturnStatement && !inConditionalExpression, node, effectiveExpr) + c.checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, errorNode, effectiveExpr, nil, nil) +} + func (c *Checker) checkWithStatement(node *ast.Node) { if !c.checkGrammarStatementInAmbientContext(node) { if node.Flags&ast.NodeFlagsAwaitContext != 0 { @@ -4190,7 +4220,7 @@ func (c *Checker) checkBaseTypeAccessibility(t *Type, node *ast.Node) { signatures := c.getSignaturesOfType(t, SignatureKindConstruct) if len(signatures) != 0 { declaration := signatures[0].declaration - if declaration != nil && hasModifier(declaration, ast.ModifierFlagsPrivate) { + if declaration != nil && HasModifier(declaration, ast.ModifierFlagsPrivate) { typeClassDeclaration := ast.GetClassLikeDeclarationOfSymbol(t.symbol) if !c.isNodeWithinClass(node, typeClassDeclaration) { c.error(node, diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, c.getFullyQualifiedName(t.symbol, nil)) @@ -4436,13 +4466,18 @@ func (c *Checker) checkMembersForOverrideModifier(node *ast.Node, t *Type, typeW } func (c *Checker) checkMemberForOverrideModifier(node *ast.Node, staticType *Type, baseStaticType *Type, baseWithThis *Type, t *Type, typeWithThis *Type, member *ast.Node) { + isJs := ast.IsInJSFile(node) memberHasOverrideModifier := hasOverrideModifier(member) if baseWithThis == nil { if memberHasOverrideModifier { - c.error(member, diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class, c.TypeToString(t)) + c.error(member, core.IfElse(isJs, diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class, diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class), c.TypeToString(t)) } return } + if sym := member.Symbol(); memberHasOverrideModifier && sym != nil && sym.ValueDeclaration != nil && ast.IsClassElement(member) && member.Name() != nil && c.isNonBindableDynamicName(member.Name()) { + c.error(member, core.IfElse(isJs, diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic, diagnostics.This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic)) + return + } if !memberHasOverrideModifier && !c.compilerOptions.NoImplicitOverride.IsTrue() { return } @@ -4462,18 +4497,18 @@ func (c *Checker) checkMemberForOverrideModifier(node *ast.Node, staticType *Typ if baseProp == nil && memberHasOverrideModifier { suggestion := c.getSuggestedSymbolForNonexistentClassMember(ast.SymbolName(symbol), baseType) if suggestion != nil { - c.error(member, diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, c.TypeToString(baseWithThis), c.symbolToString(suggestion)) + c.error(member, core.IfElse(isJs, diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1), c.TypeToString(baseWithThis), c.symbolToString(suggestion)) return } - c.error(member, diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, c.TypeToString(baseWithThis)) + c.error(member, core.IfElse(isJs, diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0, diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0), c.TypeToString(baseWithThis)) return } if baseProp != nil && len(baseProp.Declarations) != 0 && !memberHasOverrideModifier && c.compilerOptions.NoImplicitOverride.IsTrue() && node.Flags&ast.NodeFlagsAmbient == 0 { baseHasAbstract := core.Some(baseProp.Declarations, hasAbstractModifier) if !baseHasAbstract { message := core.IfElse(ast.IsParameter(member), - diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0, - diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0) + core.IfElse(isJs, diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0, diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0), + core.IfElse(isJs, diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0, diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0)) c.error(member, message, c.TypeToString(baseWithThis)) return } @@ -4696,6 +4731,9 @@ func (c *Checker) checkInterfaceDeclaration(node *ast.Node) { if !c.checkGrammarModifiers(node) { c.checkGrammarInterfaceDeclaration(node.AsInterfaceDeclaration()) } + if !c.containerAllowsBlockScopedVariable(node.Parent) { + c.grammarErrorOnNode(node, diagnostics.X_0_declarations_can_only_be_declared_inside_a_block, "interface") + } c.checkTypeParameters(node.TypeParameters()) c.checkTypeNameIsReserved(node.Name(), diagnostics.Interface_name_cannot_be_0) c.checkExportsOnMergedDeclarations(node) @@ -4773,6 +4811,11 @@ func (c *Checker) checkEnumDeclaration(node *ast.Node) { c.checkCollisionsForDeclarationName(node, node.Name()) c.checkExportsOnMergedDeclarations(node) c.checkSourceElements(node.Members()) + + if c.compilerOptions.ErasableSyntaxOnly.IsTrue() && node.Flags&ast.NodeFlagsAmbient == 0 { + c.error(node, diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled) + } + c.computeEnumMemberValues(node) // Spec 2014 - Section 9.3: // It isn't possible for one enum declaration to continue the automatic numbering sequence of another, @@ -4859,6 +4902,9 @@ func (c *Checker) checkModuleDeclaration(node *ast.Node) { symbol := c.getSymbolOfDeclaration(node) // The following checks only apply on a non-ambient instantiated module declaration. if symbol.Flags&ast.SymbolFlagsValueModule != 0 && !inAmbientContext && isInstantiatedModule(node, c.compilerOptions.ShouldPreserveConstEnums()) { + if c.compilerOptions.ErasableSyntaxOnly.IsTrue() { + c.error(node, diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled) + } if c.compilerOptions.GetIsolatedModules() && ast.GetSourceFileOfNode(node).ExternalModuleIndicator == nil { // This could be loosened a little if needed. The only problem we are trying to avoid is unqualified // references to namespace members declared in other files. But use of namespaces is discouraged anyway, @@ -4875,7 +4921,7 @@ func (c *Checker) checkModuleDeclaration(node *ast.Node) { } } } - if c.compilerOptions.VerbatimModuleSyntax.IsTrue() && ast.IsSourceFile(node.Parent) && node.ModifierFlags()&ast.ModifierFlagsExport != 0 && c.getEmitModuleFormatOfFile(node.Parent.AsSourceFile()) == core.ModuleKindCommonJS { + if c.compilerOptions.VerbatimModuleSyntax.IsTrue() && ast.IsSourceFile(node.Parent) && node.ModifierFlags()&ast.ModifierFlagsExport != 0 && c.program.GetEmitModuleFormatOfFile(node.Parent.AsSourceFile()) == core.ModuleKindCommonJS { exportModifier := core.Find(node.ModifierNodes(), func(m *ast.Node) bool { return m.Kind == ast.KindExportKeyword }) c.error(exportModifier, diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled) } @@ -4993,7 +5039,10 @@ func (c *Checker) checkImportDeclaration(node *ast.Node) { } } } - if c.isOnlyImportableAsDefault(moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node) { + if !importClause.IsTypeOnly() && + core.ModuleKindNode18 <= c.moduleKind && c.moduleKind <= core.ModuleKindNodeNext && + c.isOnlyImportableAsDefault(moduleSpecifier, resolvedModule) && + !hasTypeJsonImportAttribute(node) { c.error(moduleSpecifier, diagnostics.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0, c.moduleKind.String()) } } else if c.compilerOptions.NoUncheckedSideEffectImports.IsTrue() && importClause == nil { @@ -5090,29 +5139,32 @@ func (c *Checker) checkImportAttributes(declaration *ast.Node) { if isTypeOnly && override != core.ResolutionModeNone { return // Other grammar checks do not apply to type-only imports with resolution mode assertions } - var mode core.ResolutionMode - if c.moduleKind == core.ModuleKindNodeNext { - if moduleSpecifier := getModuleSpecifierFromNode(declaration); moduleSpecifier != nil { - mode = c.getEmitSyntaxForModuleSpecifierExpression(moduleSpecifier) + + if !c.moduleKind.SupportsImportAttributes() { + if isImportAttributes { + c.grammarErrorOnNode(node, diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve) + } else { + c.grammarErrorOnNode(node, diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve) } + return } - if mode != core.ModuleKindESNext && c.moduleKind != core.ModuleKindESNext && c.moduleKind != core.ModuleKindPreserve { - var message *diagnostics.Message - switch { - case isImportAttributes: - if c.moduleKind == core.ModuleKindNodeNext { - message = diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls + + if c.moduleKind == core.ModuleKindNodeNext && !isImportAttributes { + c.grammarErrorOnNode(node, diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert) + return + } + + if moduleSpecifier := getModuleSpecifierFromNode(declaration); moduleSpecifier != nil { + if c.getEmitSyntaxForModuleSpecifierExpression(moduleSpecifier) == core.ModuleKindCommonJS { + if isImportAttributes { + c.grammarErrorOnNode(node, diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls) } else { - message = diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve + c.grammarErrorOnNode(node, diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls) } - case c.moduleKind == core.ModuleKindNodeNext: - message = diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls - default: - message = diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve + return } - c.grammarErrorOnNode(node, message) - return } + if isTypeOnly { c.grammarErrorOnNode(node, core.IfElse(isImportAttributes, diagnostics.Import_attributes_cannot_be_used_with_type_only_imports_or_exports, @@ -5149,6 +5201,9 @@ func (c *Checker) checkImportEqualsDeclaration(node *ast.Node) { return // If we hit an import declaration in an illegal context, just bail out to avoid cascading errors. } c.checkGrammarModifiers(node) + if c.compilerOptions.ErasableSyntaxOnly.IsTrue() && node.Flags&ast.NodeFlagsAmbient == 0 { + c.error(node, diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled) + } if ast.IsInternalModuleImportEqualsDeclaration(node) || c.checkExternalImportOrExportDeclaration(node) { c.checkImportBinding(node) c.markLinkedReferences(node, ReferenceHintExportImportEquals, nil, nil) @@ -5248,6 +5303,9 @@ func (c *Checker) checkExportAssignment(node *ast.Node) { if c.checkGrammarModuleElementContext(node, illegalContextMessage) { return // If we hit an export assignment in an illegal context, just bail out to avoid cascading errors. } + if c.compilerOptions.ErasableSyntaxOnly.IsTrue() && node.AsExportAssignment().IsExportEquals && node.Flags&ast.NodeFlagsAmbient == 0 { + c.error(node, diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled) + } container := node.Parent if !ast.IsSourceFile(container) { container = container.Parent @@ -5264,7 +5322,7 @@ func (c *Checker) checkExportAssignment(node *ast.Node) { if !c.checkGrammarModifiers(node) && ast.IsExportAssignment(node) && node.AsExportAssignment().Modifiers() != nil { c.grammarErrorOnFirstToken(node, diagnostics.An_export_assignment_cannot_have_modifiers) } - isIllegalExportDefaultInCJS := !isExportEquals && node.Flags&ast.NodeFlagsAmbient == 0 && c.compilerOptions.VerbatimModuleSyntax.IsTrue() && c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS + isIllegalExportDefaultInCJS := !isExportEquals && node.Flags&ast.NodeFlagsAmbient == 0 && c.compilerOptions.VerbatimModuleSyntax.IsTrue() && c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS if ast.IsIdentifier(node.Expression()) { id := node.Expression() sym := c.getExportSymbolOfValueSymbolIfExported(c.resolveEntityName(id, ast.SymbolFlagsAll, true /*ignoreErrors*/, true /*dontResolveAlias*/, node)) @@ -5324,7 +5382,7 @@ func (c *Checker) checkExportAssignment(node *ast.Node) { } if isExportEquals { // Forbid export= in esm implementation files, and esm mode declaration files - if c.moduleKind >= core.ModuleKindES2015 && c.moduleKind != core.ModuleKindPreserve && ((node.Flags&ast.NodeFlagsAmbient != 0 && c.getImpliedNodeFormatForEmit(ast.GetSourceFileOfNode(node)) == core.ModuleKindESNext) || (node.Flags&ast.NodeFlagsAmbient == 0 && c.getImpliedNodeFormatForEmit(ast.GetSourceFileOfNode(node)) != core.ModuleKindCommonJS)) { + if c.moduleKind >= core.ModuleKindES2015 && c.moduleKind != core.ModuleKindPreserve && ((node.Flags&ast.NodeFlagsAmbient != 0 && c.program.GetImpliedNodeFormatForEmit(ast.GetSourceFileOfNode(node)) == core.ModuleKindESNext) || (node.Flags&ast.NodeFlagsAmbient == 0 && c.program.GetImpliedNodeFormatForEmit(ast.GetSourceFileOfNode(node)) != core.ModuleKindCommonJS)) { // export assignment is not supported in es6 modules c.grammarErrorOnNode(node, diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead) } else if c.moduleKind == core.ModuleKindSystem && node.Flags&ast.NodeFlagsAmbient == 0 { @@ -5620,7 +5678,7 @@ func (c *Checker) checkVarDeclaredNamesNotShadowed(node *ast.Node) { localDeclarationSymbol := c.resolveName(node, name.Text(), ast.SymbolFlagsVariable, nil /*nameNotFoundMessage*/, false /*isUse*/, false) if localDeclarationSymbol != nil && localDeclarationSymbol != symbol && localDeclarationSymbol.Flags&ast.SymbolFlagsBlockScopedVariable != 0 { if c.getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol)&ast.NodeFlagsBlockScoped != 0 { - varDeclList := getAncestor(localDeclarationSymbol.ValueDeclaration, ast.KindVariableDeclarationList) + varDeclList := ast.FindAncestorKind(localDeclarationSymbol.ValueDeclaration, ast.KindVariableDeclarationList) var container *ast.Node if ast.IsVariableStatement(varDeclList.Parent) && varDeclList.Parent.Parent != nil { container = varDeclList.Parent.Parent @@ -5643,7 +5701,7 @@ func (c *Checker) checkVarDeclaredNamesNotShadowed(node *ast.Node) { func (c *Checker) checkDecorators(node *ast.Node) { // skip this check for nodes that cannot have decorators. These should have already had an error reported by // checkGrammarModifiers. - if !ast.CanHaveDecorators(node) || !hasDecorators(node) || !nodeCanBeDecorated(c.legacyDecorators, node, node.Parent, node.Parent.Parent) { + if !ast.CanHaveDecorators(node) || !ast.HasDecorators(node) || !nodeCanBeDecorated(c.legacyDecorators, node, node.Parent, node.Parent.Parent) { return } firstDecorator := core.Find(node.ModifierNodes(), ast.IsDecorator) @@ -5871,18 +5929,26 @@ func (c *Checker) getIterationTypesOfIterable(t *Type, use IterationUse, errorNo if IsTypeAny(t) { return IterationTypes{c.anyType, c.anyType, c.anyType} } - key := IterationTypesKey{typeId: t.id, use: use&IterationUseCacheFlags | core.IfElse(errorNode != nil, IterationUseReportError, 0)} + key := IterationTypesKey{typeId: t.id, use: use & IterationUseCacheFlags} + // If we are reporting errors and encounter a cached `noIterationTypes`, we should ignore the cached value and continue as if nothing was cached. + // In addition, we should not cache any new results for this call. + noCache := false if cached, ok := c.iterationTypesCache[key]; ok { - return cached + if errorNode == nil || cached.hasTypes() { + return cached + } + noCache = true + } + result := c.getIterationTypesOfIterableWorker(t, use, errorNode, noCache) + if !noCache { + c.iterationTypesCache[key] = result } - result := c.getIterationTypesOfIterableWorker(t, use, errorNode) - c.iterationTypesCache[key] = result return result } -func (c *Checker) getIterationTypesOfIterableWorker(t *Type, use IterationUse, errorNode *ast.Node) IterationTypes { +func (c *Checker) getIterationTypesOfIterableWorker(t *Type, use IterationUse, errorNode *ast.Node, noCache bool) IterationTypes { if t.flags&TypeFlagsUnion != 0 { - return c.combineIterationTypes(core.Map(t.Types(), func(t *Type) IterationTypes { return c.getIterationTypesOfIterableWorker(t, use, errorNode) })) + return c.combineIterationTypes(core.Map(t.Types(), func(t *Type) IterationTypes { return c.getIterationTypesOfIterableWorker(t, use, errorNode, noCache) })) } if use&IterationUseAllowsAsyncIterablesFlag != 0 { iterationTypes := c.getIterationTypesOfIterableFast(t, c.asyncIterationTypesResolver) @@ -6036,10 +6102,17 @@ func (c *Checker) getIterationTypesOfIterableSlow(t *Type, r *IterationTypesReso if IsTypeAny(methodType) { return IterationTypes{c.anyType, c.anyType, c.anyType} } - if signatures := c.getSignaturesOfType(methodType, SignatureKindCall); len(signatures) != 0 { - iteratorType := c.getIntersectionType(core.Map(signatures, c.getReturnTypeOfSignature)) + allSignatures := c.getSignaturesOfType(methodType, SignatureKindCall) + validSignatures := core.Filter(allSignatures, func(sig *Signature) bool { + return c.getMinArgumentCount(sig) == 0 + }) + if len(validSignatures) != 0 { + iteratorType := c.getIntersectionType(core.Map(validSignatures, c.getReturnTypeOfSignature)) return c.getIterationTypesOfIteratorWorker(iteratorType, r, errorNode, diagnosticOutput) } + if errorNode != nil && len(allSignatures) != 0 { + c.checkTypeAssignableTo(t, r.getGlobalIterableTypeChecked(), errorNode, nil) + } } return IterationTypes{} } @@ -6355,7 +6428,7 @@ func (c *Checker) checkAliasSymbol(node *ast.Node) { name := node.PropertyNameOrName().Text() c.addTypeOnlyDeclarationRelatedInfo(c.error(node, message, name), core.IfElse(isType, nil, typeOnlyAlias), name) } - if isType && node.Kind == ast.KindImportEqualsDeclaration && hasModifier(node, ast.ModifierFlagsExport) { + if isType && node.Kind == ast.KindImportEqualsDeclaration && HasModifier(node, ast.ModifierFlagsExport) { c.error(node, diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, c.getIsolatedModulesLikeFlagName()) } case ast.KindExportSpecifier: @@ -6374,9 +6447,9 @@ func (c *Checker) checkAliasSymbol(node *ast.Node) { } } } - if c.compilerOptions.VerbatimModuleSyntax.IsTrue() && !ast.IsImportEqualsDeclaration(node) && !ast.IsVariableDeclarationInitializedToRequire(node) && c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { + if c.compilerOptions.VerbatimModuleSyntax.IsTrue() && !ast.IsImportEqualsDeclaration(node) && !ast.IsVariableDeclarationInitializedToRequire(node) && c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { c.error(node, diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled) - } else if c.moduleKind == core.ModuleKindPreserve && !ast.IsImportEqualsDeclaration(node) && !ast.IsVariableDeclaration(node) && c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { + } else if c.moduleKind == core.ModuleKindPreserve && !ast.IsImportEqualsDeclaration(node) && !ast.IsVariableDeclaration(node) && c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { // In `--module preserve`, ESM input syntax emits ESM output syntax, but there will be times // when we look at the `impliedNodeFormat` of this file and decide it's CommonJS (i.e., currently, // only if the file extension is .cjs/.cts). To avoid that inconsistency, we disallow ESM syntax @@ -6417,6 +6490,9 @@ func (c *Checker) checkTypeAliasDeclaration(node *ast.Node) { // Grammar checking c.checkGrammarModifiers(node) c.checkTypeNameIsReserved(node.Name(), diagnostics.Type_alias_name_cannot_be_0) + if !c.containerAllowsBlockScopedVariable(node.Parent) { + c.grammarErrorOnNode(node, diagnostics.X_0_declarations_can_only_be_declared_inside_a_block, "type") + } c.checkExportsOnMergedDeclarations(node) typeNode := node.AsTypeAliasDeclaration().Type @@ -6642,7 +6718,7 @@ func (c *Checker) checkUnusedClassMembers(node *ast.Node) { break // Already would have reported an error on the getter. } symbol := c.getSymbolOfDeclaration(member) - if !c.isReferenced(symbol) && (hasModifier(member, ast.ModifierFlagsPrivate) || member.Name() != nil && ast.IsPrivateIdentifier(member.Name())) && member.Flags&ast.NodeFlagsAmbient == 0 { + if !c.isReferenced(symbol) && (HasModifier(member, ast.ModifierFlagsPrivate) || member.Name() != nil && ast.IsPrivateIdentifier(member.Name())) && member.Flags&ast.NodeFlagsAmbient == 0 { c.reportUnused(member, UnusedKindLocal, NewDiagnosticForNode(member.Name(), diagnostics.X_0_is_declared_but_its_value_is_never_read, c.symbolToString(symbol))) } case ast.KindConstructor: @@ -7710,7 +7786,7 @@ func (c *Checker) createArrayLiteralType(t *Type) *Type { func isSpreadIntoCallOrNew(node *ast.Node) bool { parent := ast.WalkUpParenthesizedExpressions(node.Parent) - return ast.IsSpreadElement(parent) && isCallOrNewExpression(parent.Parent) + return ast.IsSpreadElement(parent) && ast.IsCallOrNewExpression(parent.Parent) } func (c *Checker) checkQualifiedName(node *ast.Node, checkMode CheckMode) *Type { @@ -7950,7 +8026,7 @@ func (c *Checker) checkDeprecatedSignature(sig *Signature, node *ast.Node) { } if sig.declaration != nil && sig.declaration.Flags&ast.NodeFlagsDeprecated != 0 { suggestionNode := c.getDeprecatedSuggestionNode(node) - name := tryGetPropertyAccessOrIdentifierToString(getInvokedExpression(node)) + name := tryGetPropertyAccessOrIdentifierToString(ast.GetInvokedExpression(node)) c.addDeprecatedSuggestionWithSignature(suggestionNode, sig.declaration, name, c.signatureToString(sig)) } } @@ -8043,7 +8119,7 @@ func (c *Checker) resolveSignature(node *ast.Node, candidatesOutArray *[]*Signat return c.resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode) case ast.KindDecorator: return c.resolveDecorator(node, candidatesOutArray, checkMode) - case ast.KindJsxOpeningElement, ast.KindJsxSelfClosingElement: + case ast.KindJsxOpeningFragment, ast.KindJsxOpeningElement, ast.KindJsxSelfClosingElement: return c.resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) case ast.KindBinaryExpression: return c.resolveInstanceofExpression(node, candidatesOutArray, checkMode) @@ -8197,7 +8273,7 @@ func (c *Checker) resolveNewExpression(node *ast.Node, candidatesOutArray *[]*Si } if expressionType.symbol != nil { valueDecl := ast.GetClassLikeDeclarationOfSymbol(expressionType.symbol) - if valueDecl != nil && hasModifier(valueDecl, ast.ModifierFlagsAbstract) { + if valueDecl != nil && HasModifier(valueDecl, ast.ModifierFlagsAbstract) { c.error(node, diagnostics.Cannot_create_an_instance_of_an_abstract_class) return c.resolveErrorCall(node) } @@ -8421,7 +8497,7 @@ func (c *Checker) resolveCall(node *ast.Node, signatures []*Signature, candidate reportErrors := !c.isInferencePartiallyBlocked && candidatesOutArray == nil var s CallState s.node = node - if !isDecorator && !isInstanceof && !isSuperCall(node) { + if !isDecorator && !isInstanceof && !isSuperCall(node) && !ast.IsJsxOpeningFragment(node) { s.typeArguments = node.TypeArguments() // We already perform checking on the type arguments on the class declaration itself. if isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.Expression().Kind != ast.KindSuperKeyword { @@ -8515,7 +8591,7 @@ func (c *Checker) resolveCall(node *ast.Node, signatures []*Signature, candidate if headMessage == nil && isInstanceof { headMessage = diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method } - c.reportCallResolutionErrors(&s, signatures, headMessage) + c.reportCallResolutionErrors(node, &s, signatures, headMessage) } return result } @@ -8697,6 +8773,9 @@ func (c *Checker) getImplementationSignature(signature *Signature) *Signature { } func (c *Checker) hasCorrectArity(node *ast.Node, args []*ast.Node, signature *Signature, signatureHelpTrailingComma bool) bool { + if ast.IsJsxOpeningFragment(node) { + return true + } var argCount int callIsIncomplete := false // In incomplete call we want to be lenient when we have too few arguments @@ -8842,8 +8921,8 @@ func (c *Checker) checkTypeArguments(signature *Signature, typeArgumentNodes []* } func (c *Checker) isSignatureApplicable(node *ast.Node, args []*ast.Node, signature *Signature, relation *Relation, checkMode CheckMode, reportErrors bool, inferenceContext *InferenceContext, diagnosticOutput *[]*ast.Diagnostic) bool { - if ast.IsJsxOpeningLikeElement(node) { - return c.checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors, diagnosticOutput) + if ast.IsJsxCallLike(node) { + return c.checkApplicableSignatureForJsxCallLikeElement(node, signature, relation, checkMode, reportErrors, diagnosticOutput) } thisType := c.getThisTypeOfSignature(signature) if thisType != nil && thisType != c.voidType && !(ast.IsNewExpression(node) || ast.IsCallExpression(node) && isSuperProperty(node.Expression())) { @@ -9237,7 +9316,7 @@ func (c *Checker) tryGetRestTypeOfSignature(signature *Signature) *Type { return c.getIndexTypeOfType(restType, c.numberType) } -func (c *Checker) reportCallResolutionErrors(s *CallState, signatures []*Signature, headMessage *diagnostics.Message) { +func (c *Checker) reportCallResolutionErrors(node *ast.Node, s *CallState, signatures []*Signature, headMessage *diagnostics.Message) { switch { case len(s.candidatesForArgumentError) != 0: last := s.candidatesForArgumentError[len(s.candidatesForArgumentError)-1] @@ -9261,7 +9340,7 @@ func (c *Checker) reportCallResolutionErrors(s *CallState, signatures []*Signatu c.diagnostics.Add(c.getArgumentArityError(s.node, []*Signature{s.candidateForArgumentArityError}, s.args, headMessage)) case s.candidateForTypeArgumentError != nil: c.checkTypeArguments(s.candidateForTypeArgumentError, s.node.TypeArguments(), true /*reportErrors*/, headMessage) - default: + case !ast.IsJsxOpeningFragment(node): signaturesWithCorrectTypeArgumentArity := core.Filter(signatures, func(sig *Signature) bool { return c.hasCorrectTypeArgumentArity(sig, s.typeArguments) }) @@ -9740,13 +9819,7 @@ func (c *Checker) checkFunctionExpressionOrObjectLiteralMethodDeferred(node *ast if returnType != nil { returnOrPromisedType := c.unwrapReturnType(returnType, functionFlags) if returnOrPromisedType != nil { - effectiveCheckNode := c.getEffectiveCheckNode(body) - if (functionFlags & FunctionFlagsAsyncGenerator) == FunctionFlagsAsync { - awaitedType := c.checkAwaitedType(exprType, false /*withAlias*/, effectiveCheckNode, diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member) - c.checkTypeAssignableToAndOptionallyElaborate(awaitedType, returnOrPromisedType, effectiveCheckNode, effectiveCheckNode, nil, nil) - } else { - c.checkTypeAssignableToAndOptionallyElaborate(exprType, returnOrPromisedType, effectiveCheckNode, effectiveCheckNode, nil, nil) - } + c.checkReturnExpression(node, returnOrPromisedType, body, body, exprType, false) } } } @@ -9965,7 +10038,7 @@ func (c *Checker) checkCollisionsForDeclarationName(node *ast.Node, name *ast.No func (c *Checker) checkCollisionWithRequireExportsInGeneratedCode(node *ast.Node, name *ast.Node) { // No need to check for require or exports for ES6 modules and later - if c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) >= core.ModuleKindES2015 { + if c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) >= core.ModuleKindES2015 { return } if name == nil || !c.needCollisionCheckForIdentifier(node, name, "require") && !c.needCollisionCheckForIdentifier(node, name, "exports") { @@ -10175,13 +10248,13 @@ func (c *Checker) checkNewTargetMetaProperty(node *ast.Node) *Type { } func (c *Checker) checkImportMetaProperty(node *ast.Node) *Type { - if c.moduleKind == core.ModuleKindNode16 || c.moduleKind == core.ModuleKindNodeNext { - sourceFileMetaData := ast.GetSourceFileOfNode(node).Metadata + if core.ModuleKindNode16 <= c.moduleKind && c.moduleKind <= core.ModuleKindNodeNext { + sourceFileMetaData := c.program.GetSourceFileMetaData(ast.GetSourceFileOfNode(node).Path()) if sourceFileMetaData == nil || sourceFileMetaData.ImpliedNodeFormat != core.ModuleKindESNext { c.error(node, diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output) } } else if c.moduleKind < core.ModuleKindES2020 && c.moduleKind != core.ModuleKindSystem { - c.error(node, diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext) + c.error(node, diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_or_nodenext) } // file := ast.GetSourceFileOfNode(node) // Debug.assert(file.Flags&ast.NodeFlagsPossiblyContainsImportMeta != 0, "Containing file is missing import meta node flag.") @@ -10832,7 +10905,7 @@ func (c *Checker) isMethodAccessForCall(node *ast.Node) bool { for ast.IsParenthesizedExpression(node.Parent) { node = node.Parent } - return isCallOrNewExpression(node.Parent) && node.Parent.Expression() == node + return ast.IsCallOrNewExpression(node.Parent) && node.Parent.Expression() == node } // Lookup the private identifier lexically. @@ -11048,7 +11121,7 @@ func (c *Checker) isUncalledFunctionReference(node *ast.Node, symbol *ast.Symbol parent = node.Parent } if ast.IsCallLikeExpression(parent) { - return isCallOrNewExpression(parent) && ast.IsIdentifier(node) && c.hasMatchingArgument(parent, node) + return ast.IsCallOrNewExpression(parent) && ast.IsIdentifier(node) && c.hasMatchingArgument(parent, node) } return core.Every(symbol.Declarations, func(d *ast.Node) bool { return !ast.IsFunctionLike(d) || c.IsDeprecatedDeclaration(d) @@ -11604,7 +11677,7 @@ func (c *Checker) getThisTypeOfDeclaration(declaration *ast.Node) *Type { func (c *Checker) checkThisInStaticClassFieldInitializerInDecoratedClass(thisExpression *ast.Node, container *ast.Node) { if ast.IsPropertyDeclaration(container) && ast.HasStaticModifier(container) && c.legacyDecorators { initializer := container.Initializer() - if initializer != nil && initializer.Loc.ContainsInclusive(thisExpression.Pos()) && hasDecorators(container.Parent) { + if initializer != nil && initializer.Loc.ContainsInclusive(thisExpression.Pos()) && ast.HasDecorators(container.Parent) { c.error(thisExpression, diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class) } } @@ -11635,6 +11708,11 @@ func (c *Checker) classDeclarationExtendsNull(classDecl *ast.Node) bool { } func (c *Checker) checkAssertion(node *ast.Node, checkMode CheckMode) *Type { + if node.Kind == ast.KindTypeAssertionExpression { + if c.compilerOptions.ErasableSyntaxOnly.IsTrue() { + c.diagnostics.Add(ast.NewDiagnostic(ast.GetSourceFileOfNode(node), core.NewTextRange(scanner.SkipTrivia(ast.GetSourceFileOfNode(node).Text(), node.Pos()), node.Expression().Pos()), diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled)) + } + } typeNode := node.Type() exprType := c.checkExpressionEx(node.Expression(), checkMode) if isConstTypeReference(typeNode) { @@ -12261,7 +12339,9 @@ func (c *Checker) getSyntacticNullishnessSemantics(node *ast.Node) PredicateSema switch node.Kind { case ast.KindAwaitExpression, ast.KindCallExpression, + ast.KindTaggedTemplateExpression, ast.KindElementAccessExpression, + ast.KindMetaProperty, ast.KindNewExpression, ast.KindPropertyAccessExpression, ast.KindYieldExpression, @@ -12279,6 +12359,8 @@ func (c *Checker) getSyntacticNullishnessSemantics(node *ast.Node) PredicateSema ast.KindAmpersandAmpersandToken, ast.KindAmpersandAmpersandEqualsToken: return PredicateSemanticsSometimes + case ast.KindCommaToken: + return c.getSyntacticNullishnessSemantics(node.AsBinaryExpression().Right) } return PredicateSemanticsNever case ast.KindConditionalExpression: @@ -14005,7 +14087,7 @@ func (c *Checker) canHaveSyntheticDefault(file *ast.Node, moduleSymbol *ast.Symb usageMode = c.getEmitSyntaxForModuleSpecifierExpression(usage) } if file != nil && usageMode != core.ModuleKindNone { - targetMode := c.getImpliedNodeFormatForEmit(file.AsSourceFile()) + targetMode := c.program.GetImpliedNodeFormatForEmit(file.AsSourceFile()) if usageMode == core.ModuleKindESNext && targetMode == core.ModuleKindCommonJS && core.ModuleKindNode16 <= c.moduleKind && c.moduleKind <= core.ModuleKindNodeNext { // In Node.js, CommonJS modules always have a synthetic default when imported into ESM return true @@ -14048,10 +14130,9 @@ func (c *Checker) canHaveSyntheticDefault(file *ast.Node, moduleSymbol *ast.Symb } func (c *Checker) getEmitSyntaxForModuleSpecifierExpression(usage *ast.Node) core.ResolutionMode { - // !!! - // if isStringLiteralLike(usage) { - // return host.getEmitSyntaxForUsageLocation(ast.GetSourceFileOfNode(usage), usage) - // } + if ast.IsStringLiteralLike(usage) { + return c.program.GetEmitSyntaxForUsageLocation(ast.GetSourceFileOfNode(usage), usage) + } return core.ModuleKindNone } @@ -14176,7 +14257,7 @@ func (c *Checker) getTargetOfAliasLikeExpression(expression *ast.Node, dontResol } func (c *Checker) getTargetOfNamespaceExportDeclaration(node *ast.Node, dontResolveAlias bool) *ast.Symbol { - if canHaveSymbol(node.Parent) { + if ast.CanHaveSymbol(node.Parent) { resolved := c.resolveExternalModuleSymbol(node.Parent.Symbol(), dontResolveAlias) c.markSymbolOfAliasDeclarationIfTypeOnly(node, nil /*immediateTarget*/, resolved, false /*overwriteEmpty*/, nil, "") return resolved @@ -14363,7 +14444,7 @@ func (c *Checker) resolveExternalModule(location *ast.Node, moduleReference stri var sourceFile *ast.SourceFile resolvedModule := c.program.GetResolvedModule(importingSourceFile, moduleReference, mode) - if resolvedModule != nil && resolvedModule.IsResolved() { + if resolvedModule.IsResolved() { sourceFile = c.program.GetSourceFile(resolvedModule.ResolvedFileName) } @@ -14402,7 +14483,7 @@ func (c *Checker) resolveExternalModule(location *ast.Node, moduleReference stri if resolvedModule.IsExternalLibraryImport && !(tspath.ExtensionIsTs(resolvedModule.Extension) || resolvedModule.Extension == tspath.ExtensionJson) { c.errorOnImplicitAnyModule(false /*isError*/, errorNode, mode, resolvedModule, moduleReference) } - if c.moduleResolutionKind == core.ModuleResolutionKindNode16 || c.moduleResolutionKind == core.ModuleResolutionKindNodeNext { + if c.moduleKind == core.ModuleKindNode16 || c.moduleKind == core.ModuleKindNode18 { isSyncImport := c.program.GetDefaultResolutionModeForFile(importingSourceFile) == core.ModuleKindCommonJS && ast.FindAncestor(location, ast.IsImportCall) == nil || ast.FindAncestor(location, ast.IsImportEqualsDeclaration) != nil overrideHost := ast.FindAncestor(location, ast.IsResolutionModeOverrideHost) @@ -14455,7 +14536,7 @@ func (c *Checker) resolveExternalModule(location *ast.Node, moduleReference stri return nil } - if resolvedModule != nil && resolvedModule.IsResolved() && !(tspath.ExtensionIsTs(resolvedModule.Extension) || resolvedModule.Extension == tspath.ExtensionJson) { + if resolvedModule.IsResolved() && !(tspath.ExtensionIsTs(resolvedModule.Extension) || resolvedModule.Extension == tspath.ExtensionJson) { if isForAugmentation { c.error( errorNode, @@ -14580,7 +14661,7 @@ func (c *Checker) createModuleNotFoundChain(resolvedModule *module.ResolvedModul func (c *Checker) createModeMismatchDetails(sourceFile *ast.SourceFile, errorNode *ast.Node) *ast.Diagnostic { ext := tspath.TryGetExtensionFromPath(sourceFile.FileName()) targetExt := core.IfElse(ext == tspath.ExtensionTs, tspath.ExtensionMts, core.IfElse(ext == tspath.ExtensionJs, tspath.ExtensionMjs, "")) - meta := sourceFile.Metadata + meta := c.program.GetSourceFileMetaData(sourceFile.Path()) packageJsonType := meta.PackageJsonType packageJsonDirectory := meta.PackageJsonDirectory var result *ast.Diagnostic @@ -15154,7 +15235,7 @@ type ExportCollisionTable = map[string]*ExportCollision func (c *Checker) getExportsOfModuleWorker(moduleSymbol *ast.Symbol) (exports ast.SymbolTable, typeOnlyExportStarMap map[string]*ast.Node) { var visitedSymbols []*ast.Symbol - var nonTypeOnlyNames core.Set[string] + nonTypeOnlyNames := core.NewSetWithSizeHint[string](len(moduleSymbol.Exports)) // The ES6 spec permits export * declarations in a module to circularly reference the module itself. For example, // module 'a' can 'export * from "b"' and 'b' can 'export * from "a"' without error. var visit func(*ast.Symbol, *ast.Node, bool) ast.SymbolTable @@ -17197,6 +17278,9 @@ func (c *Checker) reportImplicitAny(declaration *ast.Node, t *Type, wideningKind switch { case !c.noImplicitAny: diagnostic = diagnostics.X_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage + case declaration.Flags&ast.NodeFlagsReparsed != 0: + c.error(declaration, diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString) + return case wideningKind == WideningKindGeneratorYield: diagnostic = diagnostics.X_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type default: @@ -17376,7 +17460,7 @@ func (c *Checker) getTypeOfAccessors(symbol *ast.Symbol) *Type { t = c.getReturnTypeFromBody(getter, CheckModeNormal) } } - if t == nil && accessor != nil && accessor.Initializer() != nil { + if t == nil && accessor != nil { t = c.getWidenedTypeForVariableLikeDeclaration(accessor, true /*reportErrors*/) } if t == nil { @@ -18487,7 +18571,7 @@ func (c *Checker) getIndexInfosOfIndexSymbol(indexSymbol *ast.Symbol, siblingSym } forEachType(c.getTypeFromTypeNode(typeNode), func(keyType *Type) { if c.isValidIndexKeyType(keyType) && findIndexInfo(indexInfos, keyType) == nil { - indexInfo := c.newIndexInfo(keyType, valueType, hasModifier(declaration, ast.ModifierFlagsReadonly), declaration) + indexInfo := c.newIndexInfo(keyType, valueType, HasModifier(declaration, ast.ModifierFlagsReadonly), declaration) indexInfos = append(indexInfos, indexInfo) } }) @@ -18639,7 +18723,8 @@ func (c *Checker) getSignaturesOfSymbol(symbol *ast.Symbol) []*Signature { // precedes the implementation node (i.e. has the same parent and ends where the implementation starts). if i > 0 && decl.Body() != nil { previous := symbol.Declarations[i-1] - if decl.Parent == previous.Parent && decl.Kind == previous.Kind && decl.Pos() == previous.End() { + if decl.Parent == previous.Parent && decl.Kind == previous.Kind && + (decl.Pos() == previous.End() || previous.Flags&ast.NodeFlagsReparsed != 0) { continue } } @@ -21666,7 +21751,7 @@ func (c *Checker) getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node *as if links.resolvedType == nil { // Deferred resolution of members is handled by resolveObjectTypeMembers alias := c.getAliasForTypeNode(node) - if len(c.getMembersOfSymbol(node.Symbol())) == 0 && alias == nil { + if sym := node.Symbol(); sym == nil || len(c.getMembersOfSymbol(sym)) == 0 && alias == nil { links.resolvedType = c.emptyTypeLiteralType } else { t := c.newObjectType(ObjectFlagsAnonymous, node.Symbol()) @@ -25864,7 +25949,7 @@ func (c *Checker) isAssignmentToReadonlyEntity(expr *ast.Node, symbol *ast.Symbo // Allow assignments to readonly properties within constructors of the same class declaration. if symbol.Flags&ast.SymbolFlagsProperty != 0 && ast.IsAccessExpression(expr) && expr.Expression().Kind == ast.KindThisKeyword { // Look for if this is the constructor for the class that `symbol` is a property of. - ctor := getContainingFunction(expr) + ctor := c.getControlFlowContainer(expr) if ctor == nil || !ast.IsConstructorDeclaration(ctor) { return true } @@ -26250,7 +26335,7 @@ func (c *Checker) markPropertyAsReferenced(prop *ast.Symbol, nodeForCheckWriteOn if prop.Flags&ast.SymbolFlagsClassMember == 0 || prop.ValueDeclaration == nil { return } - hasPrivateModifier := hasModifier(prop.ValueDeclaration, ast.ModifierFlagsPrivate) + hasPrivateModifier := HasModifier(prop.ValueDeclaration, ast.ModifierFlagsPrivate) hasPrivateIdentifier := prop.ValueDeclaration.Name() != nil && ast.IsPrivateIdentifier(prop.ValueDeclaration.Name()) if !hasPrivateModifier && !hasPrivateIdentifier { return @@ -26272,18 +26357,6 @@ func (c *Checker) markPropertyAsReferenced(prop *ast.Symbol, nodeForCheckWriteOn c.symbolReferenceLinks.Get(target).referenceKinds |= ast.SymbolFlagsAll } -func (c *Checker) GetExpandedParameters(signature *Signature /* !!! skipUnionExpanding */) []*ast.Symbol { - if signatureHasRestParameter(signature) { - restIndex := len(signature.parameters) - 1 - restSymbol := signature.parameters[restIndex] - restType := c.getTypeOfSymbol(restSymbol) - if isTupleType(restType) { - return c.expandSignatureParametersWithTupleMembers(signature, restType.AsTypeReference(), restIndex, restSymbol) - } - } - return signature.parameters -} - func (c *Checker) expandSignatureParametersWithTupleMembers(signature *Signature, restType *TypeReference, restIndex int, restSymbol *ast.Symbol) []*ast.Symbol { elementTypes := c.getTypeArguments(restType.AsType()) elementInfos := restType.TargetTupleType().elementInfos @@ -26780,7 +26853,7 @@ func (c *Checker) markLinkedReferences(location *ast.Node, hint ReferenceHint, p if !c.compilerOptions.EmitDecoratorMetadata.IsTrue() { return } - if !ast.CanHaveDecorators(location) || !hasDecorators(location) || location.Modifiers() == nil || !nodeCanBeDecorated(c.legacyDecorators, location, location.Parent, location.Parent.Parent) { + if !ast.CanHaveDecorators(location) || !ast.HasDecorators(location) || location.Modifiers() == nil || !nodeCanBeDecorated(c.legacyDecorators, location, location.Parent, location.Parent.Parent) { return } @@ -26930,10 +27003,15 @@ func (c *Checker) markJsxAliasReferenced(node *ast.Node /*JsxOpeningLikeElement if ast.IsJsxOpeningLikeElement(node) { jsxFactoryLocation = node.TagName() } - // allow null as jsxFragmentFactory + shouldFactoryRefErr := c.compilerOptions.Jsx != core.JsxEmitPreserve && c.compilerOptions.Jsx != core.JsxEmitReactNative + // #38720/60122, allow null as jsxFragmentFactory var jsxFactorySym *ast.Symbol if !(ast.IsJsxOpeningFragment(node) && jsxFactoryNamespace == "null") { - jsxFactorySym = c.resolveName(jsxFactoryLocation, jsxFactoryNamespace, ast.SymbolFlagsValue, jsxFactoryRefErr, true /*isUse*/, false /*excludeGlobals*/) + flags := ast.SymbolFlagsValue + if !shouldFactoryRefErr { + flags &= ^ast.SymbolFlagsEnum + } + jsxFactorySym = c.resolveName(jsxFactoryLocation, jsxFactoryNamespace, flags, jsxFactoryRefErr, true /*isUse*/, false /*excludeGlobals*/) } if jsxFactorySym != nil { // Mark local symbol as referenced here because it might not have been marked @@ -26944,12 +27022,17 @@ func (c *Checker) markJsxAliasReferenced(node *ast.Node /*JsxOpeningLikeElement c.markAliasSymbolAsReferenced(jsxFactorySym) } } - // For JsxFragment, mark jsx pragma as referenced via resolveName + // if JsxFragment, additionally mark jsx pragma as referenced, since `getJsxNamespace` above would have resolved to only the fragment factory if they are distinct if ast.IsJsxOpeningFragment(node) { file := ast.GetSourceFileOfNode(node) - localJsxNamespace := c.getLocalJsxNamespace(file) - if localJsxNamespace != "" { - c.resolveName(jsxFactoryLocation, localJsxNamespace, ast.SymbolFlagsValue, jsxFactoryRefErr, true /*isUse*/, false /*excludeGlobals*/) + entity := c.getJsxFactoryEntity(file.AsNode()) + if entity != nil { + localJsxNamespace := ast.GetFirstIdentifier(entity).Text() + flags := ast.SymbolFlagsValue + if !shouldFactoryRefErr { + flags &= ^ast.SymbolFlagsEnum + } + c.resolveName(jsxFactoryLocation, localJsxNamespace, flags, jsxFactoryRefErr, true /*isUse*/, false /*excludeGlobals*/) } } } @@ -27569,7 +27652,7 @@ func (c *Checker) getContextualType(node *ast.Node, contextFlags ContextFlags) * return c.getContextualType(parent.Parent, contextFlags) case ast.KindArrayLiteralExpression: t := c.getApparentTypeOfContextualType(parent, contextFlags) - elementIndex := indexOfNode(parent.AsArrayLiteralExpression().Elements.Nodes, node) + elementIndex := ast.IndexOfNode(parent.AsArrayLiteralExpression().Elements.Nodes, node) firstSpreadIndex, lastSpreadIndex := c.getSpreadIndices(parent) return c.getContextualTypeForElementExpression(t, elementIndex, len(parent.AsArrayLiteralExpression().Elements.Nodes), firstSpreadIndex, lastSpreadIndex) case ast.KindConditionalExpression: @@ -28208,6 +28291,9 @@ func (c *Checker) getContextualImportAttributeType(node *ast.Node) *Type { // Returns the effective arguments for an expression that works like a function invocation. func (c *Checker) getEffectiveCallArguments(node *ast.Node) []*ast.Node { switch { + case ast.IsJsxOpeningFragment(node): + // This attributes Type does not include a children property yet, the same way a fragment created with does not at this stage + return []*ast.Node{c.createSyntheticExpression(node, c.emptyFreshJsxObjectType, false, nil)} case ast.IsTaggedTemplateExpression(node): template := node.AsTaggedTemplateExpression().Template firstArg := c.createSyntheticExpression(template, c.getGlobalTemplateStringsArrayType(), false, nil) @@ -29916,7 +30002,7 @@ func (c *Checker) getSymbolOfNameOrPropertyAccessExpression(name *ast.Node) *ast } } else if ast.IsEntityName(name) && isInRightSideOfImportOrExportAssignment(name) { // Since we already checked for ExportAssignment, this really could only be an Import - importEqualsDeclaration := getAncestor(name, ast.KindImportEqualsDeclaration) + importEqualsDeclaration := ast.FindAncestorKind(name, ast.KindImportEqualsDeclaration) if importEqualsDeclaration == nil { panic("ImportEqualsDeclaration should be defined") } @@ -30253,11 +30339,3 @@ func (c *Checker) GetEmitResolver(file *ast.SourceFile, skipDiagnostics bool) *e func (c *Checker) GetAliasedSymbol(symbol *ast.Symbol) *ast.Symbol { return c.resolveAlias(symbol) } - -func (c *Checker) getEmitModuleFormatOfFile(sourceFile *ast.SourceFile) core.ModuleKind { - return ast.GetEmitModuleFormatOfFileWorker(sourceFile, c.compilerOptions) -} - -func (c *Checker) getImpliedNodeFormatForEmit(sourceFile *ast.SourceFile) core.ResolutionMode { - return ast.GetImpliedNodeFormatForEmitWorker(sourceFile, c.compilerOptions.GetEmitModuleKind()) -} diff --git a/internal/checker/checker_test.go b/internal/checker/checker_test.go index 61d0fa6c39..31db5a9ee6 100644 --- a/internal/checker/checker_test.go +++ b/internal/checker/checker_test.go @@ -40,9 +40,11 @@ foo.bar;` parsed, errors := tsoptions.GetParsedCommandLineOfConfigFile("/tsconfig.json", &core.CompilerOptions{}, host, nil) assert.Equal(t, len(errors), 0, "Expected no errors in parsed command line") - host = compiler.NewCachedFSCompilerHost(parsed.CompilerOptions(), cd, fs, bundled.LibPath()) - p := compiler.NewProgramFromParsedCommandLine(parsed, host) + p := compiler.NewProgram(compiler.ProgramOptions{ + Config: parsed, + Host: host, + }) p.BindSourceFiles() c, done := p.GetTypeChecker(t.Context()) defer done() @@ -71,9 +73,10 @@ func TestCheckSrcCompiler(t *testing.T) { host := compiler.NewCompilerHost(nil, rootPath, fs, bundled.LibPath()) parsed, errors := tsoptions.GetParsedCommandLineOfConfigFile(tspath.CombinePaths(rootPath, "tsconfig.json"), &core.CompilerOptions{}, host, nil) assert.Equal(t, len(errors), 0, "Expected no errors in parsed command line") - host = compiler.NewCachedFSCompilerHost(parsed.CompilerOptions(), rootPath, fs, bundled.LibPath()) - - p := compiler.NewProgramFromParsedCommandLine(parsed, host) + p := compiler.NewProgram(compiler.ProgramOptions{ + Config: parsed, + Host: host, + }) p.CheckSourceFiles(t.Context()) } @@ -87,9 +90,10 @@ func BenchmarkNewChecker(b *testing.B) { host := compiler.NewCompilerHost(nil, rootPath, fs, bundled.LibPath()) parsed, errors := tsoptions.GetParsedCommandLineOfConfigFile(tspath.CombinePaths(rootPath, "tsconfig.json"), &core.CompilerOptions{}, host, nil) assert.Equal(b, len(errors), 0, "Expected no errors in parsed command line") - host = compiler.NewCachedFSCompilerHost(parsed.CompilerOptions(), rootPath, fs, bundled.LibPath()) - - p := compiler.NewProgramFromParsedCommandLine(parsed, host) + p := compiler.NewProgram(compiler.ProgramOptions{ + Config: parsed, + Host: host, + }) b.ReportAllocs() diff --git a/internal/checker/emitresolver.go b/internal/checker/emitresolver.go index b7015ca3e2..f083334d2d 100644 --- a/internal/checker/emitresolver.go +++ b/internal/checker/emitresolver.go @@ -952,8 +952,12 @@ func (r *emitResolver) CreateLateBoundIndexSignatures(emitContext *printer.EmitC // } node := requestNodeBuilder.IndexInfoToIndexSignatureDeclaration(info, enclosingDeclaration, flags, internalFlags, tracker) if node != nil && isStatic { + modNodes := []*ast.Node{emitContext.Factory.NewModifier(ast.KindStaticKeyword)} mods := node.Modifiers() - mods = emitContext.Factory.NewModifierList(append([]*ast.Node{emitContext.Factory.NewModifier(ast.KindStaticKeyword)}, mods.Nodes...)) + if mods != nil { + modNodes = append(modNodes, mods.Nodes...) + } + mods = emitContext.Factory.NewModifierList(modNodes) node = emitContext.Factory.UpdateIndexSignatureDeclaration( node.AsIndexSignatureDeclaration(), mods, diff --git a/internal/checker/exports.go b/internal/checker/exports.go index c9062f149e..52477ba12c 100644 --- a/internal/checker/exports.go +++ b/internal/checker/exports.go @@ -6,6 +6,10 @@ import ( "github.com/microsoft/typescript-go/internal/diagnostics" ) +func (c *Checker) GetStringType() *Type { + return c.stringType +} + func (c *Checker) GetUnknownSymbol() *ast.Symbol { return c.unknownSymbol } @@ -18,6 +22,10 @@ func (c *Checker) GetGlobalSymbol(name string, meaning ast.SymbolFlags, diagnost return c.getGlobalSymbol(name, meaning, diagnostic) } +func (c *Checker) GetMergedSymbol(symbol *ast.Symbol) *ast.Symbol { + return c.getMergedSymbol(symbol) +} + func (c *Checker) GetTypeFromTypeNode(node *ast.Node) *Type { return c.getTypeFromTypeNode(node) } @@ -30,6 +38,10 @@ func (c *Checker) GetPropertiesOfType(t *Type) []*ast.Symbol { return c.getPropertiesOfType(t) } +func (c *Checker) GetPropertyOfType(t *Type, name string) *ast.Symbol { + return c.getPropertyOfType(t, name) +} + func (c *Checker) TypeHasCallOrConstructSignatures(t *Type) bool { return c.typeHasCallOrConstructSignatures(t) } @@ -85,3 +97,35 @@ func (c *Checker) GetEffectiveDeclarationFlags(n *ast.Node, flagsToCheck ast.Mod func (c *Checker) GetBaseConstraintOfType(t *Type) *Type { return c.getBaseConstraintOfType(t) } + +func (c *Checker) GetTypePredicateOfSignature(sig *Signature) *TypePredicate { + return c.getTypePredicateOfSignature(sig) +} + +func IsTupleType(t *Type) bool { + return isTupleType(t) +} + +func (c *Checker) GetReturnTypeOfSignature(sig *Signature) *Type { + return c.getReturnTypeOfSignature(sig) +} + +func (c *Checker) HasEffectiveRestParameter(signature *Signature) bool { + return c.hasEffectiveRestParameter(signature) +} + +func (c *Checker) GetLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol *ast.Symbol) []*Type { + return c.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) +} + +func (c *Checker) GetContextualTypeForObjectLiteralElement(element *ast.Node, contextFlags ContextFlags) *Type { + return c.getContextualTypeForObjectLiteralElement(element, contextFlags) +} + +func (c *Checker) TypePredicateToString(t *TypePredicate) string { + return c.typePredicateToString(t) +} + +func (c *Checker) GetExpandedParameters(signature *Signature, skipUnionExpanding bool) [][]*ast.Symbol { + return c.getExpandedParameters(signature, skipUnionExpanding) +} diff --git a/internal/checker/flow.go b/internal/checker/flow.go index 4ef3469f75..b8e1841171 100644 --- a/internal/checker/flow.go +++ b/internal/checker/flow.go @@ -388,7 +388,7 @@ func (c *Checker) narrowType(f *FlowState, t *Type, expr *ast.Node, assumeTrue b return c.narrowTypeByTruthiness(f, t, expr, assumeTrue) case ast.KindCallExpression: return c.narrowTypeByCallExpression(f, t, expr, assumeTrue) - case ast.KindParenthesizedExpression, ast.KindNonNullExpression: + case ast.KindParenthesizedExpression, ast.KindNonNullExpression, ast.KindSatisfiesExpression: return c.narrowType(f, t, expr.Expression(), assumeTrue) case ast.KindBinaryExpression: return c.narrowTypeByBinaryExpression(f, t, expr.AsBinaryExpression(), assumeTrue) @@ -841,10 +841,13 @@ func (c *Checker) getNarrowedTypeWorker(t *Type, candidate *Type, assumeTrue boo return !c.isTypeDerivedFrom(t, candidate) }) } + if t.flags&TypeFlagsUnknown != 0 { + t = c.unknownUnionType + } trueType := c.getNarrowedType(t, candidate, true /*assumeTrue*/, false /*checkDerived*/) - return c.filterType(t, func(t *Type) bool { + return c.recombineUnknownType(c.filterType(t, func(t *Type) bool { return !c.isTypeSubsetOf(t, trueType) - }) + })) } if t.flags&TypeFlagsAnyOrUnknown != 0 { return candidate @@ -1572,7 +1575,7 @@ func (c *Checker) isMatchingReference(source *ast.Node, target *ast.Node) bool { return target.Kind == ast.KindThisKeyword case ast.KindSuperKeyword: return target.Kind == ast.KindSuperKeyword - case ast.KindNonNullExpression, ast.KindParenthesizedExpression: + case ast.KindNonNullExpression, ast.KindParenthesizedExpression, ast.KindSatisfiesExpression: return c.isMatchingReference(source.Expression(), target) case ast.KindPropertyAccessExpression, ast.KindElementAccessExpression: if sourcePropertyName, ok := c.getAccessedPropertyName(source); ok { @@ -1926,7 +1929,7 @@ func (c *Checker) computeExhaustiveSwitchStatement(node *ast.Node) bool { return c.getTypeFacts(t, notEqualFacts) == notEqualFacts }) } - t := c.checkExpressionCached(node.Expression()) + t := c.getBaseConstraintOrType(c.checkExpressionCached(node.Expression())) if !isLiteralType(t) { return false } diff --git a/internal/checker/grammarchecks.go b/internal/checker/grammarchecks.go index cf3d48ac8b..ff17ba9cd0 100644 --- a/internal/checker/grammarchecks.go +++ b/internal/checker/grammarchecks.go @@ -233,7 +233,7 @@ func (c *Checker) checkGrammarModifiers(node *ast.Node /*Union[HasModifiers, Has } } else if c.legacyDecorators && (node.Kind == ast.KindGetAccessor || node.Kind == ast.KindSetAccessor) { accessors := c.getAllAccessorDeclarationsForDeclaration(node) - if hasDecorators(accessors.firstAccessor) && node == accessors.secondAccessor { + if ast.HasDecorators(accessors.firstAccessor) && node == accessors.secondAccessor { return c.grammarErrorOnFirstToken(node, diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name) } } @@ -389,7 +389,7 @@ func (c *Checker) checkGrammarModifiers(node *ast.Node /*Union[HasModifiers, Has } flags |= ast.ModifierFlagsReadonly case ast.KindExportKeyword: - if c.compilerOptions.VerbatimModuleSyntax == core.TSTrue && node.Flags&ast.NodeFlagsAmbient == 0 && node.Kind != ast.KindTypeAliasDeclaration && node.Kind != ast.KindInterfaceDeclaration && node.Kind != ast.KindModuleDeclaration && node.Parent.Kind == ast.KindSourceFile && c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { + if c.compilerOptions.VerbatimModuleSyntax == core.TSTrue && node.Flags&ast.NodeFlagsAmbient == 0 && node.Kind != ast.KindTypeAliasDeclaration && node.Kind != ast.KindInterfaceDeclaration && node.Kind != ast.KindModuleDeclaration && node.Parent.Kind == ast.KindSourceFile && c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node)) == core.ModuleKindCommonJS { return c.grammarErrorOnNode(modifier, diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled) } if flags&ast.ModifierFlagsExport != 0 { @@ -1211,8 +1211,8 @@ func (c *Checker) checkGrammarForInOrForOfStatement(forInOrOfStatement *ast.ForI c.diagnostics.Add(createDiagnosticForNode(forInOrOfStatement.AwaitModifier, diagnostics.X_for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module)) } switch c.moduleKind { - case core.ModuleKindNode16, core.ModuleKindNodeNext: - sourceFileMetaData := sourceFile.Metadata + case core.ModuleKindNode16, core.ModuleKindNode18, core.ModuleKindNodeNext: + sourceFileMetaData := c.program.GetSourceFileMetaData(sourceFile.Path()) if sourceFileMetaData != nil && sourceFileMetaData.ImpliedNodeFormat == core.ModuleKindCommonJS { c.diagnostics.Add(createDiagnosticForNode(forInOrOfStatement.AwaitModifier, diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level)) break @@ -1227,7 +1227,7 @@ func (c *Checker) checkGrammarForInOrForOfStatement(forInOrOfStatement *ast.ForI } fallthrough default: - c.diagnostics.Add(createDiagnosticForNode(forInOrOfStatement.AwaitModifier, diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher)) + c.diagnostics.Add(createDiagnosticForNode(forInOrOfStatement.AwaitModifier, diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher)) } } } else { @@ -1419,7 +1419,17 @@ func (c *Checker) checkGrammarTypeOperatorNode(node *ast.TypeOperatorNode) bool } func (c *Checker) checkGrammarForInvalidDynamicName(node *ast.DeclarationName, message *diagnostics.Message) bool { - if c.isNonBindableDynamicName(node) { + if !c.isNonBindableDynamicName(node) { + return false + } + var expression *ast.Node + if ast.IsElementAccessExpression(node) { + expression = ast.SkipParentheses(node.AsElementAccessExpression().ArgumentExpression) + } else { + expression = node.Expression() + } + + if !ast.IsEntityNameExpression(expression) { return c.grammarErrorOnNode(node, message) } @@ -1611,7 +1621,7 @@ func (c *Checker) checkGrammarVariableDeclaration(node *ast.VariableDeclaration) return c.grammarErrorOnNode(node.ExclamationToken, message) } - if c.getEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node.AsNode())) < core.ModuleKindSystem && (node.Parent.Parent.Flags&ast.NodeFlagsAmbient == 0) && ast.HasSyntacticModifier(node.Parent.Parent, ast.ModifierFlagsExport) { + if c.program.GetEmitModuleFormatOfFile(ast.GetSourceFileOfNode(node.AsNode())) < core.ModuleKindSystem && (node.Parent.Parent.Flags&ast.NodeFlagsAmbient == 0) && ast.HasSyntacticModifier(node.Parent.Parent, ast.ModifierFlagsExport) { c.checkGrammarForEsModuleMarkerInBindingName(node.Name()) } @@ -1714,8 +1724,9 @@ func (c *Checker) checkGrammarAwaitOrAwaitUsing(node *ast.Node) bool { } switch c.moduleKind { case core.ModuleKindNode16, + core.ModuleKindNode18, core.ModuleKindNodeNext: - sourceFileMetaData := sourceFile.Metadata + sourceFileMetaData := c.program.GetSourceFileMetaData(sourceFile.Path()) if sourceFileMetaData != nil && sourceFileMetaData.ImpliedNodeFormat == core.ModuleKindCommonJS { if !spanCalculated { span = scanner.GetRangeOfTokenAtPosition(sourceFile, node.Pos()) @@ -1739,9 +1750,9 @@ func (c *Checker) checkGrammarAwaitOrAwaitUsing(node *ast.Node) bool { } var message *diagnostics.Message if ast.IsAwaitExpression(node) { - message = diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher + message = diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher } else { - message = diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher + message = diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher } c.diagnostics.Add(ast.NewDiagnostic(sourceFile, span, message)) hasError = true @@ -2159,7 +2170,7 @@ func (c *Checker) checkGrammarImportCallExpression(node *ast.Node) bool { } if c.moduleKind == core.ModuleKindES2015 { - return c.grammarErrorOnNode(node, diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext) + return c.grammarErrorOnNode(node, diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_or_nodenext) } nodeAsCall := node.AsCallExpression() @@ -2175,7 +2186,7 @@ func (c *Checker) checkGrammarImportCallExpression(node *ast.Node) bool { if len(argumentNodes) > 1 { importAttributesArgument := argumentNodes[1] - return c.grammarErrorOnNode(importAttributesArgument, diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodenext_or_preserve) + return c.grammarErrorOnNode(importAttributesArgument, diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_nodenext_or_preserve) } } diff --git a/internal/checker/jsx.go b/internal/checker/jsx.go index 507e5063e4..18666b1c6f 100644 --- a/internal/checker/jsx.go +++ b/internal/checker/jsx.go @@ -61,6 +61,12 @@ var JsxNames = struct { LibraryManagedAttributes: "LibraryManagedAttributes", } +var ReactNames = struct { + Fragment string +}{ + Fragment: "Fragment", +} + func (c *Checker) checkJsxElement(node *ast.Node, checkMode CheckMode) *Type { c.checkNodeDeferred(node) return c.getJsxElementTypeAt(node) @@ -111,7 +117,8 @@ func (c *Checker) checkJsxFragment(node *ast.Node) *Type { c.error(node, message) } c.checkJsxChildren(node, CheckModeNormal) - return c.getJsxElementTypeAt(node) + t := c.getJsxElementTypeAt(node) + return core.IfElse(c.isErrorType(t), c.anyType, t) } func (c *Checker) checkJsxAttributes(node *ast.Node, checkMode CheckMode) *Type { @@ -125,9 +132,9 @@ func (c *Checker) checkJsxOpeningLikeElementOrOpeningFragment(node *ast.Node) { } c.checkJsxPreconditions(node) c.markJsxAliasReferenced(node) + sig := c.getResolvedSignature(node, nil, CheckModeNormal) + c.checkDeprecatedSignature(sig, node) if isNodeOpeningLikeElement { - sig := c.getResolvedSignature(node, nil, CheckModeNormal) - c.checkDeprecatedSignature(sig, node) elementTypeConstraint := c.getJsxElementTypeTypeAt(node) if elementTypeConstraint != nil { tagName := node.TagName() @@ -475,19 +482,71 @@ func (c *Checker) getSuggestedSymbolForNonexistentJSXAttribute(name string, cont return c.getSpellingSuggestionForName(name, properties, ast.SymbolFlagsValue) } +func (c *Checker) getJSXFragmentType(node *ast.Node) *Type { + // An opening fragment is required in order for `getJsxNamespace` to give the fragment factory + links := c.sourceFileLinks.Get(ast.GetSourceFileOfNode(node)) + if links.jsxFragmentType != nil { + return links.jsxFragmentType + } + jsxFragmentFactoryName := c.getJsxNamespace(node) + // #38720/60122, allow null as jsxFragmentFactory + shouldResolveFactoryReference := (c.compilerOptions.Jsx == core.JsxEmitReact || c.compilerOptions.JsxFragmentFactory != "") && jsxFragmentFactoryName != "null" + if !shouldResolveFactoryReference { + links.jsxFragmentType = c.anyType + return links.jsxFragmentType + } + jsxFactorySymbol := c.getJsxNamespaceContainerForImplicitImport(node) + if jsxFactorySymbol == nil { + shouldModuleRefErr := c.compilerOptions.Jsx != core.JsxEmitPreserve && c.compilerOptions.Jsx != core.JsxEmitReactNative + flags := ast.SymbolFlagsValue + if !shouldModuleRefErr { + flags &= ^ast.SymbolFlagsEnum + } + jsxFactorySymbol = c.resolveName(node, jsxFragmentFactoryName, flags, diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found, true /*isUse*/, false /*excludeGlobals*/) + } + if jsxFactorySymbol == nil { + links.jsxFragmentType = c.errorType + return links.jsxFragmentType + } + if jsxFactorySymbol.Name == ReactNames.Fragment { + links.jsxFragmentType = c.getTypeOfSymbol(jsxFactorySymbol) + return links.jsxFragmentType + } + resolvedAlias := jsxFactorySymbol + if jsxFactorySymbol.Flags&ast.SymbolFlagsAlias != 0 { + resolvedAlias = c.resolveAlias(jsxFactorySymbol) + } + if jsxFactorySymbol != nil { + reactExports := c.getExportsOfSymbol(resolvedAlias) + typeSymbol := c.getSymbol(reactExports, ReactNames.Fragment, ast.SymbolFlagsBlockScopedVariable) + if typeSymbol != nil { + links.jsxFragmentType = c.getTypeOfSymbol(typeSymbol) + } else { + links.jsxFragmentType = c.errorType + } + } + return links.jsxFragmentType +} + func (c *Checker) resolveJsxOpeningLikeElement(node *ast.Node, candidatesOutArray *[]*Signature, checkMode CheckMode) *Signature { - if isJsxIntrinsicTagName(node.TagName()) { - result := c.getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) - fakeSignature := c.createSignatureForJSXIntrinsic(node, result) - c.checkTypeAssignableToAndOptionallyElaborate(c.checkExpressionWithContextualType(node.Attributes(), c.getEffectiveFirstArgumentForJsxSignature(fakeSignature, node), nil /*inferenceContext*/, CheckModeNormal), result, node.TagName(), node.Attributes(), nil, nil) - typeArguments := node.TypeArguments() - if len(typeArguments) != 0 { - c.checkSourceElements(typeArguments) - c.diagnostics.Add(ast.NewDiagnostic(ast.GetSourceFileOfNode(node), node.TypeArgumentList().Loc, diagnostics.Expected_0_type_arguments_but_got_1, 0, len(typeArguments))) + isJsxOpenFragment := ast.IsJsxOpeningFragment(node) + var exprTypes *Type + if !isJsxOpenFragment { + if isJsxIntrinsicTagName(node.TagName()) { + result := c.getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) + fakeSignature := c.createSignatureForJSXIntrinsic(node, result) + c.checkTypeAssignableToAndOptionallyElaborate(c.checkExpressionWithContextualType(node.Attributes(), c.getEffectiveFirstArgumentForJsxSignature(fakeSignature, node), nil /*inferenceContext*/, CheckModeNormal), result, node.TagName(), node.Attributes(), nil, nil) + typeArguments := node.TypeArguments() + if len(typeArguments) != 0 { + c.checkSourceElements(typeArguments) + c.diagnostics.Add(ast.NewDiagnostic(ast.GetSourceFileOfNode(node), node.TypeArgumentList().Loc, diagnostics.Expected_0_type_arguments_but_got_1, 0, len(typeArguments))) + } + return fakeSignature } - return fakeSignature + exprTypes = c.checkExpression(node.TagName()) + } else { + exprTypes = c.getJSXFragmentType(node) } - exprTypes := c.checkExpression(node.TagName()) apparentType := c.getApparentType(exprTypes) if c.isErrorType(apparentType) { return c.resolveErrorCall(node) @@ -498,7 +557,11 @@ func (c *Checker) resolveJsxOpeningLikeElement(node *ast.Node, candidatesOutArra } if len(signatures) == 0 { // We found no signatures at all, which is an error - c.error(node.TagName(), diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, scanner.GetTextOfNode(node.TagName())) + if isJsxOpenFragment { + c.error(node, diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, scanner.GetTextOfNode(node)) + } else { + c.error(node.TagName(), diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, scanner.GetTextOfNode(node.TagName())) + } return c.resolveErrorCall(node) } return c.resolveCall(node, signatures, candidatesOutArray, checkMode, SignatureFlagsNone, nil) @@ -508,17 +571,23 @@ func (c *Checker) resolveJsxOpeningLikeElement(node *ast.Node, candidatesOutArra // @param node a JSX opening-like element we are trying to figure its call signature // @param signature a candidate signature we are trying whether it is a call signature // @param relation a relationship to check parameter and argument type -func (c *Checker) checkApplicableSignatureForJsxOpeningLikeElement(node *ast.Node, signature *Signature, relation *Relation, checkMode CheckMode, reportErrors bool, diagnosticOutput *[]*ast.Diagnostic) bool { +func (c *Checker) checkApplicableSignatureForJsxCallLikeElement(node *ast.Node, signature *Signature, relation *Relation, checkMode CheckMode, reportErrors bool, diagnosticOutput *[]*ast.Diagnostic) bool { // Stateless function components can have maximum of three arguments: "props", "context", and "updater". // However "context" and "updater" are implicit and can't be specify by users. Only the first parameter, props, // can be specified by users through attributes property. paramType := c.getEffectiveFirstArgumentForJsxSignature(signature, node) - attributesType := c.checkExpressionWithContextualType(node.Attributes(), paramType, nil /*inferenceContext*/, checkMode) + var attributesType *Type + if ast.IsJsxOpeningFragment(node) { + attributesType = c.createJsxAttributesTypeFromAttributesProperty(node, CheckModeNormal) + } else { + attributesType = c.checkExpressionWithContextualType(node.Attributes(), paramType, nil /*inferenceContext*/, checkMode) + } var checkAttributesType *Type checkTagNameDoesNotExpectTooManyArguments := func() bool { if c.getJsxNamespaceContainerForImplicitImport(node) != nil { return true // factory is implicitly jsx/jsxdev - assume it fits the bill, since we don't strongly look for the jsx/jsxs/jsxDEV factory APIs anywhere else (at least not yet) } + // We assume fragments have the correct arity since the node does not have attributes var tagType *Type if (ast.IsJsxOpeningElement(node) || ast.IsJsxSelfClosingElement(node)) && !(isJsxIntrinsicTagName(node.TagName()) || ast.IsJsxNamespacedName(node.TagName())) { tagType = c.checkExpression(node.TagName()) @@ -580,10 +649,12 @@ func (c *Checker) checkApplicableSignatureForJsxOpeningLikeElement(node *ast.Nod return true // some signature accepts the number of arguments the function component provides } if reportErrors { - diag := NewDiagnosticForNode(node.TagName(), diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, entityNameToString(node.TagName()), absoluteMinArgCount, entityNameToString(factory), maxParamCount) - tagNameSymbol := c.getSymbolAtLocation(node.TagName(), false) + tagName := node.TagName() + // We will not report errors in this function for fragments, since we do not check them in this function + diag := NewDiagnosticForNode(tagName, diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, entityNameToString(tagName), absoluteMinArgCount, entityNameToString(factory), maxParamCount) + tagNameSymbol := c.getSymbolAtLocation(tagName, false) if tagNameSymbol != nil && tagNameSymbol.ValueDeclaration != nil { - diag.AddRelatedInfo(NewDiagnosticForNode(tagNameSymbol.ValueDeclaration, diagnostics.X_0_is_declared_here, entityNameToString(node.TagName()))) + diag.AddRelatedInfo(NewDiagnosticForNode(tagNameSymbol.ValueDeclaration, diagnostics.X_0_is_declared_here, entityNameToString(tagName))) } c.reportDiagnostic(diag, diagnosticOutput) } @@ -599,9 +670,17 @@ func (c *Checker) checkApplicableSignatureForJsxOpeningLikeElement(node *ast.Nod } var errorNode *ast.Node if reportErrors { - errorNode = node.TagName() + if ast.IsJsxOpeningFragment(node) { + errorNode = node + } else { + errorNode = node.TagName() + } + } + var attributes *ast.Node + if !ast.IsJsxOpeningFragment(node) { + attributes = node.Attributes() } - return c.checkTypeRelatedToAndOptionallyElaborate(checkAttributesType, paramType, relation, errorNode, node.Attributes(), nil, diagnosticOutput) + return c.checkTypeRelatedToAndOptionallyElaborate(checkAttributesType, paramType, relation, errorNode, attributes, nil, diagnosticOutput) } // Get attributes type of the JSX opening-like element. The result is from resolving "attributes" property of the opening-like element. @@ -612,13 +691,13 @@ func (c *Checker) checkApplicableSignatureForJsxOpeningLikeElement(node *ast.Nod // @remarks Because this function calls getSpreadType, it needs to use the same checks as checkObjectLiteral, // which also calls getSpreadType. func (c *Checker) createJsxAttributesTypeFromAttributesProperty(openingLikeElement *ast.Node, checkMode CheckMode) *Type { - attributes := openingLikeElement.Attributes() - contextualType := c.getContextualType(attributes, ContextFlagsNone) var allAttributesTable ast.SymbolTable if c.strictNullChecks { allAttributesTable = make(ast.SymbolTable) } attributesTable := make(ast.SymbolTable) + var attributesSymbol *ast.Symbol + attributeParent := openingLikeElement spread := c.emptyJsxObjectType var hasSpreadAnyType bool var typeToIntersect *Type @@ -626,96 +705,120 @@ func (c *Checker) createJsxAttributesTypeFromAttributesProperty(openingLikeEleme objectFlags := ObjectFlagsJsxAttributes createJsxAttributesType := func() *Type { objectFlags |= ObjectFlagsFreshLiteral - result := c.newAnonymousType(attributes.Symbol(), attributesTable, nil, nil, nil) + result := c.newAnonymousType(attributesSymbol, attributesTable, nil, nil, nil) result.objectFlags |= objectFlags | ObjectFlagsObjectLiteral | ObjectFlagsContainsObjectOrArrayLiteral return result } jsxChildrenPropertyName := c.getJsxElementChildrenPropertyName(c.getJsxNamespaceAt(openingLikeElement)) - // Create anonymous type from given attributes symbol table. - // @param symbol a symbol of JsxAttributes containing attributes corresponding to attributesTable - // @param attributesTable a symbol table of attributes property - for _, attributeDecl := range attributes.AsJsxAttributes().Properties.Nodes { - member := attributeDecl.Symbol() - if ast.IsJsxAttribute(attributeDecl) { - exprType := c.checkJsxAttribute(attributeDecl, checkMode) - objectFlags |= exprType.objectFlags & ObjectFlagsPropagatingFlags - attributeSymbol := c.newSymbol(ast.SymbolFlagsProperty|member.Flags, member.Name) - attributeSymbol.Declarations = member.Declarations - attributeSymbol.Parent = member.Parent - if member.ValueDeclaration != nil { - attributeSymbol.ValueDeclaration = member.ValueDeclaration - } - links := c.valueSymbolLinks.Get(attributeSymbol) - links.resolvedType = exprType - links.target = member - attributesTable[attributeSymbol.Name] = attributeSymbol - if allAttributesTable != nil { - allAttributesTable[attributeSymbol.Name] = attributeSymbol - } - if attributeDecl.Name().Text() == jsxChildrenPropertyName { - explicitlySpecifyChildrenAttribute = true - } - if contextualType != nil { - prop := c.getPropertyOfType(contextualType, member.Name) - if prop != nil && prop.Declarations != nil && c.isDeprecatedSymbol(prop) && ast.IsIdentifier(attributeDecl.Name()) { - c.addDeprecatedSuggestion(attributeDecl.Name(), prop.Declarations, attributeDecl.Name().Text()) + isJsxOpenFragment := ast.IsJsxOpeningFragment(openingLikeElement) + if !isJsxOpenFragment { + attributes := openingLikeElement.Attributes() + attributesSymbol = attributes.Symbol() + attributeParent = attributes + contextualType := c.getContextualType(attributes, ContextFlagsNone) + // Create anonymous type from given attributes symbol table. + // @param symbol a symbol of JsxAttributes containing attributes corresponding to attributesTable + // @param attributesTable a symbol table of attributes property + for _, attributeDecl := range attributes.AsJsxAttributes().Properties.Nodes { + member := attributeDecl.Symbol() + if ast.IsJsxAttribute(attributeDecl) { + exprType := c.checkJsxAttribute(attributeDecl, checkMode) + objectFlags |= exprType.objectFlags & ObjectFlagsPropagatingFlags + attributeSymbol := c.newSymbol(ast.SymbolFlagsProperty|member.Flags, member.Name) + attributeSymbol.Declarations = member.Declarations + attributeSymbol.Parent = member.Parent + if member.ValueDeclaration != nil { + attributeSymbol.ValueDeclaration = member.ValueDeclaration } - } - if contextualType != nil && checkMode&CheckModeInferential != 0 && checkMode&CheckModeSkipContextSensitive == 0 && c.isContextSensitive(attributeDecl) { - inferenceContext := c.getInferenceContext(attributes) - // Debug.assert(inferenceContext) - // In CheckMode.Inferential we should always have an inference context - inferenceNode := attributeDecl.Initializer().Expression() - c.addIntraExpressionInferenceSite(inferenceContext, inferenceNode, exprType) - } - } else { - // Debug.assert(attributeDecl.Kind == ast.KindJsxSpreadAttribute) - if len(attributesTable) != 0 { - spread = c.getSpreadType(spread, createJsxAttributesType(), attributes.Symbol(), objectFlags, false /*readonly*/) - attributesTable = make(ast.SymbolTable) - } - exprType := c.getReducedType(c.checkExpressionEx(attributeDecl.Expression(), checkMode&CheckModeInferential)) - if IsTypeAny(exprType) { - hasSpreadAnyType = true - } - if c.isValidSpreadType(exprType) { - spread = c.getSpreadType(spread, exprType, attributes.Symbol(), objectFlags, false /*readonly*/) + links := c.valueSymbolLinks.Get(attributeSymbol) + links.resolvedType = exprType + links.target = member + attributesTable[attributeSymbol.Name] = attributeSymbol if allAttributesTable != nil { - c.checkSpreadPropOverrides(exprType, allAttributesTable, attributeDecl) + allAttributesTable[attributeSymbol.Name] = attributeSymbol + } + if attributeDecl.Name().Text() == jsxChildrenPropertyName { + explicitlySpecifyChildrenAttribute = true + } + if contextualType != nil { + prop := c.getPropertyOfType(contextualType, member.Name) + if prop != nil && prop.Declarations != nil && c.isDeprecatedSymbol(prop) && ast.IsIdentifier(attributeDecl.Name()) { + c.addDeprecatedSuggestion(attributeDecl.Name(), prop.Declarations, attributeDecl.Name().Text()) + } + } + if contextualType != nil && checkMode&CheckModeInferential != 0 && checkMode&CheckModeSkipContextSensitive == 0 && c.isContextSensitive(attributeDecl) { + inferenceContext := c.getInferenceContext(attributes) + // Debug.assert(inferenceContext) + // In CheckMode.Inferential we should always have an inference context + inferenceNode := attributeDecl.Initializer().Expression() + c.addIntraExpressionInferenceSite(inferenceContext, inferenceNode, exprType) } } else { - c.error(attributeDecl.Expression(), diagnostics.Spread_types_may_only_be_created_from_object_types) - if typeToIntersect != nil { - typeToIntersect = c.getIntersectionType([]*Type{typeToIntersect, exprType}) + // Debug.assert(attributeDecl.Kind == ast.KindJsxSpreadAttribute) + if len(attributesTable) != 0 { + spread = c.getSpreadType(spread, createJsxAttributesType(), attributesSymbol, objectFlags, false /*readonly*/) + attributesTable = make(ast.SymbolTable) + } + exprType := c.getReducedType(c.checkExpressionEx(attributeDecl.Expression(), checkMode&CheckModeInferential)) + if IsTypeAny(exprType) { + hasSpreadAnyType = true + } + if c.isValidSpreadType(exprType) { + spread = c.getSpreadType(spread, exprType, attributesSymbol, objectFlags, false /*readonly*/) + if allAttributesTable != nil { + c.checkSpreadPropOverrides(exprType, allAttributesTable, attributeDecl) + } } else { - typeToIntersect = exprType + c.error(attributeDecl.Expression(), diagnostics.Spread_types_may_only_be_created_from_object_types) + if typeToIntersect != nil { + typeToIntersect = c.getIntersectionType([]*Type{typeToIntersect, exprType}) + } else { + typeToIntersect = exprType + } } } } - } - if !hasSpreadAnyType { - if len(attributesTable) != 0 { - spread = c.getSpreadType(spread, createJsxAttributesType(), attributes.Symbol(), objectFlags, false /*readonly*/) + if !hasSpreadAnyType { + if len(attributesTable) != 0 { + spread = c.getSpreadType(spread, createJsxAttributesType(), attributesSymbol, objectFlags, false /*readonly*/) + } } } - // Handle children attribute - var parent *ast.Node - if ast.IsJsxElement(openingLikeElement.Parent) { - parent = openingLikeElement.Parent + parentHasSemanticJsxChildren := func(openingLikeElement *ast.Node) bool { + // Handle children attribute + parent := openingLikeElement.Parent + if parent == nil { + return false + } + var children []*ast.Node + + switch { + case ast.IsJsxElement(parent): + // We have to check that openingElement of the parent is the one we are visiting as this may not be true for selfClosingElement + if parent.AsJsxElement().OpeningElement == openingLikeElement { + children = parent.AsJsxElement().Children.Nodes + } + case ast.IsJsxFragment(parent): + if parent.AsJsxFragment().OpeningFragment == openingLikeElement { + children = parent.AsJsxFragment().Children.Nodes + } + } + return len(getSemanticJsxChildren(children)) != 0 } - // We have to check that openingElement of the parent is the one we are visiting as this may not be true for selfClosingElement - if parent != nil && parent.AsJsxElement().OpeningElement == openingLikeElement && len(getSemanticJsxChildren(parent.AsJsxElement().Children.Nodes)) != 0 { - var childTypes []*Type = c.checkJsxChildren(parent, checkMode) + if parentHasSemanticJsxChildren(openingLikeElement) { + var childTypes []*Type = c.checkJsxChildren(openingLikeElement.Parent, checkMode) if !hasSpreadAnyType && jsxChildrenPropertyName != ast.InternalSymbolNameMissing && jsxChildrenPropertyName != "" { // Error if there is a attribute named "children" explicitly specified and children element. // This is because children element will overwrite the value from attributes. // Note: we will not warn "children" attribute overwritten if "children" attribute is specified in object spread. if explicitlySpecifyChildrenAttribute { - c.error(attributes, diagnostics.X_0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName) + c.error(attributeParent, diagnostics.X_0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName) } var childrenContextualType *Type - if contextualType := c.getApparentTypeOfContextualType(openingLikeElement.Attributes(), ContextFlagsNone); contextualType != nil { - childrenContextualType = c.getTypeOfPropertyOfContextualType(contextualType, jsxChildrenPropertyName) + if ast.IsJsxOpeningElement(openingLikeElement) { + if contextualType := c.getApparentTypeOfContextualType(openingLikeElement.Attributes(), ContextFlagsNone); contextualType != nil { + childrenContextualType = c.getTypeOfPropertyOfContextualType(contextualType, jsxChildrenPropertyName) + } } // If there are children in the body of JSX element, create dummy attribute "children" with the union of children types so that it will pass the attribute checking process childrenPropSymbol := c.newSymbol(ast.SymbolFlagsProperty, jsxChildrenPropertyName) @@ -730,11 +833,11 @@ func (c *Checker) createJsxAttributesTypeFromAttributesProperty(openingLikeEleme } // Fake up a property declaration for the children childrenPropSymbol.ValueDeclaration = c.factory.NewPropertySignatureDeclaration(nil, c.factory.NewIdentifier(jsxChildrenPropertyName), nil /*postfixToken*/, nil /*type*/, nil /*initializer*/) - childrenPropSymbol.ValueDeclaration.Parent = attributes + childrenPropSymbol.ValueDeclaration.Parent = attributeParent childrenPropSymbol.ValueDeclaration.AsPropertySignatureDeclaration().Symbol = childrenPropSymbol childPropMap := make(ast.SymbolTable) childPropMap[jsxChildrenPropertyName] = childrenPropSymbol - spread = c.getSpreadType(spread, c.newAnonymousType(attributes.Symbol(), childPropMap, nil, nil, nil), attributes.Symbol(), objectFlags, false /*readonly*/) + spread = c.getSpreadType(spread, c.newAnonymousType(attributesSymbol, childPropMap, nil, nil, nil), attributesSymbol, objectFlags, false /*readonly*/) } } if hasSpreadAnyType { @@ -822,7 +925,7 @@ func (c *Checker) getUninstantiatedJsxSignaturesOfType(elementType *Type, caller } func (c *Checker) getEffectiveFirstArgumentForJsxSignature(signature *Signature, node *ast.Node) *Type { - if c.getJsxReferenceKind(node) != JsxReferenceKindComponent { + if ast.IsJsxOpeningFragment(node) || c.getJsxReferenceKind(node) != JsxReferenceKindComponent { return c.getJsxPropsTypeFromCallSignature(signature, node) } return c.getJsxPropsTypeFromClassType(signature, node) @@ -974,6 +1077,10 @@ func (c *Checker) getJsxElementPropertiesName(jsxNamespace *ast.Symbol) string { } func (c *Checker) getJsxElementChildrenPropertyName(jsxNamespace *ast.Symbol) string { + if c.compilerOptions.Jsx == core.JsxEmitReactJSX || c.compilerOptions.Jsx == core.JsxEmitReactJSXDev { + // In these JsxEmit modes the children property is fixed to 'children' + return "children" + } return c.getNameFromJsxElementAttributesContainer(JsxNames.ElementChildrenAttributeNameContainer, jsxNamespace) } @@ -1007,6 +1114,9 @@ func (c *Checker) getNameFromJsxElementAttributesContainer(nameOfAttribPropConta } func (c *Checker) getStaticTypeOfReferencedJsxConstructor(context *ast.Node) *Type { + if ast.IsJsxOpeningFragment(context) { + return c.getJSXFragmentType(context) + } if isJsxIntrinsicTagName(context.TagName()) { result := c.getIntrinsicAttributesTypeFromJsxOpeningLikeElement(context) fakeSignature := c.createSignatureForJSXIntrinsic(context, result) diff --git a/internal/checker/nodebuilder.go b/internal/checker/nodebuilder.go index 6f95386069..5a9a54b4c5 100644 --- a/internal/checker/nodebuilder.go +++ b/internal/checker/nodebuilder.go @@ -36,16 +36,17 @@ func (b *NodeBuilder) enterContext(enclosingDeclaration *ast.Node, flags nodebui tracker = NewSymbolTrackerImpl(b.impl.ctx, nil, b.host) b.impl.ctx.tracker = tracker } - b.impl.initializeClosures() // recapture ctx b.ctxStack = append(b.ctxStack, b.impl.ctx) } func (b *NodeBuilder) popContext() { - b.impl.ctx = nil - if len(b.ctxStack) > 1 { - b.impl.ctx = b.ctxStack[len(b.ctxStack)-1] + stackSize := len(b.ctxStack) + if stackSize == 0 { + b.impl.ctx = nil + } else { + b.impl.ctx = b.ctxStack[stackSize-1] + b.ctxStack = b.ctxStack[:stackSize-1] } - b.ctxStack = b.ctxStack[:len(b.ctxStack)-1] } func (b *NodeBuilder) exitContext(result *ast.Node) *ast.Node { @@ -159,14 +160,14 @@ func (b *NodeBuilder) TypePredicateToTypePredicateNode(predicate *TypePredicate, // TypeToTypeNode implements NodeBuilderInterface. func (b *NodeBuilder) TypeToTypeNode(typ *Type, enclosingDeclaration *ast.Node, flags nodebuilder.Flags, internalFlags nodebuilder.InternalFlags, tracker nodebuilder.SymbolTracker) *ast.Node { b.enterContext(enclosingDeclaration, flags, internalFlags, tracker) - return b.exitContext(b.impl.typeToTypeNodeWorker(typ)) + return b.exitContext(b.impl.typeToTypeNode(typ)) } // var _ NodeBuilderInterface = NewNodeBuilderAPI(nil, nil) func NewNodeBuilder(ch *Checker, e *printer.EmitContext) *NodeBuilder { impl := newNodeBuilderImpl(ch, e) - return &NodeBuilder{impl: &impl, ctxStack: make([]*NodeBuilderContext, 0, 1), host: ch.program} + return &NodeBuilder{impl: impl, ctxStack: make([]*NodeBuilderContext, 0, 1), host: ch.program} } func (c *Checker) GetDiagnosticNodeBuilder() *NodeBuilder { diff --git a/internal/checker/nodebuilderimpl.go b/internal/checker/nodebuilderimpl.go index 7c70377864..591489e55d 100644 --- a/internal/checker/nodebuilderimpl.go +++ b/internal/checker/nodebuilderimpl.go @@ -91,16 +91,11 @@ type nodeBuilderImpl struct { links core.LinkStore[*ast.Node, NodeBuilderLinks] symbolLinks core.LinkStore[*ast.Symbol, NodeBuilderSymbolLinks] - // closures - typeToTypeNode func(t *Type) *ast.TypeNode - typeReferenceToTypeNode func(t *Type) *ast.TypeNode - conditionalTypeToTypeNode func(t *Type) *ast.TypeNode - createTypeNodeFromObjectType func(t *Type) *ast.TypeNode - isStringNamed func(d *ast.Declaration) bool - isSingleQuotedStringNamed func(d *ast.Declaration) bool - // state ctx *NodeBuilderContext + + // reusable visitor + cloneBindingNameVisitor *ast.NodeVisitor } const ( @@ -110,19 +105,10 @@ const ( // Node builder utility functions -func newNodeBuilderImpl(ch *Checker, e *printer.EmitContext) nodeBuilderImpl { - result := nodeBuilderImpl{f: e.Factory.AsNodeFactory(), ch: ch, e: e, typeToTypeNode: nil, typeReferenceToTypeNode: nil, conditionalTypeToTypeNode: nil, ctx: nil} - result.initializeClosures() - return result -} - -func (b *nodeBuilderImpl) initializeClosures() { - b.typeToTypeNode = b.typeToTypeNodeWorker - b.typeReferenceToTypeNode = b.typeReferenceToTypeNodeWorker - b.conditionalTypeToTypeNode = b.conditionalTypeToTypeNodeWorker - b.createTypeNodeFromObjectType = b.createTypeNodeFromObjectTypeWorker - b.isStringNamed = b.isStringNamedWorker - b.isSingleQuotedStringNamed = b.isSingleQuotedStringNamedWorker +func newNodeBuilderImpl(ch *Checker, e *printer.EmitContext) *nodeBuilderImpl { + b := &nodeBuilderImpl{f: e.Factory.AsNodeFactory(), ch: ch, e: e} + b.cloneBindingNameVisitor = ast.NewNodeVisitor(b.cloneBindingName, b.f, ast.NodeVisitorHooks{}) + return b } func (b *nodeBuilderImpl) saveRestoreFlags() func() { @@ -435,7 +421,7 @@ func (b *nodeBuilderImpl) symbolToTypeNode(symbol *ast.Symbol, mask ast.SymbolFl var attributes *ast.Node if b.ch.compilerOptions.GetModuleResolutionKind() == core.ModuleResolutionKindNode16 || b.ch.compilerOptions.GetModuleResolutionKind() == core.ModuleResolutionKindNodeNext { // An `import` type directed at an esm format file is only going to resolve in esm mode - set the esm mode assertion - if targetFile != nil && contextFile != nil && b.ch.getEmitModuleFormatOfFile(targetFile) == core.ModuleKindESNext && b.ch.getEmitModuleFormatOfFile(targetFile) != b.ch.getEmitModuleFormatOfFile(contextFile) { + if targetFile != nil && contextFile != nil && b.ch.program.GetEmitModuleFormatOfFile(targetFile) == core.ModuleKindESNext && b.ch.program.GetEmitModuleFormatOfFile(targetFile) != b.ch.program.GetEmitModuleFormatOfFile(contextFile) { specifier = b.getSpecifierForModuleSymbol(chain[0], core.ModuleKindESNext) attributes = b.f.NewImportAttributes( ast.KindWithKeyword, @@ -453,7 +439,7 @@ func (b *nodeBuilderImpl) symbolToTypeNode(symbol *ast.Symbol, mask ast.SymbolFl if b.ch.compilerOptions.GetModuleResolutionKind() == core.ModuleResolutionKindNode16 || b.ch.compilerOptions.GetModuleResolutionKind() == core.ModuleResolutionKindNodeNext { // We might be able to write a portable import type using a mode override; try specifier generation again, but with a different mode set swappedMode := core.ModuleKindESNext - if b.ch.getEmitModuleFormatOfFile(contextFile) == core.ModuleKindESNext { + if b.ch.program.GetEmitModuleFormatOfFile(contextFile) == core.ModuleKindESNext { swappedMode = core.ModuleKindCommonJS } specifier = b.getSpecifierForModuleSymbol(chain[0], swappedMode) @@ -1486,8 +1472,46 @@ func (b *nodeBuilderImpl) parameterToParameterDeclarationName(parameterSymbol *a if parameterDeclaration == nil || parameterDeclaration.Name() == nil { return b.f.NewIdentifier(parameterSymbol.Name) } - // !!! TODO - symbol tracking of computed names in cloned binding patterns, set singleline emit flags - return b.f.DeepCloneNode(parameterDeclaration.Name()) + + name := parameterDeclaration.Name() + switch name.Kind { + case ast.KindIdentifier: + cloned := b.f.DeepCloneNode(name) + b.e.SetEmitFlags(cloned, printer.EFNoAsciiEscaping) + return cloned + case ast.KindQualifiedName: + cloned := b.f.DeepCloneNode(name.AsQualifiedName().Right) + b.e.SetEmitFlags(cloned, printer.EFNoAsciiEscaping) + return cloned + default: + return b.cloneBindingName(name) + } +} + +func (b *nodeBuilderImpl) cloneBindingName(node *ast.Node) *ast.Node { + if ast.IsComputedPropertyName(node) && b.ch.isLateBindableName(node) { + b.trackComputedName(node.Expression(), b.ctx.enclosingDeclaration) + } + + visited := b.cloneBindingNameVisitor.VisitEachChild(node) + + if ast.IsBindingElement(visited) { + bindingElement := visited.AsBindingElement() + visited = b.f.UpdateBindingElement( + bindingElement, + bindingElement.DotDotDotToken, + bindingElement.PropertyName, + bindingElement.Name(), + nil, // remove initializer + ) + } + + if !ast.NodeIsSynthesized(visited) { + visited = b.f.DeepCloneNode(visited) + } + + b.e.SetEmitFlags(visited, printer.EFSingleLine|printer.EFNoAsciiEscaping) + return visited } func (b *nodeBuilderImpl) symbolTableToDeclarationStatements(symbolTable *ast.SymbolTable) []*ast.Node { @@ -1976,7 +2000,7 @@ func (b *nodeBuilderImpl) createPropertyNameNodeForIdentifierOrLiteral(name stri return result } -func (b *nodeBuilderImpl) isStringNamedWorker(d *ast.Declaration) bool { +func (b *nodeBuilderImpl) isStringNamed(d *ast.Declaration) bool { name := ast.GetNameOfDeclaration(d) if name == nil { return false @@ -1992,7 +2016,7 @@ func (b *nodeBuilderImpl) isStringNamedWorker(d *ast.Declaration) bool { return ast.IsStringLiteral(name) } -func (b *nodeBuilderImpl) isSingleQuotedStringNamedWorker(d *ast.Declaration) bool { +func (b *nodeBuilderImpl) isSingleQuotedStringNamed(d *ast.Declaration) bool { return false // !!! // TODO: actually support single-quote-style-maintenance // name := ast.GetNameOfDeclaration(d) @@ -2216,7 +2240,7 @@ func (b *nodeBuilderImpl) createTypeNodesFromResolvedType(resolvedType *Structur } } -func (b *nodeBuilderImpl) createTypeNodeFromObjectTypeWorker(t *Type) *ast.TypeNode { +func (b *nodeBuilderImpl) createTypeNodeFromObjectType(t *Type) *ast.TypeNode { if b.ch.isGenericMappedType(t) || (t.objectFlags&ObjectFlagsMapped != 0 && t.AsMappedType().containsError) { return b.createMappedTypeNodeFromType(t) } @@ -2329,7 +2353,7 @@ func (b *nodeBuilderImpl) createAnonymousTypeNode(t *Type) *ast.TypeNode { if _, ok := b.ctx.visitedTypes[typeId]; ok { return b.createElidedInformationPlaceholder() } - return b.visitAndTransformType(t, b.createTypeNodeFromObjectType) + return b.visitAndTransformType(t, (*nodeBuilderImpl).createTypeNodeFromObjectType) } var isInstanceType ast.SymbolFlags if isClassInstanceSide(b.ch, t) { @@ -2355,7 +2379,7 @@ func (b *nodeBuilderImpl) createAnonymousTypeNode(t *Type) *ast.TypeNode { return b.createElidedInformationPlaceholder() } } else { - return b.visitAndTransformType(t, b.createTypeNodeFromObjectType) + return b.visitAndTransformType(t, (*nodeBuilderImpl).createTypeNodeFromObjectType) } } else { // Anonymous types without a symbol are never circular. @@ -2386,12 +2410,12 @@ func (b *nodeBuilderImpl) typeToTypeNodeOrCircularityElision(t *Type) *ast.TypeN } return b.createElidedInformationPlaceholder() } - return b.visitAndTransformType(t, b.typeToTypeNode) + return b.visitAndTransformType(t, (*nodeBuilderImpl).typeToTypeNode) } return b.typeToTypeNode(t) } -func (b *nodeBuilderImpl) conditionalTypeToTypeNodeWorker(_t *Type) *ast.TypeNode { +func (b *nodeBuilderImpl) conditionalTypeToTypeNode(_t *Type) *ast.TypeNode { t := _t.AsConditionalType() checkTypeNode := b.typeToTypeNode(t.checkType) b.ctx.approximateLength += 15 @@ -2449,7 +2473,7 @@ func (b *nodeBuilderImpl) getParentSymbolOfTypeParameter(typeParameter *TypePara return b.ch.getSymbolOfNode(host) } -func (b *nodeBuilderImpl) typeReferenceToTypeNodeWorker(t *Type) *ast.TypeNode { +func (b *nodeBuilderImpl) typeReferenceToTypeNode(t *Type) *ast.TypeNode { var typeArguments []*Type = b.ch.getTypeArguments(t) if t.Target() == b.ch.globalArrayType || t.Target() == b.ch.globalReadonlyArrayType { if b.ctx.flags&nodebuilder.FlagsWriteArrayAsGenericType != 0 { @@ -2583,7 +2607,7 @@ func (b *nodeBuilderImpl) typeReferenceToTypeNodeWorker(t *Type) *ast.TypeNode { } } -func (b *nodeBuilderImpl) visitAndTransformType(t *Type, transform func(t *Type) *ast.TypeNode) *ast.TypeNode { +func (b *nodeBuilderImpl) visitAndTransformType(t *Type, transform func(b *nodeBuilderImpl, t *Type) *ast.TypeNode) *ast.TypeNode { typeId := t.id isConstructorObject := t.objectFlags&ObjectFlagsAnonymous != 0 && t.symbol != nil && t.symbol.Flags&ast.SymbolFlagsClass != 0 var id *CompositeSymbolIdentity @@ -2629,7 +2653,7 @@ func (b *nodeBuilderImpl) visitAndTransformType(t *Type, transform func(t *Type) prevTrackedSymbols := b.ctx.trackedSymbols b.ctx.trackedSymbols = nil startLength := b.ctx.approximateLength - result := transform(t) + result := transform(b, t) addedLength := b.ctx.approximateLength - startLength if !b.ctx.reportedDiagnostic && !b.ctx.encounteredError { links := b.links.Get(b.ctx.enclosingDeclaration) @@ -2668,7 +2692,7 @@ func (b *nodeBuilderImpl) visitAndTransformType(t *Type, transform func(t *Type) // } } -func (b *nodeBuilderImpl) typeToTypeNodeWorker(t *Type) *ast.TypeNode { +func (b *nodeBuilderImpl) typeToTypeNode(t *Type) *ast.TypeNode { inTypeAlias := b.ctx.flags & nodebuilder.FlagsInTypeAlias b.ctx.flags &^= nodebuilder.FlagsInTypeAlias @@ -2830,7 +2854,7 @@ func (b *nodeBuilderImpl) typeToTypeNodeWorker(t *Type) *ast.TypeNode { if objectFlags&ObjectFlagsReference != 0 { // Debug.assert(t.flags&TypeFlagsObject != 0) // !!! if t.AsTypeReference().node != nil { - return b.visitAndTransformType(t, b.typeReferenceToTypeNode) + return b.visitAndTransformType(t, (*nodeBuilderImpl).typeReferenceToTypeNode) } else { return b.typeReferenceToTypeNode(t) } @@ -2936,7 +2960,7 @@ func (b *nodeBuilderImpl) typeToTypeNodeWorker(t *Type) *ast.TypeNode { return b.f.NewIndexedAccessTypeNode(objectTypeNode, indexTypeNode) } if t.flags&TypeFlagsConditional != 0 { - return b.visitAndTransformType(t, b.conditionalTypeToTypeNode) + return b.visitAndTransformType(t, (*nodeBuilderImpl).conditionalTypeToTypeNode) } if t.flags&TypeFlagsSubstitution != 0 { typeNode := b.typeToTypeNode(t.AsSubstitutionType().baseType) diff --git a/internal/checker/services.go b/internal/checker/services.go index 9405803c42..6adae744fa 100644 --- a/internal/checker/services.go +++ b/internal/checker/services.go @@ -6,6 +6,7 @@ import ( "github.com/microsoft/typescript-go/internal/ast" "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/printer" ) func (c *Checker) GetSymbolsInScope(location *ast.Node, meaning ast.SymbolFlags) []*ast.Symbol { @@ -299,10 +300,20 @@ func runWithInferenceBlockedFromSourceNode[T any](c *Checker, node *ast.Node, fn return result } -func runWithoutResolvedSignatureCaching[T any](c *Checker, node *ast.Node, fn func() T) T { - ancestorNode := ast.FindAncestor(node, func(n *ast.Node) bool { - return ast.IsCallLikeOrFunctionLikeExpression(n) +func GetResolvedSignatureForSignatureHelp(node *ast.Node, argumentCount int, c *Checker) (*Signature, []*Signature) { + type result struct { + signature *Signature + candidates []*Signature + } + res := runWithoutResolvedSignatureCaching(c, node, func() result { + signature, candidates := c.getResolvedSignatureWorker(node, CheckModeIsForSignatureHelp, argumentCount) + return result{signature, candidates} }) + return res.signature, res.candidates +} + +func runWithoutResolvedSignatureCaching[T any](c *Checker, node *ast.Node, fn func() T) T { + ancestorNode := ast.FindAncestor(node, ast.IsCallLikeOrFunctionLikeExpression) if ancestorNode != nil { cachedResolvedSignatures := make(map[*SignatureLinks]*Signature) cachedTypes := make(map[*ValueSymbolLinks]*Type) @@ -396,6 +407,56 @@ func (c *Checker) GetExportSymbolOfSymbol(symbol *ast.Symbol) *ast.Symbol { return c.getMergedSymbol(core.IfElse(symbol.ExportSymbol != nil, symbol.ExportSymbol, symbol)) } +func (c *Checker) GetExportSpecifierLocalTargetSymbol(node *ast.Node) *ast.Symbol { + // node should be ExportSpecifier | Identifier + switch node.Kind { + case ast.KindExportSpecifier: + if node.Parent.Parent.AsExportDeclaration().ModuleSpecifier != nil { + return c.getExternalModuleMember(node.Parent.Parent, node, false /*dontResolveAlias*/) + } + name := node.PropertyName() + if name == nil { + name = node.Name() + } + if name.Kind == ast.KindStringLiteral { + // Skip for invalid syntax like this: export { "x" } + return nil + } + case ast.KindIdentifier: + // do nothing (don't panic) + default: + panic("Unhandled case in getExportSpecifierLocalTargetSymbol, node should be ExportSpecifier | Identifier") + } + return c.resolveEntityName(node, ast.SymbolFlagsValue|ast.SymbolFlagsType|ast.SymbolFlagsNamespace|ast.SymbolFlagsAlias, true /*ignoreErrors*/, false, nil) +} + +func (c *Checker) GetShorthandAssignmentValueSymbol(location *ast.Node) *ast.Symbol { + if location != nil && location.Kind == ast.KindShorthandPropertyAssignment { + return c.resolveEntityName(location.Name(), ast.SymbolFlagsValue|ast.SymbolFlagsAlias, true /*ignoreErrors*/, false, nil) + } + return nil +} + +/** +* Get symbols that represent parameter-property-declaration as parameter and as property declaration +* @param parameter a parameterDeclaration node +* @param parameterName a name of the parameter to get the symbols for. +* @return a tuple of two symbols + */ +func (c *Checker) GetSymbolsOfParameterPropertyDeclaration(parameter *ast.Node /*ParameterPropertyDeclaration*/, parameterName string) (*ast.Symbol, *ast.Symbol) { + constructorDeclaration := parameter.Parent + classDeclaration := parameter.Parent.Parent + + parameterSymbol := c.getSymbol(constructorDeclaration.Locals(), parameterName, ast.SymbolFlagsValue) + propertySymbol := c.getSymbol(c.getMembersOfSymbol(classDeclaration.Symbol()), parameterName, ast.SymbolFlagsValue) + + if parameterSymbol != nil && propertySymbol != nil { + return parameterSymbol, propertySymbol + } + + panic("There should exist two symbols, one as property declaration and one as parameter declaration") +} + func (c *Checker) GetTypeArgumentConstraint(node *ast.Node) *Type { if !ast.IsTypeNode(node) { return nil @@ -506,3 +567,15 @@ func (c *Checker) GetConstantValue(node *ast.Node) any { return nil } + +func (c *Checker) getResolvedSignatureWorker(node *ast.Node, checkMode CheckMode, argumentCount int) (*Signature, []*Signature) { + parsedNode := printer.NewEmitContext().ParseNode(node) + c.apparentArgumentCount = &argumentCount + candidatesOutArray := &[]*Signature{} + var res *Signature + if parsedNode != nil { + res = c.getResolvedSignature(parsedNode, candidatesOutArray, checkMode) + } + c.apparentArgumentCount = nil + return res, *candidatesOutArray +} diff --git a/internal/checker/types.go b/internal/checker/types.go index 6a2ace4023..ae842ea0cd 100644 --- a/internal/checker/types.go +++ b/internal/checker/types.go @@ -10,6 +10,7 @@ import ( ) //go:generate go tool golang.org/x/tools/cmd/stringer -type=SignatureKind -output=stringer_generated.go +//go:generate go tool mvdan.cc/gofumpt -lang=go1.24 -w stringer_generated.go // ParseFlags @@ -394,6 +395,7 @@ type SourceFileLinks struct { localJsxFragmentNamespace string localJsxFactory *ast.EntityName localJsxFragmentFactory *ast.EntityName + jsxFragmentType *Type } // Signature specific links @@ -588,6 +590,10 @@ func (t *Type) Flags() TypeFlags { return t.flags } +func (t *Type) ObjectFlags() ObjectFlags { + return t.objectFlags +} + // Casts for concrete struct types func (t *Type) AsIntrinsicType() *IntrinsicType { return t.data.(*IntrinsicType) } @@ -940,6 +946,8 @@ type TupleElementInfo struct { labeledDeclaration *ast.Node // NamedTupleMember | ParameterDeclaration | nil } +func (t *TupleElementInfo) TupleElementFlags() ElementFlags { return t.flags } + type TupleType struct { InterfaceType elementInfos []TupleElementInfo @@ -949,6 +957,15 @@ type TupleType struct { readonly bool } +func (t *TupleType) FixedLength() int { return t.fixedLength } +func (t *TupleType) ElementFlags() []ElementFlags { + elementFlags := make([]ElementFlags, len(t.elementInfos)) + for i, info := range t.elementInfos { + elementFlags[i] = info.flags + } + return elementFlags +} + // SingleSignatureType type SingleSignatureType struct { @@ -1148,6 +1165,22 @@ type Signature struct { composite *CompositeSignature } +func (s *Signature) TypeParameters() []*Type { + return s.typeParameters +} + +func (s *Signature) Declaration() *ast.Node { + return s.declaration +} + +func (s *Signature) Target() *Signature { + return s.target +} + +func (s *Signature) ThisParameter() *ast.Symbol { + return s.thisParameter +} + type CompositeSignature struct { isUnion bool // True for union, false for intersection signatures []*Signature // Individual signatures diff --git a/internal/checker/utilities.go b/internal/checker/utilities.go index c5d2ce85de..fa959157e7 100644 --- a/internal/checker/utilities.go +++ b/internal/checker/utilities.go @@ -83,20 +83,16 @@ func hasAsyncModifier(node *ast.Node) bool { return ast.HasSyntacticModifier(node, ast.ModifierFlagsAsync) } -func hasDecorators(node *ast.Node) bool { - return ast.HasSyntacticModifier(node, ast.ModifierFlagsDecorator) -} - func getSelectedModifierFlags(node *ast.Node, flags ast.ModifierFlags) ast.ModifierFlags { return node.ModifierFlags() & flags } -func hasModifier(node *ast.Node, flags ast.ModifierFlags) bool { +func HasModifier(node *ast.Node, flags ast.ModifierFlags) bool { return node.ModifierFlags()&flags != 0 } func hasReadonlyModifier(node *ast.Node) bool { - return hasModifier(node, ast.ModifierFlagsReadonly) + return HasModifier(node, ast.ModifierFlagsReadonly) } func isStaticPrivateIdentifierProperty(s *ast.Symbol) bool { @@ -179,7 +175,7 @@ func isConstTypeReference(node *ast.Node) bool { return ast.IsTypeReferenceNode(node) && len(node.TypeArguments()) == 0 && ast.IsIdentifier(node.AsTypeReferenceNode().TypeName) && node.AsTypeReferenceNode().TypeName.Text() == "const" } -func getSingleVariableOfVariableStatement(node *ast.Node) *ast.Node { +func GetSingleVariableOfVariableStatement(node *ast.Node) *ast.Node { if !ast.IsVariableStatement(node) { return nil } @@ -256,25 +252,6 @@ func nodeCanBeDecorated(useLegacyDecorators bool, node *ast.Node, parent *ast.No return false } -func canHaveSymbol(node *ast.Node) bool { - switch node.Kind { - case ast.KindArrowFunction, ast.KindBinaryExpression, ast.KindBindingElement, ast.KindCallExpression, ast.KindCallSignature, - ast.KindClassDeclaration, ast.KindClassExpression, ast.KindClassStaticBlockDeclaration, ast.KindConstructor, ast.KindConstructorType, - ast.KindConstructSignature, ast.KindElementAccessExpression, ast.KindEnumDeclaration, ast.KindEnumMember, ast.KindExportAssignment, ast.KindJSExportAssignment, - ast.KindExportDeclaration, ast.KindExportSpecifier, ast.KindFunctionDeclaration, ast.KindFunctionExpression, ast.KindFunctionType, - ast.KindGetAccessor, ast.KindIdentifier, ast.KindImportClause, ast.KindImportEqualsDeclaration, ast.KindImportSpecifier, - ast.KindIndexSignature, ast.KindInterfaceDeclaration, ast.KindJSDocSignature, ast.KindJSDocTypeLiteral, - ast.KindJsxAttribute, ast.KindJsxAttributes, ast.KindJsxSpreadAttribute, ast.KindMappedType, ast.KindMethodDeclaration, - ast.KindMethodSignature, ast.KindModuleDeclaration, ast.KindNamedTupleMember, ast.KindNamespaceExport, ast.KindNamespaceExportDeclaration, - ast.KindNamespaceImport, ast.KindNewExpression, ast.KindNoSubstitutionTemplateLiteral, ast.KindNumericLiteral, ast.KindObjectLiteralExpression, - ast.KindParameter, ast.KindPropertyAccessExpression, ast.KindPropertyAssignment, ast.KindPropertyDeclaration, ast.KindPropertySignature, - ast.KindSetAccessor, ast.KindShorthandPropertyAssignment, ast.KindSourceFile, ast.KindSpreadAssignment, ast.KindStringLiteral, - ast.KindTypeAliasDeclaration, ast.KindJSTypeAliasDeclaration, ast.KindTypeLiteral, ast.KindTypeParameter, ast.KindVariableDeclaration: - return true - } - return false -} - func canHaveLocals(node *ast.Node) bool { switch node.Kind { case ast.KindArrowFunction, ast.KindBlock, ast.KindCallSignature, ast.KindCaseBlock, ast.KindCatchClause, @@ -439,7 +416,7 @@ func declarationBelongsToPrivateAmbientMember(declaration *ast.Node) bool { } func isPrivateWithinAmbient(node *ast.Node) bool { - return (hasModifier(node, ast.ModifierFlagsPrivate) || ast.IsPrivateIdentifierClassElementDeclaration(node)) && node.Flags&ast.NodeFlagsAmbient != 0 + return (HasModifier(node, ast.ModifierFlagsPrivate) || ast.IsPrivateIdentifierClassElementDeclaration(node)) && node.Flags&ast.NodeFlagsAmbient != 0 } func isTypeAssertion(node *ast.Node) bool { @@ -1094,10 +1071,6 @@ func isThisTypeParameter(t *Type) bool { return t.flags&TypeFlagsTypeParameter != 0 && t.AsTypeParameter().isThisType } -func isCallOrNewExpression(node *ast.Node) bool { - return ast.IsCallExpression(node) || ast.IsNewExpression(node) -} - func isClassInstanceProperty(node *ast.Node) bool { return node.Parent != nil && ast.IsClassLike(node.Parent) && ast.IsPropertyDeclaration(node) && !ast.HasAccessorModifier(node) } @@ -1197,11 +1170,6 @@ func reverseAccessKind(a AccessKind) AccessKind { panic("Unhandled case in reverseAccessKind") } -// Deprecated in favor of `ast.IsObjectLiteralElement` -func isObjectLiteralElementLike(node *ast.Node) bool { - return ast.IsObjectLiteralElement(node) -} - func isInfinityOrNaNString(name string) bool { return name == "Infinity" || name == "-Infinity" || name == "NaN" } @@ -1230,13 +1198,6 @@ func isInAmbientOrTypeNode(node *ast.Node) bool { }) != nil } -func getAncestor(node *ast.Node, kind ast.Kind) *ast.Node { - for node != nil && node.Kind != kind { - node = node.Parent - } - return node -} - func isLiteralExpressionOfObject(node *ast.Node) bool { switch node.Kind { case ast.KindObjectLiteralExpression, ast.KindArrayLiteralExpression, ast.KindRegularExpressionLiteral, @@ -1274,18 +1235,6 @@ func getBindingElementPropertyName(node *ast.Node) *ast.Node { return node.Name() } -func indexOfNode(nodes []*ast.Node, node *ast.Node) int { - index, ok := slices.BinarySearchFunc(nodes, node, compareNodePositions) - if ok { - return index - } - return -1 -} - -func compareNodePositions(n1, n2 *ast.Node) int { - return n1.Pos() - n2.Pos() -} - func hasContextSensitiveParameters(node *ast.Node) bool { // Functions with type parameters are not context sensitive. if node.TypeParameters() == nil { @@ -1310,7 +1259,7 @@ func isCallChain(node *ast.Node) bool { } func (c *Checker) callLikeExpressionMayHaveTypeArguments(node *ast.Node) bool { - return isCallOrNewExpression(node) || ast.IsTaggedTemplateExpression(node) || ast.IsJsxOpeningLikeElement(node) + return ast.IsCallOrNewExpression(node) || ast.IsTaggedTemplateExpression(node) || ast.IsJsxOpeningLikeElement(node) } func isSuperCall(n *ast.Node) bool { @@ -1847,19 +1796,6 @@ func tryGetPropertyAccessOrIdentifierToString(expr *ast.Node) string { return "" } -func getInvokedExpression(node *ast.Node) *ast.Node { - switch node.Kind { - case ast.KindTaggedTemplateExpression: - return node.AsTaggedTemplateExpression().Tag - case ast.KindJsxOpeningElement, ast.KindJsxSelfClosingElement: - return node.TagName() - case ast.KindBinaryExpression: - return node.AsBinaryExpression().Right - default: - return node.Expression() - } -} - func getFirstJSDocTag(node *ast.Node, f func(*ast.Node) bool) *ast.Node { for _, jsdoc := range node.JSDoc(nil) { tags := jsdoc.AsJSDoc().Tags diff --git a/internal/compiler/emitHost.go b/internal/compiler/emitHost.go index 21772f7e57..bceaae4ac5 100644 --- a/internal/compiler/emitHost.go +++ b/internal/compiler/emitHost.go @@ -5,7 +5,9 @@ import ( "github.com/microsoft/typescript-go/internal/ast" "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/module" "github.com/microsoft/typescript-go/internal/modulespecifiers" + "github.com/microsoft/typescript-go/internal/outputpaths" "github.com/microsoft/typescript-go/internal/printer" "github.com/microsoft/typescript-go/internal/transformers/declarations" "github.com/microsoft/typescript-go/internal/tspath" @@ -39,10 +41,22 @@ type emitHost struct { program *Program } -func (host *emitHost) GetDefaultResolutionModeForFile(file *ast.SourceFile) core.ResolutionMode { +func (host *emitHost) GetModeForUsageLocation(file ast.HasFileName, moduleSpecifier *ast.StringLiteralLike) core.ResolutionMode { + return host.program.GetModeForUsageLocation(file, moduleSpecifier) +} + +func (host *emitHost) GetResolvedModuleFromModuleSpecifier(file ast.HasFileName, moduleSpecifier *ast.StringLiteralLike) *module.ResolvedModule { + return host.program.GetResolvedModuleFromModuleSpecifier(file, moduleSpecifier) +} + +func (host *emitHost) GetDefaultResolutionModeForFile(file ast.HasFileName) core.ResolutionMode { return host.program.GetDefaultResolutionModeForFile(file) } +func (host *emitHost) GetEmitModuleFormatOfFile(file ast.HasFileName) core.ModuleKind { + return host.program.GetEmitModuleFormatOfFile(file) +} + func (host *emitHost) FileExists(path string) bool { return host.program.FileExists(path) } @@ -77,7 +91,7 @@ func (host *emitHost) GetEffectiveDeclarationFlags(node *ast.Node, flags ast.Mod func (host *emitHost) GetOutputPathsFor(file *ast.SourceFile, forceDtsPaths bool) declarations.OutputPaths { // TODO: cache - return getOutputPathsFor(file, host, forceDtsPaths) + return outputpaths.GetOutputPathsFor(file, host.Options(), host, forceDtsPaths) } func (host *emitHost) GetResolutionModeOverride(node *ast.Node) core.ResolutionMode { @@ -90,10 +104,10 @@ func (host *emitHost) GetSourceFileFromReference(origin *ast.SourceFile, ref *as func (host *emitHost) Options() *core.CompilerOptions { return host.program.Options() } func (host *emitHost) SourceFiles() []*ast.SourceFile { return host.program.SourceFiles() } -func (host *emitHost) GetCurrentDirectory() string { return host.program.host.GetCurrentDirectory() } +func (host *emitHost) GetCurrentDirectory() string { return host.program.GetCurrentDirectory() } func (host *emitHost) CommonSourceDirectory() string { return host.program.CommonSourceDirectory() } func (host *emitHost) UseCaseSensitiveFileNames() bool { - return host.program.host.FS().UseCaseSensitiveFileNames() + return host.program.UseCaseSensitiveFileNames() } func (host *emitHost) IsEmitBlocked(file string) bool { @@ -102,7 +116,7 @@ func (host *emitHost) IsEmitBlocked(file string) bool { } func (host *emitHost) WriteFile(fileName string, text string, writeByteOrderMark bool, _ []*ast.SourceFile, _ *printer.WriteFileData) error { - return host.program.host.FS().WriteFile(fileName, text, writeByteOrderMark) + return host.program.Host().FS().WriteFile(fileName, text, writeByteOrderMark) } func (host *emitHost) GetEmitResolver(file *ast.SourceFile, skipDiagnostics bool) printer.EmitResolver { diff --git a/internal/compiler/emitter.go b/internal/compiler/emitter.go index 75d581809e..1eb27b621c 100644 --- a/internal/compiler/emitter.go +++ b/internal/compiler/emitter.go @@ -7,6 +7,7 @@ import ( "github.com/microsoft/typescript-go/internal/ast" "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/diagnostics" + "github.com/microsoft/typescript-go/internal/outputpaths" "github.com/microsoft/typescript-go/internal/printer" "github.com/microsoft/typescript-go/internal/sourcemap" "github.com/microsoft/typescript-go/internal/stringutil" @@ -32,15 +33,15 @@ type emitter struct { emitSkipped bool sourceMapDataList []*SourceMapEmitResult writer printer.EmitTextWriter - paths *outputPaths + paths *outputpaths.OutputPaths sourceFile *ast.SourceFile } func (e *emitter) emit() { // !!! tracing - e.emitJSFile(e.sourceFile, e.paths.jsFilePath, e.paths.sourceMapFilePath) - e.emitDeclarationFile(e.sourceFile, e.paths.declarationFilePath, e.paths.declarationMapPath) - e.emitBuildInfo(e.paths.buildInfoPath) + e.emitJSFile(e.sourceFile, e.paths.JsFilePath(), e.paths.SourceMapFilePath()) + e.emitDeclarationFile(e.sourceFile, e.paths.DeclarationFilePath(), e.paths.DeclarationMapPath()) + e.emitBuildInfo(e.paths.BuildInfoPath()) } func (e *emitter) getDeclarationTransformers(emitContext *printer.EmitContext, sourceFile *ast.SourceFile, declarationFilePath string, declarationMapPath string) []*declarations.DeclarationTransformer { @@ -207,44 +208,6 @@ func (e *emitter) printSourceFile(jsFilePath string, sourceMapFilePath string, s return !data.SkippedDtsWrite } -func getSourceFilePathInNewDir(fileName string, newDirPath string, currentDirectory string, commonSourceDirectory string, useCaseSensitiveFileNames bool) string { - sourceFilePath := tspath.GetNormalizedAbsolutePath(fileName, currentDirectory) - commonSourceDirectory = tspath.EnsureTrailingDirectorySeparator(commonSourceDirectory) - isSourceFileInCommonSourceDirectory := tspath.ContainsPath(commonSourceDirectory, sourceFilePath, tspath.ComparePathsOptions{ - UseCaseSensitiveFileNames: useCaseSensitiveFileNames, - CurrentDirectory: currentDirectory, - }) - if isSourceFileInCommonSourceDirectory { - sourceFilePath = sourceFilePath[len(commonSourceDirectory):] - } - return tspath.CombinePaths(newDirPath, sourceFilePath) -} - -func getOwnEmitOutputFilePath(fileName string, host printer.EmitHost, extension string) string { - compilerOptions := host.Options() - var emitOutputFilePathWithoutExtension string - if len(compilerOptions.OutDir) > 0 { - currentDirectory := host.GetCurrentDirectory() - emitOutputFilePathWithoutExtension = tspath.RemoveFileExtension(getSourceFilePathInNewDir( - fileName, - compilerOptions.OutDir, - currentDirectory, - host.CommonSourceDirectory(), - host.UseCaseSensitiveFileNames(), - )) - } else { - emitOutputFilePathWithoutExtension = tspath.RemoveFileExtension(fileName) - } - return emitOutputFilePathWithoutExtension + extension -} - -func getSourceMapFilePath(jsFilePath string, options *core.CompilerOptions) string { - if options.SourceMap.IsTrue() && !options.InlineSourceMap.IsTrue() { - return jsFilePath + ".map" - } - return "" -} - func shouldEmitSourceMaps(mapOptions *core.CompilerOptions, sourceFile *ast.SourceFile) bool { return (mapOptions.SourceMap.IsTrue() || mapOptions.InlineSourceMap.IsTrue()) && !tspath.FileExtensionIs(sourceFile.FileName(), tspath.ExtensionJson) @@ -274,7 +237,7 @@ func (e *emitter) getSourceMapDirectory(mapOptions *core.CompilerOptions, filePa if sourceFile != nil { // For modules or multiple emit files the mapRoot will have directory structure like the sources // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map - sourceMapDir = tspath.GetDirectoryPath(getSourceFilePathInNewDir( + sourceMapDir = tspath.GetDirectoryPath(outputpaths.GetSourceFilePathInNewDir( sourceFile.FileName(), sourceMapDir, e.host.GetCurrentDirectory(), @@ -305,7 +268,7 @@ func (e *emitter) getSourceMappingURL(mapOptions *core.CompilerOptions, sourceMa if sourceFile != nil { // For modules or multiple emit files the mapRoot will have directory structure like the sources // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map - sourceMapDir = tspath.GetDirectoryPath(getSourceFilePathInNewDir( + sourceMapDir = tspath.GetDirectoryPath(outputpaths.GetSourceFilePathInNewDir( sourceFile.FileName(), sourceMapDir, e.host.GetCurrentDirectory(), @@ -334,91 +297,6 @@ func (e *emitter) getSourceMappingURL(mapOptions *core.CompilerOptions, sourceMa return stringutil.EncodeURI(sourceMapFile) } -func getDeclarationEmitOutputFilePath(file string, host EmitHost) string { - options := host.Options() - var outputDir *string - if len(options.DeclarationDir) > 0 { - outputDir = &options.DeclarationDir - } else if len(options.OutDir) > 0 { - outputDir = &options.OutDir - } - - var path string - if outputDir != nil { - path = getSourceFilePathInNewDirWorker(file, *outputDir, host.GetCurrentDirectory(), host.CommonSourceDirectory(), host.UseCaseSensitiveFileNames()) - } else { - path = file - } - declarationExtension := tspath.GetDeclarationEmitExtensionForPath(path) - return tspath.RemoveFileExtension(path) + declarationExtension -} - -func getSourceFilePathInNewDirWorker(fileName string, newDirPath string, currentDirectory string, commonSourceDirectory string, useCaseSensitiveFileNames bool) string { - sourceFilePath := tspath.GetNormalizedAbsolutePath(fileName, currentDirectory) - commonDir := tspath.GetCanonicalFileName(commonSourceDirectory, useCaseSensitiveFileNames) - canonFile := tspath.GetCanonicalFileName(sourceFilePath, useCaseSensitiveFileNames) - isSourceFileInCommonSourceDirectory := strings.HasPrefix(canonFile, commonDir) - if isSourceFileInCommonSourceDirectory { - sourceFilePath = sourceFilePath[len(commonSourceDirectory):] - } - return tspath.CombinePaths(newDirPath, sourceFilePath) -} - -type outputPaths struct { - jsFilePath string - sourceMapFilePath string - declarationFilePath string - declarationMapPath string - buildInfoPath string -} - -// DeclarationFilePath implements declarations.OutputPaths. -func (o *outputPaths) DeclarationFilePath() string { - return o.declarationFilePath -} - -// JsFilePath implements declarations.OutputPaths. -func (o *outputPaths) JsFilePath() string { - return o.jsFilePath -} - -func getOutputPathsFor(sourceFile *ast.SourceFile, host EmitHost, forceDtsEmit bool) *outputPaths { - options := host.Options() - // !!! bundle not implemented, may be deprecated - ownOutputFilePath := getOwnEmitOutputFilePath(sourceFile.FileName(), host, core.GetOutputExtension(sourceFile.FileName(), options.Jsx)) - isJsonFile := ast.IsJsonSourceFile(sourceFile) - // If json file emits to the same location skip writing it, if emitDeclarationOnly skip writing it - isJsonEmittedToSameLocation := isJsonFile && - tspath.ComparePaths(sourceFile.FileName(), ownOutputFilePath, tspath.ComparePathsOptions{ - CurrentDirectory: host.GetCurrentDirectory(), - UseCaseSensitiveFileNames: host.UseCaseSensitiveFileNames(), - }) == 0 - paths := &outputPaths{} - if options.EmitDeclarationOnly != core.TSTrue && !isJsonEmittedToSameLocation { - paths.jsFilePath = ownOutputFilePath - if !ast.IsJsonSourceFile(sourceFile) { - paths.sourceMapFilePath = getSourceMapFilePath(paths.jsFilePath, options) - } - } - if forceDtsEmit || options.GetEmitDeclarations() && !isJsonFile { - paths.declarationFilePath = getDeclarationEmitOutputFilePath(sourceFile.FileName(), host) - if options.GetAreDeclarationMapsEnabled() { - paths.declarationMapPath = paths.declarationFilePath + ".map" - } - } - return paths -} - -func forEachEmittedFile(host EmitHost, action func(emitFileNames *outputPaths, sourceFile *ast.SourceFile) bool, sourceFiles []*ast.SourceFile, options *EmitOptions) bool { - // !!! outFile not yet implemented, may be deprecated - for _, sourceFile := range sourceFiles { - if action(getOutputPathsFor(sourceFile, host, options.forceDtsEmit), sourceFile) { - return true - } - } - return false -} - func sourceFileMayBeEmitted(sourceFile *ast.SourceFile, host printer.EmitHost, forceDtsEmit bool) bool { // !!! Js files are emitted only if option is enabled diff --git a/internal/compiler/fileloader.go b/internal/compiler/fileloader.go index 17f03d7834..53d6a35fa8 100644 --- a/internal/compiler/fileloader.go +++ b/internal/compiler/fileloader.go @@ -17,9 +17,7 @@ import ( ) type fileLoader struct { - host CompilerHost - programOptions ProgramOptions - compilerOptions *core.CompilerOptions + opts ProgramOptions resolver *module.Resolver defaultLibraryPath string comparePathsOptions tspath.ComparePathsOptions @@ -40,6 +38,7 @@ type processedFiles struct { files []*ast.SourceFile missingFiles []string resolvedModules map[tspath.Path]module.ModeAwareCache[*module.ResolvedModule] + sourceFileMetaDatas map[tspath.Path]*ast.SourceFileMetaData jsxRuntimeImportSpecifiers map[tspath.Path]*jsxRuntimeImportSpecifier importHelpersImportSpecifiers map[tspath.Path]*ast.Node } @@ -50,24 +49,21 @@ type jsxRuntimeImportSpecifier struct { } func processAllProgramFiles( - host CompilerHost, - programOptions ProgramOptions, - compilerOptions *core.CompilerOptions, + opts ProgramOptions, resolver *module.Resolver, - rootFiles []string, libs []string, singleThreaded bool, ) processedFiles { + compilerOptions := opts.Config.CompilerOptions() + rootFiles := opts.Config.FileNames() supportedExtensions := tsoptions.GetSupportedExtensions(compilerOptions, nil /*extraFileExtensions*/) loader := fileLoader{ - host: host, - programOptions: programOptions, - compilerOptions: compilerOptions, + opts: opts, resolver: resolver, - defaultLibraryPath: tspath.GetNormalizedAbsolutePath(host.DefaultLibraryPath(), host.GetCurrentDirectory()), + defaultLibraryPath: tspath.GetNormalizedAbsolutePath(opts.Host.DefaultLibraryPath(), opts.Host.GetCurrentDirectory()), comparePathsOptions: tspath.ComparePathsOptions{ - UseCaseSensitiveFileNames: host.FS().UseCaseSensitiveFileNames(), - CurrentDirectory: host.GetCurrentDirectory(), + UseCaseSensitiveFileNames: opts.Host.FS().UseCaseSensitiveFileNames(), + CurrentDirectory: opts.Host.GetCurrentDirectory(), }, wg: core.NewWorkGroup(singleThreaded), rootTasks: make([]*parseTask, 0, len(rootFiles)+len(libs)), @@ -90,6 +86,7 @@ func processAllProgramFiles( libFiles := make([]*ast.SourceFile, 0, totalFileCount) // totalFileCount here since we append files to it later to construct the final list resolvedModules := make(map[tspath.Path]module.ModeAwareCache[*module.ResolvedModule], totalFileCount) + sourceFileMetaDatas := make(map[tspath.Path]*ast.SourceFileMetaData, totalFileCount) var jsxRuntimeImportSpecifiers map[tspath.Path]*jsxRuntimeImportSpecifier var importHelpersImportSpecifiers map[tspath.Path]*ast.Node @@ -106,6 +103,7 @@ func processAllProgramFiles( } path := file.Path() resolvedModules[path] = task.resolutionsInFile + sourceFileMetaDatas[path] = task.metadata if task.jsxRuntimeImportSpecifier != nil { if jsxRuntimeImportSpecifiers == nil { jsxRuntimeImportSpecifiers = make(map[tspath.Path]*jsxRuntimeImportSpecifier, totalFileCount) @@ -126,6 +124,7 @@ func processAllProgramFiles( return processedFiles{ files: allFiles, resolvedModules: resolvedModules, + sourceFileMetaDatas: sourceFileMetaDatas, jsxRuntimeImportSpecifiers: jsxRuntimeImportSpecifiers, importHelpersImportSpecifiers: importHelpersImportSpecifiers, } @@ -133,8 +132,8 @@ func processAllProgramFiles( func (p *fileLoader) addRootTasks(files []string, isLib bool) { for _, fileName := range files { - absPath := tspath.GetNormalizedAbsolutePath(fileName, p.host.GetCurrentDirectory()) - if core.Tristate.IsTrue(p.compilerOptions.AllowNonTsExtensions) || slices.Contains(p.supportedExtensions, tspath.TryGetExtensionFromPath(absPath)) { + absPath := tspath.GetNormalizedAbsolutePath(fileName, p.opts.Host.GetCurrentDirectory()) + if core.Tristate.IsTrue(p.opts.Config.CompilerOptions().AllowNonTsExtensions) || slices.Contains(p.supportedExtensions, tspath.TryGetExtensionFromPath(absPath)) { p.rootTasks = append(p.rootTasks, &parseTask{normalizedFilePath: absPath, isLib: isLib}) } } @@ -142,14 +141,15 @@ func (p *fileLoader) addRootTasks(files []string, isLib bool) { func (p *fileLoader) addAutomaticTypeDirectiveTasks() { var containingDirectory string - if p.compilerOptions.ConfigFilePath != "" { - containingDirectory = tspath.GetDirectoryPath(p.compilerOptions.ConfigFilePath) + compilerOptions := p.opts.Config.CompilerOptions() + if compilerOptions.ConfigFilePath != "" { + containingDirectory = tspath.GetDirectoryPath(compilerOptions.ConfigFilePath) } else { - containingDirectory = p.host.GetCurrentDirectory() + containingDirectory = p.opts.Host.GetCurrentDirectory() } containingFileName := tspath.CombinePaths(containingDirectory, module.InferredTypesContainingFile) - automaticTypeDirectiveNames := module.GetAutomaticTypeDirectiveNames(p.compilerOptions, p.host) + automaticTypeDirectiveNames := module.GetAutomaticTypeDirectiveNames(compilerOptions, p.opts.Host) for _, name := range automaticTypeDirectiveNames { resolved := p.resolver.ResolveTypeReferenceDirective(name, containingFileName, core.ModuleKindNodeNext, nil) if resolved.IsResolved() { @@ -231,6 +231,7 @@ type parseTask struct { isLib bool subTasks []*parseTask + metadata *ast.SourceFileMetaData resolutionsInFile module.ModeAwareCache[*module.ResolvedModule] importHelpersImportSpecifier *ast.Node jsxRuntimeImportSpecifier *jsxRuntimeImportSpecifier @@ -249,6 +250,7 @@ func (t *parseTask) start(loader *fileLoader) { } t.file = file + t.metadata = loader.loadSourceFileMetaData(file.FileName()) // !!! if noResolve, skip all of this t.subTasks = make([]*parseTask, 0, len(file.ReferencedFiles)+len(file.Imports())+len(file.ModuleAugmentations)) @@ -258,15 +260,16 @@ func (t *parseTask) start(loader *fileLoader) { t.addSubTask(resolvedPath, false) } + compilerOptions := loader.opts.Config.CompilerOptions() for _, ref := range file.TypeReferenceDirectives { - resolutionMode := getModeForTypeReferenceDirectiveInFile(ref, file, loader.compilerOptions) + resolutionMode := getModeForTypeReferenceDirectiveInFile(ref, file, t.metadata, compilerOptions) resolved := loader.resolver.ResolveTypeReferenceDirective(ref.FileName, file.FileName(), resolutionMode, nil) if resolved.IsResolved() { t.addSubTask(resolved.ResolvedFileName, false) } } - if loader.compilerOptions.NoLib != core.TSTrue { + if compilerOptions.NoLib != core.TSTrue { for _, lib := range file.LibReferenceDirectives { name, ok := tsoptions.GetLibFileName(lib.FileName) if !ok { @@ -276,7 +279,7 @@ func (t *parseTask) start(loader *fileLoader) { } } - toParse, resolutionsInFile, importHelpersImportSpecifier, jsxRuntimeImportSpecifier := loader.resolveImportsAndModuleAugmentations(file, file.Metadata) + toParse, resolutionsInFile, importHelpersImportSpecifier, jsxRuntimeImportSpecifier := loader.resolveImportsAndModuleAugmentations(file, t.metadata) for _, imp := range toParse { t.addSubTask(imp, false) } @@ -307,10 +310,8 @@ func (p *fileLoader) loadSourceFileMetaData(fileName string) *ast.SourceFileMeta } func (p *fileLoader) parseSourceFile(fileName string) *ast.SourceFile { - path := tspath.ToPath(fileName, p.host.GetCurrentDirectory(), p.host.FS().UseCaseSensitiveFileNames()) - // TODO(jakebailey): we can do this concurently any time before parse - metadata := p.loadSourceFileMetaData(fileName) - sourceFile := p.host.GetSourceFile(fileName, path, metadata) + path := tspath.ToPath(fileName, p.opts.Host.GetCurrentDirectory(), p.opts.Host.FS().UseCaseSensitiveFileNames()) + sourceFile := p.opts.Host.GetSourceFile(fileName, path, p.opts.Config.CompilerOptions().GetEmitScriptTarget()) return sourceFile } @@ -349,14 +350,15 @@ func (p *fileLoader) resolveImportsAndModuleAugmentations(file *ast.SourceFile, isJavaScriptFile := ast.IsSourceFileJS(file) isExternalModuleFile := ast.IsExternalModule(file) - if isJavaScriptFile || (!file.IsDeclarationFile && (p.compilerOptions.GetIsolatedModules() || isExternalModuleFile)) { - if p.compilerOptions.ImportHelpers.IsTrue() { + compilerOptions := p.opts.Config.CompilerOptions() + if isJavaScriptFile || (!file.IsDeclarationFile && (compilerOptions.GetIsolatedModules() || isExternalModuleFile)) { + if compilerOptions.ImportHelpers.IsTrue() { specifier := p.createSyntheticImport(externalHelpersModuleNameText, file) moduleNames = append(moduleNames, specifier) importHelpersImportSpecifier = specifier } - jsxImport := ast.GetJSXRuntimeImport(ast.GetJSXImplicitImportBase(p.compilerOptions, file), p.compilerOptions) + jsxImport := ast.GetJSXRuntimeImport(ast.GetJSXImplicitImportBase(compilerOptions, file), compilerOptions) if jsxImport != "" { specifier := p.createSyntheticImport(jsxImport, file) moduleNames = append(moduleNames, specifier) @@ -379,7 +381,7 @@ func (p *fileLoader) resolveImportsAndModuleAugmentations(file *ast.SourceFile, resolvedFileName := resolution.resolvedModule.ResolvedFileName // TODO(ercornel): !!!: check if from node modules - mode := getModeForUsageLocation(file, meta, resolution.node, optionsForFile) + mode := getModeForUsageLocation(file.FileName(), meta, resolution.node, optionsForFile) resolutionsInFile[module.ModeAwareCacheKey{Name: resolution.node.Text(), Mode: mode}] = resolution.resolvedModule // add file to program only if: @@ -393,9 +395,9 @@ func (p *fileLoader) resolveImportsAndModuleAugmentations(file *ast.SourceFile, // Don't add the file if it has a bad extension (e.g. 'tsx' if we don't have '--allowJs') // This may still end up being an untyped module -- the file won't be included but imports will be allowed. hasAllowedExtension := false - if p.compilerOptions.ResolveJsonModule.IsTrue() { + if compilerOptions.ResolveJsonModule.IsTrue() { hasAllowedExtension = tspath.FileExtensionIsOneOf(resolvedFileName, tspath.SupportedTSExtensionsWithJsonFlat) - } else if p.compilerOptions.AllowJs.IsTrue() { + } else if compilerOptions.AllowJs.IsTrue() { hasAllowedExtension = tspath.FileExtensionIsOneOf(resolvedFileName, tspath.SupportedJSExtensionsFlat) || tspath.FileExtensionIsOneOf(resolvedFileName, tspath.SupportedTSExtensionsFlat) } else { hasAllowedExtension = tspath.FileExtensionIsOneOf(resolvedFileName, tspath.SupportedTSExtensionsFlat) @@ -425,7 +427,7 @@ func (p *fileLoader) resolveModuleNames(entries []*ast.Node, file *ast.SourceFil if moduleName == "" { continue } - resolvedModule := p.resolver.ResolveModuleName(moduleName, file.FileName(), getModeForUsageLocation(file, meta, entry, p.compilerOptions), nil) + resolvedModule := p.resolver.ResolveModuleName(moduleName, file.FileName(), getModeForUsageLocation(file.FileName(), meta, entry, p.opts.Config.CompilerOptions()), nil) resolvedModules = append(resolvedModules, &resolution{node: entry, resolvedModule: resolvedModule}) } @@ -452,26 +454,26 @@ type resolution struct { func (p *fileLoader) getCompilerOptionsForFile(file *ast.SourceFile) *core.CompilerOptions { // !!! return getRedirectReferenceForResolution(file)?.commandLine.options || options; - return p.compilerOptions + return p.opts.Config.CompilerOptions() } -func getModeForTypeReferenceDirectiveInFile(ref *ast.FileReference, file *ast.SourceFile, options *core.CompilerOptions) core.ResolutionMode { +func getModeForTypeReferenceDirectiveInFile(ref *ast.FileReference, file *ast.SourceFile, meta *ast.SourceFileMetaData, options *core.CompilerOptions) core.ResolutionMode { if ref.ResolutionMode != core.ResolutionModeNone { return ref.ResolutionMode } else { - return getDefaultResolutionModeForFile(file, options) + return getDefaultResolutionModeForFile(file.FileName(), meta, options) } } -func getDefaultResolutionModeForFile(file *ast.SourceFile, options *core.CompilerOptions) core.ResolutionMode { +func getDefaultResolutionModeForFile(fileName string, meta *ast.SourceFileMetaData, options *core.CompilerOptions) core.ResolutionMode { if importSyntaxAffectsModuleResolution(options) { - return ast.GetImpliedNodeFormatForEmitWorker(file, options.GetEmitModuleKind()) + return ast.GetImpliedNodeFormatForEmitWorker(fileName, options, meta) } else { return core.ResolutionModeNone } } -func getModeForUsageLocation(file *ast.SourceFile, meta *ast.SourceFileMetaData, usage *ast.Node, options *core.CompilerOptions) core.ResolutionMode { +func getModeForUsageLocation(fileName string, meta *ast.SourceFileMetaData, usage *ast.StringLiteralLike, options *core.CompilerOptions) core.ResolutionMode { if ast.IsImportDeclaration(usage.Parent) || ast.IsExportDeclaration(usage.Parent) || ast.IsJSDocImportTag(usage.Parent) { isTypeOnly := ast.IsExclusivelyTypeOnlyImportOrExport(usage.Parent) if isTypeOnly { @@ -497,7 +499,7 @@ func getModeForUsageLocation(file *ast.SourceFile, meta *ast.SourceFileMetaData, } if options != nil && importSyntaxAffectsModuleResolution(options) { - return getEmitSyntaxForUsageLocationWorker(file, meta, usage, options) + return getEmitSyntaxForUsageLocationWorker(fileName, meta, usage, options) } return core.ResolutionModeNone @@ -509,18 +511,13 @@ func importSyntaxAffectsModuleResolution(options *core.CompilerOptions) bool { options.GetResolvePackageJsonExports() || options.GetResolvePackageJsonImports() } -func getEmitSyntaxForUsageLocationWorker(file *ast.SourceFile, meta *ast.SourceFileMetaData, usage *ast.Node, options *core.CompilerOptions) core.ResolutionMode { - if options == nil { - // This should always be provided, but we try to fail somewhat - // gracefully to allow projects like ts-node time to update. - return core.ResolutionModeNone - } - +func getEmitSyntaxForUsageLocationWorker(fileName string, meta *ast.SourceFileMetaData, usage *ast.Node, options *core.CompilerOptions) core.ResolutionMode { if ast.IsRequireCall(usage.Parent) || ast.IsExternalModuleReference(usage.Parent) && ast.IsImportEqualsDeclaration(usage.Parent.Parent) { return core.ModuleKindCommonJS } + fileEmitMode := ast.GetEmitModuleFormatOfFileWorker(fileName, options, meta) if ast.IsImportCall(ast.WalkUpParenthesizedExpressions(usage.Parent)) { - if shouldTransformImportCallWorker(file, meta, options) { + if ast.ShouldTransformImportCall(fileName, options, fileEmitMode) { return core.ModuleKindCommonJS } else { return core.ModuleKindESNext @@ -533,7 +530,6 @@ func getEmitSyntaxForUsageLocationWorker(file *ast.SourceFile, meta *ast.SourceF // file, until/unless declaration emit can indicate a true ESM import. On the // other hand, writing CJS syntax in a definitely-ESM file is fine, since declaration // emit preserves the CJS syntax. - fileEmitMode := ast.GetEmitModuleFormatOfFileWorker(file, options) if fileEmitMode == core.ModuleKindCommonJS { return core.ModuleKindCommonJS } else { @@ -543,11 +539,3 @@ func getEmitSyntaxForUsageLocationWorker(file *ast.SourceFile, meta *ast.SourceF } return core.ModuleKindNone } - -func shouldTransformImportCallWorker(file *ast.SourceFile, meta *ast.SourceFileMetaData, options *core.CompilerOptions) bool { - moduleKind := options.GetEmitModuleKind() - if core.ModuleKindNode16 <= moduleKind && moduleKind <= core.ModuleKindNodeNext || moduleKind == core.ModuleKindPreserve { - return false - } - return ast.GetImpliedNodeFormatForEmitWorker(file, options.GetEmitModuleKind()) < core.ModuleKindES2015 -} diff --git a/internal/compiler/host.go b/internal/compiler/host.go index 93a5dc2151..3db76b350a 100644 --- a/internal/compiler/host.go +++ b/internal/compiler/host.go @@ -16,7 +16,7 @@ type CompilerHost interface { GetCurrentDirectory() string NewLine() string Trace(msg string) - GetSourceFile(fileName string, path tspath.Path, metadata *ast.SourceFileMetaData) *ast.SourceFile + GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile } type FileInfo struct { @@ -54,6 +54,10 @@ func (h *compilerHost) DefaultLibraryPath() string { return h.defaultLibraryPath } +func (h *compilerHost) SetOptions(options *core.CompilerOptions) { + h.options = options +} + func (h *compilerHost) GetCurrentDirectory() string { return h.currentDirectory } @@ -69,13 +73,10 @@ func (h *compilerHost) Trace(msg string) { //!!! TODO: implement } -func (h *compilerHost) GetSourceFile(fileName string, path tspath.Path, metadata *ast.SourceFileMetaData) *ast.SourceFile { +func (h *compilerHost) GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile { text, _ := h.FS().ReadFile(fileName) if tspath.FileExtensionIs(fileName, tspath.ExtensionJson) { return parser.ParseJSONText(fileName, path, text) } - if h.options == nil { - panic("GetSourceFile called without CompilerOptions set") - } - return parser.ParseSourceFile(fileName, path, text, h.options.SourceFileAffecting(), metadata, scanner.JSDocParsingModeParseForTypeErrors) + return parser.ParseSourceFile(fileName, path, text, languageVersion, scanner.JSDocParsingModeParseForTypeErrors) } diff --git a/internal/compiler/program.go b/internal/compiler/program.go index 0ddbb5d1ea..a5a8b96800 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -9,10 +9,12 @@ import ( "github.com/microsoft/typescript-go/internal/ast" "github.com/microsoft/typescript-go/internal/binder" "github.com/microsoft/typescript-go/internal/checker" + "github.com/microsoft/typescript-go/internal/collections" "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/diagnostics" "github.com/microsoft/typescript-go/internal/module" "github.com/microsoft/typescript-go/internal/modulespecifiers" + "github.com/microsoft/typescript-go/internal/outputpaths" "github.com/microsoft/typescript-go/internal/printer" "github.com/microsoft/typescript-go/internal/scanner" "github.com/microsoft/typescript-go/internal/sourcemap" @@ -21,34 +23,28 @@ import ( ) type ProgramOptions struct { - RootFiles []string - Host CompilerHost - Options *core.CompilerOptions - SingleThreaded core.Tristate - ProjectReference []core.ProjectReference - ConfigFileParsingDiagnostics []*ast.Diagnostic - CreateCheckerPool func(*Program) CheckerPool - - TypingsLocation string - ProjectName string + Host CompilerHost + Config *tsoptions.ParsedCommandLine + SingleThreaded core.Tristate + CreateCheckerPool func(*Program) CheckerPool + TypingsLocation string + ProjectName string } type Program struct { - host CompilerHost - programOptions ProgramOptions - compilerOptions *core.CompilerOptions - configFileName string - nodeModules map[string]*ast.SourceFile - checkerPool CheckerPool - currentDirectory string - configFileParsingDiagnostics []*ast.Diagnostic + opts ProgramOptions + nodeModules map[string]*ast.SourceFile + checkerPool CheckerPool + currentDirectory string sourceAffectingCompilerOptionsOnce sync.Once sourceAffectingCompilerOptions *core.SourceFileAffectingCompilerOptions resolver *module.Resolver - comparePathsOptions tspath.ComparePathsOptions + comparePathsOptions tspath.ComparePathsOptions + supportedExtensions [][]string + supportedExtensionsWithJsonIfResolveJsonModule []string processedFiles @@ -71,16 +67,18 @@ type Program struct { // List of present unsupported extensions unsupportedExtensions []string + + declarationDiagnosticCache collections.SyncMap[*ast.SourceFile, []*ast.Diagnostic] } // FileExists implements checker.Program. func (p *Program) FileExists(path string) bool { - return p.host.FS().FileExists(path) + return p.Host().FS().FileExists(path) } // GetCurrentDirectory implements checker.Program. func (p *Program) GetCurrentDirectory() string { - return p.host.GetCurrentDirectory() + return p.Host().GetCurrentDirectory() } // GetGlobalTypingsCacheLocation implements checker.Program. @@ -123,7 +121,7 @@ func (p *Program) IsSourceOfProjectReferenceRedirect(path string) bool { // UseCaseSensitiveFileNames implements checker.Program. func (p *Program) UseCaseSensitiveFileNames() bool { - return p.host.FS().UseCaseSensitiveFileNames() + return p.Host().FS().UseCaseSensitiveFileNames() } var _ checker.Program = (*Program)(nil) @@ -140,7 +138,7 @@ func (p *Program) GetSourceFileFromReference(origin *ast.SourceFile, ref *ast.Fi allowNonTsExtensions := p.Options().AllowNonTsExtensions.IsTrue() if tspath.HasExtension(fileName) { if !allowNonTsExtensions { - canonicalFileName := tspath.GetCanonicalFileName(fileName, p.host.FS().UseCaseSensitiveFileNames()) + canonicalFileName := tspath.GetCanonicalFileName(fileName, p.UseCaseSensitiveFileNames()) supported := false for _, group := range supportedExtensions { if tspath.FileExtensionIsOneOf(canonicalFileName, group) { @@ -172,16 +170,15 @@ func (p *Program) GetSourceFileFromReference(origin *ast.SourceFile, ref *ast.Fi return nil } -func NewProgram(options ProgramOptions) *Program { - p := &Program{} - p.programOptions = options - p.compilerOptions = options.Options - p.configFileParsingDiagnostics = slices.Clip(options.ConfigFileParsingDiagnostics) - if p.compilerOptions == nil { +func NewProgram(opts ProgramOptions) *Program { + p := &Program{ + opts: opts, + } + compilerOptions := p.opts.Config.CompilerOptions() + if compilerOptions == nil { panic("compiler options required") } - p.host = options.Host - if p.host == nil { + if p.opts.Host == nil { panic("host required") } p.initCheckerPool() @@ -192,32 +189,26 @@ func NewProgram(options ProgramOptions) *Program { // tracing?.push(tracing.Phase.Program, "createProgram", { configFilePath: options.configFilePath, rootDir: options.rootDir }, /*separateBeginAndEnd*/ true); // performance.mark("beforeProgram"); - // TODO(jakebailey): !!! override host's options - p.host = options.Host - if p.host == nil { - panic("host required") - } - - p.resolver = module.NewResolver(p.host, p.compilerOptions, p.programOptions.TypingsLocation, p.programOptions.ProjectName) + p.resolver = module.NewResolver(p.Host(), compilerOptions, p.opts.TypingsLocation, p.opts.ProjectName) var libs []string - if p.compilerOptions.NoLib != core.TSTrue { - if p.compilerOptions.Lib == nil { - name := tsoptions.GetDefaultLibFileName(p.compilerOptions) - libs = append(libs, tspath.CombinePaths(p.host.DefaultLibraryPath(), name)) + if compilerOptions.NoLib != core.TSTrue { + if compilerOptions.Lib == nil { + name := tsoptions.GetDefaultLibFileName(compilerOptions) + libs = append(libs, tspath.CombinePaths(p.Host().DefaultLibraryPath(), name)) } else { - for _, lib := range p.compilerOptions.Lib { + for _, lib := range compilerOptions.Lib { name, ok := tsoptions.GetLibFileName(lib) if ok { - libs = append(libs, tspath.CombinePaths(p.host.DefaultLibraryPath(), name)) + libs = append(libs, tspath.CombinePaths(p.Host().DefaultLibraryPath(), name)) } // !!! error on unknown name } } } - p.processedFiles = processAllProgramFiles(p.host, p.programOptions, p.compilerOptions, p.resolver, options.RootFiles, libs, p.singleThreaded()) + p.processedFiles = processAllProgramFiles(p.opts, p.resolver, libs, p.singleThreaded()) p.filesByPath = make(map[tspath.Path]*ast.SourceFile, len(p.files)) for _, file := range p.files { p.filesByPath[file.Path()] = file @@ -237,25 +228,21 @@ func NewProgram(options ProgramOptions) *Program { // In addition to a new program, return a boolean indicating whether the data of the old program was reused. func (p *Program) UpdateProgram(changedFilePath tspath.Path) (*Program, bool) { oldFile := p.filesByPath[changedFilePath] - newFile := p.host.GetSourceFile(oldFile.FileName(), changedFilePath, oldFile.Metadata) // TODO(jakebailey): metadata could have changed + newFile := p.Host().GetSourceFile(oldFile.FileName(), changedFilePath, oldFile.LanguageVersion) if !canReplaceFileInProgram(oldFile, newFile) { - return NewProgram(p.programOptions), false + return NewProgram(p.opts), false } result := &Program{ - host: p.host, - programOptions: p.programOptions, - compilerOptions: p.compilerOptions, - configFileName: p.configFileName, - nodeModules: p.nodeModules, - currentDirectory: p.currentDirectory, - configFileParsingDiagnostics: p.configFileParsingDiagnostics, - resolver: p.resolver, - comparePathsOptions: p.comparePathsOptions, - processedFiles: p.processedFiles, - filesByPath: p.filesByPath, - currentNodeModulesDepth: p.currentNodeModulesDepth, - usesUriStyleNodeCoreModules: p.usesUriStyleNodeCoreModules, - unsupportedExtensions: p.unsupportedExtensions, + opts: p.opts, + nodeModules: p.nodeModules, + currentDirectory: p.currentDirectory, + resolver: p.resolver, + comparePathsOptions: p.comparePathsOptions, + processedFiles: p.processedFiles, + filesByPath: p.filesByPath, + currentNodeModulesDepth: p.currentNodeModulesDepth, + usesUriStyleNodeCoreModules: p.usesUriStyleNodeCoreModules, + unsupportedExtensions: p.unsupportedExtensions, } result.initCheckerPool() index := core.FindIndex(result.files, func(file *ast.SourceFile) bool { return file.Path() == newFile.Path() }) @@ -267,8 +254,8 @@ func (p *Program) UpdateProgram(changedFilePath tspath.Path) (*Program, bool) { } func (p *Program) initCheckerPool() { - if p.programOptions.CreateCheckerPool != nil { - p.checkerPool = p.programOptions.CreateCheckerPool(p) + if p.opts.CreateCheckerPool != nil { + p.checkerPool = p.opts.CreateCheckerPool(p) } else { p.checkerPool = newCheckerPool(core.IfElse(p.singleThreaded(), 1, 4), p) } @@ -289,8 +276,7 @@ func canReplaceFileInProgram(file1 *ast.SourceFile, file2 *ast.SourceFile) bool slices.EqualFunc(file1.ReferencedFiles, file2.ReferencedFiles, equalFileReferences) && slices.EqualFunc(file1.TypeReferenceDirectives, file2.TypeReferenceDirectives, equalFileReferences) && slices.EqualFunc(file1.LibReferenceDirectives, file2.LibReferenceDirectives, equalFileReferences) && - equalCheckJSDirectives(file1.CheckJsDirective, file2.CheckJsDirective) && - equalMetaData(file1.Metadata, file2.Metadata) + equalCheckJSDirectives(file1.CheckJsDirective, file2.CheckJsDirective) } func equalModuleSpecifiers(n1 *ast.Node, n2 *ast.Node) bool { @@ -309,35 +295,20 @@ func equalCheckJSDirectives(d1 *ast.CheckJsDirective, d2 *ast.CheckJsDirective) return d1 == nil && d2 == nil || d1 != nil && d2 != nil && d1.Enabled == d2.Enabled } -func equalMetaData(m1 *ast.SourceFileMetaData, m2 *ast.SourceFileMetaData) bool { - return m1 == nil && m2 == nil || m1 != nil && m2 != nil && *m1 == *m2 -} - -func NewProgramFromParsedCommandLine(config *tsoptions.ParsedCommandLine, host CompilerHost) *Program { - programOptions := ProgramOptions{ - RootFiles: config.FileNames(), - Options: config.CompilerOptions(), - Host: host, - // todo: ProjectReferences - ConfigFileParsingDiagnostics: config.GetConfigFileParsingDiagnostics(), - } - return NewProgram(programOptions) -} - func (p *Program) SourceFiles() []*ast.SourceFile { return p.files } -func (p *Program) Options() *core.CompilerOptions { return p.compilerOptions } -func (p *Program) Host() CompilerHost { return p.host } +func (p *Program) Options() *core.CompilerOptions { return p.opts.Config.CompilerOptions() } +func (p *Program) Host() CompilerHost { return p.opts.Host } func (p *Program) GetConfigFileParsingDiagnostics() []*ast.Diagnostic { - return slices.Clip(p.configFileParsingDiagnostics) + return slices.Clip(p.opts.Config.GetConfigFileParsingDiagnostics()) } func (p *Program) singleThreaded() bool { - return p.programOptions.SingleThreaded.DefaultIfUnknown(p.compilerOptions.SingleThreaded).IsTrue() + return p.opts.SingleThreaded.DefaultIfUnknown(p.Options().SingleThreaded).IsTrue() } func (p *Program) getSourceAffectingCompilerOptions() *core.SourceFileAffectingCompilerOptions { p.sourceAffectingCompilerOptionsOnce.Do(func() { - p.sourceAffectingCompilerOptions = p.compilerOptions.SourceFileAffecting() + p.sourceAffectingCompilerOptions = p.Options().SourceFileAffecting() }) return p.sourceAffectingCompilerOptions } @@ -385,7 +356,7 @@ func (p *Program) GetTypeCheckerForFile(ctx context.Context, file *ast.SourceFil return p.checkerPool.GetCheckerForFile(ctx, file) } -func (p *Program) GetResolvedModule(file *ast.SourceFile, moduleReference string, mode core.ResolutionMode) *module.ResolvedModule { +func (p *Program) GetResolvedModule(file ast.HasFileName, moduleReference string, mode core.ResolutionMode) *module.ResolvedModule { if resolutions, ok := p.resolvedModules[file.Path()]; ok { if resolved, ok := resolutions[module.ModeAwareCacheKey{Name: moduleReference, Mode: mode}]; ok { return resolved @@ -394,12 +365,20 @@ func (p *Program) GetResolvedModule(file *ast.SourceFile, moduleReference string return nil } +func (p *Program) GetResolvedModuleFromModuleSpecifier(file ast.HasFileName, moduleSpecifier *ast.StringLiteralLike) *module.ResolvedModule { + if !ast.IsStringLiteralLike(moduleSpecifier) { + panic("moduleSpecifier must be a StringLiteralLike") + } + mode := p.GetModeForUsageLocation(file, moduleSpecifier) + return p.GetResolvedModule(file, moduleSpecifier.Text(), mode) +} + func (p *Program) GetResolvedModules() map[tspath.Path]module.ModeAwareCache[*module.ResolvedModule] { return p.resolvedModules } func (p *Program) findSourceFile(candidate string, reason FileIncludeReason) *ast.SourceFile { - path := tspath.ToPath(candidate, p.host.GetCurrentDirectory(), p.host.FS().UseCaseSensitiveFileNames()) + path := tspath.ToPath(candidate, p.GetCurrentDirectory(), p.UseCaseSensitiveFileNames()) return p.filesByPath[path] } @@ -443,7 +422,7 @@ func (p *Program) getOptionsDiagnosticsOfConfigFile() []*ast.Diagnostic { if p.Options() == nil || p.Options().ConfigFilePath == "" { return nil } - return p.configFileParsingDiagnostics // TODO: actually call getDiagnosticsHelper on config path + return p.GetConfigFileParsingDiagnostics() // TODO: actually call getDiagnosticsHelper on config path } func (p *Program) getSyntacticDiagnosticsForFile(ctx context.Context, sourceFile *ast.SourceFile) []*ast.Diagnostic { @@ -460,7 +439,8 @@ func (p *Program) getBindDiagnosticsForFile(ctx context.Context, sourceFile *ast } func (p *Program) getSemanticDiagnosticsForFile(ctx context.Context, sourceFile *ast.SourceFile) []*ast.Diagnostic { - if checker.SkipTypeChecking(sourceFile, p.compilerOptions) { + compilerOptions := p.Options() + if checker.SkipTypeChecking(sourceFile, compilerOptions) { return nil } @@ -487,7 +467,7 @@ func (p *Program) getSemanticDiagnosticsForFile(ctx context.Context, sourceFile return nil } - isPlainJS := ast.IsPlainJSFile(sourceFile, p.compilerOptions.CheckJs) + isPlainJS := ast.IsPlainJSFile(sourceFile, compilerOptions.CheckJs) if isPlainJS { diags = core.Filter(diags, func(d *ast.Diagnostic) bool { return plainJSErrors.Has(d.Code()) @@ -539,12 +519,19 @@ func (p *Program) getDeclarationDiagnosticsForFile(_ctx context.Context, sourceF if sourceFile.IsDeclarationFile { return []*ast.Diagnostic{} } + + if cached, ok := p.declarationDiagnosticCache.Load(sourceFile); ok { + return cached + } + host := &emitHost{program: p} - return getDeclarationDiagnostics(host, host.GetEmitResolver(sourceFile, true), sourceFile) + diagnostics := getDeclarationDiagnostics(host, host.GetEmitResolver(sourceFile, true), sourceFile) + diagnostics, _ = p.declarationDiagnosticCache.LoadOrStore(sourceFile, diagnostics) + return diagnostics } func (p *Program) getSuggestionDiagnosticsForFile(ctx context.Context, sourceFile *ast.SourceFile) []*ast.Diagnostic { - if checker.SkipTypeChecking(sourceFile, p.compilerOptions) { + if checker.SkipTypeChecking(sourceFile, p.Options()) { return nil } @@ -696,12 +683,28 @@ func (p *Program) InstantiationCount() int { return count } -func (p *Program) GetModeForUsageLocation(sourceFile *ast.SourceFile, location *ast.Node) core.ResolutionMode { - return getModeForUsageLocation(sourceFile, sourceFile.Metadata, location, p.compilerOptions) +func (p *Program) GetSourceFileMetaData(path tspath.Path) *ast.SourceFileMetaData { + return p.sourceFileMetaDatas[path] +} + +func (p *Program) GetEmitModuleFormatOfFile(sourceFile ast.HasFileName) core.ModuleKind { + return ast.GetEmitModuleFormatOfFileWorker(sourceFile.FileName(), p.Options(), p.GetSourceFileMetaData(sourceFile.Path())) +} + +func (p *Program) GetEmitSyntaxForUsageLocation(sourceFile ast.HasFileName, location *ast.StringLiteralLike) core.ResolutionMode { + return getEmitSyntaxForUsageLocationWorker(sourceFile.FileName(), p.sourceFileMetaDatas[sourceFile.Path()], location, p.Options()) } -func (p *Program) GetDefaultResolutionModeForFile(sourceFile *ast.SourceFile) core.ResolutionMode { - return getDefaultResolutionModeForFile(sourceFile, p.compilerOptions) +func (p *Program) GetImpliedNodeFormatForEmit(sourceFile ast.HasFileName) core.ResolutionMode { + return ast.GetImpliedNodeFormatForEmitWorker(sourceFile.FileName(), p.Options(), p.GetSourceFileMetaData(sourceFile.Path())) +} + +func (p *Program) GetModeForUsageLocation(sourceFile ast.HasFileName, location *ast.StringLiteralLike) core.ResolutionMode { + return getModeForUsageLocation(sourceFile.FileName(), p.sourceFileMetaDatas[sourceFile.Path()], location, p.Options()) +} + +func (p *Program) GetDefaultResolutionModeForFile(sourceFile ast.HasFileName) core.ResolutionMode { + return getDefaultResolutionModeForFile(sourceFile.FileName(), p.sourceFileMetaDatas[sourceFile.Path()], p.Options()) } func (p *Program) CommonSourceDirectory() string { @@ -714,19 +717,15 @@ func (p *Program) CommonSourceDirectory() string { } } p.commonSourceDirectory = getCommonSourceDirectory( - p.compilerOptions, + p.Options(), files, - p.host.GetCurrentDirectory(), - p.host.FS().UseCaseSensitiveFileNames(), + p.GetCurrentDirectory(), + p.UseCaseSensitiveFileNames(), ) }) return p.commonSourceDirectory } -func (p *Program) GetCompilerOptions() *core.CompilerOptions { - return p.compilerOptions -} - func computeCommonSourceDirectoryOfFilenames(fileNames []string, currentDirectory string, useCaseSensitiveFileNames bool) string { var commonPathComponents []string for _, sourceFile := range fileNames { @@ -772,10 +771,16 @@ func computeCommonSourceDirectoryOfFilenames(fileNames []string, currentDirector func getCommonSourceDirectory(options *core.CompilerOptions, files []string, currentDirectory string, useCaseSensitiveFileNames bool) string { var commonSourceDirectory string - // !!! If a rootDir is specified use it as the commonSourceDirectory - // !!! Project compilations never infer their root from the input source paths - - commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(files, currentDirectory, useCaseSensitiveFileNames) + if options.RootDir != "" { + // If a rootDir is specified use it as the commonSourceDirectory + commonSourceDirectory = options.RootDir + } else if options.Composite.IsTrue() && options.ConfigFilePath != "" { + // If the rootDir is not specified, but the project is composite, then the common source directory + // is the directory of the config file. + commonSourceDirectory = tspath.GetDirectoryPath(options.ConfigFilePath) + } else { + commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(files, currentDirectory, useCaseSensitiveFileNames) + } if len(commonSourceDirectory) > 0 { // Make sure directory path ends with directory separator so this string can directly @@ -836,7 +841,7 @@ func (p *Program) Emit(options EmitOptions) *EmitResult { // attach writer and perform emit emitter.writer = writer - emitter.paths = getOutputPathsFor(sourceFile, host, options.forceDtsEmit) + emitter.paths = outputpaths.GetOutputPathsFor(sourceFile, host.Options(), host, options.forceDtsEmit) emitter.emit() emitter.writer = nil @@ -866,7 +871,7 @@ func (p *Program) Emit(options EmitOptions) *EmitResult { } func (p *Program) GetSourceFile(filename string) *ast.SourceFile { - path := tspath.ToPath(filename, p.host.GetCurrentDirectory(), p.host.FS().UseCaseSensitiveFileNames()) + path := tspath.ToPath(filename, p.GetCurrentDirectory(), p.UseCaseSensitiveFileNames()) return p.GetSourceFileByPath(path) } @@ -878,6 +883,33 @@ func (p *Program) GetSourceFiles() []*ast.SourceFile { return p.files } +func (p *Program) GetLibFileFromReference(ref *ast.FileReference) *ast.SourceFile { + path, ok := tsoptions.GetLibFileName(ref.FileName) + if !ok { + return nil + } + if sourceFile, ok := p.filesByPath[tspath.Path(path)]; ok { + return sourceFile + } + return nil +} + +func (p *Program) GetResolvedTypeReferenceDirectiveFromTypeReferenceDirective(typeRef *ast.FileReference, sourceFile *ast.SourceFile) *module.ResolvedTypeReferenceDirective { + return p.resolver.ResolveTypeReferenceDirective( + typeRef.FileName, + sourceFile.FileName(), + p.getModeForTypeReferenceDirectiveInFile(typeRef, sourceFile), + nil, + ) +} + +func (p *Program) getModeForTypeReferenceDirectiveInFile(ref *ast.FileReference, sourceFile *ast.SourceFile) core.ResolutionMode { + if ref.ResolutionMode != core.ResolutionModeNone { + return ref.ResolutionMode + } + return p.GetDefaultResolutionModeForFile(sourceFile) +} + type FileIncludeKind int const ( diff --git a/internal/compiler/program_test.go b/internal/compiler/program_test.go index d9fbee543f..803e1ed11c 100644 --- a/internal/compiler/program_test.go +++ b/internal/compiler/program_test.go @@ -106,8 +106,10 @@ var esnextLibs = []string{ "lib.esnext.collection.d.ts", "lib.esnext.intl.d.ts", "lib.esnext.disposable.d.ts", + "lib.esnext.promise.d.ts", "lib.esnext.decorators.d.ts", "lib.esnext.iterator.d.ts", + "lib.esnext.float16.d.ts", "lib.decorators.d.ts", "lib.decorators.legacy.d.ts", "lib.esnext.full.d.ts", @@ -232,9 +234,13 @@ func TestProgram(t *testing.T) { opts := core.CompilerOptions{Target: testCase.target} program := NewProgram(ProgramOptions{ - RootFiles: []string{"c:/dev/src/index.ts"}, - Host: NewCompilerHost(&opts, "c:/dev/src", fs, bundled.LibPath()), - Options: &opts, + Config: &tsoptions.ParsedCommandLine{ + ParsedConfig: &core.ParsedOptions{ + FileNames: []string{"c:/dev/src/index.ts"}, + CompilerOptions: &opts, + }, + }, + Host: NewCompilerHost(&opts, "c:/dev/src", fs, bundled.LibPath()), }) actualFiles := []string{} @@ -265,9 +271,13 @@ func BenchmarkNewProgram(b *testing.B) { opts := core.CompilerOptions{Target: testCase.target} programOpts := ProgramOptions{ - RootFiles: []string{"c:/dev/src/index.ts"}, - Host: NewCompilerHost(&opts, "c:/dev/src", fs, bundled.LibPath()), - Options: &opts, + Config: &tsoptions.ParsedCommandLine{ + ParsedConfig: &core.ParsedOptions{ + FileNames: []string{"c:/dev/src/index.ts"}, + CompilerOptions: &opts, + }, + }, + Host: NewCompilerHost(&opts, "c:/dev/src", fs, bundled.LibPath()), } for b.Loop() { @@ -288,11 +298,10 @@ func BenchmarkNewProgram(b *testing.B) { parsed, errors := tsoptions.GetParsedCommandLineOfConfigFile(tspath.CombinePaths(rootPath, "tsconfig.json"), &core.CompilerOptions{}, host, nil) assert.Equal(b, len(errors), 0, "Expected no errors in parsed command line") - host = NewCompilerHost(parsed.CompilerOptions(), rootPath, fs, bundled.LibPath()) opts := ProgramOptions{ - Host: host, - Options: parsed.CompilerOptions(), + Config: parsed, + Host: host, } for b.Loop() { diff --git a/internal/core/compileroptions.go b/internal/core/compileroptions.go index 21f8f322ed..76c9d27fd2 100644 --- a/internal/core/compileroptions.go +++ b/internal/core/compileroptions.go @@ -8,6 +8,7 @@ import ( ) //go:generate go tool golang.org/x/tools/cmd/stringer -type=ModuleKind,ScriptTarget -output=compileroptions_stringer_generated.go +//go:generate go tool mvdan.cc/gofumpt -lang=go1.24 -w compileroptions_stringer_generated.go type CompilerOptions struct { AllowJs Tristate `json:"allowJs,omitzero"` @@ -36,6 +37,7 @@ type CompilerOptions struct { DisableSourceOfProjectReferenceRedirect Tristate `json:"disableSourceOfProjectReferenceRedirect,omitzero"` DisableSolutionSearching Tristate `json:"disableSolutionSearching,omitzero"` DisableReferencedProjectLoad Tristate `json:"disableReferencedProjectLoad,omitzero"` + ErasableSyntaxOnly Tristate `json:"erasableSyntaxOnly,omitzero"` ESModuleInterop Tristate `json:"esModuleInterop,omitzero"` ExactOptionalPropertyTypes Tristate `json:"exactOptionalPropertyTypes,omitzero"` ExperimentalDecorators Tristate `json:"experimentalDecorators,omitzero"` @@ -54,6 +56,7 @@ type CompilerOptions struct { JsxImportSource string `json:"jsxImportSource,omitzero"` KeyofStringsOnly Tristate `json:"keyofStringsOnly,omitzero"` Lib []string `json:"lib,omitzero"` + LibReplacement Tristate `json:"libReplacement,omitzero"` Locale string `json:"locale,omitzero"` MapRoot string `json:"mapRoot,omitzero"` Module ModuleKind `json:"module,omitzero"` @@ -147,7 +150,7 @@ func (options *CompilerOptions) GetEmitScriptTarget() ScriptTarget { return options.Target } switch options.GetEmitModuleKind() { - case ModuleKindNode16: + case ModuleKindNode16, ModuleKindNode18: return ScriptTargetES2022 case ModuleKindNodeNext: return ScriptTargetESNext @@ -171,7 +174,7 @@ func (options *CompilerOptions) GetModuleResolutionKind() ModuleResolutionKind { return options.ModuleResolution } switch options.GetEmitModuleKind() { - case ModuleKindNode16: + case ModuleKindNode16, ModuleKindNode18: return ModuleResolutionKindNode16 case ModuleKindNodeNext: return ModuleResolutionKindNodeNext @@ -196,18 +199,6 @@ func (options *CompilerOptions) AllowImportingTsExtensionsFrom(fileName string) return options.GetAllowImportingTsExtensions() || tspath.IsDeclarationFileName(fileName) } -func (options *CompilerOptions) GetEmitModuleDetectionKind() ModuleDetectionKind { - if options.ModuleDetection != ModuleDetectionKindNone { - return options.ModuleDetection - } - switch options.GetEmitModuleKind() { - case ModuleKindNode16, ModuleKindNodeNext: - return ModuleDetectionKindForce - default: - return ModuleDetectionKindAuto - } -} - func (options *CompilerOptions) GetESModuleInterop() bool { if options.ESModuleInterop != TSUnknown { return options.ESModuleInterop == TSTrue @@ -315,10 +306,7 @@ type SourceFileAffectingCompilerOptions struct { AllowUnreachableCode Tristate AllowUnusedLabels Tristate BindInStrictMode bool - EmitModuleDetectionKind ModuleDetectionKind - EmitModuleKind ModuleKind EmitScriptTarget ScriptTarget - JsxEmit JsxEmit NoFallthroughCasesInSwitch Tristate ShouldPreserveConstEnums bool } @@ -328,10 +316,7 @@ func (options *CompilerOptions) SourceFileAffecting() *SourceFileAffectingCompil AllowUnreachableCode: options.AllowUnreachableCode, AllowUnusedLabels: options.AllowUnusedLabels, BindInStrictMode: options.AlwaysStrict.IsTrue() || options.Strict.IsTrue(), - EmitModuleDetectionKind: options.GetEmitModuleDetectionKind(), EmitScriptTarget: options.GetEmitScriptTarget(), - EmitModuleKind: options.GetEmitModuleKind(), - JsxEmit: options.Jsx, NoFallthroughCasesInSwitch: options.NoFallthroughCasesInSwitch, ShouldPreserveConstEnums: options.ShouldPreserveConstEnums(), } @@ -363,6 +348,7 @@ const ( ModuleKindESNext ModuleKind = 99 // Node16+ is an amalgam of commonjs (albeit updated) and es2022+, and represents a distinct module system from es2020/esnext ModuleKindNode16 ModuleKind = 100 + ModuleKindNode18 ModuleKind = 101 ModuleKindNodeNext ModuleKind = 199 // Emit as written ModuleKindPreserve ModuleKind = 200 @@ -372,6 +358,12 @@ func (moduleKind ModuleKind) IsNonNodeESM() bool { return moduleKind >= ModuleKindES2015 && moduleKind <= ModuleKindESNext } +func (moduleKind ModuleKind) SupportsImportAttributes() bool { + return ModuleKindNode18 <= moduleKind && moduleKind <= ModuleKindNodeNext || + moduleKind == ModuleKindPreserve || + moduleKind == ModuleKindESNext +} + type ResolutionMode = ModuleKind // ModuleKindNone | ModuleKindCommonJS | ModuleKindESNext const ( diff --git a/internal/core/compileroptions_stringer_generated.go b/internal/core/compileroptions_stringer_generated.go index 5f8705a9df..256018aeb0 100644 --- a/internal/core/compileroptions_stringer_generated.go +++ b/internal/core/compileroptions_stringer_generated.go @@ -18,19 +18,20 @@ func _() { _ = x[ModuleKindES2022-7] _ = x[ModuleKindESNext-99] _ = x[ModuleKindNode16-100] + _ = x[ModuleKindNode18-101] _ = x[ModuleKindNodeNext-199] _ = x[ModuleKindPreserve-200] } const ( _ModuleKind_name_0 = "ModuleKindNoneModuleKindCommonJSModuleKindAMDModuleKindUMDModuleKindSystemModuleKindES2015ModuleKindES2020ModuleKindES2022" - _ModuleKind_name_1 = "ModuleKindESNextModuleKindNode16" + _ModuleKind_name_1 = "ModuleKindESNextModuleKindNode16ModuleKindNode18" _ModuleKind_name_2 = "ModuleKindNodeNextModuleKindPreserve" ) var ( _ModuleKind_index_0 = [...]uint8{0, 14, 32, 45, 58, 74, 90, 106, 122} - _ModuleKind_index_1 = [...]uint8{0, 16, 32} + _ModuleKind_index_1 = [...]uint8{0, 16, 32, 48} _ModuleKind_index_2 = [...]uint8{0, 18, 36} ) @@ -38,7 +39,7 @@ func (i ModuleKind) String() string { switch { case 0 <= i && i <= 7: return _ModuleKind_name_0[_ModuleKind_index_0[i]:_ModuleKind_index_0[i+1]] - case 99 <= i && i <= 100: + case 99 <= i && i <= 101: i -= 99 return _ModuleKind_name_1[_ModuleKind_index_1[i]:_ModuleKind_index_1[i+1]] case 199 <= i && i <= 200: @@ -48,6 +49,7 @@ func (i ModuleKind) String() string { return "ModuleKind(" + strconv.FormatInt(int64(i), 10) + ")" } } + func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. diff --git a/internal/core/core.go b/internal/core/core.go index 21e9daf4ac..d73d9e395a 100644 --- a/internal/core/core.go +++ b/internal/core/core.go @@ -95,6 +95,17 @@ func MapNonNil[T any, U comparable](slice []T, f func(T) U) []U { return result } +func FlatMap[T any, U comparable](slice []T, f func(T) []U) []U { + var result []U + for _, value := range slice { + mapped := f(value) + if len(mapped) != 0 { + result = append(result, mapped...) + } + } + return result +} + func SameMap[T comparable](slice []T, f func(T) T) []T { for i, value := range slice { mapped := f(value) @@ -327,6 +338,12 @@ func Coalesce[T *U, U any](a T, b T) T { } } +// Returns the first element that is not `nil`; CoalesceList(a, b, c) is roughly analogous to `a ?? b ?? c` in JS, except that it +// non-shortcutting, so it is advised to only use a constant or precomputed value for non-first values in the list +func CoalesceList[T *U, U any](a ...T) T { + return FirstNonNil(a, func(t T) T { return t }) +} + func ComputeLineStarts(text string) []TextPos { result := make([]TextPos, 0, strings.Count(text, "\n")+1) return slices.AppendSeq(result, ComputeLineStartsSeq(text)) @@ -431,21 +448,6 @@ func GetScriptKindFromFileName(fileName string) ScriptKind { return ScriptKindUnknown } -func GetOutputExtension(fileName string, jsx JsxEmit) string { - switch { - case tspath.FileExtensionIs(fileName, tspath.ExtensionJson): - return tspath.ExtensionJson - case jsx == JsxEmitPreserve && tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionJsx, tspath.ExtensionTsx}): - return tspath.ExtensionJsx - case tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionMts, tspath.ExtensionMjs}): - return tspath.ExtensionMjs - case tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionCts, tspath.ExtensionCjs}): - return tspath.ExtensionCjs - default: - return tspath.ExtensionJs - } -} - // Given a name and a list of names that are *not* equal to the name, return a spelling suggestion if there is one that is close enough. // Names less than length 3 only check for case-insensitive equality. // diff --git a/internal/core/languagevariant.go b/internal/core/languagevariant.go index d509f77c4e..47b4b95182 100644 --- a/internal/core/languagevariant.go +++ b/internal/core/languagevariant.go @@ -1,6 +1,7 @@ package core //go:generate go tool golang.org/x/tools/cmd/stringer -type=LanguageVariant -output=languagevariant_stringer_generated.go +//go:generate go tool mvdan.cc/gofumpt -lang=go1.24 -w languagevariant_stringer_generated.go type LanguageVariant int32 diff --git a/internal/core/scriptkind.go b/internal/core/scriptkind.go index abf7ca4f84..f185c1d3e8 100644 --- a/internal/core/scriptkind.go +++ b/internal/core/scriptkind.go @@ -1,6 +1,7 @@ package core //go:generate go tool golang.org/x/tools/cmd/stringer -type=ScriptKind -output=scriptkind_stringer_generated.go +//go:generate go tool mvdan.cc/gofumpt -lang=go1.24 -w scriptkind_stringer_generated.go type ScriptKind int32 diff --git a/internal/core/text.go b/internal/core/text.go index d8863644a9..d911b839b1 100644 --- a/internal/core/text.go +++ b/internal/core/text.go @@ -43,6 +43,10 @@ func (t TextRange) ContainsInclusive(pos int) bool { return pos >= int(t.pos) && pos <= int(t.end) } +func (t TextRange) ContainsExclusive(pos int) bool { + return int(t.pos) < pos && pos < int(t.end) +} + func (t TextRange) WithPos(pos int) TextRange { return TextRange{pos: TextPos(pos), end: t.end} } @@ -50,3 +54,13 @@ func (t TextRange) WithPos(pos int) TextRange { func (t TextRange) WithEnd(end int) TextRange { return TextRange{pos: t.pos, end: TextPos(end)} } + +func (t TextRange) ContainedBy(t2 TextRange) bool { + return t2.pos <= t.pos && t2.end >= t.end +} + +func (t TextRange) Overlaps(t2 TextRange) bool { + start := max(t.pos, t2.pos) + end := min(t.end, t2.end) + return start < end +} diff --git a/internal/core/textchange.go b/internal/core/textchange.go new file mode 100644 index 0000000000..0b4901c048 --- /dev/null +++ b/internal/core/textchange.go @@ -0,0 +1,10 @@ +package core + +type TextChange struct { + TextRange + NewText string +} + +func (t TextChange) ApplyTo(text string) string { + return text[:t.Pos()] + t.NewText + text[t.End():] +} diff --git a/internal/core/tristate.go b/internal/core/tristate.go index fd648f7a89..11b1bc0d36 100644 --- a/internal/core/tristate.go +++ b/internal/core/tristate.go @@ -1,6 +1,7 @@ package core //go:generate go tool golang.org/x/tools/cmd/stringer -type=Tristate -output=tristate_stringer_generated.go +//go:generate go tool mvdan.cc/gofumpt -lang=go1.24 -w tristate_stringer_generated.go // Tristate diff --git a/internal/diagnostics/diagnostics.go b/internal/diagnostics/diagnostics.go index 727622507f..f41e3e1ef1 100644 --- a/internal/diagnostics/diagnostics.go +++ b/internal/diagnostics/diagnostics.go @@ -5,6 +5,7 @@ import "github.com/microsoft/typescript-go/internal/stringutil" //go:generate go run generate.go -output ./diagnostics_generated.go //go:generate go tool golang.org/x/tools/cmd/stringer -type=Category -output=stringer_generated.go +//go:generate go tool mvdan.cc/gofumpt -lang=go1.24 -w diagnostics_generated.go stringer_generated.go type Category int32 diff --git a/internal/diagnostics/diagnostics_generated.go b/internal/diagnostics/diagnostics_generated.go index 643538574c..5fb56a7143 100644 --- a/internal/diagnostics/diagnostics_generated.go +++ b/internal/diagnostics/diagnostics_generated.go @@ -3,2097 +3,4213 @@ package diagnostics var Unterminated_string_literal = &Message{code: 1002, category: CategoryError, key: "Unterminated_string_literal_1002", text: "Unterminated string literal."} + var Identifier_expected = &Message{code: 1003, category: CategoryError, key: "Identifier_expected_1003", text: "Identifier expected."} + var X_0_expected = &Message{code: 1005, category: CategoryError, key: "_0_expected_1005", text: "'{0}' expected."} + var A_file_cannot_have_a_reference_to_itself = &Message{code: 1006, category: CategoryError, key: "A_file_cannot_have_a_reference_to_itself_1006", text: "A file cannot have a reference to itself."} + var The_parser_expected_to_find_a_1_to_match_the_0_token_here = &Message{code: 1007, category: CategoryError, key: "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", text: "The parser expected to find a '{1}' to match the '{0}' token here."} + var Trailing_comma_not_allowed = &Message{code: 1009, category: CategoryError, key: "Trailing_comma_not_allowed_1009", text: "Trailing comma not allowed."} + var Asterisk_Slash_expected = &Message{code: 1010, category: CategoryError, key: "Asterisk_Slash_expected_1010", text: "'*/' expected."} + var An_element_access_expression_should_take_an_argument = &Message{code: 1011, category: CategoryError, key: "An_element_access_expression_should_take_an_argument_1011", text: "An element access expression should take an argument."} + var Unexpected_token = &Message{code: 1012, category: CategoryError, key: "Unexpected_token_1012", text: "Unexpected token."} + var A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma = &Message{code: 1013, category: CategoryError, key: "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", text: "A rest parameter or binding pattern may not have a trailing comma."} + var A_rest_parameter_must_be_last_in_a_parameter_list = &Message{code: 1014, category: CategoryError, key: "A_rest_parameter_must_be_last_in_a_parameter_list_1014", text: "A rest parameter must be last in a parameter list."} + var Parameter_cannot_have_question_mark_and_initializer = &Message{code: 1015, category: CategoryError, key: "Parameter_cannot_have_question_mark_and_initializer_1015", text: "Parameter cannot have question mark and initializer."} + var A_required_parameter_cannot_follow_an_optional_parameter = &Message{code: 1016, category: CategoryError, key: "A_required_parameter_cannot_follow_an_optional_parameter_1016", text: "A required parameter cannot follow an optional parameter."} + var An_index_signature_cannot_have_a_rest_parameter = &Message{code: 1017, category: CategoryError, key: "An_index_signature_cannot_have_a_rest_parameter_1017", text: "An index signature cannot have a rest parameter."} + var An_index_signature_parameter_cannot_have_an_accessibility_modifier = &Message{code: 1018, category: CategoryError, key: "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", text: "An index signature parameter cannot have an accessibility modifier."} + var An_index_signature_parameter_cannot_have_a_question_mark = &Message{code: 1019, category: CategoryError, key: "An_index_signature_parameter_cannot_have_a_question_mark_1019", text: "An index signature parameter cannot have a question mark."} + var An_index_signature_parameter_cannot_have_an_initializer = &Message{code: 1020, category: CategoryError, key: "An_index_signature_parameter_cannot_have_an_initializer_1020", text: "An index signature parameter cannot have an initializer."} + var An_index_signature_must_have_a_type_annotation = &Message{code: 1021, category: CategoryError, key: "An_index_signature_must_have_a_type_annotation_1021", text: "An index signature must have a type annotation."} + var An_index_signature_parameter_must_have_a_type_annotation = &Message{code: 1022, category: CategoryError, key: "An_index_signature_parameter_must_have_a_type_annotation_1022", text: "An index signature parameter must have a type annotation."} + var X_readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature = &Message{code: 1024, category: CategoryError, key: "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", text: "'readonly' modifier can only appear on a property declaration or index signature."} + var An_index_signature_cannot_have_a_trailing_comma = &Message{code: 1025, category: CategoryError, key: "An_index_signature_cannot_have_a_trailing_comma_1025", text: "An index signature cannot have a trailing comma."} + var Accessibility_modifier_already_seen = &Message{code: 1028, category: CategoryError, key: "Accessibility_modifier_already_seen_1028", text: "Accessibility modifier already seen."} + var X_0_modifier_must_precede_1_modifier = &Message{code: 1029, category: CategoryError, key: "_0_modifier_must_precede_1_modifier_1029", text: "'{0}' modifier must precede '{1}' modifier."} + var X_0_modifier_already_seen = &Message{code: 1030, category: CategoryError, key: "_0_modifier_already_seen_1030", text: "'{0}' modifier already seen."} + var X_0_modifier_cannot_appear_on_class_elements_of_this_kind = &Message{code: 1031, category: CategoryError, key: "_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031", text: "'{0}' modifier cannot appear on class elements of this kind."} + var X_super_must_be_followed_by_an_argument_list_or_member_access = &Message{code: 1034, category: CategoryError, key: "super_must_be_followed_by_an_argument_list_or_member_access_1034", text: "'super' must be followed by an argument list or member access."} + var Only_ambient_modules_can_use_quoted_names = &Message{code: 1035, category: CategoryError, key: "Only_ambient_modules_can_use_quoted_names_1035", text: "Only ambient modules can use quoted names."} + var Statements_are_not_allowed_in_ambient_contexts = &Message{code: 1036, category: CategoryError, key: "Statements_are_not_allowed_in_ambient_contexts_1036", text: "Statements are not allowed in ambient contexts."} + var A_declare_modifier_cannot_be_used_in_an_already_ambient_context = &Message{code: 1038, category: CategoryError, key: "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", text: "A 'declare' modifier cannot be used in an already ambient context."} + var Initializers_are_not_allowed_in_ambient_contexts = &Message{code: 1039, category: CategoryError, key: "Initializers_are_not_allowed_in_ambient_contexts_1039", text: "Initializers are not allowed in ambient contexts."} + var X_0_modifier_cannot_be_used_in_an_ambient_context = &Message{code: 1040, category: CategoryError, key: "_0_modifier_cannot_be_used_in_an_ambient_context_1040", text: "'{0}' modifier cannot be used in an ambient context."} + var X_0_modifier_cannot_be_used_here = &Message{code: 1042, category: CategoryError, key: "_0_modifier_cannot_be_used_here_1042", text: "'{0}' modifier cannot be used here."} + var X_0_modifier_cannot_appear_on_a_module_or_namespace_element = &Message{code: 1044, category: CategoryError, key: "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", text: "'{0}' modifier cannot appear on a module or namespace element."} + var Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier = &Message{code: 1046, category: CategoryError, key: "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", text: "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."} + var A_rest_parameter_cannot_be_optional = &Message{code: 1047, category: CategoryError, key: "A_rest_parameter_cannot_be_optional_1047", text: "A rest parameter cannot be optional."} + var A_rest_parameter_cannot_have_an_initializer = &Message{code: 1048, category: CategoryError, key: "A_rest_parameter_cannot_have_an_initializer_1048", text: "A rest parameter cannot have an initializer."} + var A_set_accessor_must_have_exactly_one_parameter = &Message{code: 1049, category: CategoryError, key: "A_set_accessor_must_have_exactly_one_parameter_1049", text: "A 'set' accessor must have exactly one parameter."} + var A_set_accessor_cannot_have_an_optional_parameter = &Message{code: 1051, category: CategoryError, key: "A_set_accessor_cannot_have_an_optional_parameter_1051", text: "A 'set' accessor cannot have an optional parameter."} + var A_set_accessor_parameter_cannot_have_an_initializer = &Message{code: 1052, category: CategoryError, key: "A_set_accessor_parameter_cannot_have_an_initializer_1052", text: "A 'set' accessor parameter cannot have an initializer."} + var A_set_accessor_cannot_have_rest_parameter = &Message{code: 1053, category: CategoryError, key: "A_set_accessor_cannot_have_rest_parameter_1053", text: "A 'set' accessor cannot have rest parameter."} + var A_get_accessor_cannot_have_parameters = &Message{code: 1054, category: CategoryError, key: "A_get_accessor_cannot_have_parameters_1054", text: "A 'get' accessor cannot have parameters."} + var Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value = &Message{code: 1055, category: CategoryError, key: "Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055", text: "Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value."} + var Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher = &Message{code: 1056, category: CategoryError, key: "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", text: "Accessors are only available when targeting ECMAScript 5 and higher."} + var The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member = &Message{code: 1058, category: CategoryError, key: "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", text: "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."} + var A_promise_must_have_a_then_method = &Message{code: 1059, category: CategoryError, key: "A_promise_must_have_a_then_method_1059", text: "A promise must have a 'then' method."} + var The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback = &Message{code: 1060, category: CategoryError, key: "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", text: "The first parameter of the 'then' method of a promise must be a callback."} + var Enum_member_must_have_initializer = &Message{code: 1061, category: CategoryError, key: "Enum_member_must_have_initializer_1061", text: "Enum member must have initializer."} + var Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method = &Message{code: 1062, category: CategoryError, key: "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", text: "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."} + var An_export_assignment_cannot_be_used_in_a_namespace = &Message{code: 1063, category: CategoryError, key: "An_export_assignment_cannot_be_used_in_a_namespace_1063", text: "An export assignment cannot be used in a namespace."} + var The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0 = &Message{code: 1064, category: CategoryError, key: "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", text: "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"} + var The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type = &Message{code: 1065, category: CategoryError, key: "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065", text: "The return type of an async function or method must be the global Promise type."} + var In_ambient_enum_declarations_member_initializer_must_be_constant_expression = &Message{code: 1066, category: CategoryError, key: "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", text: "In ambient enum declarations member initializer must be constant expression."} + var Unexpected_token_A_constructor_method_accessor_or_property_was_expected = &Message{code: 1068, category: CategoryError, key: "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", text: "Unexpected token. A constructor, method, accessor, or property was expected."} + var Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces = &Message{code: 1069, category: CategoryError, key: "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", text: "Unexpected token. A type parameter name was expected without curly braces."} + var X_0_modifier_cannot_appear_on_a_type_member = &Message{code: 1070, category: CategoryError, key: "_0_modifier_cannot_appear_on_a_type_member_1070", text: "'{0}' modifier cannot appear on a type member."} + var X_0_modifier_cannot_appear_on_an_index_signature = &Message{code: 1071, category: CategoryError, key: "_0_modifier_cannot_appear_on_an_index_signature_1071", text: "'{0}' modifier cannot appear on an index signature."} + var A_0_modifier_cannot_be_used_with_an_import_declaration = &Message{code: 1079, category: CategoryError, key: "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", text: "A '{0}' modifier cannot be used with an import declaration."} + var Invalid_reference_directive_syntax = &Message{code: 1084, category: CategoryError, key: "Invalid_reference_directive_syntax_1084", text: "Invalid 'reference' directive syntax."} + var X_0_modifier_cannot_appear_on_a_constructor_declaration = &Message{code: 1089, category: CategoryError, key: "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", text: "'{0}' modifier cannot appear on a constructor declaration."} + var X_0_modifier_cannot_appear_on_a_parameter = &Message{code: 1090, category: CategoryError, key: "_0_modifier_cannot_appear_on_a_parameter_1090", text: "'{0}' modifier cannot appear on a parameter."} + var Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement = &Message{code: 1091, category: CategoryError, key: "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", text: "Only a single variable declaration is allowed in a 'for...in' statement."} + var Type_parameters_cannot_appear_on_a_constructor_declaration = &Message{code: 1092, category: CategoryError, key: "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", text: "Type parameters cannot appear on a constructor declaration."} + var Type_annotation_cannot_appear_on_a_constructor_declaration = &Message{code: 1093, category: CategoryError, key: "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", text: "Type annotation cannot appear on a constructor declaration."} + var An_accessor_cannot_have_type_parameters = &Message{code: 1094, category: CategoryError, key: "An_accessor_cannot_have_type_parameters_1094", text: "An accessor cannot have type parameters."} + var A_set_accessor_cannot_have_a_return_type_annotation = &Message{code: 1095, category: CategoryError, key: "A_set_accessor_cannot_have_a_return_type_annotation_1095", text: "A 'set' accessor cannot have a return type annotation."} + var An_index_signature_must_have_exactly_one_parameter = &Message{code: 1096, category: CategoryError, key: "An_index_signature_must_have_exactly_one_parameter_1096", text: "An index signature must have exactly one parameter."} + var X_0_list_cannot_be_empty = &Message{code: 1097, category: CategoryError, key: "_0_list_cannot_be_empty_1097", text: "'{0}' list cannot be empty."} + var Type_parameter_list_cannot_be_empty = &Message{code: 1098, category: CategoryError, key: "Type_parameter_list_cannot_be_empty_1098", text: "Type parameter list cannot be empty."} + var Type_argument_list_cannot_be_empty = &Message{code: 1099, category: CategoryError, key: "Type_argument_list_cannot_be_empty_1099", text: "Type argument list cannot be empty."} + var Invalid_use_of_0_in_strict_mode = &Message{code: 1100, category: CategoryError, key: "Invalid_use_of_0_in_strict_mode_1100", text: "Invalid use of '{0}' in strict mode."} + var X_with_statements_are_not_allowed_in_strict_mode = &Message{code: 1101, category: CategoryError, key: "with_statements_are_not_allowed_in_strict_mode_1101", text: "'with' statements are not allowed in strict mode."} + var X_delete_cannot_be_called_on_an_identifier_in_strict_mode = &Message{code: 1102, category: CategoryError, key: "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", text: "'delete' cannot be called on an identifier in strict mode."} + var X_for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules = &Message{code: 1103, category: CategoryError, key: "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", text: "'for await' loops are only allowed within async functions and at the top levels of modules."} + var A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement = &Message{code: 1104, category: CategoryError, key: "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", text: "A 'continue' statement can only be used within an enclosing iteration statement."} + var A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement = &Message{code: 1105, category: CategoryError, key: "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", text: "A 'break' statement can only be used within an enclosing iteration or switch statement."} + var The_left_hand_side_of_a_for_of_statement_may_not_be_async = &Message{code: 1106, category: CategoryError, key: "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", text: "The left-hand side of a 'for...of' statement may not be 'async'."} + var Jump_target_cannot_cross_function_boundary = &Message{code: 1107, category: CategoryError, key: "Jump_target_cannot_cross_function_boundary_1107", text: "Jump target cannot cross function boundary."} + var A_return_statement_can_only_be_used_within_a_function_body = &Message{code: 1108, category: CategoryError, key: "A_return_statement_can_only_be_used_within_a_function_body_1108", text: "A 'return' statement can only be used within a function body."} + var Expression_expected = &Message{code: 1109, category: CategoryError, key: "Expression_expected_1109", text: "Expression expected."} + var Type_expected = &Message{code: 1110, category: CategoryError, key: "Type_expected_1110", text: "Type expected."} + var Private_field_0_must_be_declared_in_an_enclosing_class = &Message{code: 1111, category: CategoryError, key: "Private_field_0_must_be_declared_in_an_enclosing_class_1111", text: "Private field '{0}' must be declared in an enclosing class."} + var A_default_clause_cannot_appear_more_than_once_in_a_switch_statement = &Message{code: 1113, category: CategoryError, key: "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", text: "A 'default' clause cannot appear more than once in a 'switch' statement."} + var Duplicate_label_0 = &Message{code: 1114, category: CategoryError, key: "Duplicate_label_0_1114", text: "Duplicate label '{0}'."} + var A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement = &Message{code: 1115, category: CategoryError, key: "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", text: "A 'continue' statement can only jump to a label of an enclosing iteration statement."} + var A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement = &Message{code: 1116, category: CategoryError, key: "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", text: "A 'break' statement can only jump to a label of an enclosing statement."} + var An_object_literal_cannot_have_multiple_properties_with_the_same_name = &Message{code: 1117, category: CategoryError, key: "An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117", text: "An object literal cannot have multiple properties with the same name."} + var An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name = &Message{code: 1118, category: CategoryError, key: "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", text: "An object literal cannot have multiple get/set accessors with the same name."} + var An_object_literal_cannot_have_property_and_accessor_with_the_same_name = &Message{code: 1119, category: CategoryError, key: "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", text: "An object literal cannot have property and accessor with the same name."} + var An_export_assignment_cannot_have_modifiers = &Message{code: 1120, category: CategoryError, key: "An_export_assignment_cannot_have_modifiers_1120", text: "An export assignment cannot have modifiers."} + var Octal_literals_are_not_allowed_Use_the_syntax_0 = &Message{code: 1121, category: CategoryError, key: "Octal_literals_are_not_allowed_Use_the_syntax_0_1121", text: "Octal literals are not allowed. Use the syntax '{0}'."} + var Variable_declaration_list_cannot_be_empty = &Message{code: 1123, category: CategoryError, key: "Variable_declaration_list_cannot_be_empty_1123", text: "Variable declaration list cannot be empty."} + var Digit_expected = &Message{code: 1124, category: CategoryError, key: "Digit_expected_1124", text: "Digit expected."} + var Hexadecimal_digit_expected = &Message{code: 1125, category: CategoryError, key: "Hexadecimal_digit_expected_1125", text: "Hexadecimal digit expected."} + var Unexpected_end_of_text = &Message{code: 1126, category: CategoryError, key: "Unexpected_end_of_text_1126", text: "Unexpected end of text."} + var Invalid_character = &Message{code: 1127, category: CategoryError, key: "Invalid_character_1127", text: "Invalid character."} + var Declaration_or_statement_expected = &Message{code: 1128, category: CategoryError, key: "Declaration_or_statement_expected_1128", text: "Declaration or statement expected."} + var Statement_expected = &Message{code: 1129, category: CategoryError, key: "Statement_expected_1129", text: "Statement expected."} + var X_case_or_default_expected = &Message{code: 1130, category: CategoryError, key: "case_or_default_expected_1130", text: "'case' or 'default' expected."} + var Property_or_signature_expected = &Message{code: 1131, category: CategoryError, key: "Property_or_signature_expected_1131", text: "Property or signature expected."} + var Enum_member_expected = &Message{code: 1132, category: CategoryError, key: "Enum_member_expected_1132", text: "Enum member expected."} + var Variable_declaration_expected = &Message{code: 1134, category: CategoryError, key: "Variable_declaration_expected_1134", text: "Variable declaration expected."} + var Argument_expression_expected = &Message{code: 1135, category: CategoryError, key: "Argument_expression_expected_1135", text: "Argument expression expected."} + var Property_assignment_expected = &Message{code: 1136, category: CategoryError, key: "Property_assignment_expected_1136", text: "Property assignment expected."} + var Expression_or_comma_expected = &Message{code: 1137, category: CategoryError, key: "Expression_or_comma_expected_1137", text: "Expression or comma expected."} + var Parameter_declaration_expected = &Message{code: 1138, category: CategoryError, key: "Parameter_declaration_expected_1138", text: "Parameter declaration expected."} + var Type_parameter_declaration_expected = &Message{code: 1139, category: CategoryError, key: "Type_parameter_declaration_expected_1139", text: "Type parameter declaration expected."} + var Type_argument_expected = &Message{code: 1140, category: CategoryError, key: "Type_argument_expected_1140", text: "Type argument expected."} + var String_literal_expected = &Message{code: 1141, category: CategoryError, key: "String_literal_expected_1141", text: "String literal expected."} + var Line_break_not_permitted_here = &Message{code: 1142, category: CategoryError, key: "Line_break_not_permitted_here_1142", text: "Line break not permitted here."} + var X_or_expected = &Message{code: 1144, category: CategoryError, key: "or_expected_1144", text: "'{' or ';' expected."} + var X_or_JSX_element_expected = &Message{code: 1145, category: CategoryError, key: "or_JSX_element_expected_1145", text: "'{' or JSX element expected."} + var Declaration_expected = &Message{code: 1146, category: CategoryError, key: "Declaration_expected_1146", text: "Declaration expected."} + var Import_declarations_in_a_namespace_cannot_reference_a_module = &Message{code: 1147, category: CategoryError, key: "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", text: "Import declarations in a namespace cannot reference a module."} + var Cannot_use_imports_exports_or_module_augmentations_when_module_is_none = &Message{code: 1148, category: CategoryError, key: "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", text: "Cannot use imports, exports, or module augmentations when '--module' is 'none'."} + var File_name_0_differs_from_already_included_file_name_1_only_in_casing = &Message{code: 1149, category: CategoryError, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", text: "File name '{0}' differs from already included file name '{1}' only in casing."} + var X_0_declarations_must_be_initialized = &Message{code: 1155, category: CategoryError, key: "_0_declarations_must_be_initialized_1155", text: "'{0}' declarations must be initialized."} + var X_0_declarations_can_only_be_declared_inside_a_block = &Message{code: 1156, category: CategoryError, key: "_0_declarations_can_only_be_declared_inside_a_block_1156", text: "'{0}' declarations can only be declared inside a block."} + var Unterminated_template_literal = &Message{code: 1160, category: CategoryError, key: "Unterminated_template_literal_1160", text: "Unterminated template literal."} + var Unterminated_regular_expression_literal = &Message{code: 1161, category: CategoryError, key: "Unterminated_regular_expression_literal_1161", text: "Unterminated regular expression literal."} + var An_object_member_cannot_be_declared_optional = &Message{code: 1162, category: CategoryError, key: "An_object_member_cannot_be_declared_optional_1162", text: "An object member cannot be declared optional."} + var A_yield_expression_is_only_allowed_in_a_generator_body = &Message{code: 1163, category: CategoryError, key: "A_yield_expression_is_only_allowed_in_a_generator_body_1163", text: "A 'yield' expression is only allowed in a generator body."} + var Computed_property_names_are_not_allowed_in_enums = &Message{code: 1164, category: CategoryError, key: "Computed_property_names_are_not_allowed_in_enums_1164", text: "Computed property names are not allowed in enums."} + var A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type = &Message{code: 1165, category: CategoryError, key: "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", text: "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."} + var A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type = &Message{code: 1166, category: CategoryError, key: "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", text: "A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."} + var A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type = &Message{code: 1168, category: CategoryError, key: "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", text: "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."} + var A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type = &Message{code: 1169, category: CategoryError, key: "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", text: "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."} + var A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type = &Message{code: 1170, category: CategoryError, key: "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", text: "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."} + var A_comma_expression_is_not_allowed_in_a_computed_property_name = &Message{code: 1171, category: CategoryError, key: "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", text: "A comma expression is not allowed in a computed property name."} + var X_extends_clause_already_seen = &Message{code: 1172, category: CategoryError, key: "extends_clause_already_seen_1172", text: "'extends' clause already seen."} + var X_extends_clause_must_precede_implements_clause = &Message{code: 1173, category: CategoryError, key: "extends_clause_must_precede_implements_clause_1173", text: "'extends' clause must precede 'implements' clause."} + var Classes_can_only_extend_a_single_class = &Message{code: 1174, category: CategoryError, key: "Classes_can_only_extend_a_single_class_1174", text: "Classes can only extend a single class."} + var X_implements_clause_already_seen = &Message{code: 1175, category: CategoryError, key: "implements_clause_already_seen_1175", text: "'implements' clause already seen."} + var Interface_declaration_cannot_have_implements_clause = &Message{code: 1176, category: CategoryError, key: "Interface_declaration_cannot_have_implements_clause_1176", text: "Interface declaration cannot have 'implements' clause."} + var Binary_digit_expected = &Message{code: 1177, category: CategoryError, key: "Binary_digit_expected_1177", text: "Binary digit expected."} + var Octal_digit_expected = &Message{code: 1178, category: CategoryError, key: "Octal_digit_expected_1178", text: "Octal digit expected."} + var Unexpected_token_expected = &Message{code: 1179, category: CategoryError, key: "Unexpected_token_expected_1179", text: "Unexpected token. '{' expected."} + var Property_destructuring_pattern_expected = &Message{code: 1180, category: CategoryError, key: "Property_destructuring_pattern_expected_1180", text: "Property destructuring pattern expected."} + var Array_element_destructuring_pattern_expected = &Message{code: 1181, category: CategoryError, key: "Array_element_destructuring_pattern_expected_1181", text: "Array element destructuring pattern expected."} + var A_destructuring_declaration_must_have_an_initializer = &Message{code: 1182, category: CategoryError, key: "A_destructuring_declaration_must_have_an_initializer_1182", text: "A destructuring declaration must have an initializer."} + var An_implementation_cannot_be_declared_in_ambient_contexts = &Message{code: 1183, category: CategoryError, key: "An_implementation_cannot_be_declared_in_ambient_contexts_1183", text: "An implementation cannot be declared in ambient contexts."} + var Modifiers_cannot_appear_here = &Message{code: 1184, category: CategoryError, key: "Modifiers_cannot_appear_here_1184", text: "Modifiers cannot appear here."} + var Merge_conflict_marker_encountered = &Message{code: 1185, category: CategoryError, key: "Merge_conflict_marker_encountered_1185", text: "Merge conflict marker encountered."} + var A_rest_element_cannot_have_an_initializer = &Message{code: 1186, category: CategoryError, key: "A_rest_element_cannot_have_an_initializer_1186", text: "A rest element cannot have an initializer."} + var A_parameter_property_may_not_be_declared_using_a_binding_pattern = &Message{code: 1187, category: CategoryError, key: "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", text: "A parameter property may not be declared using a binding pattern."} + var Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement = &Message{code: 1188, category: CategoryError, key: "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", text: "Only a single variable declaration is allowed in a 'for...of' statement."} + var The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer = &Message{code: 1189, category: CategoryError, key: "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", text: "The variable declaration of a 'for...in' statement cannot have an initializer."} + var The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer = &Message{code: 1190, category: CategoryError, key: "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", text: "The variable declaration of a 'for...of' statement cannot have an initializer."} + var An_import_declaration_cannot_have_modifiers = &Message{code: 1191, category: CategoryError, key: "An_import_declaration_cannot_have_modifiers_1191", text: "An import declaration cannot have modifiers."} + var Module_0_has_no_default_export = &Message{code: 1192, category: CategoryError, key: "Module_0_has_no_default_export_1192", text: "Module '{0}' has no default export."} + var An_export_declaration_cannot_have_modifiers = &Message{code: 1193, category: CategoryError, key: "An_export_declaration_cannot_have_modifiers_1193", text: "An export declaration cannot have modifiers."} + var Export_declarations_are_not_permitted_in_a_namespace = &Message{code: 1194, category: CategoryError, key: "Export_declarations_are_not_permitted_in_a_namespace_1194", text: "Export declarations are not permitted in a namespace."} + var X_export_Asterisk_does_not_re_export_a_default = &Message{code: 1195, category: CategoryError, key: "export_Asterisk_does_not_re_export_a_default_1195", text: "'export *' does not re-export a default."} + var Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified = &Message{code: 1196, category: CategoryError, key: "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", text: "Catch clause variable type annotation must be 'any' or 'unknown' if specified."} + var Catch_clause_variable_cannot_have_an_initializer = &Message{code: 1197, category: CategoryError, key: "Catch_clause_variable_cannot_have_an_initializer_1197", text: "Catch clause variable cannot have an initializer."} + var An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive = &Message{code: 1198, category: CategoryError, key: "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", text: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."} + var Unterminated_Unicode_escape_sequence = &Message{code: 1199, category: CategoryError, key: "Unterminated_Unicode_escape_sequence_1199", text: "Unterminated Unicode escape sequence."} + var Line_terminator_not_permitted_before_arrow = &Message{code: 1200, category: CategoryError, key: "Line_terminator_not_permitted_before_arrow_1200", text: "Line terminator not permitted before arrow."} + var Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead = &Message{code: 1202, category: CategoryError, key: "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", text: "Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."} + var Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead = &Message{code: 1203, category: CategoryError, key: "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", text: "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."} + var Re_exporting_a_type_when_0_is_enabled_requires_using_export_type = &Message{code: 1205, category: CategoryError, key: "Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205", text: "Re-exporting a type when '{0}' is enabled requires using 'export type'."} + var Decorators_are_not_valid_here = &Message{code: 1206, category: CategoryError, key: "Decorators_are_not_valid_here_1206", text: "Decorators are not valid here."} + var Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name = &Message{code: 1207, category: CategoryError, key: "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", text: "Decorators cannot be applied to multiple get/set accessors of the same name."} + var Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0 = &Message{code: 1209, category: CategoryError, key: "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209", text: "Invalid optional chain from new expression. Did you mean to call '{0}()'?"} + var Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode = &Message{code: 1210, category: CategoryError, key: "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", text: "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."} + var A_class_declaration_without_the_default_modifier_must_have_a_name = &Message{code: 1211, category: CategoryError, key: "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", text: "A class declaration without the 'default' modifier must have a name."} + var Identifier_expected_0_is_a_reserved_word_in_strict_mode = &Message{code: 1212, category: CategoryError, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", text: "Identifier expected. '{0}' is a reserved word in strict mode."} + var Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode = &Message{code: 1213, category: CategoryError, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", text: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."} + var Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode = &Message{code: 1214, category: CategoryError, key: "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", text: "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."} + var Invalid_use_of_0_Modules_are_automatically_in_strict_mode = &Message{code: 1215, category: CategoryError, key: "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", text: "Invalid use of '{0}'. Modules are automatically in strict mode."} + var Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules = &Message{code: 1216, category: CategoryError, key: "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", text: "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."} + var Export_assignment_is_not_supported_when_module_flag_is_system = &Message{code: 1218, category: CategoryError, key: "Export_assignment_is_not_supported_when_module_flag_is_system_1218", text: "Export assignment is not supported when '--module' flag is 'system'."} + var Generators_are_not_allowed_in_an_ambient_context = &Message{code: 1221, category: CategoryError, key: "Generators_are_not_allowed_in_an_ambient_context_1221", text: "Generators are not allowed in an ambient context."} + var An_overload_signature_cannot_be_declared_as_a_generator = &Message{code: 1222, category: CategoryError, key: "An_overload_signature_cannot_be_declared_as_a_generator_1222", text: "An overload signature cannot be declared as a generator."} + var X_0_tag_already_specified = &Message{code: 1223, category: CategoryError, key: "_0_tag_already_specified_1223", text: "'{0}' tag already specified."} + var Signature_0_must_be_a_type_predicate = &Message{code: 1224, category: CategoryError, key: "Signature_0_must_be_a_type_predicate_1224", text: "Signature '{0}' must be a type predicate."} + var Cannot_find_parameter_0 = &Message{code: 1225, category: CategoryError, key: "Cannot_find_parameter_0_1225", text: "Cannot find parameter '{0}'."} + var Type_predicate_0_is_not_assignable_to_1 = &Message{code: 1226, category: CategoryError, key: "Type_predicate_0_is_not_assignable_to_1_1226", text: "Type predicate '{0}' is not assignable to '{1}'."} + var Parameter_0_is_not_in_the_same_position_as_parameter_1 = &Message{code: 1227, category: CategoryError, key: "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", text: "Parameter '{0}' is not in the same position as parameter '{1}'."} + var A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods = &Message{code: 1228, category: CategoryError, key: "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", text: "A type predicate is only allowed in return type position for functions and methods."} + var A_type_predicate_cannot_reference_a_rest_parameter = &Message{code: 1229, category: CategoryError, key: "A_type_predicate_cannot_reference_a_rest_parameter_1229", text: "A type predicate cannot reference a rest parameter."} + var A_type_predicate_cannot_reference_element_0_in_a_binding_pattern = &Message{code: 1230, category: CategoryError, key: "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", text: "A type predicate cannot reference element '{0}' in a binding pattern."} + var An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration = &Message{code: 1231, category: CategoryError, key: "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", text: "An export assignment must be at the top level of a file or module declaration."} + var An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module = &Message{code: 1232, category: CategoryError, key: "An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232", text: "An import declaration can only be used at the top level of a namespace or module."} + var An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module = &Message{code: 1233, category: CategoryError, key: "An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233", text: "An export declaration can only be used at the top level of a namespace or module."} + var An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file = &Message{code: 1234, category: CategoryError, key: "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", text: "An ambient module declaration is only allowed at the top level in a file."} + var A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module = &Message{code: 1235, category: CategoryError, key: "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235", text: "A namespace declaration is only allowed at the top level of a namespace or module."} + var The_return_type_of_a_property_decorator_function_must_be_either_void_or_any = &Message{code: 1236, category: CategoryError, key: "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", text: "The return type of a property decorator function must be either 'void' or 'any'."} + var The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any = &Message{code: 1237, category: CategoryError, key: "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", text: "The return type of a parameter decorator function must be either 'void' or 'any'."} + var Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression = &Message{code: 1238, category: CategoryError, key: "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", text: "Unable to resolve signature of class decorator when called as an expression."} + var Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression = &Message{code: 1239, category: CategoryError, key: "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", text: "Unable to resolve signature of parameter decorator when called as an expression."} + var Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression = &Message{code: 1240, category: CategoryError, key: "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", text: "Unable to resolve signature of property decorator when called as an expression."} + var Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression = &Message{code: 1241, category: CategoryError, key: "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", text: "Unable to resolve signature of method decorator when called as an expression."} + var X_abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration = &Message{code: 1242, category: CategoryError, key: "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", text: "'abstract' modifier can only appear on a class, method, or property declaration."} + var X_0_modifier_cannot_be_used_with_1_modifier = &Message{code: 1243, category: CategoryError, key: "_0_modifier_cannot_be_used_with_1_modifier_1243", text: "'{0}' modifier cannot be used with '{1}' modifier."} + var Abstract_methods_can_only_appear_within_an_abstract_class = &Message{code: 1244, category: CategoryError, key: "Abstract_methods_can_only_appear_within_an_abstract_class_1244", text: "Abstract methods can only appear within an abstract class."} + var Method_0_cannot_have_an_implementation_because_it_is_marked_abstract = &Message{code: 1245, category: CategoryError, key: "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", text: "Method '{0}' cannot have an implementation because it is marked abstract."} + var An_interface_property_cannot_have_an_initializer = &Message{code: 1246, category: CategoryError, key: "An_interface_property_cannot_have_an_initializer_1246", text: "An interface property cannot have an initializer."} + var A_type_literal_property_cannot_have_an_initializer = &Message{code: 1247, category: CategoryError, key: "A_type_literal_property_cannot_have_an_initializer_1247", text: "A type literal property cannot have an initializer."} + var A_class_member_cannot_have_the_0_keyword = &Message{code: 1248, category: CategoryError, key: "A_class_member_cannot_have_the_0_keyword_1248", text: "A class member cannot have the '{0}' keyword."} + var A_decorator_can_only_decorate_a_method_implementation_not_an_overload = &Message{code: 1249, category: CategoryError, key: "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", text: "A decorator can only decorate a method implementation, not an overload."} + var Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5 = &Message{code: 1250, category: CategoryError, key: "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250", text: "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'."} + var Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode = &Message{code: 1251, category: CategoryError, key: "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251", text: "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode."} + var Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode = &Message{code: 1252, category: CategoryError, key: "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252", text: "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode."} + var Abstract_properties_can_only_appear_within_an_abstract_class = &Message{code: 1253, category: CategoryError, key: "Abstract_properties_can_only_appear_within_an_abstract_class_1253", text: "Abstract properties can only appear within an abstract class."} + var A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference = &Message{code: 1254, category: CategoryError, key: "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254", text: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."} + var A_definite_assignment_assertion_is_not_permitted_in_this_context = &Message{code: 1255, category: CategoryError, key: "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", text: "A definite assignment assertion '!' is not permitted in this context."} + var A_required_element_cannot_follow_an_optional_element = &Message{code: 1257, category: CategoryError, key: "A_required_element_cannot_follow_an_optional_element_1257", text: "A required element cannot follow an optional element."} + var A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration = &Message{code: 1258, category: CategoryError, key: "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", text: "A default export must be at the top level of a file or module declaration."} + var Module_0_can_only_be_default_imported_using_the_1_flag = &Message{code: 1259, category: CategoryError, key: "Module_0_can_only_be_default_imported_using_the_1_flag_1259", text: "Module '{0}' can only be default-imported using the '{1}' flag"} + var Keywords_cannot_contain_escape_characters = &Message{code: 1260, category: CategoryError, key: "Keywords_cannot_contain_escape_characters_1260", text: "Keywords cannot contain escape characters."} + var Already_included_file_name_0_differs_from_file_name_1_only_in_casing = &Message{code: 1261, category: CategoryError, key: "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261", text: "Already included file name '{0}' differs from file name '{1}' only in casing."} + var Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module = &Message{code: 1262, category: CategoryError, key: "Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262", text: "Identifier expected. '{0}' is a reserved word at the top-level of a module."} + var Declarations_with_initializers_cannot_also_have_definite_assignment_assertions = &Message{code: 1263, category: CategoryError, key: "Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263", text: "Declarations with initializers cannot also have definite assignment assertions."} + var Declarations_with_definite_assignment_assertions_must_also_have_type_annotations = &Message{code: 1264, category: CategoryError, key: "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", text: "Declarations with definite assignment assertions must also have type annotations."} + var A_rest_element_cannot_follow_another_rest_element = &Message{code: 1265, category: CategoryError, key: "A_rest_element_cannot_follow_another_rest_element_1265", text: "A rest element cannot follow another rest element."} + var An_optional_element_cannot_follow_a_rest_element = &Message{code: 1266, category: CategoryError, key: "An_optional_element_cannot_follow_a_rest_element_1266", text: "An optional element cannot follow a rest element."} + var Property_0_cannot_have_an_initializer_because_it_is_marked_abstract = &Message{code: 1267, category: CategoryError, key: "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", text: "Property '{0}' cannot have an initializer because it is marked abstract."} + var An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type = &Message{code: 1268, category: CategoryError, key: "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", text: "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."} + var Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled = &Message{code: 1269, category: CategoryError, key: "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269", text: "Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."} + var Decorator_function_return_type_0_is_not_assignable_to_type_1 = &Message{code: 1270, category: CategoryError, key: "Decorator_function_return_type_0_is_not_assignable_to_type_1_1270", text: "Decorator function return type '{0}' is not assignable to type '{1}'."} + var Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any = &Message{code: 1271, category: CategoryError, key: "Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271", text: "Decorator function return type is '{0}' but is expected to be 'void' or 'any'."} + var A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled = &Message{code: 1272, category: CategoryError, key: "A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272", text: "A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."} + var X_0_modifier_cannot_appear_on_a_type_parameter = &Message{code: 1273, category: CategoryError, key: "_0_modifier_cannot_appear_on_a_type_parameter_1273", text: "'{0}' modifier cannot appear on a type parameter"} + var X_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias = &Message{code: 1274, category: CategoryError, key: "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", text: "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"} + var X_accessor_modifier_can_only_appear_on_a_property_declaration = &Message{code: 1275, category: CategoryError, key: "accessor_modifier_can_only_appear_on_a_property_declaration_1275", text: "'accessor' modifier can only appear on a property declaration."} + var An_accessor_property_cannot_be_declared_optional = &Message{code: 1276, category: CategoryError, key: "An_accessor_property_cannot_be_declared_optional_1276", text: "An 'accessor' property cannot be declared optional."} + var X_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class = &Message{code: 1277, category: CategoryError, key: "_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277", text: "'{0}' modifier can only appear on a type parameter of a function, method or class"} + var The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0 = &Message{code: 1278, category: CategoryError, key: "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278", text: "The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."} + var The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0 = &Message{code: 1279, category: CategoryError, key: "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279", text: "The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."} + var Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement = &Message{code: 1280, category: CategoryError, key: "Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280", text: "Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."} + var Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead = &Message{code: 1281, category: CategoryError, key: "Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281", text: "Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."} + var An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type = &Message{code: 1282, category: CategoryError, key: "An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282", text: "An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."} + var An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration = &Message{code: 1283, category: CategoryError, key: "An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283", text: "An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."} + var An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type = &Message{code: 1284, category: CategoryError, key: "An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284", text: "An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."} + var An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration = &Message{code: 1285, category: CategoryError, key: "An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285", text: "An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."} + var ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled = &Message{code: 1286, category: CategoryError, key: "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", text: "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."} + var A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled = &Message{code: 1287, category: CategoryError, key: "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", text: "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."} + var An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled = &Message{code: 1288, category: CategoryError, key: "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", text: "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."} + var X_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported = &Message{code: 1289, category: CategoryError, key: "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", text: "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."} + var X_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default = &Message{code: 1290, category: CategoryError, key: "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", text: "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."} + var X_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported = &Message{code: 1291, category: CategoryError, key: "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291", text: "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."} + var X_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default = &Message{code: 1292, category: CategoryError, key: "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292", text: "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."} + var ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve = &Message{code: 1293, category: CategoryError, key: "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293", text: "ESM syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."} + +var This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled = &Message{code: 1294, category: CategoryError, key: "This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled_1294", text: "This syntax is not allowed when 'erasableSyntaxOnly' is enabled."} + var X_with_statements_are_not_allowed_in_an_async_function_block = &Message{code: 1300, category: CategoryError, key: "with_statements_are_not_allowed_in_an_async_function_block_1300", text: "'with' statements are not allowed in an async function block."} + var X_await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules = &Message{code: 1308, category: CategoryError, key: "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", text: "'await' expressions are only allowed within async functions and at the top levels of modules."} + var The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level = &Message{code: 1309, category: CategoryError, key: "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", text: "The current file is a CommonJS module and cannot use 'await' at the top level."} + var Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern = &Message{code: 1312, category: CategoryError, key: "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", text: "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."} + var The_body_of_an_if_statement_cannot_be_the_empty_statement = &Message{code: 1313, category: CategoryError, key: "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", text: "The body of an 'if' statement cannot be the empty statement."} + var Global_module_exports_may_only_appear_in_module_files = &Message{code: 1314, category: CategoryError, key: "Global_module_exports_may_only_appear_in_module_files_1314", text: "Global module exports may only appear in module files."} + var Global_module_exports_may_only_appear_in_declaration_files = &Message{code: 1315, category: CategoryError, key: "Global_module_exports_may_only_appear_in_declaration_files_1315", text: "Global module exports may only appear in declaration files."} + var Global_module_exports_may_only_appear_at_top_level = &Message{code: 1316, category: CategoryError, key: "Global_module_exports_may_only_appear_at_top_level_1316", text: "Global module exports may only appear at top level."} + var A_parameter_property_cannot_be_declared_using_a_rest_parameter = &Message{code: 1317, category: CategoryError, key: "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", text: "A parameter property cannot be declared using a rest parameter."} + var An_abstract_accessor_cannot_have_an_implementation = &Message{code: 1318, category: CategoryError, key: "An_abstract_accessor_cannot_have_an_implementation_1318", text: "An abstract accessor cannot have an implementation."} + var A_default_export_can_only_be_used_in_an_ECMAScript_style_module = &Message{code: 1319, category: CategoryError, key: "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", text: "A default export can only be used in an ECMAScript-style module."} + var Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member = &Message{code: 1320, category: CategoryError, key: "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", text: "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."} + var Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member = &Message{code: 1321, category: CategoryError, key: "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", text: "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."} + var Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member = &Message{code: 1322, category: CategoryError, key: "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", text: "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."} -var Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext = &Message{code: 1323, category: CategoryError, key: "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", text: "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."} -var Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodenext_or_preserve = &Message{code: 1324, category: CategoryError, key: "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodene_1324", text: "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'nodenext', or 'preserve'."} + +var Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_or_nodenext = &Message{code: 1323, category: CategoryError, key: "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", text: "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'."} + +var Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_nodenext_or_preserve = &Message{code: 1324, category: CategoryError, key: "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_1324", text: "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'."} + var Argument_of_dynamic_import_cannot_be_spread_element = &Message{code: 1325, category: CategoryError, key: "Argument_of_dynamic_import_cannot_be_spread_element_1325", text: "Argument of dynamic import cannot be spread element."} + var This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments = &Message{code: 1326, category: CategoryError, key: "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", text: "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."} + var String_literal_with_double_quotes_expected = &Message{code: 1327, category: CategoryError, key: "String_literal_with_double_quotes_expected_1327", text: "String literal with double quotes expected."} + var Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal = &Message{code: 1328, category: CategoryError, key: "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", text: "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."} + var X_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0 = &Message{code: 1329, category: CategoryError, key: "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", text: "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"} + var A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly = &Message{code: 1330, category: CategoryError, key: "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330", text: "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."} + var A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly = &Message{code: 1331, category: CategoryError, key: "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331", text: "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."} + var A_variable_whose_type_is_a_unique_symbol_type_must_be_const = &Message{code: 1332, category: CategoryError, key: "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332", text: "A variable whose type is a 'unique symbol' type must be 'const'."} + var X_unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name = &Message{code: 1333, category: CategoryError, key: "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", text: "'unique symbol' types may not be used on a variable declaration with a binding name."} + var X_unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement = &Message{code: 1334, category: CategoryError, key: "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", text: "'unique symbol' types are only allowed on variables in a variable statement."} + var X_unique_symbol_types_are_not_allowed_here = &Message{code: 1335, category: CategoryError, key: "unique_symbol_types_are_not_allowed_here_1335", text: "'unique symbol' types are not allowed here."} + var An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead = &Message{code: 1337, category: CategoryError, key: "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", text: "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."} + var X_infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type = &Message{code: 1338, category: CategoryError, key: "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", text: "'infer' declarations are only permitted in the 'extends' clause of a conditional type."} + var Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here = &Message{code: 1339, category: CategoryError, key: "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", text: "Module '{0}' does not refer to a value, but is used as a value here."} + var Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0 = &Message{code: 1340, category: CategoryError, key: "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", text: "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"} + var Class_constructor_may_not_be_an_accessor = &Message{code: 1341, category: CategoryError, key: "Class_constructor_may_not_be_an_accessor_1341", text: "Class constructor may not be an accessor."} -var The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext = &Message{code: 1343, category: CategoryError, key: "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", text: "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."} + +var The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_or_nodenext = &Message{code: 1343, category: CategoryError, key: "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", text: "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'."} + var A_label_is_not_allowed_here = &Message{code: 1344, category: CategoryError, key: "A_label_is_not_allowed_here_1344", text: "'A label is not allowed here."} + var An_expression_of_type_void_cannot_be_tested_for_truthiness = &Message{code: 1345, category: CategoryError, key: "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", text: "An expression of type 'void' cannot be tested for truthiness."} + var This_parameter_is_not_allowed_with_use_strict_directive = &Message{code: 1346, category: CategoryError, key: "This_parameter_is_not_allowed_with_use_strict_directive_1346", text: "This parameter is not allowed with 'use strict' directive."} + var X_use_strict_directive_cannot_be_used_with_non_simple_parameter_list = &Message{code: 1347, category: CategoryError, key: "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", text: "'use strict' directive cannot be used with non-simple parameter list."} + var Non_simple_parameter_declared_here = &Message{code: 1348, category: CategoryError, key: "Non_simple_parameter_declared_here_1348", text: "Non-simple parameter declared here."} + var X_use_strict_directive_used_here = &Message{code: 1349, category: CategoryError, key: "use_strict_directive_used_here_1349", text: "'use strict' directive used here."} + var Print_the_final_configuration_instead_of_building = &Message{code: 1350, category: CategoryMessage, key: "Print_the_final_configuration_instead_of_building_1350", text: "Print the final configuration instead of building."} + var An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal = &Message{code: 1351, category: CategoryError, key: "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", text: "An identifier or keyword cannot immediately follow a numeric literal."} + var A_bigint_literal_cannot_use_exponential_notation = &Message{code: 1352, category: CategoryError, key: "A_bigint_literal_cannot_use_exponential_notation_1352", text: "A bigint literal cannot use exponential notation."} + var A_bigint_literal_must_be_an_integer = &Message{code: 1353, category: CategoryError, key: "A_bigint_literal_must_be_an_integer_1353", text: "A bigint literal must be an integer."} + var X_readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types = &Message{code: 1354, category: CategoryError, key: "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", text: "'readonly' type modifier is only permitted on array and tuple literal types."} + var A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals = &Message{code: 1355, category: CategoryError, key: "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355", text: "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."} + var Did_you_mean_to_mark_this_function_as_async = &Message{code: 1356, category: CategoryError, key: "Did_you_mean_to_mark_this_function_as_async_1356", text: "Did you mean to mark this function as 'async'?"} + var An_enum_member_name_must_be_followed_by_a_or = &Message{code: 1357, category: CategoryError, key: "An_enum_member_name_must_be_followed_by_a_or_1357", text: "An enum member name must be followed by a ',', '=', or '}'."} + var Tagged_template_expressions_are_not_permitted_in_an_optional_chain = &Message{code: 1358, category: CategoryError, key: "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", text: "Tagged template expressions are not permitted in an optional chain."} + var Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here = &Message{code: 1359, category: CategoryError, key: "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", text: "Identifier expected. '{0}' is a reserved word that cannot be used here."} + var Type_0_does_not_satisfy_the_expected_type_1 = &Message{code: 1360, category: CategoryError, key: "Type_0_does_not_satisfy_the_expected_type_1_1360", text: "Type '{0}' does not satisfy the expected type '{1}'."} + var X_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type = &Message{code: 1361, category: CategoryError, key: "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", text: "'{0}' cannot be used as a value because it was imported using 'import type'."} + var X_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type = &Message{code: 1362, category: CategoryError, key: "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", text: "'{0}' cannot be used as a value because it was exported using 'export type'."} + var A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both = &Message{code: 1363, category: CategoryError, key: "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", text: "A type-only import can specify a default import or named bindings, but not both."} + var Convert_to_type_only_export = &Message{code: 1364, category: CategoryMessage, key: "Convert_to_type_only_export_1364", text: "Convert to type-only export"} + var Convert_all_re_exported_types_to_type_only_exports = &Message{code: 1365, category: CategoryMessage, key: "Convert_all_re_exported_types_to_type_only_exports_1365", text: "Convert all re-exported types to type-only exports"} + var Split_into_two_separate_import_declarations = &Message{code: 1366, category: CategoryMessage, key: "Split_into_two_separate_import_declarations_1366", text: "Split into two separate import declarations"} + var Split_all_invalid_type_only_imports = &Message{code: 1367, category: CategoryMessage, key: "Split_all_invalid_type_only_imports_1367", text: "Split all invalid type-only imports"} + var Class_constructor_may_not_be_a_generator = &Message{code: 1368, category: CategoryError, key: "Class_constructor_may_not_be_a_generator_1368", text: "Class constructor may not be a generator."} + var Did_you_mean_0 = &Message{code: 1369, category: CategoryMessage, key: "Did_you_mean_0_1369", text: "Did you mean '{0}'?"} + var X_await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module = &Message{code: 1375, category: CategoryError, key: "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", text: "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."} + var X_0_was_imported_here = &Message{code: 1376, category: CategoryMessage, key: "_0_was_imported_here_1376", text: "'{0}' was imported here."} + var X_0_was_exported_here = &Message{code: 1377, category: CategoryMessage, key: "_0_was_exported_here_1377", text: "'{0}' was exported here."} -var Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher = &Message{code: 1378, category: CategoryError, key: "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", text: "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."} + +var Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher = &Message{code: 1378, category: CategoryError, key: "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", text: "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."} + var An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type = &Message{code: 1379, category: CategoryError, key: "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", text: "An import alias cannot reference a declaration that was exported using 'export type'."} + var An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type = &Message{code: 1380, category: CategoryError, key: "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", text: "An import alias cannot reference a declaration that was imported using 'import type'."} + var Unexpected_token_Did_you_mean_or_rbrace = &Message{code: 1381, category: CategoryError, key: "Unexpected_token_Did_you_mean_or_rbrace_1381", text: "Unexpected token. Did you mean `{'}'}` or `}`?"} + var Unexpected_token_Did_you_mean_or_gt = &Message{code: 1382, category: CategoryError, key: "Unexpected_token_Did_you_mean_or_gt_1382", text: "Unexpected token. Did you mean `{'>'}` or `>`?"} + var Function_type_notation_must_be_parenthesized_when_used_in_a_union_type = &Message{code: 1385, category: CategoryError, key: "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", text: "Function type notation must be parenthesized when used in a union type."} + var Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type = &Message{code: 1386, category: CategoryError, key: "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", text: "Constructor type notation must be parenthesized when used in a union type."} + var Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type = &Message{code: 1387, category: CategoryError, key: "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", text: "Function type notation must be parenthesized when used in an intersection type."} + var Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type = &Message{code: 1388, category: CategoryError, key: "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", text: "Constructor type notation must be parenthesized when used in an intersection type."} + var X_0_is_not_allowed_as_a_variable_declaration_name = &Message{code: 1389, category: CategoryError, key: "_0_is_not_allowed_as_a_variable_declaration_name_1389", text: "'{0}' is not allowed as a variable declaration name."} + var X_0_is_not_allowed_as_a_parameter_name = &Message{code: 1390, category: CategoryError, key: "_0_is_not_allowed_as_a_parameter_name_1390", text: "'{0}' is not allowed as a parameter name."} + var An_import_alias_cannot_use_import_type = &Message{code: 1392, category: CategoryError, key: "An_import_alias_cannot_use_import_type_1392", text: "An import alias cannot use 'import type'"} + var Imported_via_0_from_file_1 = &Message{code: 1393, category: CategoryMessage, key: "Imported_via_0_from_file_1_1393", text: "Imported via {0} from file '{1}'"} + var Imported_via_0_from_file_1_with_packageId_2 = &Message{code: 1394, category: CategoryMessage, key: "Imported_via_0_from_file_1_with_packageId_2_1394", text: "Imported via {0} from file '{1}' with packageId '{2}'"} + var Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions = &Message{code: 1395, category: CategoryMessage, key: "Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395", text: "Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"} + var Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions = &Message{code: 1396, category: CategoryMessage, key: "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", text: "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"} + var Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions = &Message{code: 1397, category: CategoryMessage, key: "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", text: "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"} + var Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions = &Message{code: 1398, category: CategoryMessage, key: "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", text: "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"} + var File_is_included_via_import_here = &Message{code: 1399, category: CategoryMessage, key: "File_is_included_via_import_here_1399", text: "File is included via import here."} + var Referenced_via_0_from_file_1 = &Message{code: 1400, category: CategoryMessage, key: "Referenced_via_0_from_file_1_1400", text: "Referenced via '{0}' from file '{1}'"} + var File_is_included_via_reference_here = &Message{code: 1401, category: CategoryMessage, key: "File_is_included_via_reference_here_1401", text: "File is included via reference here."} + var Type_library_referenced_via_0_from_file_1 = &Message{code: 1402, category: CategoryMessage, key: "Type_library_referenced_via_0_from_file_1_1402", text: "Type library referenced via '{0}' from file '{1}'"} + var Type_library_referenced_via_0_from_file_1_with_packageId_2 = &Message{code: 1403, category: CategoryMessage, key: "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", text: "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"} + var File_is_included_via_type_library_reference_here = &Message{code: 1404, category: CategoryMessage, key: "File_is_included_via_type_library_reference_here_1404", text: "File is included via type library reference here."} + var Library_referenced_via_0_from_file_1 = &Message{code: 1405, category: CategoryMessage, key: "Library_referenced_via_0_from_file_1_1405", text: "Library referenced via '{0}' from file '{1}'"} + var File_is_included_via_library_reference_here = &Message{code: 1406, category: CategoryMessage, key: "File_is_included_via_library_reference_here_1406", text: "File is included via library reference here."} + var Matched_by_include_pattern_0_in_1 = &Message{code: 1407, category: CategoryMessage, key: "Matched_by_include_pattern_0_in_1_1407", text: "Matched by include pattern '{0}' in '{1}'"} + var File_is_matched_by_include_pattern_specified_here = &Message{code: 1408, category: CategoryMessage, key: "File_is_matched_by_include_pattern_specified_here_1408", text: "File is matched by include pattern specified here."} + var Part_of_files_list_in_tsconfig_json = &Message{code: 1409, category: CategoryMessage, key: "Part_of_files_list_in_tsconfig_json_1409", text: "Part of 'files' list in tsconfig.json"} + var File_is_matched_by_files_list_specified_here = &Message{code: 1410, category: CategoryMessage, key: "File_is_matched_by_files_list_specified_here_1410", text: "File is matched by 'files' list specified here."} + var Output_from_referenced_project_0_included_because_1_specified = &Message{code: 1411, category: CategoryMessage, key: "Output_from_referenced_project_0_included_because_1_specified_1411", text: "Output from referenced project '{0}' included because '{1}' specified"} + var Output_from_referenced_project_0_included_because_module_is_specified_as_none = &Message{code: 1412, category: CategoryMessage, key: "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", text: "Output from referenced project '{0}' included because '--module' is specified as 'none'"} + var File_is_output_from_referenced_project_specified_here = &Message{code: 1413, category: CategoryMessage, key: "File_is_output_from_referenced_project_specified_here_1413", text: "File is output from referenced project specified here."} + var Source_from_referenced_project_0_included_because_1_specified = &Message{code: 1414, category: CategoryMessage, key: "Source_from_referenced_project_0_included_because_1_specified_1414", text: "Source from referenced project '{0}' included because '{1}' specified"} + var Source_from_referenced_project_0_included_because_module_is_specified_as_none = &Message{code: 1415, category: CategoryMessage, key: "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", text: "Source from referenced project '{0}' included because '--module' is specified as 'none'"} + var File_is_source_from_referenced_project_specified_here = &Message{code: 1416, category: CategoryMessage, key: "File_is_source_from_referenced_project_specified_here_1416", text: "File is source from referenced project specified here."} + var Entry_point_of_type_library_0_specified_in_compilerOptions = &Message{code: 1417, category: CategoryMessage, key: "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", text: "Entry point of type library '{0}' specified in compilerOptions"} + var Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1 = &Message{code: 1418, category: CategoryMessage, key: "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", text: "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"} + var File_is_entry_point_of_type_library_specified_here = &Message{code: 1419, category: CategoryMessage, key: "File_is_entry_point_of_type_library_specified_here_1419", text: "File is entry point of type library specified here."} + var Entry_point_for_implicit_type_library_0 = &Message{code: 1420, category: CategoryMessage, key: "Entry_point_for_implicit_type_library_0_1420", text: "Entry point for implicit type library '{0}'"} + var Entry_point_for_implicit_type_library_0_with_packageId_1 = &Message{code: 1421, category: CategoryMessage, key: "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", text: "Entry point for implicit type library '{0}' with packageId '{1}'"} + var Library_0_specified_in_compilerOptions = &Message{code: 1422, category: CategoryMessage, key: "Library_0_specified_in_compilerOptions_1422", text: "Library '{0}' specified in compilerOptions"} + var File_is_library_specified_here = &Message{code: 1423, category: CategoryMessage, key: "File_is_library_specified_here_1423", text: "File is library specified here."} + var Default_library = &Message{code: 1424, category: CategoryMessage, key: "Default_library_1424", text: "Default library"} + var Default_library_for_target_0 = &Message{code: 1425, category: CategoryMessage, key: "Default_library_for_target_0_1425", text: "Default library for target '{0}'"} + var File_is_default_library_for_target_specified_here = &Message{code: 1426, category: CategoryMessage, key: "File_is_default_library_for_target_specified_here_1426", text: "File is default library for target specified here."} + var Root_file_specified_for_compilation = &Message{code: 1427, category: CategoryMessage, key: "Root_file_specified_for_compilation_1427", text: "Root file specified for compilation"} + var File_is_output_of_project_reference_source_0 = &Message{code: 1428, category: CategoryMessage, key: "File_is_output_of_project_reference_source_0_1428", text: "File is output of project reference source '{0}'"} + var File_redirects_to_file_0 = &Message{code: 1429, category: CategoryMessage, key: "File_redirects_to_file_0_1429", text: "File redirects to file '{0}'"} + var The_file_is_in_the_program_because_Colon = &Message{code: 1430, category: CategoryMessage, key: "The_file_is_in_the_program_because_Colon_1430", text: "The file is in the program because:"} + var X_for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module = &Message{code: 1431, category: CategoryError, key: "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", text: "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."} -var Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher = &Message{code: 1432, category: CategoryError, key: "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", text: "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."} + +var Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher = &Message{code: 1432, category: CategoryError, key: "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", text: "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."} + var Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters = &Message{code: 1433, category: CategoryError, key: "Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433", text: "Neither decorators nor modifiers may be applied to 'this' parameters."} + var Unexpected_keyword_or_identifier = &Message{code: 1434, category: CategoryError, key: "Unexpected_keyword_or_identifier_1434", text: "Unexpected keyword or identifier."} + var Unknown_keyword_or_identifier_Did_you_mean_0 = &Message{code: 1435, category: CategoryError, key: "Unknown_keyword_or_identifier_Did_you_mean_0_1435", text: "Unknown keyword or identifier. Did you mean '{0}'?"} + var Decorators_must_precede_the_name_and_all_keywords_of_property_declarations = &Message{code: 1436, category: CategoryError, key: "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", text: "Decorators must precede the name and all keywords of property declarations."} + var Namespace_must_be_given_a_name = &Message{code: 1437, category: CategoryError, key: "Namespace_must_be_given_a_name_1437", text: "Namespace must be given a name."} + var Interface_must_be_given_a_name = &Message{code: 1438, category: CategoryError, key: "Interface_must_be_given_a_name_1438", text: "Interface must be given a name."} + var Type_alias_must_be_given_a_name = &Message{code: 1439, category: CategoryError, key: "Type_alias_must_be_given_a_name_1439", text: "Type alias must be given a name."} + var Variable_declaration_not_allowed_at_this_location = &Message{code: 1440, category: CategoryError, key: "Variable_declaration_not_allowed_at_this_location_1440", text: "Variable declaration not allowed at this location."} + var Cannot_start_a_function_call_in_a_type_annotation = &Message{code: 1441, category: CategoryError, key: "Cannot_start_a_function_call_in_a_type_annotation_1441", text: "Cannot start a function call in a type annotation."} + var Expected_for_property_initializer = &Message{code: 1442, category: CategoryError, key: "Expected_for_property_initializer_1442", text: "Expected '=' for property initializer."} + var Module_declaration_names_may_only_use_or_quoted_strings = &Message{code: 1443, category: CategoryError, key: "Module_declaration_names_may_only_use_or_quoted_strings_1443", text: "Module declaration names may only use ' or \" quoted strings."} + var X_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled = &Message{code: 1448, category: CategoryError, key: "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448", text: "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."} + var Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed = &Message{code: 1449, category: CategoryMessage, key: "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", text: "Preserve unused imported values in the JavaScript output that would otherwise be removed."} + var Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments = &Message{code: 1450, category: CategoryMessage, key: "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450", text: "Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"} + var Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression = &Message{code: 1451, category: CategoryError, key: "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", text: "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"} + var X_resolution_mode_should_be_either_require_or_import = &Message{code: 1453, category: CategoryError, key: "resolution_mode_should_be_either_require_or_import_1453", text: "`resolution-mode` should be either `require` or `import`."} + var X_resolution_mode_can_only_be_set_for_type_only_imports = &Message{code: 1454, category: CategoryError, key: "resolution_mode_can_only_be_set_for_type_only_imports_1454", text: "`resolution-mode` can only be set for type-only imports."} + var X_resolution_mode_is_the_only_valid_key_for_type_import_assertions = &Message{code: 1455, category: CategoryError, key: "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", text: "`resolution-mode` is the only valid key for type import assertions."} + var Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require = &Message{code: 1456, category: CategoryError, key: "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", text: "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."} + var Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk = &Message{code: 1457, category: CategoryMessage, key: "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", text: "Matched by default include pattern '**/*'"} + var File_is_ECMAScript_module_because_0_has_field_type_with_value_module = &Message{code: 1458, category: CategoryMessage, key: "File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458", text: "File is ECMAScript module because '{0}' has field \"type\" with value \"module\""} + var File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module = &Message{code: 1459, category: CategoryMessage, key: "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", text: "File is CommonJS module because '{0}' has field \"type\" whose value is not \"module\""} + var File_is_CommonJS_module_because_0_does_not_have_field_type = &Message{code: 1460, category: CategoryMessage, key: "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", text: "File is CommonJS module because '{0}' does not have field \"type\""} + var File_is_CommonJS_module_because_package_json_was_not_found = &Message{code: 1461, category: CategoryMessage, key: "File_is_CommonJS_module_because_package_json_was_not_found_1461", text: "File is CommonJS module because 'package.json' was not found"} + var X_resolution_mode_is_the_only_valid_key_for_type_import_attributes = &Message{code: 1463, category: CategoryError, key: "resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463", text: "'resolution-mode' is the only valid key for type import attributes."} + var Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require = &Message{code: 1464, category: CategoryError, key: "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464", text: "Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."} + var The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output = &Message{code: 1470, category: CategoryError, key: "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", text: "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."} + var Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead = &Message{code: 1471, category: CategoryError, key: "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", text: "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."} + var X_catch_or_finally_expected = &Message{code: 1472, category: CategoryError, key: "catch_or_finally_expected_1472", text: "'catch' or 'finally' expected."} + var An_import_declaration_can_only_be_used_at_the_top_level_of_a_module = &Message{code: 1473, category: CategoryError, key: "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", text: "An import declaration can only be used at the top level of a module."} + var An_export_declaration_can_only_be_used_at_the_top_level_of_a_module = &Message{code: 1474, category: CategoryError, key: "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", text: "An export declaration can only be used at the top level of a module."} + var Control_what_method_is_used_to_detect_module_format_JS_files = &Message{code: 1475, category: CategoryMessage, key: "Control_what_method_is_used_to_detect_module_format_JS_files_1475", text: "Control what method is used to detect module-format JS files."} + var X_auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules = &Message{code: 1476, category: CategoryMessage, key: "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", text: "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."} + var An_instantiation_expression_cannot_be_followed_by_a_property_access = &Message{code: 1477, category: CategoryError, key: "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", text: "An instantiation expression cannot be followed by a property access."} + var Identifier_or_string_literal_expected = &Message{code: 1478, category: CategoryError, key: "Identifier_or_string_literal_expected_1478", text: "Identifier or string literal expected."} + var The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead = &Message{code: 1479, category: CategoryError, key: "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479", text: "The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"{0}\")' call instead."} + var To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module = &Message{code: 1480, category: CategoryMessage, key: "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480", text: "To convert this file to an ECMAScript module, change its file extension to '{0}' or create a local package.json file with `{ \"type\": \"module\" }`."} + var To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1 = &Message{code: 1481, category: CategoryMessage, key: "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481", text: "To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field `\"type\": \"module\"` to '{1}'."} + var To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0 = &Message{code: 1482, category: CategoryMessage, key: "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482", text: "To convert this file to an ECMAScript module, add the field `\"type\": \"module\"` to '{0}'."} + var To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module = &Message{code: 1483, category: CategoryMessage, key: "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", text: "To convert this file to an ECMAScript module, create a local package.json file with `{ \"type\": \"module\" }`."} + var X_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled = &Message{code: 1484, category: CategoryError, key: "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484", text: "'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."} + var X_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled = &Message{code: 1485, category: CategoryError, key: "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485", text: "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."} + var Decorator_used_before_export_here = &Message{code: 1486, category: CategoryError, key: "Decorator_used_before_export_here_1486", text: "Decorator used before 'export' here."} + var Octal_escape_sequences_are_not_allowed_Use_the_syntax_0 = &Message{code: 1487, category: CategoryError, key: "Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487", text: "Octal escape sequences are not allowed. Use the syntax '{0}'."} + var Escape_sequence_0_is_not_allowed = &Message{code: 1488, category: CategoryError, key: "Escape_sequence_0_is_not_allowed_1488", text: "Escape sequence '{0}' is not allowed."} + var Decimals_with_leading_zeros_are_not_allowed = &Message{code: 1489, category: CategoryError, key: "Decimals_with_leading_zeros_are_not_allowed_1489", text: "Decimals with leading zeros are not allowed."} + var File_appears_to_be_binary = &Message{code: 1490, category: CategoryError, key: "File_appears_to_be_binary_1490", text: "File appears to be binary."} + var X_0_modifier_cannot_appear_on_a_using_declaration = &Message{code: 1491, category: CategoryError, key: "_0_modifier_cannot_appear_on_a_using_declaration_1491", text: "'{0}' modifier cannot appear on a 'using' declaration."} + var X_0_declarations_may_not_have_binding_patterns = &Message{code: 1492, category: CategoryError, key: "_0_declarations_may_not_have_binding_patterns_1492", text: "'{0}' declarations may not have binding patterns."} + var The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration = &Message{code: 1493, category: CategoryError, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", text: "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."} + var The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration = &Message{code: 1494, category: CategoryError, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", text: "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."} + var X_0_modifier_cannot_appear_on_an_await_using_declaration = &Message{code: 1495, category: CategoryError, key: "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", text: "'{0}' modifier cannot appear on an 'await using' declaration."} + var Identifier_string_literal_or_number_literal_expected = &Message{code: 1496, category: CategoryError, key: "Identifier_string_literal_or_number_literal_expected_1496", text: "Identifier, string literal, or number literal expected."} + var Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator = &Message{code: 1497, category: CategoryError, key: "Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497", text: "Expression must be enclosed in parentheses to be used as a decorator."} + var Invalid_syntax_in_decorator = &Message{code: 1498, category: CategoryError, key: "Invalid_syntax_in_decorator_1498", text: "Invalid syntax in decorator."} + var Unknown_regular_expression_flag = &Message{code: 1499, category: CategoryError, key: "Unknown_regular_expression_flag_1499", text: "Unknown regular expression flag."} + var Duplicate_regular_expression_flag = &Message{code: 1500, category: CategoryError, key: "Duplicate_regular_expression_flag_1500", text: "Duplicate regular expression flag."} + var This_regular_expression_flag_is_only_available_when_targeting_0_or_later = &Message{code: 1501, category: CategoryError, key: "This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501", text: "This regular expression flag is only available when targeting '{0}' or later."} + var The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously = &Message{code: 1502, category: CategoryError, key: "The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502", text: "The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."} + var Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later = &Message{code: 1503, category: CategoryError, key: "Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503", text: "Named capturing groups are only available when targeting 'ES2018' or later."} + var Subpattern_flags_must_be_present_when_there_is_a_minus_sign = &Message{code: 1504, category: CategoryError, key: "Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504", text: "Subpattern flags must be present when there is a minus sign."} + var Incomplete_quantifier_Digit_expected = &Message{code: 1505, category: CategoryError, key: "Incomplete_quantifier_Digit_expected_1505", text: "Incomplete quantifier. Digit expected."} + var Numbers_out_of_order_in_quantifier = &Message{code: 1506, category: CategoryError, key: "Numbers_out_of_order_in_quantifier_1506", text: "Numbers out of order in quantifier."} + var There_is_nothing_available_for_repetition = &Message{code: 1507, category: CategoryError, key: "There_is_nothing_available_for_repetition_1507", text: "There is nothing available for repetition."} + var Unexpected_0_Did_you_mean_to_escape_it_with_backslash = &Message{code: 1508, category: CategoryError, key: "Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508", text: "Unexpected '{0}'. Did you mean to escape it with backslash?"} + var This_regular_expression_flag_cannot_be_toggled_within_a_subpattern = &Message{code: 1509, category: CategoryError, key: "This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509", text: "This regular expression flag cannot be toggled within a subpattern."} + var X_k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets = &Message{code: 1510, category: CategoryError, key: "k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510", text: "'\\k' must be followed by a capturing group name enclosed in angle brackets."} + var X_q_is_only_available_inside_character_class = &Message{code: 1511, category: CategoryError, key: "q_is_only_available_inside_character_class_1511", text: "'\\q' is only available inside character class."} + var X_c_must_be_followed_by_an_ASCII_letter = &Message{code: 1512, category: CategoryError, key: "c_must_be_followed_by_an_ASCII_letter_1512", text: "'\\c' must be followed by an ASCII letter."} + var Undetermined_character_escape = &Message{code: 1513, category: CategoryError, key: "Undetermined_character_escape_1513", text: "Undetermined character escape."} + var Expected_a_capturing_group_name = &Message{code: 1514, category: CategoryError, key: "Expected_a_capturing_group_name_1514", text: "Expected a capturing group name."} + var Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other = &Message{code: 1515, category: CategoryError, key: "Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515", text: "Named capturing groups with the same name must be mutually exclusive to each other."} + var A_character_class_range_must_not_be_bounded_by_another_character_class = &Message{code: 1516, category: CategoryError, key: "A_character_class_range_must_not_be_bounded_by_another_character_class_1516", text: "A character class range must not be bounded by another character class."} + var Range_out_of_order_in_character_class = &Message{code: 1517, category: CategoryError, key: "Range_out_of_order_in_character_class_1517", text: "Range out of order in character class."} + var Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class = &Message{code: 1518, category: CategoryError, key: "Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518", text: "Anything that would possibly match more than a single character is invalid inside a negated character class."} + var Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead = &Message{code: 1519, category: CategoryError, key: "Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519", text: "Operators must not be mixed within a character class. Wrap it in a nested class instead."} + var Expected_a_class_set_operand = &Message{code: 1520, category: CategoryError, key: "Expected_a_class_set_operand_1520", text: "Expected a class set operand."} + var X_q_must_be_followed_by_string_alternatives_enclosed_in_braces = &Message{code: 1521, category: CategoryError, key: "q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521", text: "'\\q' must be followed by string alternatives enclosed in braces."} + var A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash = &Message{code: 1522, category: CategoryError, key: "A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522", text: "A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"} + var Expected_a_Unicode_property_name = &Message{code: 1523, category: CategoryError, key: "Expected_a_Unicode_property_name_1523", text: "Expected a Unicode property name."} + var Unknown_Unicode_property_name = &Message{code: 1524, category: CategoryError, key: "Unknown_Unicode_property_name_1524", text: "Unknown Unicode property name."} + var Expected_a_Unicode_property_value = &Message{code: 1525, category: CategoryError, key: "Expected_a_Unicode_property_value_1525", text: "Expected a Unicode property value."} + var Unknown_Unicode_property_value = &Message{code: 1526, category: CategoryError, key: "Unknown_Unicode_property_value_1526", text: "Unknown Unicode property value."} + var Expected_a_Unicode_property_name_or_value = &Message{code: 1527, category: CategoryError, key: "Expected_a_Unicode_property_name_or_value_1527", text: "Expected a Unicode property name or value."} + var Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set = &Message{code: 1528, category: CategoryError, key: "Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528", text: "Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."} + var Unknown_Unicode_property_name_or_value = &Message{code: 1529, category: CategoryError, key: "Unknown_Unicode_property_name_or_value_1529", text: "Unknown Unicode property name or value."} + var Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set = &Message{code: 1530, category: CategoryError, key: "Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530", text: "Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."} + var X_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces = &Message{code: 1531, category: CategoryError, key: "_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531", text: "'\\{0}' must be followed by a Unicode property value expression enclosed in braces."} + var There_is_no_capturing_group_named_0_in_this_regular_expression = &Message{code: 1532, category: CategoryError, key: "There_is_no_capturing_group_named_0_in_this_regular_expression_1532", text: "There is no capturing group named '{0}' in this regular expression."} + var This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression = &Message{code: 1533, category: CategoryError, key: "This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533", text: "This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression."} + var This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression = &Message{code: 1534, category: CategoryError, key: "This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534", text: "This backreference refers to a group that does not exist. There are no capturing groups in this regular expression."} + var This_character_cannot_be_escaped_in_a_regular_expression = &Message{code: 1535, category: CategoryError, key: "This_character_cannot_be_escaped_in_a_regular_expression_1535", text: "This character cannot be escaped in a regular expression."} + var Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead = &Message{code: 1536, category: CategoryError, key: "Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536", text: "Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."} + var Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class = &Message{code: 1537, category: CategoryError, key: "Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537", text: "Decimal escape sequences and backreferences are not allowed in a character class."} + var Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set = &Message{code: 1538, category: CategoryError, key: "Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538", text: "Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."} + var A_bigint_literal_cannot_be_used_as_a_property_name = &Message{code: 1539, category: CategoryError, key: "A_bigint_literal_cannot_be_used_as_a_property_name_1539", text: "A 'bigint' literal cannot be used as a property name."} + var A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead = &Message{code: 1540, category: CategorySuggestion, key: "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540", text: "A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.", reportsDeprecated: true} + var Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute = &Message{code: 1541, category: CategoryError, key: "Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541", text: "Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."} + var Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute = &Message{code: 1542, category: CategoryError, key: "Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542", text: "Type import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."} + var Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0 = &Message{code: 1543, category: CategoryError, key: "Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543", text: "Importing a JSON file into an ECMAScript module requires a 'type: \"json\"' import attribute when 'module' is set to '{0}'."} + var Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0 = &Message{code: 1544, category: CategoryError, key: "Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544", text: "Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'."} + var The_types_of_0_are_incompatible_between_these_types = &Message{code: 2200, category: CategoryError, key: "The_types_of_0_are_incompatible_between_these_types_2200", text: "The types of '{0}' are incompatible between these types."} + var The_types_returned_by_0_are_incompatible_between_these_types = &Message{code: 2201, category: CategoryError, key: "The_types_returned_by_0_are_incompatible_between_these_types_2201", text: "The types returned by '{0}' are incompatible between these types."} + var Call_signature_return_types_0_and_1_are_incompatible = &Message{code: 2202, category: CategoryError, key: "Call_signature_return_types_0_and_1_are_incompatible_2202", text: "Call signature return types '{0}' and '{1}' are incompatible.", elidedInCompatibilityPyramid: true} + var Construct_signature_return_types_0_and_1_are_incompatible = &Message{code: 2203, category: CategoryError, key: "Construct_signature_return_types_0_and_1_are_incompatible_2203", text: "Construct signature return types '{0}' and '{1}' are incompatible.", elidedInCompatibilityPyramid: true} + var Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1 = &Message{code: 2204, category: CategoryError, key: "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204", text: "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", elidedInCompatibilityPyramid: true} + var Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1 = &Message{code: 2205, category: CategoryError, key: "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", text: "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", elidedInCompatibilityPyramid: true} + var The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement = &Message{code: 2206, category: CategoryError, key: "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", text: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."} + var The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement = &Message{code: 2207, category: CategoryError, key: "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", text: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."} + var This_type_parameter_might_need_an_extends_0_constraint = &Message{code: 2208, category: CategoryError, key: "This_type_parameter_might_need_an_extends_0_constraint_2208", text: "This type parameter might need an `extends {0}` constraint."} + var The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate = &Message{code: 2209, category: CategoryError, key: "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", text: "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."} + var The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate = &Message{code: 2210, category: CategoryError, key: "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", text: "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."} + var Add_extends_constraint = &Message{code: 2211, category: CategoryMessage, key: "Add_extends_constraint_2211", text: "Add `extends` constraint."} + var Add_extends_constraint_to_all_type_parameters = &Message{code: 2212, category: CategoryMessage, key: "Add_extends_constraint_to_all_type_parameters_2212", text: "Add `extends` constraint to all type parameters"} + var Duplicate_identifier_0 = &Message{code: 2300, category: CategoryError, key: "Duplicate_identifier_0_2300", text: "Duplicate identifier '{0}'."} + var Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor = &Message{code: 2301, category: CategoryError, key: "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", text: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."} + var Static_members_cannot_reference_class_type_parameters = &Message{code: 2302, category: CategoryError, key: "Static_members_cannot_reference_class_type_parameters_2302", text: "Static members cannot reference class type parameters."} + var Circular_definition_of_import_alias_0 = &Message{code: 2303, category: CategoryError, key: "Circular_definition_of_import_alias_0_2303", text: "Circular definition of import alias '{0}'."} + var Cannot_find_name_0 = &Message{code: 2304, category: CategoryError, key: "Cannot_find_name_0_2304", text: "Cannot find name '{0}'."} + var Module_0_has_no_exported_member_1 = &Message{code: 2305, category: CategoryError, key: "Module_0_has_no_exported_member_1_2305", text: "Module '{0}' has no exported member '{1}'."} + var File_0_is_not_a_module = &Message{code: 2306, category: CategoryError, key: "File_0_is_not_a_module_2306", text: "File '{0}' is not a module."} + var Cannot_find_module_0_or_its_corresponding_type_declarations = &Message{code: 2307, category: CategoryError, key: "Cannot_find_module_0_or_its_corresponding_type_declarations_2307", text: "Cannot find module '{0}' or its corresponding type declarations."} + var Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity = &Message{code: 2308, category: CategoryError, key: "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", text: "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."} + var An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements = &Message{code: 2309, category: CategoryError, key: "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", text: "An export assignment cannot be used in a module with other exported elements."} + var Type_0_recursively_references_itself_as_a_base_type = &Message{code: 2310, category: CategoryError, key: "Type_0_recursively_references_itself_as_a_base_type_2310", text: "Type '{0}' recursively references itself as a base type."} + var Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function = &Message{code: 2311, category: CategoryError, key: "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", text: "Cannot find name '{0}'. Did you mean to write this in an async function?"} + var An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members = &Message{code: 2312, category: CategoryError, key: "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", text: "An interface can only extend an object type or intersection of object types with statically known members."} + var Type_parameter_0_has_a_circular_constraint = &Message{code: 2313, category: CategoryError, key: "Type_parameter_0_has_a_circular_constraint_2313", text: "Type parameter '{0}' has a circular constraint."} + var Generic_type_0_requires_1_type_argument_s = &Message{code: 2314, category: CategoryError, key: "Generic_type_0_requires_1_type_argument_s_2314", text: "Generic type '{0}' requires {1} type argument(s)."} + var Type_0_is_not_generic = &Message{code: 2315, category: CategoryError, key: "Type_0_is_not_generic_2315", text: "Type '{0}' is not generic."} + var Global_type_0_must_be_a_class_or_interface_type = &Message{code: 2316, category: CategoryError, key: "Global_type_0_must_be_a_class_or_interface_type_2316", text: "Global type '{0}' must be a class or interface type."} + var Global_type_0_must_have_1_type_parameter_s = &Message{code: 2317, category: CategoryError, key: "Global_type_0_must_have_1_type_parameter_s_2317", text: "Global type '{0}' must have {1} type parameter(s)."} + var Cannot_find_global_type_0 = &Message{code: 2318, category: CategoryError, key: "Cannot_find_global_type_0_2318", text: "Cannot find global type '{0}'."} + var Named_property_0_of_types_1_and_2_are_not_identical = &Message{code: 2319, category: CategoryError, key: "Named_property_0_of_types_1_and_2_are_not_identical_2319", text: "Named property '{0}' of types '{1}' and '{2}' are not identical."} + var Interface_0_cannot_simultaneously_extend_types_1_and_2 = &Message{code: 2320, category: CategoryError, key: "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", text: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."} + var Excessive_stack_depth_comparing_types_0_and_1 = &Message{code: 2321, category: CategoryError, key: "Excessive_stack_depth_comparing_types_0_and_1_2321", text: "Excessive stack depth comparing types '{0}' and '{1}'."} + var Type_0_is_not_assignable_to_type_1 = &Message{code: 2322, category: CategoryError, key: "Type_0_is_not_assignable_to_type_1_2322", text: "Type '{0}' is not assignable to type '{1}'."} + var Cannot_redeclare_exported_variable_0 = &Message{code: 2323, category: CategoryError, key: "Cannot_redeclare_exported_variable_0_2323", text: "Cannot redeclare exported variable '{0}'."} + var Property_0_is_missing_in_type_1 = &Message{code: 2324, category: CategoryError, key: "Property_0_is_missing_in_type_1_2324", text: "Property '{0}' is missing in type '{1}'."} + var Property_0_is_private_in_type_1_but_not_in_type_2 = &Message{code: 2325, category: CategoryError, key: "Property_0_is_private_in_type_1_but_not_in_type_2_2325", text: "Property '{0}' is private in type '{1}' but not in type '{2}'."} + var Types_of_property_0_are_incompatible = &Message{code: 2326, category: CategoryError, key: "Types_of_property_0_are_incompatible_2326", text: "Types of property '{0}' are incompatible."} + var Property_0_is_optional_in_type_1_but_required_in_type_2 = &Message{code: 2327, category: CategoryError, key: "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", text: "Property '{0}' is optional in type '{1}' but required in type '{2}'."} + var Types_of_parameters_0_and_1_are_incompatible = &Message{code: 2328, category: CategoryError, key: "Types_of_parameters_0_and_1_are_incompatible_2328", text: "Types of parameters '{0}' and '{1}' are incompatible."} + var Index_signature_for_type_0_is_missing_in_type_1 = &Message{code: 2329, category: CategoryError, key: "Index_signature_for_type_0_is_missing_in_type_1_2329", text: "Index signature for type '{0}' is missing in type '{1}'."} + var X_0_and_1_index_signatures_are_incompatible = &Message{code: 2330, category: CategoryError, key: "_0_and_1_index_signatures_are_incompatible_2330", text: "'{0}' and '{1}' index signatures are incompatible."} + var X_this_cannot_be_referenced_in_a_module_or_namespace_body = &Message{code: 2331, category: CategoryError, key: "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", text: "'this' cannot be referenced in a module or namespace body."} + var X_this_cannot_be_referenced_in_current_location = &Message{code: 2332, category: CategoryError, key: "this_cannot_be_referenced_in_current_location_2332", text: "'this' cannot be referenced in current location."} + var X_this_cannot_be_referenced_in_a_static_property_initializer = &Message{code: 2334, category: CategoryError, key: "this_cannot_be_referenced_in_a_static_property_initializer_2334", text: "'this' cannot be referenced in a static property initializer."} + var X_super_can_only_be_referenced_in_a_derived_class = &Message{code: 2335, category: CategoryError, key: "super_can_only_be_referenced_in_a_derived_class_2335", text: "'super' can only be referenced in a derived class."} + var X_super_cannot_be_referenced_in_constructor_arguments = &Message{code: 2336, category: CategoryError, key: "super_cannot_be_referenced_in_constructor_arguments_2336", text: "'super' cannot be referenced in constructor arguments."} + var Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors = &Message{code: 2337, category: CategoryError, key: "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", text: "Super calls are not permitted outside constructors or in nested functions inside constructors."} + var X_super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class = &Message{code: 2338, category: CategoryError, key: "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", text: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."} + var Property_0_does_not_exist_on_type_1 = &Message{code: 2339, category: CategoryError, key: "Property_0_does_not_exist_on_type_1_2339", text: "Property '{0}' does not exist on type '{1}'."} + var Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword = &Message{code: 2340, category: CategoryError, key: "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", text: "Only public and protected methods of the base class are accessible via the 'super' keyword."} + var Property_0_is_private_and_only_accessible_within_class_1 = &Message{code: 2341, category: CategoryError, key: "Property_0_is_private_and_only_accessible_within_class_1_2341", text: "Property '{0}' is private and only accessible within class '{1}'."} + var This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0 = &Message{code: 2343, category: CategoryError, key: "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", text: "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."} + var Type_0_does_not_satisfy_the_constraint_1 = &Message{code: 2344, category: CategoryError, key: "Type_0_does_not_satisfy_the_constraint_1_2344", text: "Type '{0}' does not satisfy the constraint '{1}'."} + var Argument_of_type_0_is_not_assignable_to_parameter_of_type_1 = &Message{code: 2345, category: CategoryError, key: "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", text: "Argument of type '{0}' is not assignable to parameter of type '{1}'."} + var Untyped_function_calls_may_not_accept_type_arguments = &Message{code: 2347, category: CategoryError, key: "Untyped_function_calls_may_not_accept_type_arguments_2347", text: "Untyped function calls may not accept type arguments."} + var Value_of_type_0_is_not_callable_Did_you_mean_to_include_new = &Message{code: 2348, category: CategoryError, key: "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", text: "Value of type '{0}' is not callable. Did you mean to include 'new'?"} + var This_expression_is_not_callable = &Message{code: 2349, category: CategoryError, key: "This_expression_is_not_callable_2349", text: "This expression is not callable."} + var Only_a_void_function_can_be_called_with_the_new_keyword = &Message{code: 2350, category: CategoryError, key: "Only_a_void_function_can_be_called_with_the_new_keyword_2350", text: "Only a void function can be called with the 'new' keyword."} + var This_expression_is_not_constructable = &Message{code: 2351, category: CategoryError, key: "This_expression_is_not_constructable_2351", text: "This expression is not constructable."} + var Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first = &Message{code: 2352, category: CategoryError, key: "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352", text: "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."} + var Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1 = &Message{code: 2353, category: CategoryError, key: "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", text: "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."} + var This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found = &Message{code: 2354, category: CategoryError, key: "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", text: "This syntax requires an imported helper but module '{0}' cannot be found."} + var A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value = &Message{code: 2355, category: CategoryError, key: "A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355", text: "A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."} + var An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type = &Message{code: 2356, category: CategoryError, key: "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", text: "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."} + var The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access = &Message{code: 2357, category: CategoryError, key: "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", text: "The operand of an increment or decrement operator must be a variable or a property access."} + var The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter = &Message{code: 2358, category: CategoryError, key: "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", text: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."} + var The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method = &Message{code: 2359, category: CategoryError, key: "The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359", text: "The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."} + var The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type = &Message{code: 2362, category: CategoryError, key: "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", text: "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."} + var The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type = &Message{code: 2363, category: CategoryError, key: "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", text: "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."} + var The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access = &Message{code: 2364, category: CategoryError, key: "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", text: "The left-hand side of an assignment expression must be a variable or a property access."} + var Operator_0_cannot_be_applied_to_types_1_and_2 = &Message{code: 2365, category: CategoryError, key: "Operator_0_cannot_be_applied_to_types_1_and_2_2365", text: "Operator '{0}' cannot be applied to types '{1}' and '{2}'."} + var Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined = &Message{code: 2366, category: CategoryError, key: "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", text: "Function lacks ending return statement and return type does not include 'undefined'."} + var This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap = &Message{code: 2367, category: CategoryError, key: "This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367", text: "This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."} + var Type_parameter_name_cannot_be_0 = &Message{code: 2368, category: CategoryError, key: "Type_parameter_name_cannot_be_0_2368", text: "Type parameter name cannot be '{0}'."} + var A_parameter_property_is_only_allowed_in_a_constructor_implementation = &Message{code: 2369, category: CategoryError, key: "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", text: "A parameter property is only allowed in a constructor implementation."} + var A_rest_parameter_must_be_of_an_array_type = &Message{code: 2370, category: CategoryError, key: "A_rest_parameter_must_be_of_an_array_type_2370", text: "A rest parameter must be of an array type."} + var A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation = &Message{code: 2371, category: CategoryError, key: "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", text: "A parameter initializer is only allowed in a function or constructor implementation."} + var Parameter_0_cannot_reference_itself = &Message{code: 2372, category: CategoryError, key: "Parameter_0_cannot_reference_itself_2372", text: "Parameter '{0}' cannot reference itself."} + var Parameter_0_cannot_reference_identifier_1_declared_after_it = &Message{code: 2373, category: CategoryError, key: "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", text: "Parameter '{0}' cannot reference identifier '{1}' declared after it."} + var Duplicate_index_signature_for_type_0 = &Message{code: 2374, category: CategoryError, key: "Duplicate_index_signature_for_type_0_2374", text: "Duplicate index signature for type '{0}'."} + var Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties = &Message{code: 2375, category: CategoryError, key: "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", text: "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."} + var A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers = &Message{code: 2376, category: CategoryError, key: "A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376", text: "A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."} + var Constructors_for_derived_classes_must_contain_a_super_call = &Message{code: 2377, category: CategoryError, key: "Constructors_for_derived_classes_must_contain_a_super_call_2377", text: "Constructors for derived classes must contain a 'super' call."} + var A_get_accessor_must_return_a_value = &Message{code: 2378, category: CategoryError, key: "A_get_accessor_must_return_a_value_2378", text: "A 'get' accessor must return a value."} + var Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties = &Message{code: 2379, category: CategoryError, key: "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", text: "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."} + var Overload_signatures_must_all_be_exported_or_non_exported = &Message{code: 2383, category: CategoryError, key: "Overload_signatures_must_all_be_exported_or_non_exported_2383", text: "Overload signatures must all be exported or non-exported."} + var Overload_signatures_must_all_be_ambient_or_non_ambient = &Message{code: 2384, category: CategoryError, key: "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", text: "Overload signatures must all be ambient or non-ambient."} + var Overload_signatures_must_all_be_public_private_or_protected = &Message{code: 2385, category: CategoryError, key: "Overload_signatures_must_all_be_public_private_or_protected_2385", text: "Overload signatures must all be public, private or protected."} + var Overload_signatures_must_all_be_optional_or_required = &Message{code: 2386, category: CategoryError, key: "Overload_signatures_must_all_be_optional_or_required_2386", text: "Overload signatures must all be optional or required."} + var Function_overload_must_be_static = &Message{code: 2387, category: CategoryError, key: "Function_overload_must_be_static_2387", text: "Function overload must be static."} + var Function_overload_must_not_be_static = &Message{code: 2388, category: CategoryError, key: "Function_overload_must_not_be_static_2388", text: "Function overload must not be static."} + var Function_implementation_name_must_be_0 = &Message{code: 2389, category: CategoryError, key: "Function_implementation_name_must_be_0_2389", text: "Function implementation name must be '{0}'."} + var Constructor_implementation_is_missing = &Message{code: 2390, category: CategoryError, key: "Constructor_implementation_is_missing_2390", text: "Constructor implementation is missing."} + var Function_implementation_is_missing_or_not_immediately_following_the_declaration = &Message{code: 2391, category: CategoryError, key: "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", text: "Function implementation is missing or not immediately following the declaration."} + var Multiple_constructor_implementations_are_not_allowed = &Message{code: 2392, category: CategoryError, key: "Multiple_constructor_implementations_are_not_allowed_2392", text: "Multiple constructor implementations are not allowed."} + var Duplicate_function_implementation = &Message{code: 2393, category: CategoryError, key: "Duplicate_function_implementation_2393", text: "Duplicate function implementation."} + var This_overload_signature_is_not_compatible_with_its_implementation_signature = &Message{code: 2394, category: CategoryError, key: "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394", text: "This overload signature is not compatible with its implementation signature."} + var Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local = &Message{code: 2395, category: CategoryError, key: "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", text: "Individual declarations in merged declaration '{0}' must be all exported or all local."} + var Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters = &Message{code: 2396, category: CategoryError, key: "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", text: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."} + var Declaration_name_conflicts_with_built_in_global_identifier_0 = &Message{code: 2397, category: CategoryError, key: "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", text: "Declaration name conflicts with built-in global identifier '{0}'."} + var X_constructor_cannot_be_used_as_a_parameter_property_name = &Message{code: 2398, category: CategoryError, key: "constructor_cannot_be_used_as_a_parameter_property_name_2398", text: "'constructor' cannot be used as a parameter property name."} + var Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference = &Message{code: 2399, category: CategoryError, key: "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", text: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."} + var Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference = &Message{code: 2400, category: CategoryError, key: "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", text: "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."} + var A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers = &Message{code: 2401, category: CategoryError, key: "A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401", text: "A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."} + var Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference = &Message{code: 2402, category: CategoryError, key: "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", text: "Expression resolves to '_super' that compiler uses to capture base class reference."} + var Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2 = &Message{code: 2403, category: CategoryError, key: "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", text: "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."} + var The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation = &Message{code: 2404, category: CategoryError, key: "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", text: "The left-hand side of a 'for...in' statement cannot use a type annotation."} + var The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any = &Message{code: 2405, category: CategoryError, key: "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", text: "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."} + var The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access = &Message{code: 2406, category: CategoryError, key: "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", text: "The left-hand side of a 'for...in' statement must be a variable or a property access."} + var The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0 = &Message{code: 2407, category: CategoryError, key: "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407", text: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."} + var Setters_cannot_return_a_value = &Message{code: 2408, category: CategoryError, key: "Setters_cannot_return_a_value_2408", text: "Setters cannot return a value."} + var Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class = &Message{code: 2409, category: CategoryError, key: "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", text: "Return type of constructor signature must be assignable to the instance type of the class."} + var The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any = &Message{code: 2410, category: CategoryError, key: "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", text: "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."} + var Property_0_of_type_1_is_not_assignable_to_2_index_type_3 = &Message{code: 2411, category: CategoryError, key: "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", text: "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."} + var Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target = &Message{code: 2412, category: CategoryError, key: "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", text: "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."} + var X_0_index_type_1_is_not_assignable_to_2_index_type_3 = &Message{code: 2413, category: CategoryError, key: "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", text: "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."} + var Class_name_cannot_be_0 = &Message{code: 2414, category: CategoryError, key: "Class_name_cannot_be_0_2414", text: "Class name cannot be '{0}'."} + var Class_0_incorrectly_extends_base_class_1 = &Message{code: 2415, category: CategoryError, key: "Class_0_incorrectly_extends_base_class_1_2415", text: "Class '{0}' incorrectly extends base class '{1}'."} + var Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2 = &Message{code: 2416, category: CategoryError, key: "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", text: "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."} + var Class_static_side_0_incorrectly_extends_base_class_static_side_1 = &Message{code: 2417, category: CategoryError, key: "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", text: "Class static side '{0}' incorrectly extends base class static side '{1}'."} + var Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 = &Message{code: 2418, category: CategoryError, key: "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418", text: "Type of computed property's value is '{0}', which is not assignable to type '{1}'."} + var Types_of_construct_signatures_are_incompatible = &Message{code: 2419, category: CategoryError, key: "Types_of_construct_signatures_are_incompatible_2419", text: "Types of construct signatures are incompatible."} + var Class_0_incorrectly_implements_interface_1 = &Message{code: 2420, category: CategoryError, key: "Class_0_incorrectly_implements_interface_1_2420", text: "Class '{0}' incorrectly implements interface '{1}'."} + var A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members = &Message{code: 2422, category: CategoryError, key: "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", text: "A class can only implement an object type or intersection of object types with statically known members."} + var Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor = &Message{code: 2423, category: CategoryError, key: "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", text: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."} + var Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function = &Message{code: 2425, category: CategoryError, key: "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", text: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."} + var Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function = &Message{code: 2426, category: CategoryError, key: "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", text: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."} + var Interface_name_cannot_be_0 = &Message{code: 2427, category: CategoryError, key: "Interface_name_cannot_be_0_2427", text: "Interface name cannot be '{0}'."} + var All_declarations_of_0_must_have_identical_type_parameters = &Message{code: 2428, category: CategoryError, key: "All_declarations_of_0_must_have_identical_type_parameters_2428", text: "All declarations of '{0}' must have identical type parameters."} + var Interface_0_incorrectly_extends_interface_1 = &Message{code: 2430, category: CategoryError, key: "Interface_0_incorrectly_extends_interface_1_2430", text: "Interface '{0}' incorrectly extends interface '{1}'."} + var Enum_name_cannot_be_0 = &Message{code: 2431, category: CategoryError, key: "Enum_name_cannot_be_0_2431", text: "Enum name cannot be '{0}'."} + var In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element = &Message{code: 2432, category: CategoryError, key: "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", text: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."} + var A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged = &Message{code: 2433, category: CategoryError, key: "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", text: "A namespace declaration cannot be in a different file from a class or function with which it is merged."} + var A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged = &Message{code: 2434, category: CategoryError, key: "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", text: "A namespace declaration cannot be located prior to a class or function with which it is merged."} + var Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces = &Message{code: 2435, category: CategoryError, key: "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", text: "Ambient modules cannot be nested in other modules or namespaces."} + var Ambient_module_declaration_cannot_specify_relative_module_name = &Message{code: 2436, category: CategoryError, key: "Ambient_module_declaration_cannot_specify_relative_module_name_2436", text: "Ambient module declaration cannot specify relative module name."} + var Module_0_is_hidden_by_a_local_declaration_with_the_same_name = &Message{code: 2437, category: CategoryError, key: "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", text: "Module '{0}' is hidden by a local declaration with the same name."} + var Import_name_cannot_be_0 = &Message{code: 2438, category: CategoryError, key: "Import_name_cannot_be_0_2438", text: "Import name cannot be '{0}'."} + var Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name = &Message{code: 2439, category: CategoryError, key: "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", text: "Import or export declaration in an ambient module declaration cannot reference module through relative module name."} + var Import_declaration_conflicts_with_local_declaration_of_0 = &Message{code: 2440, category: CategoryError, key: "Import_declaration_conflicts_with_local_declaration_of_0_2440", text: "Import declaration conflicts with local declaration of '{0}'."} + var Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module = &Message{code: 2441, category: CategoryError, key: "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", text: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."} + var Types_have_separate_declarations_of_a_private_property_0 = &Message{code: 2442, category: CategoryError, key: "Types_have_separate_declarations_of_a_private_property_0_2442", text: "Types have separate declarations of a private property '{0}'."} + var Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2 = &Message{code: 2443, category: CategoryError, key: "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", text: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."} + var Property_0_is_protected_in_type_1_but_public_in_type_2 = &Message{code: 2444, category: CategoryError, key: "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", text: "Property '{0}' is protected in type '{1}' but public in type '{2}'."} + var Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses = &Message{code: 2445, category: CategoryError, key: "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", text: "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."} + var Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2 = &Message{code: 2446, category: CategoryError, key: "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", text: "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."} + var The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead = &Message{code: 2447, category: CategoryError, key: "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", text: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."} + var Block_scoped_variable_0_used_before_its_declaration = &Message{code: 2448, category: CategoryError, key: "Block_scoped_variable_0_used_before_its_declaration_2448", text: "Block-scoped variable '{0}' used before its declaration."} + var Class_0_used_before_its_declaration = &Message{code: 2449, category: CategoryError, key: "Class_0_used_before_its_declaration_2449", text: "Class '{0}' used before its declaration."} + var Enum_0_used_before_its_declaration = &Message{code: 2450, category: CategoryError, key: "Enum_0_used_before_its_declaration_2450", text: "Enum '{0}' used before its declaration."} + var Cannot_redeclare_block_scoped_variable_0 = &Message{code: 2451, category: CategoryError, key: "Cannot_redeclare_block_scoped_variable_0_2451", text: "Cannot redeclare block-scoped variable '{0}'."} + var An_enum_member_cannot_have_a_numeric_name = &Message{code: 2452, category: CategoryError, key: "An_enum_member_cannot_have_a_numeric_name_2452", text: "An enum member cannot have a numeric name."} + var Variable_0_is_used_before_being_assigned = &Message{code: 2454, category: CategoryError, key: "Variable_0_is_used_before_being_assigned_2454", text: "Variable '{0}' is used before being assigned."} + var Type_alias_0_circularly_references_itself = &Message{code: 2456, category: CategoryError, key: "Type_alias_0_circularly_references_itself_2456", text: "Type alias '{0}' circularly references itself."} + var Type_alias_name_cannot_be_0 = &Message{code: 2457, category: CategoryError, key: "Type_alias_name_cannot_be_0_2457", text: "Type alias name cannot be '{0}'."} + var An_AMD_module_cannot_have_multiple_name_assignments = &Message{code: 2458, category: CategoryError, key: "An_AMD_module_cannot_have_multiple_name_assignments_2458", text: "An AMD module cannot have multiple name assignments."} + var Module_0_declares_1_locally_but_it_is_not_exported = &Message{code: 2459, category: CategoryError, key: "Module_0_declares_1_locally_but_it_is_not_exported_2459", text: "Module '{0}' declares '{1}' locally, but it is not exported."} + var Module_0_declares_1_locally_but_it_is_exported_as_2 = &Message{code: 2460, category: CategoryError, key: "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", text: "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."} + var Type_0_is_not_an_array_type = &Message{code: 2461, category: CategoryError, key: "Type_0_is_not_an_array_type_2461", text: "Type '{0}' is not an array type."} + var A_rest_element_must_be_last_in_a_destructuring_pattern = &Message{code: 2462, category: CategoryError, key: "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", text: "A rest element must be last in a destructuring pattern."} + var A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature = &Message{code: 2463, category: CategoryError, key: "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", text: "A binding pattern parameter cannot be optional in an implementation signature."} + var A_computed_property_name_must_be_of_type_string_number_symbol_or_any = &Message{code: 2464, category: CategoryError, key: "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", text: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'."} + var X_this_cannot_be_referenced_in_a_computed_property_name = &Message{code: 2465, category: CategoryError, key: "this_cannot_be_referenced_in_a_computed_property_name_2465", text: "'this' cannot be referenced in a computed property name."} + var X_super_cannot_be_referenced_in_a_computed_property_name = &Message{code: 2466, category: CategoryError, key: "super_cannot_be_referenced_in_a_computed_property_name_2466", text: "'super' cannot be referenced in a computed property name."} + var A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type = &Message{code: 2467, category: CategoryError, key: "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", text: "A computed property name cannot reference a type parameter from its containing type."} + var Cannot_find_global_value_0 = &Message{code: 2468, category: CategoryError, key: "Cannot_find_global_value_0_2468", text: "Cannot find global value '{0}'."} + var The_0_operator_cannot_be_applied_to_type_symbol = &Message{code: 2469, category: CategoryError, key: "The_0_operator_cannot_be_applied_to_type_symbol_2469", text: "The '{0}' operator cannot be applied to type 'symbol'."} + var Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher = &Message{code: 2472, category: CategoryError, key: "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", text: "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."} + var Enum_declarations_must_all_be_const_or_non_const = &Message{code: 2473, category: CategoryError, key: "Enum_declarations_must_all_be_const_or_non_const_2473", text: "Enum declarations must all be const or non-const."} + var X_const_enum_member_initializers_must_be_constant_expressions = &Message{code: 2474, category: CategoryError, key: "const_enum_member_initializers_must_be_constant_expressions_2474", text: "const enum member initializers must be constant expressions."} + var X_const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query = &Message{code: 2475, category: CategoryError, key: "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", text: "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."} + var A_const_enum_member_can_only_be_accessed_using_a_string_literal = &Message{code: 2476, category: CategoryError, key: "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", text: "A const enum member can only be accessed using a string literal."} + var X_const_enum_member_initializer_was_evaluated_to_a_non_finite_value = &Message{code: 2477, category: CategoryError, key: "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", text: "'const' enum member initializer was evaluated to a non-finite value."} + var X_const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN = &Message{code: 2478, category: CategoryError, key: "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", text: "'const' enum member initializer was evaluated to disallowed value 'NaN'."} + var X_let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations = &Message{code: 2480, category: CategoryError, key: "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", text: "'let' is not allowed to be used as a name in 'let' or 'const' declarations."} + var Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1 = &Message{code: 2481, category: CategoryError, key: "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", text: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."} + var The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation = &Message{code: 2483, category: CategoryError, key: "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", text: "The left-hand side of a 'for...of' statement cannot use a type annotation."} + var Export_declaration_conflicts_with_exported_declaration_of_0 = &Message{code: 2484, category: CategoryError, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", text: "Export declaration conflicts with exported declaration of '{0}'."} + var The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access = &Message{code: 2487, category: CategoryError, key: "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", text: "The left-hand side of a 'for...of' statement must be a variable or a property access."} + var Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator = &Message{code: 2488, category: CategoryError, key: "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", text: "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."} + var An_iterator_must_have_a_next_method = &Message{code: 2489, category: CategoryError, key: "An_iterator_must_have_a_next_method_2489", text: "An iterator must have a 'next()' method."} + var The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property = &Message{code: 2490, category: CategoryError, key: "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490", text: "The type returned by the '{0}()' method of an iterator must have a 'value' property."} + var The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern = &Message{code: 2491, category: CategoryError, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", text: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."} + var Cannot_redeclare_identifier_0_in_catch_clause = &Message{code: 2492, category: CategoryError, key: "Cannot_redeclare_identifier_0_in_catch_clause_2492", text: "Cannot redeclare identifier '{0}' in catch clause."} + var Tuple_type_0_of_length_1_has_no_element_at_index_2 = &Message{code: 2493, category: CategoryError, key: "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493", text: "Tuple type '{0}' of length '{1}' has no element at index '{2}'."} + var Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher = &Message{code: 2494, category: CategoryError, key: "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", text: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."} + var Type_0_is_not_an_array_type_or_a_string_type = &Message{code: 2495, category: CategoryError, key: "Type_0_is_not_an_array_type_or_a_string_type_2495", text: "Type '{0}' is not an array type or a string type."} + var The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression = &Message{code: 2496, category: CategoryError, key: "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496", text: "The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression."} + var This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export = &Message{code: 2497, category: CategoryError, key: "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497", text: "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."} + var Module_0_uses_export_and_cannot_be_used_with_export_Asterisk = &Message{code: 2498, category: CategoryError, key: "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", text: "Module '{0}' uses 'export =' and cannot be used with 'export *'."} + var An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments = &Message{code: 2499, category: CategoryError, key: "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", text: "An interface can only extend an identifier/qualified-name with optional type arguments."} + var A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments = &Message{code: 2500, category: CategoryError, key: "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", text: "A class can only implement an identifier/qualified-name with optional type arguments."} + var A_rest_element_cannot_contain_a_binding_pattern = &Message{code: 2501, category: CategoryError, key: "A_rest_element_cannot_contain_a_binding_pattern_2501", text: "A rest element cannot contain a binding pattern."} + var X_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation = &Message{code: 2502, category: CategoryError, key: "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", text: "'{0}' is referenced directly or indirectly in its own type annotation."} + var Cannot_find_namespace_0 = &Message{code: 2503, category: CategoryError, key: "Cannot_find_namespace_0_2503", text: "Cannot find namespace '{0}'."} + var Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator = &Message{code: 2504, category: CategoryError, key: "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", text: "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."} + var A_generator_cannot_have_a_void_type_annotation = &Message{code: 2505, category: CategoryError, key: "A_generator_cannot_have_a_void_type_annotation_2505", text: "A generator cannot have a 'void' type annotation."} + var X_0_is_referenced_directly_or_indirectly_in_its_own_base_expression = &Message{code: 2506, category: CategoryError, key: "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", text: "'{0}' is referenced directly or indirectly in its own base expression."} + var Type_0_is_not_a_constructor_function_type = &Message{code: 2507, category: CategoryError, key: "Type_0_is_not_a_constructor_function_type_2507", text: "Type '{0}' is not a constructor function type."} + var No_base_constructor_has_the_specified_number_of_type_arguments = &Message{code: 2508, category: CategoryError, key: "No_base_constructor_has_the_specified_number_of_type_arguments_2508", text: "No base constructor has the specified number of type arguments."} + var Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members = &Message{code: 2509, category: CategoryError, key: "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509", text: "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."} + var Base_constructors_must_all_have_the_same_return_type = &Message{code: 2510, category: CategoryError, key: "Base_constructors_must_all_have_the_same_return_type_2510", text: "Base constructors must all have the same return type."} + var Cannot_create_an_instance_of_an_abstract_class = &Message{code: 2511, category: CategoryError, key: "Cannot_create_an_instance_of_an_abstract_class_2511", text: "Cannot create an instance of an abstract class."} + var Overload_signatures_must_all_be_abstract_or_non_abstract = &Message{code: 2512, category: CategoryError, key: "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", text: "Overload signatures must all be abstract or non-abstract."} + var Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression = &Message{code: 2513, category: CategoryError, key: "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", text: "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."} + var A_tuple_type_cannot_be_indexed_with_a_negative_value = &Message{code: 2514, category: CategoryError, key: "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", text: "A tuple type cannot be indexed with a negative value."} + var Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2 = &Message{code: 2515, category: CategoryError, key: "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", text: "Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."} + var All_declarations_of_an_abstract_method_must_be_consecutive = &Message{code: 2516, category: CategoryError, key: "All_declarations_of_an_abstract_method_must_be_consecutive_2516", text: "All declarations of an abstract method must be consecutive."} + var Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type = &Message{code: 2517, category: CategoryError, key: "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", text: "Cannot assign an abstract constructor type to a non-abstract constructor type."} + var A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard = &Message{code: 2518, category: CategoryError, key: "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", text: "A 'this'-based type guard is not compatible with a parameter-based type guard."} + var An_async_iterator_must_have_a_next_method = &Message{code: 2519, category: CategoryError, key: "An_async_iterator_must_have_a_next_method_2519", text: "An async iterator must have a 'next()' method."} + var Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions = &Message{code: 2520, category: CategoryError, key: "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", text: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."} + var The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method = &Message{code: 2522, category: CategoryError, key: "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522", text: "The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."} + var X_yield_expressions_cannot_be_used_in_a_parameter_initializer = &Message{code: 2523, category: CategoryError, key: "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", text: "'yield' expressions cannot be used in a parameter initializer."} + var X_await_expressions_cannot_be_used_in_a_parameter_initializer = &Message{code: 2524, category: CategoryError, key: "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", text: "'await' expressions cannot be used in a parameter initializer."} + var A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface = &Message{code: 2526, category: CategoryError, key: "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", text: "A 'this' type is available only in a non-static member of a class or interface."} + var The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary = &Message{code: 2527, category: CategoryError, key: "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", text: "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."} + var A_module_cannot_have_multiple_default_exports = &Message{code: 2528, category: CategoryError, key: "A_module_cannot_have_multiple_default_exports_2528", text: "A module cannot have multiple default exports."} + var Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions = &Message{code: 2529, category: CategoryError, key: "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", text: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."} + var Property_0_is_incompatible_with_index_signature = &Message{code: 2530, category: CategoryError, key: "Property_0_is_incompatible_with_index_signature_2530", text: "Property '{0}' is incompatible with index signature."} + var Object_is_possibly_null = &Message{code: 2531, category: CategoryError, key: "Object_is_possibly_null_2531", text: "Object is possibly 'null'."} + var Object_is_possibly_undefined = &Message{code: 2532, category: CategoryError, key: "Object_is_possibly_undefined_2532", text: "Object is possibly 'undefined'."} + var Object_is_possibly_null_or_undefined = &Message{code: 2533, category: CategoryError, key: "Object_is_possibly_null_or_undefined_2533", text: "Object is possibly 'null' or 'undefined'."} + var A_function_returning_never_cannot_have_a_reachable_end_point = &Message{code: 2534, category: CategoryError, key: "A_function_returning_never_cannot_have_a_reachable_end_point_2534", text: "A function returning 'never' cannot have a reachable end point."} + var Type_0_cannot_be_used_to_index_type_1 = &Message{code: 2536, category: CategoryError, key: "Type_0_cannot_be_used_to_index_type_1_2536", text: "Type '{0}' cannot be used to index type '{1}'."} + var Type_0_has_no_matching_index_signature_for_type_1 = &Message{code: 2537, category: CategoryError, key: "Type_0_has_no_matching_index_signature_for_type_1_2537", text: "Type '{0}' has no matching index signature for type '{1}'."} + var Type_0_cannot_be_used_as_an_index_type = &Message{code: 2538, category: CategoryError, key: "Type_0_cannot_be_used_as_an_index_type_2538", text: "Type '{0}' cannot be used as an index type."} + var Cannot_assign_to_0_because_it_is_not_a_variable = &Message{code: 2539, category: CategoryError, key: "Cannot_assign_to_0_because_it_is_not_a_variable_2539", text: "Cannot assign to '{0}' because it is not a variable."} + var Cannot_assign_to_0_because_it_is_a_read_only_property = &Message{code: 2540, category: CategoryError, key: "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", text: "Cannot assign to '{0}' because it is a read-only property."} + var Index_signature_in_type_0_only_permits_reading = &Message{code: 2542, category: CategoryError, key: "Index_signature_in_type_0_only_permits_reading_2542", text: "Index signature in type '{0}' only permits reading."} + var Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference = &Message{code: 2543, category: CategoryError, key: "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", text: "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."} + var Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference = &Message{code: 2544, category: CategoryError, key: "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", text: "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."} + var A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any = &Message{code: 2545, category: CategoryError, key: "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", text: "A mixin class must have a constructor with a single rest parameter of type 'any[]'."} + var The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property = &Message{code: 2547, category: CategoryError, key: "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", text: "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."} + var Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator = &Message{code: 2548, category: CategoryError, key: "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", text: "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."} + var Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator = &Message{code: 2549, category: CategoryError, key: "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", text: "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."} + var Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later = &Message{code: 2550, category: CategoryError, key: "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", text: "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."} + var Property_0_does_not_exist_on_type_1_Did_you_mean_2 = &Message{code: 2551, category: CategoryError, key: "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", text: "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"} + var Cannot_find_name_0_Did_you_mean_1 = &Message{code: 2552, category: CategoryError, key: "Cannot_find_name_0_Did_you_mean_1_2552", text: "Cannot find name '{0}'. Did you mean '{1}'?"} + var Computed_values_are_not_permitted_in_an_enum_with_string_valued_members = &Message{code: 2553, category: CategoryError, key: "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", text: "Computed values are not permitted in an enum with string valued members."} + var Expected_0_arguments_but_got_1 = &Message{code: 2554, category: CategoryError, key: "Expected_0_arguments_but_got_1_2554", text: "Expected {0} arguments, but got {1}."} + var Expected_at_least_0_arguments_but_got_1 = &Message{code: 2555, category: CategoryError, key: "Expected_at_least_0_arguments_but_got_1_2555", text: "Expected at least {0} arguments, but got {1}."} + var A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter = &Message{code: 2556, category: CategoryError, key: "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", text: "A spread argument must either have a tuple type or be passed to a rest parameter."} + var Expected_0_type_arguments_but_got_1 = &Message{code: 2558, category: CategoryError, key: "Expected_0_type_arguments_but_got_1_2558", text: "Expected {0} type arguments, but got {1}."} + var Type_0_has_no_properties_in_common_with_type_1 = &Message{code: 2559, category: CategoryError, key: "Type_0_has_no_properties_in_common_with_type_1_2559", text: "Type '{0}' has no properties in common with type '{1}'."} + var Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it = &Message{code: 2560, category: CategoryError, key: "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", text: "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"} + var Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2 = &Message{code: 2561, category: CategoryError, key: "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561", text: "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"} + var Base_class_expressions_cannot_reference_class_type_parameters = &Message{code: 2562, category: CategoryError, key: "Base_class_expressions_cannot_reference_class_type_parameters_2562", text: "Base class expressions cannot reference class type parameters."} + var The_containing_function_or_module_body_is_too_large_for_control_flow_analysis = &Message{code: 2563, category: CategoryError, key: "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563", text: "The containing function or module body is too large for control flow analysis."} + var Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor = &Message{code: 2564, category: CategoryError, key: "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564", text: "Property '{0}' has no initializer and is not definitely assigned in the constructor."} + var Property_0_is_used_before_being_assigned = &Message{code: 2565, category: CategoryError, key: "Property_0_is_used_before_being_assigned_2565", text: "Property '{0}' is used before being assigned."} + var A_rest_element_cannot_have_a_property_name = &Message{code: 2566, category: CategoryError, key: "A_rest_element_cannot_have_a_property_name_2566", text: "A rest element cannot have a property name."} + var Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations = &Message{code: 2567, category: CategoryError, key: "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", text: "Enum declarations can only merge with namespace or other enum declarations."} + var Property_0_may_not_exist_on_type_1_Did_you_mean_2 = &Message{code: 2568, category: CategoryError, key: "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", text: "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"} + var Could_not_find_name_0_Did_you_mean_1 = &Message{code: 2570, category: CategoryError, key: "Could_not_find_name_0_Did_you_mean_1_2570", text: "Could not find name '{0}'. Did you mean '{1}'?"} + var Object_is_of_type_unknown = &Message{code: 2571, category: CategoryError, key: "Object_is_of_type_unknown_2571", text: "Object is of type 'unknown'."} + var A_rest_element_type_must_be_an_array_type = &Message{code: 2574, category: CategoryError, key: "A_rest_element_type_must_be_an_array_type_2574", text: "A rest element type must be an array type."} + var No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments = &Message{code: 2575, category: CategoryError, key: "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575", text: "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."} + var Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead = &Message{code: 2576, category: CategoryError, key: "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", text: "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"} + var Return_type_annotation_circularly_references_itself = &Message{code: 2577, category: CategoryError, key: "Return_type_annotation_circularly_references_itself_2577", text: "Return type annotation circularly references itself."} + var Unused_ts_expect_error_directive = &Message{code: 2578, category: CategoryError, key: "Unused_ts_expect_error_directive_2578", text: "Unused '@ts-expect-error' directive."} + var Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode = &Message{code: 2580, category: CategoryError, key: "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580", text: "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."} + var Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery = &Message{code: 2581, category: CategoryError, key: "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581", text: "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."} + var Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha = &Message{code: 2582, category: CategoryError, key: "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582", text: "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."} + var Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later = &Message{code: 2583, category: CategoryError, key: "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", text: "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."} + var Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom = &Message{code: 2584, category: CategoryError, key: "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", text: "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."} + var X_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later = &Message{code: 2585, category: CategoryError, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", text: "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."} + var Cannot_assign_to_0_because_it_is_a_constant = &Message{code: 2588, category: CategoryError, key: "Cannot_assign_to_0_because_it_is_a_constant_2588", text: "Cannot assign to '{0}' because it is a constant."} + var Type_instantiation_is_excessively_deep_and_possibly_infinite = &Message{code: 2589, category: CategoryError, key: "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589", text: "Type instantiation is excessively deep and possibly infinite."} + var Expression_produces_a_union_type_that_is_too_complex_to_represent = &Message{code: 2590, category: CategoryError, key: "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590", text: "Expression produces a union type that is too complex to represent."} + var Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig = &Message{code: 2591, category: CategoryError, key: "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", text: "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."} + var Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig = &Message{code: 2592, category: CategoryError, key: "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", text: "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."} + var Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig = &Message{code: 2593, category: CategoryError, key: "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", text: "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."} + var This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag = &Message{code: 2594, category: CategoryError, key: "This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594", text: "This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."} + var X_0_can_only_be_imported_by_using_a_default_import = &Message{code: 2595, category: CategoryError, key: "_0_can_only_be_imported_by_using_a_default_import_2595", text: "'{0}' can only be imported by using a default import."} + var X_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import = &Message{code: 2596, category: CategoryError, key: "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", text: "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."} + var X_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import = &Message{code: 2597, category: CategoryError, key: "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", text: "'{0}' can only be imported by using a 'require' call or by using a default import."} + var X_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import = &Message{code: 2598, category: CategoryError, key: "_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598", text: "'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."} + var JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist = &Message{code: 2602, category: CategoryError, key: "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", text: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."} + var Property_0_in_type_1_is_not_assignable_to_type_2 = &Message{code: 2603, category: CategoryError, key: "Property_0_in_type_1_is_not_assignable_to_type_2_2603", text: "Property '{0}' in type '{1}' is not assignable to type '{2}'."} + var JSX_element_type_0_does_not_have_any_construct_or_call_signatures = &Message{code: 2604, category: CategoryError, key: "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", text: "JSX element type '{0}' does not have any construct or call signatures."} + var Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property = &Message{code: 2606, category: CategoryError, key: "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", text: "Property '{0}' of JSX spread attribute is not assignable to target property."} + var JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property = &Message{code: 2607, category: CategoryError, key: "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", text: "JSX element class does not support attributes because it does not have a '{0}' property."} + var The_global_type_JSX_0_may_not_have_more_than_one_property = &Message{code: 2608, category: CategoryError, key: "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", text: "The global type 'JSX.{0}' may not have more than one property."} + var JSX_spread_child_must_be_an_array_type = &Message{code: 2609, category: CategoryError, key: "JSX_spread_child_must_be_an_array_type_2609", text: "JSX spread child must be an array type."} + var X_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property = &Message{code: 2610, category: CategoryError, key: "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", text: "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."} + var X_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor = &Message{code: 2611, category: CategoryError, key: "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", text: "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."} + var Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration = &Message{code: 2612, category: CategoryError, key: "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", text: "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."} + var Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead = &Message{code: 2613, category: CategoryError, key: "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", text: "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"} + var Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead = &Message{code: 2614, category: CategoryError, key: "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", text: "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"} + var Type_of_property_0_circularly_references_itself_in_mapped_type_1 = &Message{code: 2615, category: CategoryError, key: "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615", text: "Type of property '{0}' circularly references itself in mapped type '{1}'."} + var X_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import = &Message{code: 2616, category: CategoryError, key: "_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616", text: "'{0}' can only be imported by using 'import {1} = require({2})' or a default import."} + var X_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import = &Message{code: 2617, category: CategoryError, key: "_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617", text: "'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."} + var Source_has_0_element_s_but_target_requires_1 = &Message{code: 2618, category: CategoryError, key: "Source_has_0_element_s_but_target_requires_1_2618", text: "Source has {0} element(s) but target requires {1}."} + var Source_has_0_element_s_but_target_allows_only_1 = &Message{code: 2619, category: CategoryError, key: "Source_has_0_element_s_but_target_allows_only_1_2619", text: "Source has {0} element(s) but target allows only {1}."} + var Target_requires_0_element_s_but_source_may_have_fewer = &Message{code: 2620, category: CategoryError, key: "Target_requires_0_element_s_but_source_may_have_fewer_2620", text: "Target requires {0} element(s) but source may have fewer."} + var Target_allows_only_0_element_s_but_source_may_have_more = &Message{code: 2621, category: CategoryError, key: "Target_allows_only_0_element_s_but_source_may_have_more_2621", text: "Target allows only {0} element(s) but source may have more."} + var Source_provides_no_match_for_required_element_at_position_0_in_target = &Message{code: 2623, category: CategoryError, key: "Source_provides_no_match_for_required_element_at_position_0_in_target_2623", text: "Source provides no match for required element at position {0} in target."} + var Source_provides_no_match_for_variadic_element_at_position_0_in_target = &Message{code: 2624, category: CategoryError, key: "Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624", text: "Source provides no match for variadic element at position {0} in target."} + var Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target = &Message{code: 2625, category: CategoryError, key: "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", text: "Variadic element at position {0} in source does not match element at position {1} in target."} + var Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target = &Message{code: 2626, category: CategoryError, key: "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", text: "Type at position {0} in source is not compatible with type at position {1} in target."} + var Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target = &Message{code: 2627, category: CategoryError, key: "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", text: "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."} + var Cannot_assign_to_0_because_it_is_an_enum = &Message{code: 2628, category: CategoryError, key: "Cannot_assign_to_0_because_it_is_an_enum_2628", text: "Cannot assign to '{0}' because it is an enum."} + var Cannot_assign_to_0_because_it_is_a_class = &Message{code: 2629, category: CategoryError, key: "Cannot_assign_to_0_because_it_is_a_class_2629", text: "Cannot assign to '{0}' because it is a class."} + var Cannot_assign_to_0_because_it_is_a_function = &Message{code: 2630, category: CategoryError, key: "Cannot_assign_to_0_because_it_is_a_function_2630", text: "Cannot assign to '{0}' because it is a function."} + var Cannot_assign_to_0_because_it_is_a_namespace = &Message{code: 2631, category: CategoryError, key: "Cannot_assign_to_0_because_it_is_a_namespace_2631", text: "Cannot assign to '{0}' because it is a namespace."} + var Cannot_assign_to_0_because_it_is_an_import = &Message{code: 2632, category: CategoryError, key: "Cannot_assign_to_0_because_it_is_an_import_2632", text: "Cannot assign to '{0}' because it is an import."} + var JSX_property_access_expressions_cannot_include_JSX_namespace_names = &Message{code: 2633, category: CategoryError, key: "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", text: "JSX property access expressions cannot include JSX namespace names"} + var X_0_index_signatures_are_incompatible = &Message{code: 2634, category: CategoryError, key: "_0_index_signatures_are_incompatible_2634", text: "'{0}' index signatures are incompatible."} + var Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable = &Message{code: 2635, category: CategoryError, key: "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", text: "Type '{0}' has no signatures for which the type argument list is applicable."} + var Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation = &Message{code: 2636, category: CategoryError, key: "Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636", text: "Type '{0}' is not assignable to type '{1}' as implied by variance annotation."} + var Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types = &Message{code: 2637, category: CategoryError, key: "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637", text: "Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."} + var Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator = &Message{code: 2638, category: CategoryError, key: "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", text: "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."} + var React_components_cannot_include_JSX_namespace_names = &Message{code: 2639, category: CategoryError, key: "React_components_cannot_include_JSX_namespace_names_2639", text: "React components cannot include JSX namespace names"} + var Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity = &Message{code: 2649, category: CategoryError, key: "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", text: "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."} + var Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more = &Message{code: 2650, category: CategoryError, key: "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650", text: "Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."} + var A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums = &Message{code: 2651, category: CategoryError, key: "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", text: "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."} + var Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead = &Message{code: 2652, category: CategoryError, key: "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", text: "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."} + var Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1 = &Message{code: 2653, category: CategoryError, key: "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", text: "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."} + var Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2 = &Message{code: 2654, category: CategoryError, key: "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654", text: "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."} + var Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more = &Message{code: 2655, category: CategoryError, key: "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655", text: "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."} + var Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1 = &Message{code: 2656, category: CategoryError, key: "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656", text: "Non-abstract class expression is missing implementations for the following members of '{0}': {1}."} + var JSX_expressions_must_have_one_parent_element = &Message{code: 2657, category: CategoryError, key: "JSX_expressions_must_have_one_parent_element_2657", text: "JSX expressions must have one parent element."} + var Type_0_provides_no_match_for_the_signature_1 = &Message{code: 2658, category: CategoryError, key: "Type_0_provides_no_match_for_the_signature_1_2658", text: "Type '{0}' provides no match for the signature '{1}'."} + var X_super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher = &Message{code: 2659, category: CategoryError, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", text: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."} + var X_super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions = &Message{code: 2660, category: CategoryError, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", text: "'super' can only be referenced in members of derived classes or object literal expressions."} + var Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module = &Message{code: 2661, category: CategoryError, key: "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", text: "Cannot export '{0}'. Only local declarations can be exported from a module."} + var Cannot_find_name_0_Did_you_mean_the_static_member_1_0 = &Message{code: 2662, category: CategoryError, key: "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", text: "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"} + var Cannot_find_name_0_Did_you_mean_the_instance_member_this_0 = &Message{code: 2663, category: CategoryError, key: "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", text: "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"} + var Invalid_module_name_in_augmentation_module_0_cannot_be_found = &Message{code: 2664, category: CategoryError, key: "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", text: "Invalid module name in augmentation, module '{0}' cannot be found."} + var Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented = &Message{code: 2665, category: CategoryError, key: "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", text: "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."} + var Exports_and_export_assignments_are_not_permitted_in_module_augmentations = &Message{code: 2666, category: CategoryError, key: "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", text: "Exports and export assignments are not permitted in module augmentations."} + var Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module = &Message{code: 2667, category: CategoryError, key: "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", text: "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."} + var X_export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible = &Message{code: 2668, category: CategoryError, key: "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", text: "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."} + var Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations = &Message{code: 2669, category: CategoryError, key: "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", text: "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."} + var Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context = &Message{code: 2670, category: CategoryError, key: "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", text: "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."} + var Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity = &Message{code: 2671, category: CategoryError, key: "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", text: "Cannot augment module '{0}' because it resolves to a non-module entity."} + var Cannot_assign_a_0_constructor_type_to_a_1_constructor_type = &Message{code: 2672, category: CategoryError, key: "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", text: "Cannot assign a '{0}' constructor type to a '{1}' constructor type."} + var Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration = &Message{code: 2673, category: CategoryError, key: "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", text: "Constructor of class '{0}' is private and only accessible within the class declaration."} + var Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration = &Message{code: 2674, category: CategoryError, key: "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", text: "Constructor of class '{0}' is protected and only accessible within the class declaration."} + var Cannot_extend_a_class_0_Class_constructor_is_marked_as_private = &Message{code: 2675, category: CategoryError, key: "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", text: "Cannot extend a class '{0}'. Class constructor is marked as private."} + var Accessors_must_both_be_abstract_or_non_abstract = &Message{code: 2676, category: CategoryError, key: "Accessors_must_both_be_abstract_or_non_abstract_2676", text: "Accessors must both be abstract or non-abstract."} + var A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type = &Message{code: 2677, category: CategoryError, key: "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", text: "A type predicate's type must be assignable to its parameter's type."} + var Type_0_is_not_comparable_to_type_1 = &Message{code: 2678, category: CategoryError, key: "Type_0_is_not_comparable_to_type_1_2678", text: "Type '{0}' is not comparable to type '{1}'."} + var A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void = &Message{code: 2679, category: CategoryError, key: "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", text: "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."} + var A_0_parameter_must_be_the_first_parameter = &Message{code: 2680, category: CategoryError, key: "A_0_parameter_must_be_the_first_parameter_2680", text: "A '{0}' parameter must be the first parameter."} + var A_constructor_cannot_have_a_this_parameter = &Message{code: 2681, category: CategoryError, key: "A_constructor_cannot_have_a_this_parameter_2681", text: "A constructor cannot have a 'this' parameter."} + var X_this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation = &Message{code: 2683, category: CategoryError, key: "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", text: "'this' implicitly has type 'any' because it does not have a type annotation."} + var The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1 = &Message{code: 2684, category: CategoryError, key: "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", text: "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."} + var The_this_types_of_each_signature_are_incompatible = &Message{code: 2685, category: CategoryError, key: "The_this_types_of_each_signature_are_incompatible_2685", text: "The 'this' types of each signature are incompatible."} + var X_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead = &Message{code: 2686, category: CategoryError, key: "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", text: "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."} + var All_declarations_of_0_must_have_identical_modifiers = &Message{code: 2687, category: CategoryError, key: "All_declarations_of_0_must_have_identical_modifiers_2687", text: "All declarations of '{0}' must have identical modifiers."} + var Cannot_find_type_definition_file_for_0 = &Message{code: 2688, category: CategoryError, key: "Cannot_find_type_definition_file_for_0_2688", text: "Cannot find type definition file for '{0}'."} + var Cannot_extend_an_interface_0_Did_you_mean_implements = &Message{code: 2689, category: CategoryError, key: "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", text: "Cannot extend an interface '{0}'. Did you mean 'implements'?"} + var X_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0 = &Message{code: 2690, category: CategoryError, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", text: "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"} + var X_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible = &Message{code: 2692, category: CategoryError, key: "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", text: "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."} + var X_0_only_refers_to_a_type_but_is_being_used_as_a_value_here = &Message{code: 2693, category: CategoryError, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", text: "'{0}' only refers to a type, but is being used as a value here."} + var Namespace_0_has_no_exported_member_1 = &Message{code: 2694, category: CategoryError, key: "Namespace_0_has_no_exported_member_1_2694", text: "Namespace '{0}' has no exported member '{1}'."} + var Left_side_of_comma_operator_is_unused_and_has_no_side_effects = &Message{code: 2695, category: CategoryError, key: "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", text: "Left side of comma operator is unused and has no side effects.", reportsUnnecessary: true} + var The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead = &Message{code: 2696, category: CategoryError, key: "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", text: "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"} + var An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option = &Message{code: 2697, category: CategoryError, key: "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", text: "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."} + var Spread_types_may_only_be_created_from_object_types = &Message{code: 2698, category: CategoryError, key: "Spread_types_may_only_be_created_from_object_types_2698", text: "Spread types may only be created from object types."} + var Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1 = &Message{code: 2699, category: CategoryError, key: "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", text: "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."} + var Rest_types_may_only_be_created_from_object_types = &Message{code: 2700, category: CategoryError, key: "Rest_types_may_only_be_created_from_object_types_2700", text: "Rest types may only be created from object types."} + var The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access = &Message{code: 2701, category: CategoryError, key: "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", text: "The target of an object rest assignment must be a variable or a property access."} + var X_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here = &Message{code: 2702, category: CategoryError, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", text: "'{0}' only refers to a type, but is being used as a namespace here."} + var The_operand_of_a_delete_operator_must_be_a_property_reference = &Message{code: 2703, category: CategoryError, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", text: "The operand of a 'delete' operator must be a property reference."} + var The_operand_of_a_delete_operator_cannot_be_a_read_only_property = &Message{code: 2704, category: CategoryError, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", text: "The operand of a 'delete' operator cannot be a read-only property."} + var An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option = &Message{code: 2705, category: CategoryError, key: "An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705", text: "An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."} + var Required_type_parameters_may_not_follow_optional_type_parameters = &Message{code: 2706, category: CategoryError, key: "Required_type_parameters_may_not_follow_optional_type_parameters_2706", text: "Required type parameters may not follow optional type parameters."} + var Generic_type_0_requires_between_1_and_2_type_arguments = &Message{code: 2707, category: CategoryError, key: "Generic_type_0_requires_between_1_and_2_type_arguments_2707", text: "Generic type '{0}' requires between {1} and {2} type arguments."} + var Cannot_use_namespace_0_as_a_value = &Message{code: 2708, category: CategoryError, key: "Cannot_use_namespace_0_as_a_value_2708", text: "Cannot use namespace '{0}' as a value."} + var Cannot_use_namespace_0_as_a_type = &Message{code: 2709, category: CategoryError, key: "Cannot_use_namespace_0_as_a_type_2709", text: "Cannot use namespace '{0}' as a type."} + var X_0_are_specified_twice_The_attribute_named_0_will_be_overwritten = &Message{code: 2710, category: CategoryError, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", text: "'{0}' are specified twice. The attribute named '{0}' will be overwritten."} + var A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option = &Message{code: 2711, category: CategoryError, key: "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", text: "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."} + var A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option = &Message{code: 2712, category: CategoryError, key: "A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712", text: "A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."} + var Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1 = &Message{code: 2713, category: CategoryError, key: "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", text: "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"} + var The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context = &Message{code: 2714, category: CategoryError, key: "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", text: "The expression of an export assignment must be an identifier or qualified name in an ambient context."} + var Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor = &Message{code: 2715, category: CategoryError, key: "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", text: "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."} + var Type_parameter_0_has_a_circular_default = &Message{code: 2716, category: CategoryError, key: "Type_parameter_0_has_a_circular_default_2716", text: "Type parameter '{0}' has a circular default."} + var Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 = &Message{code: 2717, category: CategoryError, key: "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717", text: "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."} + var Duplicate_property_0 = &Message{code: 2718, category: CategoryError, key: "Duplicate_property_0_2718", text: "Duplicate property '{0}'."} + var Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated = &Message{code: 2719, category: CategoryError, key: "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719", text: "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."} + var Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass = &Message{code: 2720, category: CategoryError, key: "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720", text: "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"} + var Cannot_invoke_an_object_which_is_possibly_null = &Message{code: 2721, category: CategoryError, key: "Cannot_invoke_an_object_which_is_possibly_null_2721", text: "Cannot invoke an object which is possibly 'null'."} + var Cannot_invoke_an_object_which_is_possibly_undefined = &Message{code: 2722, category: CategoryError, key: "Cannot_invoke_an_object_which_is_possibly_undefined_2722", text: "Cannot invoke an object which is possibly 'undefined'."} + var Cannot_invoke_an_object_which_is_possibly_null_or_undefined = &Message{code: 2723, category: CategoryError, key: "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", text: "Cannot invoke an object which is possibly 'null' or 'undefined'."} + var X_0_has_no_exported_member_named_1_Did_you_mean_2 = &Message{code: 2724, category: CategoryError, key: "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", text: "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"} + var Class_name_cannot_be_Object_when_targeting_ES5_with_module_0 = &Message{code: 2725, category: CategoryError, key: "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", text: "Class name cannot be 'Object' when targeting ES5 with module {0}."} + var Cannot_find_lib_definition_for_0 = &Message{code: 2726, category: CategoryError, key: "Cannot_find_lib_definition_for_0_2726", text: "Cannot find lib definition for '{0}'."} + var Cannot_find_lib_definition_for_0_Did_you_mean_1 = &Message{code: 2727, category: CategoryError, key: "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", text: "Cannot find lib definition for '{0}'. Did you mean '{1}'?"} + var X_0_is_declared_here = &Message{code: 2728, category: CategoryMessage, key: "_0_is_declared_here_2728", text: "'{0}' is declared here."} + var Property_0_is_used_before_its_initialization = &Message{code: 2729, category: CategoryError, key: "Property_0_is_used_before_its_initialization_2729", text: "Property '{0}' is used before its initialization."} + var An_arrow_function_cannot_have_a_this_parameter = &Message{code: 2730, category: CategoryError, key: "An_arrow_function_cannot_have_a_this_parameter_2730", text: "An arrow function cannot have a 'this' parameter."} + var Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String = &Message{code: 2731, category: CategoryError, key: "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", text: "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."} + var Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension = &Message{code: 2732, category: CategoryError, key: "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", text: "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."} + var Property_0_was_also_declared_here = &Message{code: 2733, category: CategoryError, key: "Property_0_was_also_declared_here_2733", text: "Property '{0}' was also declared here."} + var Are_you_missing_a_semicolon = &Message{code: 2734, category: CategoryError, key: "Are_you_missing_a_semicolon_2734", text: "Are you missing a semicolon?"} + var Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1 = &Message{code: 2735, category: CategoryError, key: "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", text: "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"} + var Operator_0_cannot_be_applied_to_type_1 = &Message{code: 2736, category: CategoryError, key: "Operator_0_cannot_be_applied_to_type_1_2736", text: "Operator '{0}' cannot be applied to type '{1}'."} + var BigInt_literals_are_not_available_when_targeting_lower_than_ES2020 = &Message{code: 2737, category: CategoryError, key: "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", text: "BigInt literals are not available when targeting lower than ES2020."} + var An_outer_value_of_this_is_shadowed_by_this_container = &Message{code: 2738, category: CategoryMessage, key: "An_outer_value_of_this_is_shadowed_by_this_container_2738", text: "An outer value of 'this' is shadowed by this container."} + var Type_0_is_missing_the_following_properties_from_type_1_Colon_2 = &Message{code: 2739, category: CategoryError, key: "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739", text: "Type '{0}' is missing the following properties from type '{1}': {2}"} + var Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more = &Message{code: 2740, category: CategoryError, key: "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740", text: "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."} + var Property_0_is_missing_in_type_1_but_required_in_type_2 = &Message{code: 2741, category: CategoryError, key: "Property_0_is_missing_in_type_1_but_required_in_type_2_2741", text: "Property '{0}' is missing in type '{1}' but required in type '{2}'."} + var The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary = &Message{code: 2742, category: CategoryError, key: "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742", text: "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."} + var No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments = &Message{code: 2743, category: CategoryError, key: "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743", text: "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."} + var Type_parameter_defaults_can_only_reference_previously_declared_type_parameters = &Message{code: 2744, category: CategoryError, key: "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744", text: "Type parameter defaults can only reference previously declared type parameters."} + var This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided = &Message{code: 2745, category: CategoryError, key: "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745", text: "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."} + var This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided = &Message{code: 2746, category: CategoryError, key: "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746", text: "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."} + var X_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2 = &Message{code: 2747, category: CategoryError, key: "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", text: "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."} + var Cannot_access_ambient_const_enums_when_0_is_enabled = &Message{code: 2748, category: CategoryError, key: "Cannot_access_ambient_const_enums_when_0_is_enabled_2748", text: "Cannot access ambient const enums when '{0}' is enabled."} + var X_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0 = &Message{code: 2749, category: CategoryError, key: "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", text: "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"} + var The_implementation_signature_is_declared_here = &Message{code: 2750, category: CategoryError, key: "The_implementation_signature_is_declared_here_2750", text: "The implementation signature is declared here."} + var Circularity_originates_in_type_at_this_location = &Message{code: 2751, category: CategoryError, key: "Circularity_originates_in_type_at_this_location_2751", text: "Circularity originates in type at this location."} + var The_first_export_default_is_here = &Message{code: 2752, category: CategoryError, key: "The_first_export_default_is_here_2752", text: "The first export default is here."} + var Another_export_default_is_here = &Message{code: 2753, category: CategoryError, key: "Another_export_default_is_here_2753", text: "Another export default is here."} + var X_super_may_not_use_type_arguments = &Message{code: 2754, category: CategoryError, key: "super_may_not_use_type_arguments_2754", text: "'super' may not use type arguments."} + var No_constituent_of_type_0_is_callable = &Message{code: 2755, category: CategoryError, key: "No_constituent_of_type_0_is_callable_2755", text: "No constituent of type '{0}' is callable."} + var Not_all_constituents_of_type_0_are_callable = &Message{code: 2756, category: CategoryError, key: "Not_all_constituents_of_type_0_are_callable_2756", text: "Not all constituents of type '{0}' are callable."} + var Type_0_has_no_call_signatures = &Message{code: 2757, category: CategoryError, key: "Type_0_has_no_call_signatures_2757", text: "Type '{0}' has no call signatures."} + var Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other = &Message{code: 2758, category: CategoryError, key: "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758", text: "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."} + var No_constituent_of_type_0_is_constructable = &Message{code: 2759, category: CategoryError, key: "No_constituent_of_type_0_is_constructable_2759", text: "No constituent of type '{0}' is constructable."} + var Not_all_constituents_of_type_0_are_constructable = &Message{code: 2760, category: CategoryError, key: "Not_all_constituents_of_type_0_are_constructable_2760", text: "Not all constituents of type '{0}' are constructable."} + var Type_0_has_no_construct_signatures = &Message{code: 2761, category: CategoryError, key: "Type_0_has_no_construct_signatures_2761", text: "Type '{0}' has no construct signatures."} + var Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other = &Message{code: 2762, category: CategoryError, key: "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762", text: "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."} + var Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0 = &Message{code: 2763, category: CategoryError, key: "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763", text: "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."} + var Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0 = &Message{code: 2764, category: CategoryError, key: "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764", text: "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."} + var Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0 = &Message{code: 2765, category: CategoryError, key: "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765", text: "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."} + var Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0 = &Message{code: 2766, category: CategoryError, key: "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766", text: "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."} + var The_0_property_of_an_iterator_must_be_a_method = &Message{code: 2767, category: CategoryError, key: "The_0_property_of_an_iterator_must_be_a_method_2767", text: "The '{0}' property of an iterator must be a method."} + var The_0_property_of_an_async_iterator_must_be_a_method = &Message{code: 2768, category: CategoryError, key: "The_0_property_of_an_async_iterator_must_be_a_method_2768", text: "The '{0}' property of an async iterator must be a method."} + var No_overload_matches_this_call = &Message{code: 2769, category: CategoryError, key: "No_overload_matches_this_call_2769", text: "No overload matches this call."} + var The_last_overload_gave_the_following_error = &Message{code: 2770, category: CategoryError, key: "The_last_overload_gave_the_following_error_2770", text: "The last overload gave the following error."} + var The_last_overload_is_declared_here = &Message{code: 2771, category: CategoryError, key: "The_last_overload_is_declared_here_2771", text: "The last overload is declared here."} + var Overload_0_of_1_2_gave_the_following_error = &Message{code: 2772, category: CategoryError, key: "Overload_0_of_1_2_gave_the_following_error_2772", text: "Overload {0} of {1}, '{2}', gave the following error."} + var Did_you_forget_to_use_await = &Message{code: 2773, category: CategoryError, key: "Did_you_forget_to_use_await_2773", text: "Did you forget to use 'await'?"} + var This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead = &Message{code: 2774, category: CategoryError, key: "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", text: "This condition will always return true since this function is always defined. Did you mean to call it instead?"} + var Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation = &Message{code: 2775, category: CategoryError, key: "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775", text: "Assertions require every name in the call target to be declared with an explicit type annotation."} + var Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name = &Message{code: 2776, category: CategoryError, key: "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776", text: "Assertions require the call target to be an identifier or qualified name."} + var The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access = &Message{code: 2777, category: CategoryError, key: "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777", text: "The operand of an increment or decrement operator may not be an optional property access."} + var The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access = &Message{code: 2778, category: CategoryError, key: "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778", text: "The target of an object rest assignment may not be an optional property access."} + var The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access = &Message{code: 2779, category: CategoryError, key: "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779", text: "The left-hand side of an assignment expression may not be an optional property access."} + var The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access = &Message{code: 2780, category: CategoryError, key: "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", text: "The left-hand side of a 'for...in' statement may not be an optional property access."} + var The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access = &Message{code: 2781, category: CategoryError, key: "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", text: "The left-hand side of a 'for...of' statement may not be an optional property access."} + var X_0_needs_an_explicit_type_annotation = &Message{code: 2782, category: CategoryMessage, key: "_0_needs_an_explicit_type_annotation_2782", text: "'{0}' needs an explicit type annotation."} + var X_0_is_specified_more_than_once_so_this_usage_will_be_overwritten = &Message{code: 2783, category: CategoryError, key: "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", text: "'{0}' is specified more than once, so this usage will be overwritten."} + var X_get_and_set_accessors_cannot_declare_this_parameters = &Message{code: 2784, category: CategoryError, key: "get_and_set_accessors_cannot_declare_this_parameters_2784", text: "'get' and 'set' accessors cannot declare 'this' parameters."} + var This_spread_always_overwrites_this_property = &Message{code: 2785, category: CategoryError, key: "This_spread_always_overwrites_this_property_2785", text: "This spread always overwrites this property."} + var X_0_cannot_be_used_as_a_JSX_component = &Message{code: 2786, category: CategoryError, key: "_0_cannot_be_used_as_a_JSX_component_2786", text: "'{0}' cannot be used as a JSX component."} + var Its_return_type_0_is_not_a_valid_JSX_element = &Message{code: 2787, category: CategoryError, key: "Its_return_type_0_is_not_a_valid_JSX_element_2787", text: "Its return type '{0}' is not a valid JSX element."} + var Its_instance_type_0_is_not_a_valid_JSX_element = &Message{code: 2788, category: CategoryError, key: "Its_instance_type_0_is_not_a_valid_JSX_element_2788", text: "Its instance type '{0}' is not a valid JSX element."} + var Its_element_type_0_is_not_a_valid_JSX_element = &Message{code: 2789, category: CategoryError, key: "Its_element_type_0_is_not_a_valid_JSX_element_2789", text: "Its element type '{0}' is not a valid JSX element."} + var The_operand_of_a_delete_operator_must_be_optional = &Message{code: 2790, category: CategoryError, key: "The_operand_of_a_delete_operator_must_be_optional_2790", text: "The operand of a 'delete' operator must be optional."} + var Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later = &Message{code: 2791, category: CategoryError, key: "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", text: "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."} + var Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option = &Message{code: 2792, category: CategoryError, key: "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792", text: "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"} + var The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible = &Message{code: 2793, category: CategoryError, key: "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", text: "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."} + var Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise = &Message{code: 2794, category: CategoryError, key: "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", text: "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"} + var The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types = &Message{code: 2795, category: CategoryError, key: "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", text: "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."} + var It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked = &Message{code: 2796, category: CategoryError, key: "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", text: "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."} + var A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract = &Message{code: 2797, category: CategoryError, key: "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", text: "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."} + var The_declaration_was_marked_as_deprecated_here = &Message{code: 2798, category: CategoryError, key: "The_declaration_was_marked_as_deprecated_here_2798", text: "The declaration was marked as deprecated here."} + var Type_produces_a_tuple_type_that_is_too_large_to_represent = &Message{code: 2799, category: CategoryError, key: "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", text: "Type produces a tuple type that is too large to represent."} + var Expression_produces_a_tuple_type_that_is_too_large_to_represent = &Message{code: 2800, category: CategoryError, key: "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", text: "Expression produces a tuple type that is too large to represent."} + var This_condition_will_always_return_true_since_this_0_is_always_defined = &Message{code: 2801, category: CategoryError, key: "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", text: "This condition will always return true since this '{0}' is always defined."} + var Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher = &Message{code: 2802, category: CategoryError, key: "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", text: "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."} + var Cannot_assign_to_private_method_0_Private_methods_are_not_writable = &Message{code: 2803, category: CategoryError, key: "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", text: "Cannot assign to private method '{0}'. Private methods are not writable."} + var Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name = &Message{code: 2804, category: CategoryError, key: "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", text: "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."} + var Private_accessor_was_defined_without_a_getter = &Message{code: 2806, category: CategoryError, key: "Private_accessor_was_defined_without_a_getter_2806", text: "Private accessor was defined without a getter."} + var This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0 = &Message{code: 2807, category: CategoryError, key: "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", text: "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."} + var A_get_accessor_must_be_at_least_as_accessible_as_the_setter = &Message{code: 2808, category: CategoryError, key: "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", text: "A get accessor must be at least as accessible as the setter"} + var Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses = &Message{code: 2809, category: CategoryError, key: "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", text: "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."} + var Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments = &Message{code: 2810, category: CategoryError, key: "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", text: "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."} + var Initializer_for_property_0 = &Message{code: 2811, category: CategoryError, key: "Initializer_for_property_0_2811", text: "Initializer for property '{0}'"} + var Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom = &Message{code: 2812, category: CategoryError, key: "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", text: "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."} + var Class_declaration_cannot_implement_overload_list_for_0 = &Message{code: 2813, category: CategoryError, key: "Class_declaration_cannot_implement_overload_list_for_0_2813", text: "Class declaration cannot implement overload list for '{0}'."} + var Function_with_bodies_can_only_merge_with_classes_that_are_ambient = &Message{code: 2814, category: CategoryError, key: "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", text: "Function with bodies can only merge with classes that are ambient."} + var X_arguments_cannot_be_referenced_in_property_initializers = &Message{code: 2815, category: CategoryError, key: "arguments_cannot_be_referenced_in_property_initializers_2815", text: "'arguments' cannot be referenced in property initializers."} + var Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class = &Message{code: 2816, category: CategoryError, key: "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", text: "Cannot use 'this' in a static property initializer of a decorated class."} + var Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block = &Message{code: 2817, category: CategoryError, key: "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", text: "Property '{0}' has no initializer and is not definitely assigned in a class static block."} + var Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers = &Message{code: 2818, category: CategoryError, key: "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", text: "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."} + var Namespace_name_cannot_be_0 = &Message{code: 2819, category: CategoryError, key: "Namespace_name_cannot_be_0_2819", text: "Namespace name cannot be '{0}'."} + var Type_0_is_not_assignable_to_type_1_Did_you_mean_2 = &Message{code: 2820, category: CategoryError, key: "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", text: "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"} -var Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve = &Message{code: 2821, category: CategoryError, key: "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2821", text: "Import assertions are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."} + +var Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve = &Message{code: 2821, category: CategoryError, key: "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_pres_2821", text: "Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'."} + var Import_assertions_cannot_be_used_with_type_only_imports_or_exports = &Message{code: 2822, category: CategoryError, key: "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", text: "Import assertions cannot be used with type-only imports or exports."} -var Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve = &Message{code: 2823, category: CategoryError, key: "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2823", text: "Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."} + +var Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve = &Message{code: 2823, category: CategoryError, key: "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_pres_2823", text: "Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'."} + var Cannot_find_namespace_0_Did_you_mean_1 = &Message{code: 2833, category: CategoryError, key: "Cannot_find_namespace_0_Did_you_mean_1_2833", text: "Cannot find namespace '{0}'. Did you mean '{1}'?"} + var Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path = &Message{code: 2834, category: CategoryError, key: "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", text: "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."} + var Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0 = &Message{code: 2835, category: CategoryError, key: "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", text: "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"} + var Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls = &Message{code: 2836, category: CategoryError, key: "Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836", text: "Import assertions are not allowed on statements that compile to CommonJS 'require' calls."} + var Import_assertion_values_must_be_string_literal_expressions = &Message{code: 2837, category: CategoryError, key: "Import_assertion_values_must_be_string_literal_expressions_2837", text: "Import assertion values must be string literal expressions."} + var All_declarations_of_0_must_have_identical_constraints = &Message{code: 2838, category: CategoryError, key: "All_declarations_of_0_must_have_identical_constraints_2838", text: "All declarations of '{0}' must have identical constraints."} + var This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value = &Message{code: 2839, category: CategoryError, key: "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", text: "This condition will always return '{0}' since JavaScript compares objects by reference, not value."} + var An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types = &Message{code: 2840, category: CategoryError, key: "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", text: "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."} + var X_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation = &Message{code: 2842, category: CategoryError, key: "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", text: "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"} + var We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here = &Message{code: 2843, category: CategoryError, key: "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", text: "We can only write a type for '{0}' by adding a type for the entire parameter here."} + var Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor = &Message{code: 2844, category: CategoryError, key: "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", text: "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."} + var This_condition_will_always_return_0 = &Message{code: 2845, category: CategoryError, key: "This_condition_will_always_return_0_2845", text: "This condition will always return '{0}'."} + var A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead = &Message{code: 2846, category: CategoryError, key: "A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846", text: "A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"} + var The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression = &Message{code: 2848, category: CategoryError, key: "The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848", text: "The right-hand side of an 'instanceof' expression must not be an instantiation expression."} + var Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1 = &Message{code: 2849, category: CategoryError, key: "Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849", text: "Target signature provides too few arguments. Expected {0} or more, but got {1}."} + var The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined = &Message{code: 2850, category: CategoryError, key: "The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850", text: "The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."} + var The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined = &Message{code: 2851, category: CategoryError, key: "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", text: "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."} + var X_await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules = &Message{code: 2852, category: CategoryError, key: "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", text: "'await using' statements are only allowed within async functions and at the top levels of modules."} + var X_await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module = &Message{code: 2853, category: CategoryError, key: "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", text: "'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."} -var Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher = &Message{code: 2854, category: CategoryError, key: "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", text: "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."} + +var Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher = &Message{code: 2854, category: CategoryError, key: "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", text: "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."} + var Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super = &Message{code: 2855, category: CategoryError, key: "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", text: "Class field '{0}' defined by the parent class is not accessible in the child class via super."} + var Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls = &Message{code: 2856, category: CategoryError, key: "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", text: "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."} + var Import_attributes_cannot_be_used_with_type_only_imports_or_exports = &Message{code: 2857, category: CategoryError, key: "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", text: "Import attributes cannot be used with type-only imports or exports."} + var Import_attribute_values_must_be_string_literal_expressions = &Message{code: 2858, category: CategoryError, key: "Import_attribute_values_must_be_string_literal_expressions_2858", text: "Import attribute values must be string literal expressions."} + var Excessive_complexity_comparing_types_0_and_1 = &Message{code: 2859, category: CategoryError, key: "Excessive_complexity_comparing_types_0_and_1_2859", text: "Excessive complexity comparing types '{0}' and '{1}'."} + var The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method = &Message{code: 2860, category: CategoryError, key: "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", text: "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."} + var An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression = &Message{code: 2861, category: CategoryError, key: "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", text: "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."} + var Type_0_is_generic_and_can_only_be_indexed_for_reading = &Message{code: 2862, category: CategoryError, key: "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", text: "Type '{0}' is generic and can only be indexed for reading."} + var A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values = &Message{code: 2863, category: CategoryError, key: "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", text: "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."} + var A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types = &Message{code: 2864, category: CategoryError, key: "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", text: "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."} + var Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled = &Message{code: 2865, category: CategoryError, key: "Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865", text: "Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."} + var Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled = &Message{code: 2866, category: CategoryError, key: "Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866", text: "Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."} + var Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun = &Message{code: 2867, category: CategoryError, key: "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867", text: "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."} + var Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig = &Message{code: 2868, category: CategoryError, key: "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868", text: "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."} + var Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish = &Message{code: 2869, category: CategoryError, key: "Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869", text: "Right operand of ?? is unreachable because the left operand is never nullish."} + var This_binary_expression_is_never_nullish_Are_you_missing_parentheses = &Message{code: 2870, category: CategoryError, key: "This_binary_expression_is_never_nullish_Are_you_missing_parentheses_2870", text: "This binary expression is never nullish. Are you missing parentheses?"} + var This_expression_is_always_nullish = &Message{code: 2871, category: CategoryError, key: "This_expression_is_always_nullish_2871", text: "This expression is always nullish."} + var This_kind_of_expression_is_always_truthy = &Message{code: 2872, category: CategoryError, key: "This_kind_of_expression_is_always_truthy_2872", text: "This kind of expression is always truthy."} + var This_kind_of_expression_is_always_falsy = &Message{code: 2873, category: CategoryError, key: "This_kind_of_expression_is_always_falsy_2873", text: "This kind of expression is always falsy."} + var This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found = &Message{code: 2874, category: CategoryError, key: "This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874", text: "This JSX tag requires '{0}' to be in scope, but it could not be found."} + var This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed = &Message{code: 2875, category: CategoryError, key: "This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875", text: "This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed."} + +var This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0 = &Message{code: 2876, category: CategoryError, key: "This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876", text: "This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to \"{0}\"."} + +var This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path = &Message{code: 2877, category: CategoryError, key: "This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877", text: "This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."} + +var This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files = &Message{code: 2878, category: CategoryError, key: "This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878", text: "This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."} + +var Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found = &Message{code: 2879, category: CategoryError, key: "Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879", text: "Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."} + +var Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert = &Message{code: 2880, category: CategoryError, key: "Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert_2880", text: "Import assertions have been replaced by import attributes. Use 'with' instead of 'assert'."} + var Import_declaration_0_is_using_private_name_1 = &Message{code: 4000, category: CategoryError, key: "Import_declaration_0_is_using_private_name_1_4000", text: "Import declaration '{0}' is using private name '{1}'."} + var Type_parameter_0_of_exported_class_has_or_is_using_private_name_1 = &Message{code: 4002, category: CategoryError, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", text: "Type parameter '{0}' of exported class has or is using private name '{1}'."} + var Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1 = &Message{code: 4004, category: CategoryError, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", text: "Type parameter '{0}' of exported interface has or is using private name '{1}'."} + var Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1 = &Message{code: 4006, category: CategoryError, key: "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", text: "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."} + var Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1 = &Message{code: 4008, category: CategoryError, key: "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", text: "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."} + var Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1 = &Message{code: 4010, category: CategoryError, key: "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", text: "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."} + var Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1 = &Message{code: 4012, category: CategoryError, key: "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", text: "Type parameter '{0}' of public method from exported class has or is using private name '{1}'."} + var Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1 = &Message{code: 4014, category: CategoryError, key: "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", text: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'."} + var Type_parameter_0_of_exported_function_has_or_is_using_private_name_1 = &Message{code: 4016, category: CategoryError, key: "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", text: "Type parameter '{0}' of exported function has or is using private name '{1}'."} + var Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 = &Message{code: 4019, category: CategoryError, key: "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", text: "Implements clause of exported class '{0}' has or is using private name '{1}'."} + var X_extends_clause_of_exported_class_0_has_or_is_using_private_name_1 = &Message{code: 4020, category: CategoryError, key: "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", text: "'extends' clause of exported class '{0}' has or is using private name '{1}'."} + var X_extends_clause_of_exported_class_has_or_is_using_private_name_0 = &Message{code: 4021, category: CategoryError, key: "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021", text: "'extends' clause of exported class has or is using private name '{0}'."} + var X_extends_clause_of_exported_interface_0_has_or_is_using_private_name_1 = &Message{code: 4022, category: CategoryError, key: "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", text: "'extends' clause of exported interface '{0}' has or is using private name '{1}'."} + var Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4023, category: CategoryError, key: "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", text: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."} + var Exported_variable_0_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4024, category: CategoryError, key: "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", text: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'."} + var Exported_variable_0_has_or_is_using_private_name_1 = &Message{code: 4025, category: CategoryError, key: "Exported_variable_0_has_or_is_using_private_name_1_4025", text: "Exported variable '{0}' has or is using private name '{1}'."} + var Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4026, category: CategoryError, key: "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", text: "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."} + var Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4027, category: CategoryError, key: "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", text: "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."} + var Public_static_property_0_of_exported_class_has_or_is_using_private_name_1 = &Message{code: 4028, category: CategoryError, key: "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", text: "Public static property '{0}' of exported class has or is using private name '{1}'."} + var Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4029, category: CategoryError, key: "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", text: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."} + var Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4030, category: CategoryError, key: "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", text: "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."} + var Public_property_0_of_exported_class_has_or_is_using_private_name_1 = &Message{code: 4031, category: CategoryError, key: "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", text: "Public property '{0}' of exported class has or is using private name '{1}'."} + var Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4032, category: CategoryError, key: "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", text: "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."} + var Property_0_of_exported_interface_has_or_is_using_private_name_1 = &Message{code: 4033, category: CategoryError, key: "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", text: "Property '{0}' of exported interface has or is using private name '{1}'."} + var Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4034, category: CategoryError, key: "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034", text: "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."} + var Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1 = &Message{code: 4035, category: CategoryError, key: "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035", text: "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."} + var Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4036, category: CategoryError, key: "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036", text: "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."} + var Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1 = &Message{code: 4037, category: CategoryError, key: "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037", text: "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."} + var Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4038, category: CategoryError, key: "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038", text: "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."} + var Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4039, category: CategoryError, key: "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039", text: "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."} + var Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1 = &Message{code: 4040, category: CategoryError, key: "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040", text: "Return type of public static getter '{0}' from exported class has or is using private name '{1}'."} + var Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4041, category: CategoryError, key: "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041", text: "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."} + var Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4042, category: CategoryError, key: "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042", text: "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."} + var Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1 = &Message{code: 4043, category: CategoryError, key: "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043", text: "Return type of public getter '{0}' from exported class has or is using private name '{1}'."} + var Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 = &Message{code: 4044, category: CategoryError, key: "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", text: "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."} + var Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0 = &Message{code: 4045, category: CategoryError, key: "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", text: "Return type of constructor signature from exported interface has or is using private name '{0}'."} + var Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 = &Message{code: 4046, category: CategoryError, key: "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", text: "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."} + var Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0 = &Message{code: 4047, category: CategoryError, key: "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", text: "Return type of call signature from exported interface has or is using private name '{0}'."} + var Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 = &Message{code: 4048, category: CategoryError, key: "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", text: "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."} + var Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0 = &Message{code: 4049, category: CategoryError, key: "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", text: "Return type of index signature from exported interface has or is using private name '{0}'."} + var Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named = &Message{code: 4050, category: CategoryError, key: "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", text: "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."} + var Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 = &Message{code: 4051, category: CategoryError, key: "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", text: "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."} + var Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0 = &Message{code: 4052, category: CategoryError, key: "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", text: "Return type of public static method from exported class has or is using private name '{0}'."} + var Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named = &Message{code: 4053, category: CategoryError, key: "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", text: "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."} + var Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 = &Message{code: 4054, category: CategoryError, key: "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", text: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'."} + var Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0 = &Message{code: 4055, category: CategoryError, key: "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", text: "Return type of public method from exported class has or is using private name '{0}'."} + var Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 = &Message{code: 4056, category: CategoryError, key: "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", text: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'."} + var Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0 = &Message{code: 4057, category: CategoryError, key: "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", text: "Return type of method from exported interface has or is using private name '{0}'."} + var Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named = &Message{code: 4058, category: CategoryError, key: "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", text: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."} + var Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 = &Message{code: 4059, category: CategoryError, key: "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", text: "Return type of exported function has or is using name '{0}' from private module '{1}'."} + var Return_type_of_exported_function_has_or_is_using_private_name_0 = &Message{code: 4060, category: CategoryError, key: "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", text: "Return type of exported function has or is using private name '{0}'."} + var Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4061, category: CategoryError, key: "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", text: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."} + var Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4062, category: CategoryError, key: "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", text: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."} + var Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1 = &Message{code: 4063, category: CategoryError, key: "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", text: "Parameter '{0}' of constructor from exported class has or is using private name '{1}'."} + var Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4064, category: CategoryError, key: "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", text: "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."} + var Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1 = &Message{code: 4065, category: CategoryError, key: "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", text: "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."} + var Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4066, category: CategoryError, key: "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", text: "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."} + var Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1 = &Message{code: 4067, category: CategoryError, key: "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", text: "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."} + var Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4068, category: CategoryError, key: "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", text: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."} + var Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4069, category: CategoryError, key: "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", text: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."} + var Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1 = &Message{code: 4070, category: CategoryError, key: "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", text: "Parameter '{0}' of public static method from exported class has or is using private name '{1}'."} + var Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4071, category: CategoryError, key: "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", text: "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."} + var Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4072, category: CategoryError, key: "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", text: "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."} + var Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1 = &Message{code: 4073, category: CategoryError, key: "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", text: "Parameter '{0}' of public method from exported class has or is using private name '{1}'."} + var Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4074, category: CategoryError, key: "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", text: "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."} + var Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1 = &Message{code: 4075, category: CategoryError, key: "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", text: "Parameter '{0}' of method from exported interface has or is using private name '{1}'."} + var Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4076, category: CategoryError, key: "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", text: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."} + var Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4077, category: CategoryError, key: "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", text: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."} + var Parameter_0_of_exported_function_has_or_is_using_private_name_1 = &Message{code: 4078, category: CategoryError, key: "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", text: "Parameter '{0}' of exported function has or is using private name '{1}'."} + var Exported_type_alias_0_has_or_is_using_private_name_1 = &Message{code: 4081, category: CategoryError, key: "Exported_type_alias_0_has_or_is_using_private_name_1_4081", text: "Exported type alias '{0}' has or is using private name '{1}'."} + var Default_export_of_the_module_has_or_is_using_private_name_0 = &Message{code: 4082, category: CategoryError, key: "Default_export_of_the_module_has_or_is_using_private_name_0_4082", text: "Default export of the module has or is using private name '{0}'."} + var Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1 = &Message{code: 4083, category: CategoryError, key: "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", text: "Type parameter '{0}' of exported type alias has or is using private name '{1}'."} + var Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2 = &Message{code: 4084, category: CategoryError, key: "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", text: "Exported type alias '{0}' has or is using private name '{1}' from module {2}."} + var Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1 = &Message{code: 4085, category: CategoryError, key: "Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085", text: "Extends clause for inferred type '{0}' has or is using private name '{1}'."} + var Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4091, category: CategoryError, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", text: "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."} + var Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1 = &Message{code: 4092, category: CategoryError, key: "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", text: "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."} + var Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected = &Message{code: 4094, category: CategoryError, key: "Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094", text: "Property '{0}' of exported anonymous class type may not be private or protected."} + var Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4095, category: CategoryError, key: "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", text: "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."} + var Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4096, category: CategoryError, key: "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", text: "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."} + var Public_static_method_0_of_exported_class_has_or_is_using_private_name_1 = &Message{code: 4097, category: CategoryError, key: "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", text: "Public static method '{0}' of exported class has or is using private name '{1}'."} + var Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4098, category: CategoryError, key: "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098", text: "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."} + var Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4099, category: CategoryError, key: "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099", text: "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."} + var Public_method_0_of_exported_class_has_or_is_using_private_name_1 = &Message{code: 4100, category: CategoryError, key: "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100", text: "Public method '{0}' of exported class has or is using private name '{1}'."} + var Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4101, category: CategoryError, key: "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101", text: "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."} + var Method_0_of_exported_interface_has_or_is_using_private_name_1 = &Message{code: 4102, category: CategoryError, key: "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", text: "Method '{0}' of exported interface has or is using private name '{1}'."} + var Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1 = &Message{code: 4103, category: CategoryError, key: "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103", text: "Type parameter '{0}' of exported mapped object type is using private name '{1}'."} + var The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1 = &Message{code: 4104, category: CategoryError, key: "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104", text: "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."} + var Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter = &Message{code: 4105, category: CategoryError, key: "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105", text: "Private or protected member '{0}' cannot be accessed on a type parameter."} + var Parameter_0_of_accessor_has_or_is_using_private_name_1 = &Message{code: 4106, category: CategoryError, key: "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", text: "Parameter '{0}' of accessor has or is using private name '{1}'."} + var Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 = &Message{code: 4107, category: CategoryError, key: "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", text: "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."} + var Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named = &Message{code: 4108, category: CategoryError, key: "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", text: "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."} + var Type_arguments_for_0_circularly_reference_themselves = &Message{code: 4109, category: CategoryError, key: "Type_arguments_for_0_circularly_reference_themselves_4109", text: "Type arguments for '{0}' circularly reference themselves."} + var Tuple_type_arguments_circularly_reference_themselves = &Message{code: 4110, category: CategoryError, key: "Tuple_type_arguments_circularly_reference_themselves_4110", text: "Tuple type arguments circularly reference themselves."} + var Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0 = &Message{code: 4111, category: CategoryError, key: "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", text: "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."} + var This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class = &Message{code: 4112, category: CategoryError, key: "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", text: "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."} + var This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0 = &Message{code: 4113, category: CategoryError, key: "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", text: "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."} + var This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0 = &Message{code: 4114, category: CategoryError, key: "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", text: "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."} + var This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 = &Message{code: 4115, category: CategoryError, key: "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", text: "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."} + var This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0 = &Message{code: 4116, category: CategoryError, key: "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", text: "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."} + var This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 = &Message{code: 4117, category: CategoryError, key: "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", text: "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"} + var The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized = &Message{code: 4118, category: CategoryError, key: "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", text: "The type of this node cannot be serialized because its property '{0}' cannot be serialized."} + var This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 = &Message{code: 4119, category: CategoryError, key: "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", text: "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."} + var This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 = &Message{code: 4120, category: CategoryError, key: "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", text: "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."} + var This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class = &Message{code: 4121, category: CategoryError, key: "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", text: "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."} + var This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0 = &Message{code: 4122, category: CategoryError, key: "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", text: "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."} + var This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 = &Message{code: 4123, category: CategoryError, key: "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", text: "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"} + var Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next = &Message{code: 4124, category: CategoryError, key: "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", text: "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."} + var Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given = &Message{code: 4125, category: CategoryError, key: "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", text: "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."} + var One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value = &Message{code: 4126, category: CategoryError, key: "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", text: "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."} + +var This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic = &Message{code: 4127, category: CategoryError, key: "This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic_4127", text: "This member cannot have an 'override' modifier because its name is dynamic."} + +var This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic = &Message{code: 4128, category: CategoryError, key: "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic_4128", text: "This member cannot have a JSDoc comment with an '@override' tag because its name is dynamic."} + var The_current_host_does_not_support_the_0_option = &Message{code: 5001, category: CategoryError, key: "The_current_host_does_not_support_the_0_option_5001", text: "The current host does not support the '{0}' option."} + var Cannot_find_the_common_subdirectory_path_for_the_input_files = &Message{code: 5009, category: CategoryError, key: "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", text: "Cannot find the common subdirectory path for the input files."} + var File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0 = &Message{code: 5010, category: CategoryError, key: "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", text: "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."} + var Cannot_read_file_0_Colon_1 = &Message{code: 5012, category: CategoryError, key: "Cannot_read_file_0_Colon_1_5012", text: "Cannot read file '{0}': {1}."} + var Unknown_compiler_option_0 = &Message{code: 5023, category: CategoryError, key: "Unknown_compiler_option_0_5023", text: "Unknown compiler option '{0}'."} + var Compiler_option_0_requires_a_value_of_type_1 = &Message{code: 5024, category: CategoryError, key: "Compiler_option_0_requires_a_value_of_type_1_5024", text: "Compiler option '{0}' requires a value of type {1}."} + var Unknown_compiler_option_0_Did_you_mean_1 = &Message{code: 5025, category: CategoryError, key: "Unknown_compiler_option_0_Did_you_mean_1_5025", text: "Unknown compiler option '{0}'. Did you mean '{1}'?"} + var Could_not_write_file_0_Colon_1 = &Message{code: 5033, category: CategoryError, key: "Could_not_write_file_0_Colon_1_5033", text: "Could not write file '{0}': {1}."} + var Option_project_cannot_be_mixed_with_source_files_on_a_command_line = &Message{code: 5042, category: CategoryError, key: "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", text: "Option 'project' cannot be mixed with source files on a command line."} + var Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher = &Message{code: 5047, category: CategoryError, key: "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", text: "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."} + var Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided = &Message{code: 5051, category: CategoryError, key: "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", text: "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."} + var Option_0_cannot_be_specified_without_specifying_option_1 = &Message{code: 5052, category: CategoryError, key: "Option_0_cannot_be_specified_without_specifying_option_1_5052", text: "Option '{0}' cannot be specified without specifying option '{1}'."} + var Option_0_cannot_be_specified_with_option_1 = &Message{code: 5053, category: CategoryError, key: "Option_0_cannot_be_specified_with_option_1_5053", text: "Option '{0}' cannot be specified with option '{1}'."} + var A_tsconfig_json_file_is_already_defined_at_Colon_0 = &Message{code: 5054, category: CategoryError, key: "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", text: "A 'tsconfig.json' file is already defined at: '{0}'."} + var Cannot_write_file_0_because_it_would_overwrite_input_file = &Message{code: 5055, category: CategoryError, key: "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", text: "Cannot write file '{0}' because it would overwrite input file."} + var Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files = &Message{code: 5056, category: CategoryError, key: "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", text: "Cannot write file '{0}' because it would be overwritten by multiple input files."} + var Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0 = &Message{code: 5057, category: CategoryError, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", text: "Cannot find a tsconfig.json file at the specified directory: '{0}'."} + var The_specified_path_does_not_exist_Colon_0 = &Message{code: 5058, category: CategoryError, key: "The_specified_path_does_not_exist_Colon_0_5058", text: "The specified path does not exist: '{0}'."} + var Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier = &Message{code: 5059, category: CategoryError, key: "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", text: "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."} + var Pattern_0_can_have_at_most_one_Asterisk_character = &Message{code: 5061, category: CategoryError, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", text: "Pattern '{0}' can have at most one '*' character."} + var Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character = &Message{code: 5062, category: CategoryError, key: "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062", text: "Substitution '{0}' in pattern '{1}' can have at most one '*' character."} + var Substitutions_for_pattern_0_should_be_an_array = &Message{code: 5063, category: CategoryError, key: "Substitutions_for_pattern_0_should_be_an_array_5063", text: "Substitutions for pattern '{0}' should be an array."} + var Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2 = &Message{code: 5064, category: CategoryError, key: "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", text: "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."} + var File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0 = &Message{code: 5065, category: CategoryError, key: "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", text: "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."} + var Substitutions_for_pattern_0_shouldn_t_be_an_empty_array = &Message{code: 5066, category: CategoryError, key: "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", text: "Substitutions for pattern '{0}' shouldn't be an empty array."} + var Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name = &Message{code: 5067, category: CategoryError, key: "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", text: "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."} + var Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig = &Message{code: 5068, category: CategoryError, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", text: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."} + var Option_0_cannot_be_specified_without_specifying_option_1_or_option_2 = &Message{code: 5069, category: CategoryError, key: "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", text: "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."} + var Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic = &Message{code: 5070, category: CategoryError, key: "Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070", text: "Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."} + var Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd = &Message{code: 5071, category: CategoryError, key: "Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071", text: "Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."} + var Unknown_build_option_0 = &Message{code: 5072, category: CategoryError, key: "Unknown_build_option_0_5072", text: "Unknown build option '{0}'."} + var Build_option_0_requires_a_value_of_type_1 = &Message{code: 5073, category: CategoryError, key: "Build_option_0_requires_a_value_of_type_1_5073", text: "Build option '{0}' requires a value of type {1}."} + var Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified = &Message{code: 5074, category: CategoryError, key: "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", text: "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."} + var X_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2 = &Message{code: 5075, category: CategoryError, key: "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", text: "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."} + var X_0_and_1_operations_cannot_be_mixed_without_parentheses = &Message{code: 5076, category: CategoryError, key: "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", text: "'{0}' and '{1}' operations cannot be mixed without parentheses."} + var Unknown_build_option_0_Did_you_mean_1 = &Message{code: 5077, category: CategoryError, key: "Unknown_build_option_0_Did_you_mean_1_5077", text: "Unknown build option '{0}'. Did you mean '{1}'?"} + var Unknown_watch_option_0 = &Message{code: 5078, category: CategoryError, key: "Unknown_watch_option_0_5078", text: "Unknown watch option '{0}'."} + var Unknown_watch_option_0_Did_you_mean_1 = &Message{code: 5079, category: CategoryError, key: "Unknown_watch_option_0_Did_you_mean_1_5079", text: "Unknown watch option '{0}'. Did you mean '{1}'?"} + var Watch_option_0_requires_a_value_of_type_1 = &Message{code: 5080, category: CategoryError, key: "Watch_option_0_requires_a_value_of_type_1_5080", text: "Watch option '{0}' requires a value of type {1}."} + var Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0 = &Message{code: 5081, category: CategoryError, key: "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", text: "Cannot find a tsconfig.json file at the current directory: {0}."} + var X_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1 = &Message{code: 5082, category: CategoryError, key: "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", text: "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."} + var Cannot_read_file_0 = &Message{code: 5083, category: CategoryError, key: "Cannot_read_file_0_5083", text: "Cannot read file '{0}'."} + var A_tuple_member_cannot_be_both_optional_and_rest = &Message{code: 5085, category: CategoryError, key: "A_tuple_member_cannot_be_both_optional_and_rest_5085", text: "A tuple member cannot be both optional and rest."} + var A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type = &Message{code: 5086, category: CategoryError, key: "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", text: "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."} + var A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type = &Message{code: 5087, category: CategoryError, key: "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", text: "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."} + var The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary = &Message{code: 5088, category: CategoryError, key: "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", text: "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."} + var Option_0_cannot_be_specified_when_option_jsx_is_1 = &Message{code: 5089, category: CategoryError, key: "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", text: "Option '{0}' cannot be specified when option 'jsx' is '{1}'."} + var Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash = &Message{code: 5090, category: CategoryError, key: "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", text: "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"} + var Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled = &Message{code: 5091, category: CategoryError, key: "Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091", text: "Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."} + var The_root_value_of_a_0_file_must_be_an_object = &Message{code: 5092, category: CategoryError, key: "The_root_value_of_a_0_file_must_be_an_object_5092", text: "The root value of a '{0}' file must be an object."} + var Compiler_option_0_may_only_be_used_with_build = &Message{code: 5093, category: CategoryError, key: "Compiler_option_0_may_only_be_used_with_build_5093", text: "Compiler option '--{0}' may only be used with '--build'."} + var Compiler_option_0_may_not_be_used_with_build = &Message{code: 5094, category: CategoryError, key: "Compiler_option_0_may_not_be_used_with_build_5094", text: "Compiler option '--{0}' may not be used with '--build'."} + var Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later = &Message{code: 5095, category: CategoryError, key: "Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095", text: "Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."} + var Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set = &Message{code: 5096, category: CategoryError, key: "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", text: "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."} + var An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled = &Message{code: 5097, category: CategoryError, key: "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", text: "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."} + var Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler = &Message{code: 5098, category: CategoryError, key: "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", text: "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."} + var Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error = &Message{code: 5101, category: CategoryError, key: "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", text: "Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '\"ignoreDeprecations\": \"{2}\"' to silence this error."} + var Option_0_has_been_removed_Please_remove_it_from_your_configuration = &Message{code: 5102, category: CategoryError, key: "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", text: "Option '{0}' has been removed. Please remove it from your configuration."} + var Invalid_value_for_ignoreDeprecations = &Message{code: 5103, category: CategoryError, key: "Invalid_value_for_ignoreDeprecations_5103", text: "Invalid value for '--ignoreDeprecations'."} + var Option_0_is_redundant_and_cannot_be_specified_with_option_1 = &Message{code: 5104, category: CategoryError, key: "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", text: "Option '{0}' is redundant and cannot be specified with option '{1}'."} + var Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System = &Message{code: 5105, category: CategoryError, key: "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", text: "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."} + var Use_0_instead = &Message{code: 5106, category: CategoryMessage, key: "Use_0_instead_5106", text: "Use '{0}' instead."} + var Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error = &Message{code: 5107, category: CategoryError, key: "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", text: "Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '\"ignoreDeprecations\": \"{3}\"' to silence this error."} + var Option_0_1_has_been_removed_Please_remove_it_from_your_configuration = &Message{code: 5108, category: CategoryError, key: "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", text: "Option '{0}={1}' has been removed. Please remove it from your configuration."} + var Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1 = &Message{code: 5109, category: CategoryError, key: "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", text: "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."} + var Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1 = &Message{code: 5110, category: CategoryError, key: "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", text: "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."} + var Generates_a_sourcemap_for_each_corresponding_d_ts_file = &Message{code: 6000, category: CategoryMessage, key: "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", text: "Generates a sourcemap for each corresponding '.d.ts' file."} + var Concatenate_and_emit_output_to_single_file = &Message{code: 6001, category: CategoryMessage, key: "Concatenate_and_emit_output_to_single_file_6001", text: "Concatenate and emit output to single file."} + var Generates_corresponding_d_ts_file = &Message{code: 6002, category: CategoryMessage, key: "Generates_corresponding_d_ts_file_6002", text: "Generates corresponding '.d.ts' file."} + var Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations = &Message{code: 6004, category: CategoryMessage, key: "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", text: "Specify the location where debugger should locate TypeScript files instead of source locations."} + var Watch_input_files = &Message{code: 6005, category: CategoryMessage, key: "Watch_input_files_6005", text: "Watch input files."} + var Redirect_output_structure_to_the_directory = &Message{code: 6006, category: CategoryMessage, key: "Redirect_output_structure_to_the_directory_6006", text: "Redirect output structure to the directory."} + var Do_not_erase_const_enum_declarations_in_generated_code = &Message{code: 6007, category: CategoryMessage, key: "Do_not_erase_const_enum_declarations_in_generated_code_6007", text: "Do not erase const enum declarations in generated code."} + var Do_not_emit_outputs_if_any_errors_were_reported = &Message{code: 6008, category: CategoryMessage, key: "Do_not_emit_outputs_if_any_errors_were_reported_6008", text: "Do not emit outputs if any errors were reported."} + var Do_not_emit_comments_to_output = &Message{code: 6009, category: CategoryMessage, key: "Do_not_emit_comments_to_output_6009", text: "Do not emit comments to output."} + var Do_not_emit_outputs = &Message{code: 6010, category: CategoryMessage, key: "Do_not_emit_outputs_6010", text: "Do not emit outputs."} + var Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking = &Message{code: 6011, category: CategoryMessage, key: "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", text: "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."} + var Skip_type_checking_of_declaration_files = &Message{code: 6012, category: CategoryMessage, key: "Skip_type_checking_of_declaration_files_6012", text: "Skip type checking of declaration files."} + var Do_not_resolve_the_real_path_of_symlinks = &Message{code: 6013, category: CategoryMessage, key: "Do_not_resolve_the_real_path_of_symlinks_6013", text: "Do not resolve the real path of symlinks."} + var Only_emit_d_ts_declaration_files = &Message{code: 6014, category: CategoryMessage, key: "Only_emit_d_ts_declaration_files_6014", text: "Only emit '.d.ts' declaration files."} + var Specify_ECMAScript_target_version = &Message{code: 6015, category: CategoryMessage, key: "Specify_ECMAScript_target_version_6015", text: "Specify ECMAScript target version."} + var Specify_module_code_generation = &Message{code: 6016, category: CategoryMessage, key: "Specify_module_code_generation_6016", text: "Specify module code generation."} + var Print_this_message = &Message{code: 6017, category: CategoryMessage, key: "Print_this_message_6017", text: "Print this message."} + var Print_the_compiler_s_version = &Message{code: 6019, category: CategoryMessage, key: "Print_the_compiler_s_version_6019", text: "Print the compiler's version."} + var Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json = &Message{code: 6020, category: CategoryMessage, key: "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", text: "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."} + var Syntax_Colon_0 = &Message{code: 6023, category: CategoryMessage, key: "Syntax_Colon_0_6023", text: "Syntax: {0}"} + var X_options = &Message{code: 6024, category: CategoryMessage, key: "options_6024", text: "options"} + var X_file = &Message{code: 6025, category: CategoryMessage, key: "file_6025", text: "file"} + var Examples_Colon_0 = &Message{code: 6026, category: CategoryMessage, key: "Examples_Colon_0_6026", text: "Examples: {0}"} + var Options_Colon = &Message{code: 6027, category: CategoryMessage, key: "Options_Colon_6027", text: "Options:"} + var Version_0 = &Message{code: 6029, category: CategoryMessage, key: "Version_0_6029", text: "Version {0}"} + var Insert_command_line_options_and_files_from_a_file = &Message{code: 6030, category: CategoryMessage, key: "Insert_command_line_options_and_files_from_a_file_6030", text: "Insert command line options and files from a file."} + var Starting_compilation_in_watch_mode = &Message{code: 6031, category: CategoryMessage, key: "Starting_compilation_in_watch_mode_6031", text: "Starting compilation in watch mode..."} + var File_change_detected_Starting_incremental_compilation = &Message{code: 6032, category: CategoryMessage, key: "File_change_detected_Starting_incremental_compilation_6032", text: "File change detected. Starting incremental compilation..."} + var KIND = &Message{code: 6034, category: CategoryMessage, key: "KIND_6034", text: "KIND"} + var FILE = &Message{code: 6035, category: CategoryMessage, key: "FILE_6035", text: "FILE"} + var VERSION = &Message{code: 6036, category: CategoryMessage, key: "VERSION_6036", text: "VERSION"} + var LOCATION = &Message{code: 6037, category: CategoryMessage, key: "LOCATION_6037", text: "LOCATION"} + var DIRECTORY = &Message{code: 6038, category: CategoryMessage, key: "DIRECTORY_6038", text: "DIRECTORY"} + var STRATEGY = &Message{code: 6039, category: CategoryMessage, key: "STRATEGY_6039", text: "STRATEGY"} + var FILE_OR_DIRECTORY = &Message{code: 6040, category: CategoryMessage, key: "FILE_OR_DIRECTORY_6040", text: "FILE OR DIRECTORY"} + var Errors_Files = &Message{code: 6041, category: CategoryMessage, key: "Errors_Files_6041", text: "Errors Files"} + var Generates_corresponding_map_file = &Message{code: 6043, category: CategoryMessage, key: "Generates_corresponding_map_file_6043", text: "Generates corresponding '.map' file."} + var Compiler_option_0_expects_an_argument = &Message{code: 6044, category: CategoryError, key: "Compiler_option_0_expects_an_argument_6044", text: "Compiler option '{0}' expects an argument."} + var Unterminated_quoted_string_in_response_file_0 = &Message{code: 6045, category: CategoryError, key: "Unterminated_quoted_string_in_response_file_0_6045", text: "Unterminated quoted string in response file '{0}'."} + var Argument_for_0_option_must_be_Colon_1 = &Message{code: 6046, category: CategoryError, key: "Argument_for_0_option_must_be_Colon_1_6046", text: "Argument for '{0}' option must be: {1}."} + var Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1 = &Message{code: 6048, category: CategoryError, key: "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", text: "Locale must be of the form or -. For example '{0}' or '{1}'."} + var Unable_to_open_file_0 = &Message{code: 6050, category: CategoryError, key: "Unable_to_open_file_0_6050", text: "Unable to open file '{0}'."} + var Corrupted_locale_file_0 = &Message{code: 6051, category: CategoryError, key: "Corrupted_locale_file_0_6051", text: "Corrupted locale file {0}."} + var Raise_error_on_expressions_and_declarations_with_an_implied_any_type = &Message{code: 6052, category: CategoryMessage, key: "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", text: "Raise error on expressions and declarations with an implied 'any' type."} + var File_0_not_found = &Message{code: 6053, category: CategoryError, key: "File_0_not_found_6053", text: "File '{0}' not found."} + var File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1 = &Message{code: 6054, category: CategoryError, key: "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", text: "File '{0}' has an unsupported extension. The only supported extensions are {1}."} + var Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures = &Message{code: 6055, category: CategoryMessage, key: "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", text: "Suppress noImplicitAny errors for indexing objects lacking index signatures."} + var Do_not_emit_declarations_for_code_that_has_an_internal_annotation = &Message{code: 6056, category: CategoryMessage, key: "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", text: "Do not emit declarations for code that has an '@internal' annotation."} + var Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir = &Message{code: 6058, category: CategoryMessage, key: "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", text: "Specify the root directory of input files. Use to control the output directory structure with --outDir."} + var File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files = &Message{code: 6059, category: CategoryError, key: "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", text: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."} + var Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix = &Message{code: 6060, category: CategoryMessage, key: "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", text: "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."} + var NEWLINE = &Message{code: 6061, category: CategoryMessage, key: "NEWLINE_6061", text: "NEWLINE"} + var Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line = &Message{code: 6064, category: CategoryError, key: "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", text: "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."} + var Enables_experimental_support_for_ES7_decorators = &Message{code: 6065, category: CategoryMessage, key: "Enables_experimental_support_for_ES7_decorators_6065", text: "Enables experimental support for ES7 decorators."} + var Enables_experimental_support_for_emitting_type_metadata_for_decorators = &Message{code: 6066, category: CategoryMessage, key: "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", text: "Enables experimental support for emitting type metadata for decorators."} + var Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file = &Message{code: 6070, category: CategoryMessage, key: "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", text: "Initializes a TypeScript project and creates a tsconfig.json file."} + var Successfully_created_a_tsconfig_json_file = &Message{code: 6071, category: CategoryMessage, key: "Successfully_created_a_tsconfig_json_file_6071", text: "Successfully created a tsconfig.json file."} + var Suppress_excess_property_checks_for_object_literals = &Message{code: 6072, category: CategoryMessage, key: "Suppress_excess_property_checks_for_object_literals_6072", text: "Suppress excess property checks for object literals."} + var Stylize_errors_and_messages_using_color_and_context_experimental = &Message{code: 6073, category: CategoryMessage, key: "Stylize_errors_and_messages_using_color_and_context_experimental_6073", text: "Stylize errors and messages using color and context (experimental)."} + var Do_not_report_errors_on_unused_labels = &Message{code: 6074, category: CategoryMessage, key: "Do_not_report_errors_on_unused_labels_6074", text: "Do not report errors on unused labels."} + var Report_error_when_not_all_code_paths_in_function_return_a_value = &Message{code: 6075, category: CategoryMessage, key: "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", text: "Report error when not all code paths in function return a value."} + var Report_errors_for_fallthrough_cases_in_switch_statement = &Message{code: 6076, category: CategoryMessage, key: "Report_errors_for_fallthrough_cases_in_switch_statement_6076", text: "Report errors for fallthrough cases in switch statement."} + var Do_not_report_errors_on_unreachable_code = &Message{code: 6077, category: CategoryMessage, key: "Do_not_report_errors_on_unreachable_code_6077", text: "Do not report errors on unreachable code."} + var Disallow_inconsistently_cased_references_to_the_same_file = &Message{code: 6078, category: CategoryMessage, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", text: "Disallow inconsistently-cased references to the same file."} + var Specify_library_files_to_be_included_in_the_compilation = &Message{code: 6079, category: CategoryMessage, key: "Specify_library_files_to_be_included_in_the_compilation_6079", text: "Specify library files to be included in the compilation."} + var Specify_JSX_code_generation = &Message{code: 6080, category: CategoryMessage, key: "Specify_JSX_code_generation_6080", text: "Specify JSX code generation."} + var Only_amd_and_system_modules_are_supported_alongside_0 = &Message{code: 6082, category: CategoryError, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", text: "Only 'amd' and 'system' modules are supported alongside --{0}."} + var Base_directory_to_resolve_non_absolute_module_names = &Message{code: 6083, category: CategoryMessage, key: "Base_directory_to_resolve_non_absolute_module_names_6083", text: "Base directory to resolve non-absolute module names."} + var Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit = &Message{code: 6084, category: CategoryMessage, key: "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", text: "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"} + var Enable_tracing_of_the_name_resolution_process = &Message{code: 6085, category: CategoryMessage, key: "Enable_tracing_of_the_name_resolution_process_6085", text: "Enable tracing of the name resolution process."} + var Resolving_module_0_from_1 = &Message{code: 6086, category: CategoryMessage, key: "Resolving_module_0_from_1_6086", text: "======== Resolving module '{0}' from '{1}'. ========"} + var Explicitly_specified_module_resolution_kind_Colon_0 = &Message{code: 6087, category: CategoryMessage, key: "Explicitly_specified_module_resolution_kind_Colon_0_6087", text: "Explicitly specified module resolution kind: '{0}'."} + var Module_resolution_kind_is_not_specified_using_0 = &Message{code: 6088, category: CategoryMessage, key: "Module_resolution_kind_is_not_specified_using_0_6088", text: "Module resolution kind is not specified, using '{0}'."} + var Module_name_0_was_successfully_resolved_to_1 = &Message{code: 6089, category: CategoryMessage, key: "Module_name_0_was_successfully_resolved_to_1_6089", text: "======== Module name '{0}' was successfully resolved to '{1}'. ========"} + var Module_name_0_was_not_resolved = &Message{code: 6090, category: CategoryMessage, key: "Module_name_0_was_not_resolved_6090", text: "======== Module name '{0}' was not resolved. ========"} + var X_paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0 = &Message{code: 6091, category: CategoryMessage, key: "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", text: "'paths' option is specified, looking for a pattern to match module name '{0}'."} + var Module_name_0_matched_pattern_1 = &Message{code: 6092, category: CategoryMessage, key: "Module_name_0_matched_pattern_1_6092", text: "Module name '{0}', matched pattern '{1}'."} + var Trying_substitution_0_candidate_module_location_Colon_1 = &Message{code: 6093, category: CategoryMessage, key: "Trying_substitution_0_candidate_module_location_Colon_1_6093", text: "Trying substitution '{0}', candidate module location: '{1}'."} + var Resolving_module_name_0_relative_to_base_url_1_2 = &Message{code: 6094, category: CategoryMessage, key: "Resolving_module_name_0_relative_to_base_url_1_2_6094", text: "Resolving module name '{0}' relative to base url '{1}' - '{2}'."} + var Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1 = &Message{code: 6095, category: CategoryMessage, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095", text: "Loading module as file / folder, candidate module location '{0}', target file types: {1}."} + var File_0_does_not_exist = &Message{code: 6096, category: CategoryMessage, key: "File_0_does_not_exist_6096", text: "File '{0}' does not exist."} + var File_0_exists_use_it_as_a_name_resolution_result = &Message{code: 6097, category: CategoryMessage, key: "File_0_exists_use_it_as_a_name_resolution_result_6097", text: "File '{0}' exists - use it as a name resolution result."} + var Loading_module_0_from_node_modules_folder_target_file_types_Colon_1 = &Message{code: 6098, category: CategoryMessage, key: "Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098", text: "Loading module '{0}' from 'node_modules' folder, target file types: {1}."} + var Found_package_json_at_0 = &Message{code: 6099, category: CategoryMessage, key: "Found_package_json_at_0_6099", text: "Found 'package.json' at '{0}'."} + var X_package_json_does_not_have_a_0_field = &Message{code: 6100, category: CategoryMessage, key: "package_json_does_not_have_a_0_field_6100", text: "'package.json' does not have a '{0}' field."} + var X_package_json_has_0_field_1_that_references_2 = &Message{code: 6101, category: CategoryMessage, key: "package_json_has_0_field_1_that_references_2_6101", text: "'package.json' has '{0}' field '{1}' that references '{2}'."} + var Allow_javascript_files_to_be_compiled = &Message{code: 6102, category: CategoryMessage, key: "Allow_javascript_files_to_be_compiled_6102", text: "Allow javascript files to be compiled."} + var Checking_if_0_is_the_longest_matching_prefix_for_1_2 = &Message{code: 6104, category: CategoryMessage, key: "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", text: "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."} + var Expected_type_of_0_field_in_package_json_to_be_1_got_2 = &Message{code: 6105, category: CategoryMessage, key: "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105", text: "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."} + var X_baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1 = &Message{code: 6106, category: CategoryMessage, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", text: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."} + var X_rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0 = &Message{code: 6107, category: CategoryMessage, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", text: "'rootDirs' option is set, using it to resolve relative module name '{0}'."} + var Longest_matching_prefix_for_0_is_1 = &Message{code: 6108, category: CategoryMessage, key: "Longest_matching_prefix_for_0_is_1_6108", text: "Longest matching prefix for '{0}' is '{1}'."} + var Loading_0_from_the_root_dir_1_candidate_location_2 = &Message{code: 6109, category: CategoryMessage, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", text: "Loading '{0}' from the root dir '{1}', candidate location '{2}'."} + var Trying_other_entries_in_rootDirs = &Message{code: 6110, category: CategoryMessage, key: "Trying_other_entries_in_rootDirs_6110", text: "Trying other entries in 'rootDirs'."} + var Module_resolution_using_rootDirs_has_failed = &Message{code: 6111, category: CategoryMessage, key: "Module_resolution_using_rootDirs_has_failed_6111", text: "Module resolution using 'rootDirs' has failed."} + var Do_not_emit_use_strict_directives_in_module_output = &Message{code: 6112, category: CategoryMessage, key: "Do_not_emit_use_strict_directives_in_module_output_6112", text: "Do not emit 'use strict' directives in module output."} + var Enable_strict_null_checks = &Message{code: 6113, category: CategoryMessage, key: "Enable_strict_null_checks_6113", text: "Enable strict null checks."} + var Unknown_option_excludes_Did_you_mean_exclude = &Message{code: 6114, category: CategoryError, key: "Unknown_option_excludes_Did_you_mean_exclude_6114", text: "Unknown option 'excludes'. Did you mean 'exclude'?"} + var Raise_error_on_this_expressions_with_an_implied_any_type = &Message{code: 6115, category: CategoryMessage, key: "Raise_error_on_this_expressions_with_an_implied_any_type_6115", text: "Raise error on 'this' expressions with an implied 'any' type."} + var Resolving_type_reference_directive_0_containing_file_1_root_directory_2 = &Message{code: 6116, category: CategoryMessage, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", text: "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"} + var Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2 = &Message{code: 6119, category: CategoryMessage, key: "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", text: "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"} + var Type_reference_directive_0_was_not_resolved = &Message{code: 6120, category: CategoryMessage, key: "Type_reference_directive_0_was_not_resolved_6120", text: "======== Type reference directive '{0}' was not resolved. ========"} + var Resolving_with_primary_search_path_0 = &Message{code: 6121, category: CategoryMessage, key: "Resolving_with_primary_search_path_0_6121", text: "Resolving with primary search path '{0}'."} + var Root_directory_cannot_be_determined_skipping_primary_search_paths = &Message{code: 6122, category: CategoryMessage, key: "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", text: "Root directory cannot be determined, skipping primary search paths."} + var Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set = &Message{code: 6123, category: CategoryMessage, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", text: "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"} + var Type_declaration_files_to_be_included_in_compilation = &Message{code: 6124, category: CategoryMessage, key: "Type_declaration_files_to_be_included_in_compilation_6124", text: "Type declaration files to be included in compilation."} + var Looking_up_in_node_modules_folder_initial_location_0 = &Message{code: 6125, category: CategoryMessage, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", text: "Looking up in 'node_modules' folder, initial location '{0}'."} + var Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder = &Message{code: 6126, category: CategoryMessage, key: "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", text: "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."} + var Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1 = &Message{code: 6127, category: CategoryMessage, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", text: "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"} + var Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set = &Message{code: 6128, category: CategoryMessage, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", text: "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"} + var Resolving_real_path_for_0_result_1 = &Message{code: 6130, category: CategoryMessage, key: "Resolving_real_path_for_0_result_1_6130", text: "Resolving real path for '{0}', result '{1}'."} + var Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system = &Message{code: 6131, category: CategoryError, key: "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", text: "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."} + var File_name_0_has_a_1_extension_stripping_it = &Message{code: 6132, category: CategoryMessage, key: "File_name_0_has_a_1_extension_stripping_it_6132", text: "File name '{0}' has a '{1}' extension - stripping it."} + var X_0_is_declared_but_its_value_is_never_read = &Message{code: 6133, category: CategoryError, key: "_0_is_declared_but_its_value_is_never_read_6133", text: "'{0}' is declared but its value is never read.", reportsUnnecessary: true} + var Report_errors_on_unused_locals = &Message{code: 6134, category: CategoryMessage, key: "Report_errors_on_unused_locals_6134", text: "Report errors on unused locals."} + var Report_errors_on_unused_parameters = &Message{code: 6135, category: CategoryMessage, key: "Report_errors_on_unused_parameters_6135", text: "Report errors on unused parameters."} + var The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files = &Message{code: 6136, category: CategoryMessage, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", text: "The maximum dependency depth to search under node_modules and load JavaScript files."} + var Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1 = &Message{code: 6137, category: CategoryError, key: "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", text: "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."} + var Property_0_is_declared_but_its_value_is_never_read = &Message{code: 6138, category: CategoryError, key: "Property_0_is_declared_but_its_value_is_never_read_6138", text: "Property '{0}' is declared but its value is never read.", reportsUnnecessary: true} + var Import_emit_helpers_from_tslib = &Message{code: 6139, category: CategoryMessage, key: "Import_emit_helpers_from_tslib_6139", text: "Import emit helpers from 'tslib'."} + var Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2 = &Message{code: 6140, category: CategoryError, key: "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", text: "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."} + var Parse_in_strict_mode_and_emit_use_strict_for_each_source_file = &Message{code: 6141, category: CategoryMessage, key: "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", text: "Parse in strict mode and emit \"use strict\" for each source file."} + var Module_0_was_resolved_to_1_but_jsx_is_not_set = &Message{code: 6142, category: CategoryError, key: "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", text: "Module '{0}' was resolved to '{1}', but '--jsx' is not set."} + var Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1 = &Message{code: 6144, category: CategoryMessage, key: "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", text: "Module '{0}' was resolved as locally declared ambient module in file '{1}'."} + var Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h = &Message{code: 6146, category: CategoryMessage, key: "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", text: "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."} + var Resolution_for_module_0_was_found_in_cache_from_location_1 = &Message{code: 6147, category: CategoryMessage, key: "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", text: "Resolution for module '{0}' was found in cache from location '{1}'."} + var Directory_0_does_not_exist_skipping_all_lookups_in_it = &Message{code: 6148, category: CategoryMessage, key: "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", text: "Directory '{0}' does not exist, skipping all lookups in it."} + var Show_diagnostic_information = &Message{code: 6149, category: CategoryMessage, key: "Show_diagnostic_information_6149", text: "Show diagnostic information."} + var Show_verbose_diagnostic_information = &Message{code: 6150, category: CategoryMessage, key: "Show_verbose_diagnostic_information_6150", text: "Show verbose diagnostic information."} + var Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file = &Message{code: 6151, category: CategoryMessage, key: "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", text: "Emit a single file with source maps instead of having a separate file."} + var Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set = &Message{code: 6152, category: CategoryMessage, key: "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", text: "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."} + var Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule = &Message{code: 6153, category: CategoryMessage, key: "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", text: "Transpile each file as a separate module (similar to 'ts.transpileModule')."} + var Print_names_of_generated_files_part_of_the_compilation = &Message{code: 6154, category: CategoryMessage, key: "Print_names_of_generated_files_part_of_the_compilation_6154", text: "Print names of generated files part of the compilation."} + var Print_names_of_files_part_of_the_compilation = &Message{code: 6155, category: CategoryMessage, key: "Print_names_of_files_part_of_the_compilation_6155", text: "Print names of files part of the compilation."} + var The_locale_used_when_displaying_messages_to_the_user_e_g_en_us = &Message{code: 6156, category: CategoryMessage, key: "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", text: "The locale used when displaying messages to the user (e.g. 'en-us')"} + var Do_not_generate_custom_helper_functions_like_extends_in_compiled_output = &Message{code: 6157, category: CategoryMessage, key: "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", text: "Do not generate custom helper functions like '__extends' in compiled output."} + var Do_not_include_the_default_library_file_lib_d_ts = &Message{code: 6158, category: CategoryMessage, key: "Do_not_include_the_default_library_file_lib_d_ts_6158", text: "Do not include the default library file (lib.d.ts)."} + var Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files = &Message{code: 6159, category: CategoryMessage, key: "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", text: "Do not add triple-slash references or imported modules to the list of compiled files."} + var Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files = &Message{code: 6160, category: CategoryMessage, key: "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", text: "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."} + var List_of_folders_to_include_type_definitions_from = &Message{code: 6161, category: CategoryMessage, key: "List_of_folders_to_include_type_definitions_from_6161", text: "List of folders to include type definitions from."} + var Disable_size_limitations_on_JavaScript_projects = &Message{code: 6162, category: CategoryMessage, key: "Disable_size_limitations_on_JavaScript_projects_6162", text: "Disable size limitations on JavaScript projects."} + var The_character_set_of_the_input_files = &Message{code: 6163, category: CategoryMessage, key: "The_character_set_of_the_input_files_6163", text: "The character set of the input files."} + var Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1 = &Message{code: 6164, category: CategoryMessage, key: "Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164", text: "Skipping module '{0}' that looks like an absolute URI, target file types: {1}."} + var Do_not_truncate_error_messages = &Message{code: 6165, category: CategoryMessage, key: "Do_not_truncate_error_messages_6165", text: "Do not truncate error messages."} + var Output_directory_for_generated_declaration_files = &Message{code: 6166, category: CategoryMessage, key: "Output_directory_for_generated_declaration_files_6166", text: "Output directory for generated declaration files."} + var A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl = &Message{code: 6167, category: CategoryMessage, key: "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", text: "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."} + var List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime = &Message{code: 6168, category: CategoryMessage, key: "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", text: "List of root folders whose combined content represents the structure of the project at runtime."} + var Show_all_compiler_options = &Message{code: 6169, category: CategoryMessage, key: "Show_all_compiler_options_6169", text: "Show all compiler options."} + var Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file = &Message{code: 6170, category: CategoryMessage, key: "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", text: "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"} + var Command_line_Options = &Message{code: 6171, category: CategoryMessage, key: "Command_line_Options_6171", text: "Command-line Options"} + var Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5 = &Message{code: 6179, category: CategoryMessage, key: "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179", text: "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'."} + var Enable_all_strict_type_checking_options = &Message{code: 6180, category: CategoryMessage, key: "Enable_all_strict_type_checking_options_6180", text: "Enable all strict type-checking options."} + var Scoped_package_detected_looking_in_0 = &Message{code: 6182, category: CategoryMessage, key: "Scoped_package_detected_looking_in_0_6182", text: "Scoped package detected, looking in '{0}'"} + var Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 = &Message{code: 6183, category: CategoryMessage, key: "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", text: "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."} + var Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 = &Message{code: 6184, category: CategoryMessage, key: "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", text: "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."} + var Enable_strict_checking_of_function_types = &Message{code: 6186, category: CategoryMessage, key: "Enable_strict_checking_of_function_types_6186", text: "Enable strict checking of function types."} + var Enable_strict_checking_of_property_initialization_in_classes = &Message{code: 6187, category: CategoryMessage, key: "Enable_strict_checking_of_property_initialization_in_classes_6187", text: "Enable strict checking of property initialization in classes."} + var Numeric_separators_are_not_allowed_here = &Message{code: 6188, category: CategoryError, key: "Numeric_separators_are_not_allowed_here_6188", text: "Numeric separators are not allowed here."} + var Multiple_consecutive_numeric_separators_are_not_permitted = &Message{code: 6189, category: CategoryError, key: "Multiple_consecutive_numeric_separators_are_not_permitted_6189", text: "Multiple consecutive numeric separators are not permitted."} + var Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen = &Message{code: 6191, category: CategoryMessage, key: "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191", text: "Whether to keep outdated console output in watch mode instead of clearing the screen."} + var All_imports_in_import_declaration_are_unused = &Message{code: 6192, category: CategoryError, key: "All_imports_in_import_declaration_are_unused_6192", text: "All imports in import declaration are unused.", reportsUnnecessary: true} + var Found_1_error_Watching_for_file_changes = &Message{code: 6193, category: CategoryMessage, key: "Found_1_error_Watching_for_file_changes_6193", text: "Found 1 error. Watching for file changes."} + var Found_0_errors_Watching_for_file_changes = &Message{code: 6194, category: CategoryMessage, key: "Found_0_errors_Watching_for_file_changes_6194", text: "Found {0} errors. Watching for file changes."} + var Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols = &Message{code: 6195, category: CategoryMessage, key: "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195", text: "Resolve 'keyof' to string valued property names only (no numbers or symbols)."} + var X_0_is_declared_but_never_used = &Message{code: 6196, category: CategoryError, key: "_0_is_declared_but_never_used_6196", text: "'{0}' is declared but never used.", reportsUnnecessary: true} + var Include_modules_imported_with_json_extension = &Message{code: 6197, category: CategoryMessage, key: "Include_modules_imported_with_json_extension_6197", text: "Include modules imported with '.json' extension"} + var All_destructured_elements_are_unused = &Message{code: 6198, category: CategoryError, key: "All_destructured_elements_are_unused_6198", text: "All destructured elements are unused.", reportsUnnecessary: true} + var All_variables_are_unused = &Message{code: 6199, category: CategoryError, key: "All_variables_are_unused_6199", text: "All variables are unused.", reportsUnnecessary: true} + var Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0 = &Message{code: 6200, category: CategoryError, key: "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", text: "Definitions of the following identifiers conflict with those in another file: {0}"} + var Conflicts_are_in_this_file = &Message{code: 6201, category: CategoryMessage, key: "Conflicts_are_in_this_file_6201", text: "Conflicts are in this file."} + var Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0 = &Message{code: 6202, category: CategoryError, key: "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", text: "Project references may not form a circular graph. Cycle detected: {0}"} + var X_0_was_also_declared_here = &Message{code: 6203, category: CategoryMessage, key: "_0_was_also_declared_here_6203", text: "'{0}' was also declared here."} + var X_and_here = &Message{code: 6204, category: CategoryMessage, key: "and_here_6204", text: "and here."} + var All_type_parameters_are_unused = &Message{code: 6205, category: CategoryError, key: "All_type_parameters_are_unused_6205", text: "All type parameters are unused."} + var X_package_json_has_a_typesVersions_field_with_version_specific_path_mappings = &Message{code: 6206, category: CategoryMessage, key: "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", text: "'package.json' has a 'typesVersions' field with version-specific path mappings."} + var X_package_json_does_not_have_a_typesVersions_entry_that_matches_version_0 = &Message{code: 6207, category: CategoryMessage, key: "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", text: "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."} + var X_package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2 = &Message{code: 6208, category: CategoryMessage, key: "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208", text: "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."} + var X_package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range = &Message{code: 6209, category: CategoryMessage, key: "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209", text: "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."} + var An_argument_for_0_was_not_provided = &Message{code: 6210, category: CategoryMessage, key: "An_argument_for_0_was_not_provided_6210", text: "An argument for '{0}' was not provided."} + var An_argument_matching_this_binding_pattern_was_not_provided = &Message{code: 6211, category: CategoryMessage, key: "An_argument_matching_this_binding_pattern_was_not_provided_6211", text: "An argument matching this binding pattern was not provided."} + var Did_you_mean_to_call_this_expression = &Message{code: 6212, category: CategoryMessage, key: "Did_you_mean_to_call_this_expression_6212", text: "Did you mean to call this expression?"} + var Did_you_mean_to_use_new_with_this_expression = &Message{code: 6213, category: CategoryMessage, key: "Did_you_mean_to_use_new_with_this_expression_6213", text: "Did you mean to use 'new' with this expression?"} + var Enable_strict_bind_call_and_apply_methods_on_functions = &Message{code: 6214, category: CategoryMessage, key: "Enable_strict_bind_call_and_apply_methods_on_functions_6214", text: "Enable strict 'bind', 'call', and 'apply' methods on functions."} + var Using_compiler_options_of_project_reference_redirect_0 = &Message{code: 6215, category: CategoryMessage, key: "Using_compiler_options_of_project_reference_redirect_0_6215", text: "Using compiler options of project reference redirect '{0}'."} + var Found_1_error = &Message{code: 6216, category: CategoryMessage, key: "Found_1_error_6216", text: "Found 1 error."} + var Found_0_errors = &Message{code: 6217, category: CategoryMessage, key: "Found_0_errors_6217", text: "Found {0} errors."} + var Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2 = &Message{code: 6218, category: CategoryMessage, key: "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218", text: "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"} + var Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3 = &Message{code: 6219, category: CategoryMessage, key: "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219", text: "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"} + var X_package_json_had_a_falsy_0_field = &Message{code: 6220, category: CategoryMessage, key: "package_json_had_a_falsy_0_field_6220", text: "'package.json' had a falsy '{0}' field."} + var Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects = &Message{code: 6221, category: CategoryMessage, key: "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221", text: "Disable use of source files instead of declaration files from referenced projects."} + var Emit_class_fields_with_Define_instead_of_Set = &Message{code: 6222, category: CategoryMessage, key: "Emit_class_fields_with_Define_instead_of_Set_6222", text: "Emit class fields with Define instead of Set."} + var Generates_a_CPU_profile = &Message{code: 6223, category: CategoryMessage, key: "Generates_a_CPU_profile_6223", text: "Generates a CPU profile."} + var Disable_solution_searching_for_this_project = &Message{code: 6224, category: CategoryMessage, key: "Disable_solution_searching_for_this_project_6224", text: "Disable solution searching for this project."} + var Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory = &Message{code: 6225, category: CategoryMessage, key: "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", text: "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."} + var Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling = &Message{code: 6226, category: CategoryMessage, key: "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", text: "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."} + var Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize = &Message{code: 6227, category: CategoryMessage, key: "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", text: "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."} + var Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3 = &Message{code: 6229, category: CategoryError, key: "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", text: "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."} + var Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line = &Message{code: 6230, category: CategoryError, key: "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", text: "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."} + var Could_not_resolve_the_path_0_with_the_extensions_Colon_1 = &Message{code: 6231, category: CategoryError, key: "Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231", text: "Could not resolve the path '{0}' with the extensions: {1}."} + var Declaration_augments_declaration_in_another_file_This_cannot_be_serialized = &Message{code: 6232, category: CategoryError, key: "Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232", text: "Declaration augments declaration in another file. This cannot be serialized."} + var This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file = &Message{code: 6233, category: CategoryError, key: "This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233", text: "This is the declaration being augmented. Consider moving the augmenting declaration into the same file."} + var This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without = &Message{code: 6234, category: CategoryError, key: "This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234", text: "This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"} + var Disable_loading_referenced_projects = &Message{code: 6235, category: CategoryMessage, key: "Disable_loading_referenced_projects_6235", text: "Disable loading referenced projects."} + var Arguments_for_the_rest_parameter_0_were_not_provided = &Message{code: 6236, category: CategoryError, key: "Arguments_for_the_rest_parameter_0_were_not_provided_6236", text: "Arguments for the rest parameter '{0}' were not provided."} + var Generates_an_event_trace_and_a_list_of_types = &Message{code: 6237, category: CategoryMessage, key: "Generates_an_event_trace_and_a_list_of_types_6237", text: "Generates an event trace and a list of types."} + var Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react = &Message{code: 6238, category: CategoryError, key: "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", text: "Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"} + var File_0_exists_according_to_earlier_cached_lookups = &Message{code: 6239, category: CategoryMessage, key: "File_0_exists_according_to_earlier_cached_lookups_6239", text: "File '{0}' exists according to earlier cached lookups."} + var File_0_does_not_exist_according_to_earlier_cached_lookups = &Message{code: 6240, category: CategoryMessage, key: "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", text: "File '{0}' does not exist according to earlier cached lookups."} + var Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1 = &Message{code: 6241, category: CategoryMessage, key: "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", text: "Resolution for type reference directive '{0}' was found in cache from location '{1}'."} + var Resolving_type_reference_directive_0_containing_file_1 = &Message{code: 6242, category: CategoryMessage, key: "Resolving_type_reference_directive_0_containing_file_1_6242", text: "======== Resolving type reference directive '{0}', containing file '{1}'. ========"} + var Interpret_optional_property_types_as_written_rather_than_adding_undefined = &Message{code: 6243, category: CategoryMessage, key: "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", text: "Interpret optional property types as written, rather than adding 'undefined'."} + var Modules = &Message{code: 6244, category: CategoryMessage, key: "Modules_6244", text: "Modules"} + var File_Management = &Message{code: 6245, category: CategoryMessage, key: "File_Management_6245", text: "File Management"} + var Emit = &Message{code: 6246, category: CategoryMessage, key: "Emit_6246", text: "Emit"} + var JavaScript_Support = &Message{code: 6247, category: CategoryMessage, key: "JavaScript_Support_6247", text: "JavaScript Support"} + var Type_Checking = &Message{code: 6248, category: CategoryMessage, key: "Type_Checking_6248", text: "Type Checking"} + var Editor_Support = &Message{code: 6249, category: CategoryMessage, key: "Editor_Support_6249", text: "Editor Support"} + var Watch_and_Build_Modes = &Message{code: 6250, category: CategoryMessage, key: "Watch_and_Build_Modes_6250", text: "Watch and Build Modes"} + var Compiler_Diagnostics = &Message{code: 6251, category: CategoryMessage, key: "Compiler_Diagnostics_6251", text: "Compiler Diagnostics"} + var Interop_Constraints = &Message{code: 6252, category: CategoryMessage, key: "Interop_Constraints_6252", text: "Interop Constraints"} + var Backwards_Compatibility = &Message{code: 6253, category: CategoryMessage, key: "Backwards_Compatibility_6253", text: "Backwards Compatibility"} + var Language_and_Environment = &Message{code: 6254, category: CategoryMessage, key: "Language_and_Environment_6254", text: "Language and Environment"} + var Projects = &Message{code: 6255, category: CategoryMessage, key: "Projects_6255", text: "Projects"} + var Output_Formatting = &Message{code: 6256, category: CategoryMessage, key: "Output_Formatting_6256", text: "Output Formatting"} + var Completeness = &Message{code: 6257, category: CategoryMessage, key: "Completeness_6257", text: "Completeness"} + var X_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file = &Message{code: 6258, category: CategoryError, key: "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", text: "'{0}' should be set inside the 'compilerOptions' object of the config json file"} + var Found_1_error_in_0 = &Message{code: 6259, category: CategoryMessage, key: "Found_1_error_in_0_6259", text: "Found 1 error in {0}"} + var Found_0_errors_in_the_same_file_starting_at_Colon_1 = &Message{code: 6260, category: CategoryMessage, key: "Found_0_errors_in_the_same_file_starting_at_Colon_1_6260", text: "Found {0} errors in the same file, starting at: {1}"} + var Found_0_errors_in_1_files = &Message{code: 6261, category: CategoryMessage, key: "Found_0_errors_in_1_files_6261", text: "Found {0} errors in {1} files."} + var File_name_0_has_a_1_extension_looking_up_2_instead = &Message{code: 6262, category: CategoryMessage, key: "File_name_0_has_a_1_extension_looking_up_2_instead_6262", text: "File name '{0}' has a '{1}' extension - looking up '{2}' instead."} + var Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set = &Message{code: 6263, category: CategoryError, key: "Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263", text: "Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."} + var Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present = &Message{code: 6264, category: CategoryMessage, key: "Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264", text: "Enable importing files with any extension, provided a declaration file is present."} + var Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder = &Message{code: 6265, category: CategoryMessage, key: "Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265", text: "Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."} + var Option_0_can_only_be_specified_on_command_line = &Message{code: 6266, category: CategoryError, key: "Option_0_can_only_be_specified_on_command_line_6266", text: "Option '{0}' can only be specified on command line."} + var Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve = &Message{code: 6270, category: CategoryMessage, key: "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", text: "Directory '{0}' has no containing package.json scope. Imports will not resolve."} + var Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1 = &Message{code: 6271, category: CategoryMessage, key: "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", text: "Import specifier '{0}' does not exist in package.json scope at path '{1}'."} + var Invalid_import_specifier_0_has_no_possible_resolutions = &Message{code: 6272, category: CategoryMessage, key: "Invalid_import_specifier_0_has_no_possible_resolutions_6272", text: "Invalid import specifier '{0}' has no possible resolutions."} + var X_package_json_scope_0_has_no_imports_defined = &Message{code: 6273, category: CategoryMessage, key: "package_json_scope_0_has_no_imports_defined_6273", text: "package.json scope '{0}' has no imports defined."} + var X_package_json_scope_0_explicitly_maps_specifier_1_to_null = &Message{code: 6274, category: CategoryMessage, key: "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", text: "package.json scope '{0}' explicitly maps specifier '{1}' to null."} + var X_package_json_scope_0_has_invalid_type_for_target_of_specifier_1 = &Message{code: 6275, category: CategoryMessage, key: "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", text: "package.json scope '{0}' has invalid type for target of specifier '{1}'"} + var Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1 = &Message{code: 6276, category: CategoryMessage, key: "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", text: "Export specifier '{0}' does not exist in package.json scope at path '{1}'."} + var Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update = &Message{code: 6277, category: CategoryMessage, key: "Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277", text: "Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."} + var There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings = &Message{code: 6278, category: CategoryMessage, key: "There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278", text: "There are types at '{0}', but this result could not be resolved when respecting package.json \"exports\". The '{1}' library may need to update its package.json or typings."} + var Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update = &Message{code: 6279, category: CategoryMessage, key: "Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279", text: "Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."} + var There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler = &Message{code: 6280, category: CategoryMessage, key: "There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280", text: "There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."} + var X_package_json_has_a_peerDependencies_field = &Message{code: 6281, category: CategoryMessage, key: "package_json_has_a_peerDependencies_field_6281", text: "'package.json' has a 'peerDependencies' field."} + var Found_peerDependency_0_with_1_version = &Message{code: 6282, category: CategoryMessage, key: "Found_peerDependency_0_with_1_version_6282", text: "Found peerDependency '{0}' with '{1}' version."} + var Failed_to_find_peerDependency_0 = &Message{code: 6283, category: CategoryMessage, key: "Failed_to_find_peerDependency_0_6283", text: "Failed to find peerDependency '{0}'."} + var Enable_project_compilation = &Message{code: 6302, category: CategoryMessage, key: "Enable_project_compilation_6302", text: "Enable project compilation"} + var Composite_projects_may_not_disable_declaration_emit = &Message{code: 6304, category: CategoryError, key: "Composite_projects_may_not_disable_declaration_emit_6304", text: "Composite projects may not disable declaration emit."} + var Output_file_0_has_not_been_built_from_source_file_1 = &Message{code: 6305, category: CategoryError, key: "Output_file_0_has_not_been_built_from_source_file_1_6305", text: "Output file '{0}' has not been built from source file '{1}'."} + var Referenced_project_0_must_have_setting_composite_Colon_true = &Message{code: 6306, category: CategoryError, key: "Referenced_project_0_must_have_setting_composite_Colon_true_6306", text: "Referenced project '{0}' must have setting \"composite\": true."} + var File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern = &Message{code: 6307, category: CategoryError, key: "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307", text: "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."} + var Referenced_project_0_may_not_disable_emit = &Message{code: 6310, category: CategoryError, key: "Referenced_project_0_may_not_disable_emit_6310", text: "Referenced project '{0}' may not disable emit."} + var Project_0_is_out_of_date_because_output_1_is_older_than_input_2 = &Message{code: 6350, category: CategoryMessage, key: "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350", text: "Project '{0}' is out of date because output '{1}' is older than input '{2}'"} + var Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2 = &Message{code: 6351, category: CategoryMessage, key: "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351", text: "Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"} + var Project_0_is_out_of_date_because_output_file_1_does_not_exist = &Message{code: 6352, category: CategoryMessage, key: "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", text: "Project '{0}' is out of date because output file '{1}' does not exist"} + var Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date = &Message{code: 6353, category: CategoryMessage, key: "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", text: "Project '{0}' is out of date because its dependency '{1}' is out of date"} + var Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies = &Message{code: 6354, category: CategoryMessage, key: "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", text: "Project '{0}' is up to date with .d.ts files from its dependencies"} + var Projects_in_this_build_Colon_0 = &Message{code: 6355, category: CategoryMessage, key: "Projects_in_this_build_Colon_0_6355", text: "Projects in this build: {0}"} + var A_non_dry_build_would_delete_the_following_files_Colon_0 = &Message{code: 6356, category: CategoryMessage, key: "A_non_dry_build_would_delete_the_following_files_Colon_0_6356", text: "A non-dry build would delete the following files: {0}"} + var A_non_dry_build_would_build_project_0 = &Message{code: 6357, category: CategoryMessage, key: "A_non_dry_build_would_build_project_0_6357", text: "A non-dry build would build project '{0}'"} + var Building_project_0 = &Message{code: 6358, category: CategoryMessage, key: "Building_project_0_6358", text: "Building project '{0}'..."} + var Updating_output_timestamps_of_project_0 = &Message{code: 6359, category: CategoryMessage, key: "Updating_output_timestamps_of_project_0_6359", text: "Updating output timestamps of project '{0}'..."} + var Project_0_is_up_to_date = &Message{code: 6361, category: CategoryMessage, key: "Project_0_is_up_to_date_6361", text: "Project '{0}' is up to date"} + var Skipping_build_of_project_0_because_its_dependency_1_has_errors = &Message{code: 6362, category: CategoryMessage, key: "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", text: "Skipping build of project '{0}' because its dependency '{1}' has errors"} + var Project_0_can_t_be_built_because_its_dependency_1_has_errors = &Message{code: 6363, category: CategoryMessage, key: "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", text: "Project '{0}' can't be built because its dependency '{1}' has errors"} + var Build_one_or_more_projects_and_their_dependencies_if_out_of_date = &Message{code: 6364, category: CategoryMessage, key: "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", text: "Build one or more projects and their dependencies, if out of date"} + var Delete_the_outputs_of_all_projects = &Message{code: 6365, category: CategoryMessage, key: "Delete_the_outputs_of_all_projects_6365", text: "Delete the outputs of all projects."} + var Show_what_would_be_built_or_deleted_if_specified_with_clean = &Message{code: 6367, category: CategoryMessage, key: "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", text: "Show what would be built (or deleted, if specified with '--clean')"} + var Option_build_must_be_the_first_command_line_argument = &Message{code: 6369, category: CategoryError, key: "Option_build_must_be_the_first_command_line_argument_6369", text: "Option '--build' must be the first command line argument."} + var Options_0_and_1_cannot_be_combined = &Message{code: 6370, category: CategoryError, key: "Options_0_and_1_cannot_be_combined_6370", text: "Options '{0}' and '{1}' cannot be combined."} + var Updating_unchanged_output_timestamps_of_project_0 = &Message{code: 6371, category: CategoryMessage, key: "Updating_unchanged_output_timestamps_of_project_0_6371", text: "Updating unchanged output timestamps of project '{0}'..."} + var A_non_dry_build_would_update_timestamps_for_output_of_project_0 = &Message{code: 6374, category: CategoryMessage, key: "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374", text: "A non-dry build would update timestamps for output of project '{0}'"} + var Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1 = &Message{code: 6377, category: CategoryError, key: "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377", text: "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"} + var Composite_projects_may_not_disable_incremental_compilation = &Message{code: 6379, category: CategoryError, key: "Composite_projects_may_not_disable_incremental_compilation_6379", text: "Composite projects may not disable incremental compilation."} + var Specify_file_to_store_incremental_compilation_information = &Message{code: 6380, category: CategoryMessage, key: "Specify_file_to_store_incremental_compilation_information_6380", text: "Specify file to store incremental compilation information"} + var Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2 = &Message{code: 6381, category: CategoryMessage, key: "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", text: "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"} + var Skipping_build_of_project_0_because_its_dependency_1_was_not_built = &Message{code: 6382, category: CategoryMessage, key: "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", text: "Skipping build of project '{0}' because its dependency '{1}' was not built"} + var Project_0_can_t_be_built_because_its_dependency_1_was_not_built = &Message{code: 6383, category: CategoryMessage, key: "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", text: "Project '{0}' can't be built because its dependency '{1}' was not built"} + var Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it = &Message{code: 6384, category: CategoryMessage, key: "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", text: "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."} + var X_0_is_deprecated = &Message{code: 6385, category: CategorySuggestion, key: "_0_is_deprecated_6385", text: "'{0}' is deprecated.", reportsDeprecated: true} + var Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found = &Message{code: 6386, category: CategoryMessage, key: "Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386", text: "Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."} + var The_signature_0_of_1_is_deprecated = &Message{code: 6387, category: CategorySuggestion, key: "The_signature_0_of_1_is_deprecated_6387", text: "The signature '{0}' of '{1}' is deprecated.", reportsDeprecated: true} + var Project_0_is_being_forcibly_rebuilt = &Message{code: 6388, category: CategoryMessage, key: "Project_0_is_being_forcibly_rebuilt_6388", text: "Project '{0}' is being forcibly rebuilt"} + var Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved = &Message{code: 6389, category: CategoryMessage, key: "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", text: "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."} + var Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2 = &Message{code: 6390, category: CategoryMessage, key: "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", text: "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."} + var Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 = &Message{code: 6391, category: CategoryMessage, key: "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", text: "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."} + var Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved = &Message{code: 6392, category: CategoryMessage, key: "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", text: "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."} + var Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3 = &Message{code: 6393, category: CategoryMessage, key: "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", text: "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."} + var Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4 = &Message{code: 6394, category: CategoryMessage, key: "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", text: "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."} + var Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved = &Message{code: 6395, category: CategoryMessage, key: "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", text: "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."} + var Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3 = &Message{code: 6396, category: CategoryMessage, key: "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", text: "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."} + var Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4 = &Message{code: 6397, category: CategoryMessage, key: "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", text: "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."} + var Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved = &Message{code: 6398, category: CategoryMessage, key: "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", text: "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."} + var Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted = &Message{code: 6399, category: CategoryMessage, key: "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399", text: "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"} + var Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files = &Message{code: 6400, category: CategoryMessage, key: "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400", text: "Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"} + var Project_0_is_out_of_date_because_there_was_error_reading_file_1 = &Message{code: 6401, category: CategoryMessage, key: "Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401", text: "Project '{0}' is out of date because there was error reading file '{1}'"} + var Resolving_in_0_mode_with_conditions_1 = &Message{code: 6402, category: CategoryMessage, key: "Resolving_in_0_mode_with_conditions_1_6402", text: "Resolving in {0} mode with conditions {1}."} + var Matched_0_condition_1 = &Message{code: 6403, category: CategoryMessage, key: "Matched_0_condition_1_6403", text: "Matched '{0}' condition '{1}'."} + var Using_0_subpath_1_with_target_2 = &Message{code: 6404, category: CategoryMessage, key: "Using_0_subpath_1_with_target_2_6404", text: "Using '{0}' subpath '{1}' with target '{2}'."} + var Saw_non_matching_condition_0 = &Message{code: 6405, category: CategoryMessage, key: "Saw_non_matching_condition_0_6405", text: "Saw non-matching condition '{0}'."} + var Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions = &Message{code: 6406, category: CategoryMessage, key: "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406", text: "Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"} + var Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set = &Message{code: 6407, category: CategoryMessage, key: "Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407", text: "Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."} + var Use_the_package_json_exports_field_when_resolving_package_imports = &Message{code: 6408, category: CategoryMessage, key: "Use_the_package_json_exports_field_when_resolving_package_imports_6408", text: "Use the package.json 'exports' field when resolving package imports."} + var Use_the_package_json_imports_field_when_resolving_imports = &Message{code: 6409, category: CategoryMessage, key: "Use_the_package_json_imports_field_when_resolving_imports_6409", text: "Use the package.json 'imports' field when resolving imports."} + var Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports = &Message{code: 6410, category: CategoryMessage, key: "Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410", text: "Conditions to set in addition to the resolver-specific defaults when resolving imports."} + var X_true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false = &Message{code: 6411, category: CategoryMessage, key: "true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411", text: "`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."} + var Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more = &Message{code: 6412, category: CategoryMessage, key: "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412", text: "Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."} + var Entering_conditional_exports = &Message{code: 6413, category: CategoryMessage, key: "Entering_conditional_exports_6413", text: "Entering conditional exports."} + var Resolved_under_condition_0 = &Message{code: 6414, category: CategoryMessage, key: "Resolved_under_condition_0_6414", text: "Resolved under condition '{0}'."} + var Failed_to_resolve_under_condition_0 = &Message{code: 6415, category: CategoryMessage, key: "Failed_to_resolve_under_condition_0_6415", text: "Failed to resolve under condition '{0}'."} + var Exiting_conditional_exports = &Message{code: 6416, category: CategoryMessage, key: "Exiting_conditional_exports_6416", text: "Exiting conditional exports."} + var Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0 = &Message{code: 6417, category: CategoryMessage, key: "Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417", text: "Searching all ancestor node_modules directories for preferred extensions: {0}."} + var Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0 = &Message{code: 6418, category: CategoryMessage, key: "Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418", text: "Searching all ancestor node_modules directories for fallback extensions: {0}."} + var Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors = &Message{code: 6419, category: CategoryMessage, key: "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors_6419", text: "Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors."} + var Project_0_is_out_of_date_because_1 = &Message{code: 6420, category: CategoryMessage, key: "Project_0_is_out_of_date_because_1_6420", text: "Project '{0}' is out of date because {1}."} + +var Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files = &Message{code: 6421, category: CategoryMessage, key: "Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421", text: "Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files."} + var The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1 = &Message{code: 6500, category: CategoryMessage, key: "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", text: "The expected type comes from property '{0}' which is declared here on type '{1}'"} + var The_expected_type_comes_from_this_index_signature = &Message{code: 6501, category: CategoryMessage, key: "The_expected_type_comes_from_this_index_signature_6501", text: "The expected type comes from this index signature."} + var The_expected_type_comes_from_the_return_type_of_this_signature = &Message{code: 6502, category: CategoryMessage, key: "The_expected_type_comes_from_the_return_type_of_this_signature_6502", text: "The expected type comes from the return type of this signature."} + var Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing = &Message{code: 6503, category: CategoryMessage, key: "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", text: "Print names of files that are part of the compilation and then stop processing."} + var File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option = &Message{code: 6504, category: CategoryError, key: "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", text: "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"} + var Print_names_of_files_and_the_reason_they_are_part_of_the_compilation = &Message{code: 6505, category: CategoryMessage, key: "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", text: "Print names of files and the reason they are part of the compilation."} + var Consider_adding_a_declare_modifier_to_this_class = &Message{code: 6506, category: CategoryMessage, key: "Consider_adding_a_declare_modifier_to_this_class_6506", text: "Consider adding a 'declare' modifier to this class."} + var Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files = &Message{code: 6600, category: CategoryMessage, key: "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", text: "Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."} + var Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export = &Message{code: 6601, category: CategoryMessage, key: "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", text: "Allow 'import x from y' when a module doesn't have a default export."} + var Allow_accessing_UMD_globals_from_modules = &Message{code: 6602, category: CategoryMessage, key: "Allow_accessing_UMD_globals_from_modules_6602", text: "Allow accessing UMD globals from modules."} + var Disable_error_reporting_for_unreachable_code = &Message{code: 6603, category: CategoryMessage, key: "Disable_error_reporting_for_unreachable_code_6603", text: "Disable error reporting for unreachable code."} + var Disable_error_reporting_for_unused_labels = &Message{code: 6604, category: CategoryMessage, key: "Disable_error_reporting_for_unused_labels_6604", text: "Disable error reporting for unused labels."} + var Ensure_use_strict_is_always_emitted = &Message{code: 6605, category: CategoryMessage, key: "Ensure_use_strict_is_always_emitted_6605", text: "Ensure 'use strict' is always emitted."} + var Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it = &Message{code: 6606, category: CategoryMessage, key: "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", text: "Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."} + var Specify_the_base_directory_to_resolve_non_relative_module_names = &Message{code: 6607, category: CategoryMessage, key: "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", text: "Specify the base directory to resolve non-relative module names."} + var No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files = &Message{code: 6608, category: CategoryMessage, key: "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", text: "No longer supported. In early versions, manually set the text encoding for reading files."} + var Enable_error_reporting_in_type_checked_JavaScript_files = &Message{code: 6609, category: CategoryMessage, key: "Enable_error_reporting_in_type_checked_JavaScript_files_6609", text: "Enable error reporting in type-checked JavaScript files."} + var Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references = &Message{code: 6611, category: CategoryMessage, key: "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", text: "Enable constraints that allow a TypeScript project to be used with project references."} + var Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project = &Message{code: 6612, category: CategoryMessage, key: "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", text: "Generate .d.ts files from TypeScript and JavaScript files in your project."} + var Specify_the_output_directory_for_generated_declaration_files = &Message{code: 6613, category: CategoryMessage, key: "Specify_the_output_directory_for_generated_declaration_files_6613", text: "Specify the output directory for generated declaration files."} + var Create_sourcemaps_for_d_ts_files = &Message{code: 6614, category: CategoryMessage, key: "Create_sourcemaps_for_d_ts_files_6614", text: "Create sourcemaps for d.ts files."} + var Output_compiler_performance_information_after_building = &Message{code: 6615, category: CategoryMessage, key: "Output_compiler_performance_information_after_building_6615", text: "Output compiler performance information after building."} + var Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project = &Message{code: 6616, category: CategoryMessage, key: "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", text: "Disables inference for type acquisition by looking at filenames in a project."} + var Reduce_the_number_of_projects_loaded_automatically_by_TypeScript = &Message{code: 6617, category: CategoryMessage, key: "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", text: "Reduce the number of projects loaded automatically by TypeScript."} + var Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server = &Message{code: 6618, category: CategoryMessage, key: "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", text: "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."} + var Opt_a_project_out_of_multi_project_reference_checking_when_editing = &Message{code: 6619, category: CategoryMessage, key: "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", text: "Opt a project out of multi-project reference checking when editing."} + var Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects = &Message{code: 6620, category: CategoryMessage, key: "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", text: "Disable preferring source files instead of declaration files when referencing composite projects."} + var Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration = &Message{code: 6621, category: CategoryMessage, key: "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", text: "Emit more compliant, but verbose and less performant JavaScript for iteration."} + var Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files = &Message{code: 6622, category: CategoryMessage, key: "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", text: "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."} + var Only_output_d_ts_files_and_not_JavaScript_files = &Message{code: 6623, category: CategoryMessage, key: "Only_output_d_ts_files_and_not_JavaScript_files_6623", text: "Only output d.ts files and not JavaScript files."} + var Emit_design_type_metadata_for_decorated_declarations_in_source_files = &Message{code: 6624, category: CategoryMessage, key: "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", text: "Emit design-type metadata for decorated declarations in source files."} + var Disable_the_type_acquisition_for_JavaScript_projects = &Message{code: 6625, category: CategoryMessage, key: "Disable_the_type_acquisition_for_JavaScript_projects_6625", text: "Disable the type acquisition for JavaScript projects"} + var Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility = &Message{code: 6626, category: CategoryMessage, key: "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", text: "Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."} + var Filters_results_from_the_include_option = &Message{code: 6627, category: CategoryMessage, key: "Filters_results_from_the_include_option_6627", text: "Filters results from the `include` option."} + var Remove_a_list_of_directories_from_the_watch_process = &Message{code: 6628, category: CategoryMessage, key: "Remove_a_list_of_directories_from_the_watch_process_6628", text: "Remove a list of directories from the watch process."} + var Remove_a_list_of_files_from_the_watch_mode_s_processing = &Message{code: 6629, category: CategoryMessage, key: "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", text: "Remove a list of files from the watch mode's processing."} + var Enable_experimental_support_for_legacy_experimental_decorators = &Message{code: 6630, category: CategoryMessage, key: "Enable_experimental_support_for_legacy_experimental_decorators_6630", text: "Enable experimental support for legacy experimental decorators."} + var Print_files_read_during_the_compilation_including_why_it_was_included = &Message{code: 6631, category: CategoryMessage, key: "Print_files_read_during_the_compilation_including_why_it_was_included_6631", text: "Print files read during the compilation including why it was included."} + var Output_more_detailed_compiler_performance_information_after_building = &Message{code: 6632, category: CategoryMessage, key: "Output_more_detailed_compiler_performance_information_after_building_6632", text: "Output more detailed compiler performance information after building."} + var Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited = &Message{code: 6633, category: CategoryMessage, key: "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", text: "Specify one or more path or node module references to base configuration files from which settings are inherited."} + var Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers = &Message{code: 6634, category: CategoryMessage, key: "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", text: "Specify what approach the watcher should use if the system runs out of native file watchers."} + var Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include = &Message{code: 6635, category: CategoryMessage, key: "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", text: "Include a list of files. This does not support glob patterns, as opposed to `include`."} + var Build_all_projects_including_those_that_appear_to_be_up_to_date = &Message{code: 6636, category: CategoryMessage, key: "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", text: "Build all projects, including those that appear to be up to date."} + var Ensure_that_casing_is_correct_in_imports = &Message{code: 6637, category: CategoryMessage, key: "Ensure_that_casing_is_correct_in_imports_6637", text: "Ensure that casing is correct in imports."} + var Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging = &Message{code: 6638, category: CategoryMessage, key: "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", text: "Emit a v8 CPU profile of the compiler run for debugging."} + var Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file = &Message{code: 6639, category: CategoryMessage, key: "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", text: "Allow importing helper functions from tslib once per project, instead of including them per-file."} + var Skip_building_downstream_projects_on_error_in_upstream_project = &Message{code: 6640, category: CategoryMessage, key: "Skip_building_downstream_projects_on_error_in_upstream_project_6640", text: "Skip building downstream projects on error in upstream project."} + var Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation = &Message{code: 6641, category: CategoryMessage, key: "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", text: "Specify a list of glob patterns that match files to be included in compilation."} + var Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects = &Message{code: 6642, category: CategoryMessage, key: "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", text: "Save .tsbuildinfo files to allow for incremental compilation of projects."} + var Include_sourcemap_files_inside_the_emitted_JavaScript = &Message{code: 6643, category: CategoryMessage, key: "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", text: "Include sourcemap files inside the emitted JavaScript."} + var Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript = &Message{code: 6644, category: CategoryMessage, key: "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", text: "Include source code in the sourcemaps inside the emitted JavaScript."} + var Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports = &Message{code: 6645, category: CategoryMessage, key: "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", text: "Ensure that each file can be safely transpiled without relying on other imports."} + var Specify_what_JSX_code_is_generated = &Message{code: 6646, category: CategoryMessage, key: "Specify_what_JSX_code_is_generated_6646", text: "Specify what JSX code is generated."} + var Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h = &Message{code: 6647, category: CategoryMessage, key: "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", text: "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."} + var Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment = &Message{code: 6648, category: CategoryMessage, key: "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", text: "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."} + var Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk = &Message{code: 6649, category: CategoryMessage, key: "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", text: "Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."} + var Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option = &Message{code: 6650, category: CategoryMessage, key: "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", text: "Make keyof only return strings instead of string, numbers or symbols. Legacy option."} + var Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment = &Message{code: 6651, category: CategoryMessage, key: "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", text: "Specify a set of bundled library declaration files that describe the target runtime environment."} + var Print_the_names_of_emitted_files_after_a_compilation = &Message{code: 6652, category: CategoryMessage, key: "Print_the_names_of_emitted_files_after_a_compilation_6652", text: "Print the names of emitted files after a compilation."} + var Print_all_of_the_files_read_during_the_compilation = &Message{code: 6653, category: CategoryMessage, key: "Print_all_of_the_files_read_during_the_compilation_6653", text: "Print all of the files read during the compilation."} + var Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit = &Message{code: 6654, category: CategoryMessage, key: "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", text: "Set the language of the messaging from TypeScript. This does not affect emit."} + var Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations = &Message{code: 6655, category: CategoryMessage, key: "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", text: "Specify the location where debugger should locate map files instead of generated locations."} + var Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs = &Message{code: 6656, category: CategoryMessage, key: "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", text: "Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."} + var Specify_what_module_code_is_generated = &Message{code: 6657, category: CategoryMessage, key: "Specify_what_module_code_is_generated_6657", text: "Specify what module code is generated."} + var Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier = &Message{code: 6658, category: CategoryMessage, key: "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", text: "Specify how TypeScript looks up a file from a given module specifier."} + var Set_the_newline_character_for_emitting_files = &Message{code: 6659, category: CategoryMessage, key: "Set_the_newline_character_for_emitting_files_6659", text: "Set the newline character for emitting files."} + var Disable_emitting_files_from_a_compilation = &Message{code: 6660, category: CategoryMessage, key: "Disable_emitting_files_from_a_compilation_6660", text: "Disable emitting files from a compilation."} + var Disable_generating_custom_helper_functions_like_extends_in_compiled_output = &Message{code: 6661, category: CategoryMessage, key: "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", text: "Disable generating custom helper functions like '__extends' in compiled output."} + var Disable_emitting_files_if_any_type_checking_errors_are_reported = &Message{code: 6662, category: CategoryMessage, key: "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", text: "Disable emitting files if any type checking errors are reported."} + var Disable_truncating_types_in_error_messages = &Message{code: 6663, category: CategoryMessage, key: "Disable_truncating_types_in_error_messages_6663", text: "Disable truncating types in error messages."} + var Enable_error_reporting_for_fallthrough_cases_in_switch_statements = &Message{code: 6664, category: CategoryMessage, key: "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", text: "Enable error reporting for fallthrough cases in switch statements."} + var Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type = &Message{code: 6665, category: CategoryMessage, key: "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", text: "Enable error reporting for expressions and declarations with an implied 'any' type."} + var Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier = &Message{code: 6666, category: CategoryMessage, key: "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", text: "Ensure overriding members in derived classes are marked with an override modifier."} + var Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function = &Message{code: 6667, category: CategoryMessage, key: "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", text: "Enable error reporting for codepaths that do not explicitly return in a function."} + var Enable_error_reporting_when_this_is_given_the_type_any = &Message{code: 6668, category: CategoryMessage, key: "Enable_error_reporting_when_this_is_given_the_type_any_6668", text: "Enable error reporting when 'this' is given the type 'any'."} + var Disable_adding_use_strict_directives_in_emitted_JavaScript_files = &Message{code: 6669, category: CategoryMessage, key: "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", text: "Disable adding 'use strict' directives in emitted JavaScript files."} + var Disable_including_any_library_files_including_the_default_lib_d_ts = &Message{code: 6670, category: CategoryMessage, key: "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", text: "Disable including any library files, including the default lib.d.ts."} + var Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type = &Message{code: 6671, category: CategoryMessage, key: "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", text: "Enforces using indexed accessors for keys declared using an indexed type."} + var Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project = &Message{code: 6672, category: CategoryMessage, key: "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", text: "Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."} + var Disable_strict_checking_of_generic_signatures_in_function_types = &Message{code: 6673, category: CategoryMessage, key: "Disable_strict_checking_of_generic_signatures_in_function_types_6673", text: "Disable strict checking of generic signatures in function types."} + var Add_undefined_to_a_type_when_accessed_using_an_index = &Message{code: 6674, category: CategoryMessage, key: "Add_undefined_to_a_type_when_accessed_using_an_index_6674", text: "Add 'undefined' to a type when accessed using an index."} + var Enable_error_reporting_when_local_variables_aren_t_read = &Message{code: 6675, category: CategoryMessage, key: "Enable_error_reporting_when_local_variables_aren_t_read_6675", text: "Enable error reporting when local variables aren't read."} + var Raise_an_error_when_a_function_parameter_isn_t_read = &Message{code: 6676, category: CategoryMessage, key: "Raise_an_error_when_a_function_parameter_isn_t_read_6676", text: "Raise an error when a function parameter isn't read."} + var Deprecated_setting_Use_outFile_instead = &Message{code: 6677, category: CategoryMessage, key: "Deprecated_setting_Use_outFile_instead_6677", text: "Deprecated setting. Use 'outFile' instead."} + var Specify_an_output_folder_for_all_emitted_files = &Message{code: 6678, category: CategoryMessage, key: "Specify_an_output_folder_for_all_emitted_files_6678", text: "Specify an output folder for all emitted files."} + var Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output = &Message{code: 6679, category: CategoryMessage, key: "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", text: "Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."} + var Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations = &Message{code: 6680, category: CategoryMessage, key: "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", text: "Specify a set of entries that re-map imports to additional lookup locations."} + var Specify_a_list_of_language_service_plugins_to_include = &Message{code: 6681, category: CategoryMessage, key: "Specify_a_list_of_language_service_plugins_to_include_6681", text: "Specify a list of language service plugins to include."} + var Disable_erasing_const_enum_declarations_in_generated_code = &Message{code: 6682, category: CategoryMessage, key: "Disable_erasing_const_enum_declarations_in_generated_code_6682", text: "Disable erasing 'const enum' declarations in generated code."} + var Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node = &Message{code: 6683, category: CategoryMessage, key: "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", text: "Disable resolving symlinks to their realpath. This correlates to the same flag in node."} + var Disable_wiping_the_console_in_watch_mode = &Message{code: 6684, category: CategoryMessage, key: "Disable_wiping_the_console_in_watch_mode_6684", text: "Disable wiping the console in watch mode."} + var Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read = &Message{code: 6685, category: CategoryMessage, key: "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", text: "Enable color and formatting in TypeScript's output to make compiler errors easier to read."} + var Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit = &Message{code: 6686, category: CategoryMessage, key: "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", text: "Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."} + var Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references = &Message{code: 6687, category: CategoryMessage, key: "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", text: "Specify an array of objects that specify paths for projects. Used in project references."} + var Disable_emitting_comments = &Message{code: 6688, category: CategoryMessage, key: "Disable_emitting_comments_6688", text: "Disable emitting comments."} + var Enable_importing_json_files = &Message{code: 6689, category: CategoryMessage, key: "Enable_importing_json_files_6689", text: "Enable importing .json files."} + var Specify_the_root_folder_within_your_source_files = &Message{code: 6690, category: CategoryMessage, key: "Specify_the_root_folder_within_your_source_files_6690", text: "Specify the root folder within your source files."} + var Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules = &Message{code: 6691, category: CategoryMessage, key: "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", text: "Allow multiple folders to be treated as one when resolving modules."} + var Skip_type_checking_d_ts_files_that_are_included_with_TypeScript = &Message{code: 6692, category: CategoryMessage, key: "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", text: "Skip type checking .d.ts files that are included with TypeScript."} + var Skip_type_checking_all_d_ts_files = &Message{code: 6693, category: CategoryMessage, key: "Skip_type_checking_all_d_ts_files_6693", text: "Skip type checking all .d.ts files."} + var Create_source_map_files_for_emitted_JavaScript_files = &Message{code: 6694, category: CategoryMessage, key: "Create_source_map_files_for_emitted_JavaScript_files_6694", text: "Create source map files for emitted JavaScript files."} + var Specify_the_root_path_for_debuggers_to_find_the_reference_source_code = &Message{code: 6695, category: CategoryMessage, key: "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", text: "Specify the root path for debuggers to find the reference source code."} + var Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function = &Message{code: 6697, category: CategoryMessage, key: "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", text: "Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."} + var When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible = &Message{code: 6698, category: CategoryMessage, key: "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", text: "When assigning functions, check to ensure parameters and the return values are subtype-compatible."} + var When_type_checking_take_into_account_null_and_undefined = &Message{code: 6699, category: CategoryMessage, key: "When_type_checking_take_into_account_null_and_undefined_6699", text: "When type checking, take into account 'null' and 'undefined'."} + var Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor = &Message{code: 6700, category: CategoryMessage, key: "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", text: "Check for class properties that are declared but not set in the constructor."} + var Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments = &Message{code: 6701, category: CategoryMessage, key: "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", text: "Disable emitting declarations that have '@internal' in their JSDoc comments."} + var Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals = &Message{code: 6702, category: CategoryMessage, key: "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", text: "Disable reporting of excess property errors during the creation of object literals."} + var Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures = &Message{code: 6703, category: CategoryMessage, key: "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", text: "Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."} + var Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively = &Message{code: 6704, category: CategoryMessage, key: "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", text: "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."} + var Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations = &Message{code: 6705, category: CategoryMessage, key: "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", text: "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."} + var Log_paths_used_during_the_moduleResolution_process = &Message{code: 6706, category: CategoryMessage, key: "Log_paths_used_during_the_moduleResolution_process_6706", text: "Log paths used during the 'moduleResolution' process."} + var Specify_the_path_to_tsbuildinfo_incremental_compilation_file = &Message{code: 6707, category: CategoryMessage, key: "Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707", text: "Specify the path to .tsbuildinfo incremental compilation file."} + var Specify_options_for_automatic_acquisition_of_declaration_files = &Message{code: 6709, category: CategoryMessage, key: "Specify_options_for_automatic_acquisition_of_declaration_files_6709", text: "Specify options for automatic acquisition of declaration files."} + var Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types = &Message{code: 6710, category: CategoryMessage, key: "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", text: "Specify multiple folders that act like './node_modules/@types'."} + var Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file = &Message{code: 6711, category: CategoryMessage, key: "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", text: "Specify type package names to be included without being referenced in a source file."} + var Emit_ECMAScript_standard_compliant_class_fields = &Message{code: 6712, category: CategoryMessage, key: "Emit_ECMAScript_standard_compliant_class_fields_6712", text: "Emit ECMAScript-standard-compliant class fields."} + var Enable_verbose_logging = &Message{code: 6713, category: CategoryMessage, key: "Enable_verbose_logging_6713", text: "Enable verbose logging."} + var Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality = &Message{code: 6714, category: CategoryMessage, key: "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", text: "Specify how directories are watched on systems that lack recursive file-watching functionality."} + var Specify_how_the_TypeScript_watch_mode_works = &Message{code: 6715, category: CategoryMessage, key: "Specify_how_the_TypeScript_watch_mode_works_6715", text: "Specify how the TypeScript watch mode works."} + var Require_undeclared_properties_from_index_signatures_to_use_element_accesses = &Message{code: 6717, category: CategoryMessage, key: "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", text: "Require undeclared properties from index signatures to use element accesses."} + var Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types = &Message{code: 6718, category: CategoryMessage, key: "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", text: "Specify emit/checking behavior for imports that are only used for types."} + var Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files = &Message{code: 6719, category: CategoryMessage, key: "Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719", text: "Require sufficient annotation on exports so other tools can trivially generate declaration files."} + var Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any = &Message{code: 6720, category: CategoryMessage, key: "Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any_6720", text: "Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'."} + +var Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript = &Message{code: 6721, category: CategoryMessage, key: "Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript_6721", text: "Do not allow runtime constructs that are not part of ECMAScript."} + var Default_catch_clause_variables_as_unknown_instead_of_any = &Message{code: 6803, category: CategoryMessage, key: "Default_catch_clause_variables_as_unknown_instead_of_any_6803", text: "Default catch clause variables as 'unknown' instead of 'any'."} + var Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting = &Message{code: 6804, category: CategoryMessage, key: "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", text: "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."} + var Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported = &Message{code: 6805, category: CategoryMessage, key: "Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805", text: "Disable full type checking (only critical parse and emit errors will be reported)."} + var Check_side_effect_imports = &Message{code: 6806, category: CategoryMessage, key: "Check_side_effect_imports_6806", text: "Check side effect imports."} + var This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2 = &Message{code: 6807, category: CategoryError, key: "This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807", text: "This operation can be simplified. This shift is identical to `{0} {1} {2}`."} + +var Enable_lib_replacement = &Message{code: 6808, category: CategoryMessage, key: "Enable_lib_replacement_6808", text: "Enable lib replacement."} + var X_one_of_Colon = &Message{code: 6900, category: CategoryMessage, key: "one_of_Colon_6900", text: "one of:"} + var X_one_or_more_Colon = &Message{code: 6901, category: CategoryMessage, key: "one_or_more_Colon_6901", text: "one or more:"} + var X_type_Colon = &Message{code: 6902, category: CategoryMessage, key: "type_Colon_6902", text: "type:"} + var X_default_Colon = &Message{code: 6903, category: CategoryMessage, key: "default_Colon_6903", text: "default:"} + var X_module_system_or_esModuleInterop = &Message{code: 6904, category: CategoryMessage, key: "module_system_or_esModuleInterop_6904", text: "module === \"system\" or esModuleInterop"} + var X_false_unless_strict_is_set = &Message{code: 6905, category: CategoryMessage, key: "false_unless_strict_is_set_6905", text: "`false`, unless `strict` is set"} + var X_false_unless_composite_is_set = &Message{code: 6906, category: CategoryMessage, key: "false_unless_composite_is_set_6906", text: "`false`, unless `composite` is set"} + var X_node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified = &Message{code: 6907, category: CategoryMessage, key: "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", text: "`[\"node_modules\", \"bower_components\", \"jspm_packages\"]`, plus the value of `outDir` if one is specified."} + var X_if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk = &Message{code: 6908, category: CategoryMessage, key: "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", text: "`[]` if `files` is specified, otherwise `[\"**/*\"]`"} + var X_true_if_composite_false_otherwise = &Message{code: 6909, category: CategoryMessage, key: "true_if_composite_false_otherwise_6909", text: "`true` if `composite`, `false` otherwise"} + var Computed_from_the_list_of_input_files = &Message{code: 6911, category: CategoryMessage, key: "Computed_from_the_list_of_input_files_6911", text: "Computed from the list of input files"} + var Platform_specific = &Message{code: 6912, category: CategoryMessage, key: "Platform_specific_6912", text: "Platform specific"} + var You_can_learn_about_all_of_the_compiler_options_at_0 = &Message{code: 6913, category: CategoryMessage, key: "You_can_learn_about_all_of_the_compiler_options_at_0_6913", text: "You can learn about all of the compiler options at {0}"} + var Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon = &Message{code: 6914, category: CategoryMessage, key: "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", text: "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"} + var Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0 = &Message{code: 6915, category: CategoryMessage, key: "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", text: "Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"} + var COMMON_COMMANDS = &Message{code: 6916, category: CategoryMessage, key: "COMMON_COMMANDS_6916", text: "COMMON COMMANDS"} + var ALL_COMPILER_OPTIONS = &Message{code: 6917, category: CategoryMessage, key: "ALL_COMPILER_OPTIONS_6917", text: "ALL COMPILER OPTIONS"} + var WATCH_OPTIONS = &Message{code: 6918, category: CategoryMessage, key: "WATCH_OPTIONS_6918", text: "WATCH OPTIONS"} + var BUILD_OPTIONS = &Message{code: 6919, category: CategoryMessage, key: "BUILD_OPTIONS_6919", text: "BUILD OPTIONS"} + var COMMON_COMPILER_OPTIONS = &Message{code: 6920, category: CategoryMessage, key: "COMMON_COMPILER_OPTIONS_6920", text: "COMMON COMPILER OPTIONS"} + var COMMAND_LINE_FLAGS = &Message{code: 6921, category: CategoryMessage, key: "COMMAND_LINE_FLAGS_6921", text: "COMMAND LINE FLAGS"} + var X_tsc_Colon_The_TypeScript_Compiler = &Message{code: 6922, category: CategoryMessage, key: "tsc_Colon_The_TypeScript_Compiler_6922", text: "tsc: The TypeScript Compiler"} + var Compiles_the_current_project_tsconfig_json_in_the_working_directory = &Message{code: 6923, category: CategoryMessage, key: "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", text: "Compiles the current project (tsconfig.json in the working directory.)"} + var Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options = &Message{code: 6924, category: CategoryMessage, key: "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", text: "Ignoring tsconfig.json, compiles the specified files with default compiler options."} + var Build_a_composite_project_in_the_working_directory = &Message{code: 6925, category: CategoryMessage, key: "Build_a_composite_project_in_the_working_directory_6925", text: "Build a composite project in the working directory."} + var Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory = &Message{code: 6926, category: CategoryMessage, key: "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", text: "Creates a tsconfig.json with the recommended settings in the working directory."} + var Compiles_the_TypeScript_project_located_at_the_specified_path = &Message{code: 6927, category: CategoryMessage, key: "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", text: "Compiles the TypeScript project located at the specified path."} + var An_expanded_version_of_this_information_showing_all_possible_compiler_options = &Message{code: 6928, category: CategoryMessage, key: "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", text: "An expanded version of this information, showing all possible compiler options"} + var Compiles_the_current_project_with_additional_settings = &Message{code: 6929, category: CategoryMessage, key: "Compiles_the_current_project_with_additional_settings_6929", text: "Compiles the current project, with additional settings."} + var X_true_for_ES2022_and_above_including_ESNext = &Message{code: 6930, category: CategoryMessage, key: "true_for_ES2022_and_above_including_ESNext_6930", text: "`true` for ES2022 and above, including ESNext."} + var List_of_file_name_suffixes_to_search_when_resolving_a_module = &Message{code: 6931, category: CategoryError, key: "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", text: "List of file name suffixes to search when resolving a module."} + var Variable_0_implicitly_has_an_1_type = &Message{code: 7005, category: CategoryError, key: "Variable_0_implicitly_has_an_1_type_7005", text: "Variable '{0}' implicitly has an '{1}' type."} + var Parameter_0_implicitly_has_an_1_type = &Message{code: 7006, category: CategoryError, key: "Parameter_0_implicitly_has_an_1_type_7006", text: "Parameter '{0}' implicitly has an '{1}' type."} + var Member_0_implicitly_has_an_1_type = &Message{code: 7008, category: CategoryError, key: "Member_0_implicitly_has_an_1_type_7008", text: "Member '{0}' implicitly has an '{1}' type."} + var X_new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type = &Message{code: 7009, category: CategoryError, key: "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", text: "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."} + var X_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type = &Message{code: 7010, category: CategoryError, key: "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", text: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."} + var Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type = &Message{code: 7011, category: CategoryError, key: "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", text: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."} + var This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation = &Message{code: 7012, category: CategoryError, key: "This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012", text: "This overload implicitly returns the type '{0}' because it lacks a return type annotation."} + var Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type = &Message{code: 7013, category: CategoryError, key: "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", text: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."} + var Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type = &Message{code: 7014, category: CategoryError, key: "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", text: "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."} + var Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number = &Message{code: 7015, category: CategoryError, key: "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", text: "Element implicitly has an 'any' type because index expression is not of type 'number'."} + var Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type = &Message{code: 7016, category: CategoryError, key: "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", text: "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."} + var Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature = &Message{code: 7017, category: CategoryError, key: "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", text: "Element implicitly has an 'any' type because type '{0}' has no index signature."} + var Object_literal_s_property_0_implicitly_has_an_1_type = &Message{code: 7018, category: CategoryError, key: "Object_literal_s_property_0_implicitly_has_an_1_type_7018", text: "Object literal's property '{0}' implicitly has an '{1}' type."} + var Rest_parameter_0_implicitly_has_an_any_type = &Message{code: 7019, category: CategoryError, key: "Rest_parameter_0_implicitly_has_an_any_type_7019", text: "Rest parameter '{0}' implicitly has an 'any[]' type."} + var Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type = &Message{code: 7020, category: CategoryError, key: "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", text: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."} + var X_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer = &Message{code: 7022, category: CategoryError, key: "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", text: "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."} + var X_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions = &Message{code: 7023, category: CategoryError, key: "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", text: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."} + var Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions = &Message{code: 7024, category: CategoryError, key: "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", text: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."} + var Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation = &Message{code: 7025, category: CategoryError, key: "Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025", text: "Generator implicitly has yield type '{0}'. Consider supplying a return type annotation."} + var JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists = &Message{code: 7026, category: CategoryError, key: "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", text: "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."} + var Unreachable_code_detected = &Message{code: 7027, category: CategoryError, key: "Unreachable_code_detected_7027", text: "Unreachable code detected.", reportsUnnecessary: true} + var Unused_label = &Message{code: 7028, category: CategoryError, key: "Unused_label_7028", text: "Unused label.", reportsUnnecessary: true} + var Fallthrough_case_in_switch = &Message{code: 7029, category: CategoryError, key: "Fallthrough_case_in_switch_7029", text: "Fallthrough case in switch."} + var Not_all_code_paths_return_a_value = &Message{code: 7030, category: CategoryError, key: "Not_all_code_paths_return_a_value_7030", text: "Not all code paths return a value."} + var Binding_element_0_implicitly_has_an_1_type = &Message{code: 7031, category: CategoryError, key: "Binding_element_0_implicitly_has_an_1_type_7031", text: "Binding element '{0}' implicitly has an '{1}' type."} + var Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation = &Message{code: 7032, category: CategoryError, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", text: "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."} + var Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation = &Message{code: 7033, category: CategoryError, key: "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", text: "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."} + var Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined = &Message{code: 7034, category: CategoryError, key: "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", text: "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."} + var Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0 = &Message{code: 7035, category: CategoryError, key: "Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035", text: "Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"} + var Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0 = &Message{code: 7036, category: CategoryError, key: "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", text: "Dynamic import's specifier must be of type 'string', but here has type '{0}'."} + var Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports = &Message{code: 7037, category: CategoryMessage, key: "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", text: "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."} + var Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead = &Message{code: 7038, category: CategoryMessage, key: "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038", text: "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."} + var Mapped_object_type_implicitly_has_an_any_template_type = &Message{code: 7039, category: CategoryError, key: "Mapped_object_type_implicitly_has_an_any_template_type_7039", text: "Mapped object type implicitly has an 'any' template type."} + var If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1 = &Message{code: 7040, category: CategoryError, key: "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", text: "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"} + var The_containing_arrow_function_captures_the_global_value_of_this = &Message{code: 7041, category: CategoryError, key: "The_containing_arrow_function_captures_the_global_value_of_this_7041", text: "The containing arrow function captures the global value of 'this'."} + var Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used = &Message{code: 7042, category: CategoryError, key: "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042", text: "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."} + var Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage = &Message{code: 7043, category: CategorySuggestion, key: "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043", text: "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."} + var Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage = &Message{code: 7044, category: CategorySuggestion, key: "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044", text: "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."} + var Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage = &Message{code: 7045, category: CategorySuggestion, key: "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045", text: "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."} + var Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage = &Message{code: 7046, category: CategorySuggestion, key: "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046", text: "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."} + var Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage = &Message{code: 7047, category: CategorySuggestion, key: "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047", text: "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."} + var Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage = &Message{code: 7048, category: CategorySuggestion, key: "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048", text: "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."} + var Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage = &Message{code: 7049, category: CategorySuggestion, key: "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049", text: "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."} + var X_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage = &Message{code: 7050, category: CategorySuggestion, key: "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050", text: "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."} + var Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1 = &Message{code: 7051, category: CategoryError, key: "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051", text: "Parameter has a name but no type. Did you mean '{0}: {1}'?"} + var Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1 = &Message{code: 7052, category: CategoryError, key: "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052", text: "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"} + var Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1 = &Message{code: 7053, category: CategoryError, key: "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053", text: "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."} + var No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1 = &Message{code: 7054, category: CategoryError, key: "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054", text: "No index signature with a parameter of type '{0}' was found on type '{1}'."} + var X_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type = &Message{code: 7055, category: CategoryError, key: "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", text: "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."} + var The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed = &Message{code: 7056, category: CategoryError, key: "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", text: "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."} + var X_yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation = &Message{code: 7057, category: CategoryError, key: "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", text: "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."} + var If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1 = &Message{code: 7058, category: CategoryError, key: "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", text: "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"} + var This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead = &Message{code: 7059, category: CategoryError, key: "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", text: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."} + var This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint = &Message{code: 7060, category: CategoryError, key: "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", text: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."} + var A_mapped_type_may_not_declare_properties_or_methods = &Message{code: 7061, category: CategoryError, key: "A_mapped_type_may_not_declare_properties_or_methods_7061", text: "A mapped type may not declare properties or methods."} + var You_cannot_rename_this_element = &Message{code: 8000, category: CategoryError, key: "You_cannot_rename_this_element_8000", text: "You cannot rename this element."} + var You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library = &Message{code: 8001, category: CategoryError, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", text: "You cannot rename elements that are defined in the standard TypeScript library."} + var X_import_can_only_be_used_in_TypeScript_files = &Message{code: 8002, category: CategoryError, key: "import_can_only_be_used_in_TypeScript_files_8002", text: "'import ... =' can only be used in TypeScript files."} + var X_export_can_only_be_used_in_TypeScript_files = &Message{code: 8003, category: CategoryError, key: "export_can_only_be_used_in_TypeScript_files_8003", text: "'export =' can only be used in TypeScript files."} + var Type_parameter_declarations_can_only_be_used_in_TypeScript_files = &Message{code: 8004, category: CategoryError, key: "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004", text: "Type parameter declarations can only be used in TypeScript files."} + var X_implements_clauses_can_only_be_used_in_TypeScript_files = &Message{code: 8005, category: CategoryError, key: "implements_clauses_can_only_be_used_in_TypeScript_files_8005", text: "'implements' clauses can only be used in TypeScript files."} + var X_0_declarations_can_only_be_used_in_TypeScript_files = &Message{code: 8006, category: CategoryError, key: "_0_declarations_can_only_be_used_in_TypeScript_files_8006", text: "'{0}' declarations can only be used in TypeScript files."} + var Type_aliases_can_only_be_used_in_TypeScript_files = &Message{code: 8008, category: CategoryError, key: "Type_aliases_can_only_be_used_in_TypeScript_files_8008", text: "Type aliases can only be used in TypeScript files."} + var The_0_modifier_can_only_be_used_in_TypeScript_files = &Message{code: 8009, category: CategoryError, key: "The_0_modifier_can_only_be_used_in_TypeScript_files_8009", text: "The '{0}' modifier can only be used in TypeScript files."} + var Type_annotations_can_only_be_used_in_TypeScript_files = &Message{code: 8010, category: CategoryError, key: "Type_annotations_can_only_be_used_in_TypeScript_files_8010", text: "Type annotations can only be used in TypeScript files."} + var Type_arguments_can_only_be_used_in_TypeScript_files = &Message{code: 8011, category: CategoryError, key: "Type_arguments_can_only_be_used_in_TypeScript_files_8011", text: "Type arguments can only be used in TypeScript files."} + var Parameter_modifiers_can_only_be_used_in_TypeScript_files = &Message{code: 8012, category: CategoryError, key: "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", text: "Parameter modifiers can only be used in TypeScript files."} + var Non_null_assertions_can_only_be_used_in_TypeScript_files = &Message{code: 8013, category: CategoryError, key: "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", text: "Non-null assertions can only be used in TypeScript files."} + var Type_assertion_expressions_can_only_be_used_in_TypeScript_files = &Message{code: 8016, category: CategoryError, key: "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", text: "Type assertion expressions can only be used in TypeScript files."} + var Signature_declarations_can_only_be_used_in_TypeScript_files = &Message{code: 8017, category: CategoryError, key: "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", text: "Signature declarations can only be used in TypeScript files."} + var Report_errors_in_js_files = &Message{code: 8019, category: CategoryMessage, key: "Report_errors_in_js_files_8019", text: "Report errors in .js files."} + var JSDoc_types_can_only_be_used_inside_documentation_comments = &Message{code: 8020, category: CategoryError, key: "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", text: "JSDoc types can only be used inside documentation comments."} + var JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags = &Message{code: 8021, category: CategoryError, key: "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", text: "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."} + var JSDoc_0_is_not_attached_to_a_class = &Message{code: 8022, category: CategoryError, key: "JSDoc_0_is_not_attached_to_a_class_8022", text: "JSDoc '@{0}' is not attached to a class."} + var JSDoc_0_1_does_not_match_the_extends_2_clause = &Message{code: 8023, category: CategoryError, key: "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", text: "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."} + var JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name = &Message{code: 8024, category: CategoryError, key: "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", text: "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."} + var Class_declarations_cannot_have_more_than_one_augments_or_extends_tag = &Message{code: 8025, category: CategoryError, key: "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", text: "Class declarations cannot have more than one '@augments' or '@extends' tag."} + var Expected_0_type_arguments_provide_these_with_an_extends_tag = &Message{code: 8026, category: CategoryError, key: "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", text: "Expected {0} type arguments; provide these with an '@extends' tag."} + var Expected_0_1_type_arguments_provide_these_with_an_extends_tag = &Message{code: 8027, category: CategoryError, key: "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", text: "Expected {0}-{1} type arguments; provide these with an '@extends' tag."} + var JSDoc_may_only_appear_in_the_last_parameter_of_a_signature = &Message{code: 8028, category: CategoryError, key: "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", text: "JSDoc '...' may only appear in the last parameter of a signature."} + var JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type = &Message{code: 8029, category: CategoryError, key: "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029", text: "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."} + var The_type_of_a_function_declaration_must_match_the_function_s_signature = &Message{code: 8030, category: CategoryError, key: "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030", text: "The type of a function declaration must match the function's signature."} + var You_cannot_rename_a_module_via_a_global_import = &Message{code: 8031, category: CategoryError, key: "You_cannot_rename_a_module_via_a_global_import_8031", text: "You cannot rename a module via a global import."} + var Qualified_name_0_is_not_allowed_without_a_leading_param_object_1 = &Message{code: 8032, category: CategoryError, key: "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", text: "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."} + var A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags = &Message{code: 8033, category: CategoryError, key: "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", text: "A JSDoc '@typedef' comment may not contain multiple '@type' tags."} + var The_tag_was_first_specified_here = &Message{code: 8034, category: CategoryError, key: "The_tag_was_first_specified_here_8034", text: "The tag was first specified here."} + var You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder = &Message{code: 8035, category: CategoryError, key: "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", text: "You cannot rename elements that are defined in a 'node_modules' folder."} + var You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder = &Message{code: 8036, category: CategoryError, key: "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", text: "You cannot rename elements that are defined in another 'node_modules' folder."} + var Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files = &Message{code: 8037, category: CategoryError, key: "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", text: "Type satisfaction expressions can only be used in TypeScript files."} + var Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export = &Message{code: 8038, category: CategoryError, key: "Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038", text: "Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."} + var A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag = &Message{code: 8039, category: CategoryError, key: "A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039", text: "A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"} + var Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit = &Message{code: 9005, category: CategoryError, key: "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", text: "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."} + var Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit = &Message{code: 9006, category: CategoryError, key: "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", text: "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."} + var Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations = &Message{code: 9007, category: CategoryError, key: "Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007", text: "Function must have an explicit return type annotation with --isolatedDeclarations."} + var Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations = &Message{code: 9008, category: CategoryError, key: "Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008", text: "Method must have an explicit return type annotation with --isolatedDeclarations."} -var At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations = &Message{code: 9009, category: CategoryError, key: "At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009", text: "At least one accessor must have an explicit return type annotation with --isolatedDeclarations."} + +var At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations = &Message{code: 9009, category: CategoryError, key: "At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009", text: "At least one accessor must have an explicit type annotation with --isolatedDeclarations."} + var Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations = &Message{code: 9010, category: CategoryError, key: "Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010", text: "Variable must have an explicit type annotation with --isolatedDeclarations."} + var Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations = &Message{code: 9011, category: CategoryError, key: "Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011", text: "Parameter must have an explicit type annotation with --isolatedDeclarations."} + var Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations = &Message{code: 9012, category: CategoryError, key: "Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012", text: "Property must have an explicit type annotation with --isolatedDeclarations."} + var Expression_type_can_t_be_inferred_with_isolatedDeclarations = &Message{code: 9013, category: CategoryError, key: "Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013", text: "Expression type can't be inferred with --isolatedDeclarations."} + var Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations = &Message{code: 9014, category: CategoryError, key: "Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014", text: "Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations."} + var Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations = &Message{code: 9015, category: CategoryError, key: "Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015", text: "Objects that contain spread assignments can't be inferred with --isolatedDeclarations."} + var Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations = &Message{code: 9016, category: CategoryError, key: "Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016", text: "Objects that contain shorthand properties can't be inferred with --isolatedDeclarations."} + var Only_const_arrays_can_be_inferred_with_isolatedDeclarations = &Message{code: 9017, category: CategoryError, key: "Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017", text: "Only const arrays can be inferred with --isolatedDeclarations."} + var Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations = &Message{code: 9018, category: CategoryError, key: "Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018", text: "Arrays with spread elements can't inferred with --isolatedDeclarations."} + var Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations = &Message{code: 9019, category: CategoryError, key: "Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019", text: "Binding elements can't be exported directly with --isolatedDeclarations."} + var Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations = &Message{code: 9020, category: CategoryError, key: "Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020", text: "Enum member initializers must be computable without references to external symbols with --isolatedDeclarations."} + var Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations = &Message{code: 9021, category: CategoryError, key: "Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021", text: "Extends clause can't contain an expression with --isolatedDeclarations."} + var Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations = &Message{code: 9022, category: CategoryError, key: "Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022", text: "Inference from class expressions is not supported with --isolatedDeclarations."} + var Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function = &Message{code: 9023, category: CategoryError, key: "Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023", text: "Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."} -var Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations = &Message{code: 9025, category: CategoryError, key: "Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025", text: "Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations."} + +var Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations = &Message{code: 9025, category: CategoryError, key: "Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025", text: "Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations."} + var Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations = &Message{code: 9026, category: CategoryError, key: "Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026", text: "Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."} + var Add_a_type_annotation_to_the_variable_0 = &Message{code: 9027, category: CategoryError, key: "Add_a_type_annotation_to_the_variable_0_9027", text: "Add a type annotation to the variable {0}."} + var Add_a_type_annotation_to_the_parameter_0 = &Message{code: 9028, category: CategoryError, key: "Add_a_type_annotation_to_the_parameter_0_9028", text: "Add a type annotation to the parameter {0}."} + var Add_a_type_annotation_to_the_property_0 = &Message{code: 9029, category: CategoryError, key: "Add_a_type_annotation_to_the_property_0_9029", text: "Add a type annotation to the property {0}."} + var Add_a_return_type_to_the_function_expression = &Message{code: 9030, category: CategoryError, key: "Add_a_return_type_to_the_function_expression_9030", text: "Add a return type to the function expression."} + var Add_a_return_type_to_the_function_declaration = &Message{code: 9031, category: CategoryError, key: "Add_a_return_type_to_the_function_declaration_9031", text: "Add a return type to the function declaration."} + var Add_a_return_type_to_the_get_accessor_declaration = &Message{code: 9032, category: CategoryError, key: "Add_a_return_type_to_the_get_accessor_declaration_9032", text: "Add a return type to the get accessor declaration."} + var Add_a_type_to_parameter_of_the_set_accessor_declaration = &Message{code: 9033, category: CategoryError, key: "Add_a_type_to_parameter_of_the_set_accessor_declaration_9033", text: "Add a type to parameter of the set accessor declaration."} + var Add_a_return_type_to_the_method = &Message{code: 9034, category: CategoryError, key: "Add_a_return_type_to_the_method_9034", text: "Add a return type to the method"} + var Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit = &Message{code: 9035, category: CategoryError, key: "Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035", text: "Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit."} + var Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it = &Message{code: 9036, category: CategoryError, key: "Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036", text: "Move the expression in default export to a variable and add a type annotation to it."} + var Default_exports_can_t_be_inferred_with_isolatedDeclarations = &Message{code: 9037, category: CategoryError, key: "Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037", text: "Default exports can't be inferred with --isolatedDeclarations."} + var Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations = &Message{code: 9038, category: CategoryError, key: "Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038", text: "Computed property names on class or object literals cannot be inferred with --isolatedDeclarations."} + var Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations = &Message{code: 9039, category: CategoryError, key: "Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039", text: "Type containing private name '{0}' can't be used with --isolatedDeclarations."} + var JSX_attributes_must_only_be_assigned_a_non_empty_expression = &Message{code: 17000, category: CategoryError, key: "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", text: "JSX attributes must only be assigned a non-empty 'expression'."} + var JSX_elements_cannot_have_multiple_attributes_with_the_same_name = &Message{code: 17001, category: CategoryError, key: "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", text: "JSX elements cannot have multiple attributes with the same name."} + var Expected_corresponding_JSX_closing_tag_for_0 = &Message{code: 17002, category: CategoryError, key: "Expected_corresponding_JSX_closing_tag_for_0_17002", text: "Expected corresponding JSX closing tag for '{0}'."} + var Cannot_use_JSX_unless_the_jsx_flag_is_provided = &Message{code: 17004, category: CategoryError, key: "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", text: "Cannot use JSX unless the '--jsx' flag is provided."} + var A_constructor_cannot_contain_a_super_call_when_its_class_extends_null = &Message{code: 17005, category: CategoryError, key: "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", text: "A constructor cannot contain a 'super' call when its class extends 'null'."} + var An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses = &Message{code: 17006, category: CategoryError, key: "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", text: "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."} + var A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses = &Message{code: 17007, category: CategoryError, key: "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", text: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."} + var JSX_element_0_has_no_corresponding_closing_tag = &Message{code: 17008, category: CategoryError, key: "JSX_element_0_has_no_corresponding_closing_tag_17008", text: "JSX element '{0}' has no corresponding closing tag."} + var X_super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class = &Message{code: 17009, category: CategoryError, key: "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", text: "'super' must be called before accessing 'this' in the constructor of a derived class."} + var Unknown_type_acquisition_option_0 = &Message{code: 17010, category: CategoryError, key: "Unknown_type_acquisition_option_0_17010", text: "Unknown type acquisition option '{0}'."} + var X_super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class = &Message{code: 17011, category: CategoryError, key: "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", text: "'super' must be called before accessing a property of 'super' in the constructor of a derived class."} + var X_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2 = &Message{code: 17012, category: CategoryError, key: "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", text: "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"} + var Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor = &Message{code: 17013, category: CategoryError, key: "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", text: "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."} + var JSX_fragment_has_no_corresponding_closing_tag = &Message{code: 17014, category: CategoryError, key: "JSX_fragment_has_no_corresponding_closing_tag_17014", text: "JSX fragment has no corresponding closing tag."} + var Expected_corresponding_closing_tag_for_JSX_fragment = &Message{code: 17015, category: CategoryError, key: "Expected_corresponding_closing_tag_for_JSX_fragment_17015", text: "Expected corresponding closing tag for JSX fragment."} + var The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option = &Message{code: 17016, category: CategoryError, key: "The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016", text: "The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."} + var An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments = &Message{code: 17017, category: CategoryError, key: "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017", text: "An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."} + var Unknown_type_acquisition_option_0_Did_you_mean_1 = &Message{code: 17018, category: CategoryError, key: "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", text: "Unknown type acquisition option '{0}'. Did you mean '{1}'?"} + var X_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1 = &Message{code: 17019, category: CategoryError, key: "_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019", text: "'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"} + var X_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1 = &Message{code: 17020, category: CategoryError, key: "_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020", text: "'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"} + var Unicode_escape_sequence_cannot_appear_here = &Message{code: 17021, category: CategoryError, key: "Unicode_escape_sequence_cannot_appear_here_17021", text: "Unicode escape sequence cannot appear here."} + var Circularity_detected_while_resolving_configuration_Colon_0 = &Message{code: 18000, category: CategoryError, key: "Circularity_detected_while_resolving_configuration_Colon_0_18000", text: "Circularity detected while resolving configuration: {0}"} + var The_files_list_in_config_file_0_is_empty = &Message{code: 18002, category: CategoryError, key: "The_files_list_in_config_file_0_is_empty_18002", text: "The 'files' list in config file '{0}' is empty."} + var No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2 = &Message{code: 18003, category: CategoryError, key: "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", text: "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."} + var No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer = &Message{code: 18004, category: CategoryError, key: "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", text: "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."} + var Classes_may_not_have_a_field_named_constructor = &Message{code: 18006, category: CategoryError, key: "Classes_may_not_have_a_field_named_constructor_18006", text: "Classes may not have a field named 'constructor'."} + var JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array = &Message{code: 18007, category: CategoryError, key: "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", text: "JSX expressions may not use the comma operator. Did you mean to write an array?"} + var Private_identifiers_cannot_be_used_as_parameters = &Message{code: 18009, category: CategoryError, key: "Private_identifiers_cannot_be_used_as_parameters_18009", text: "Private identifiers cannot be used as parameters."} + var An_accessibility_modifier_cannot_be_used_with_a_private_identifier = &Message{code: 18010, category: CategoryError, key: "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010", text: "An accessibility modifier cannot be used with a private identifier."} + var The_operand_of_a_delete_operator_cannot_be_a_private_identifier = &Message{code: 18011, category: CategoryError, key: "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011", text: "The operand of a 'delete' operator cannot be a private identifier."} + var X_constructor_is_a_reserved_word = &Message{code: 18012, category: CategoryError, key: "constructor_is_a_reserved_word_18012", text: "'#constructor' is a reserved word."} + var Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier = &Message{code: 18013, category: CategoryError, key: "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013", text: "Property '{0}' is not accessible outside class '{1}' because it has a private identifier."} + var The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling = &Message{code: 18014, category: CategoryError, key: "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014", text: "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."} + var Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2 = &Message{code: 18015, category: CategoryError, key: "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015", text: "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."} + var Private_identifiers_are_not_allowed_outside_class_bodies = &Message{code: 18016, category: CategoryError, key: "Private_identifiers_are_not_allowed_outside_class_bodies_18016", text: "Private identifiers are not allowed outside class bodies."} + var The_shadowing_declaration_of_0_is_defined_here = &Message{code: 18017, category: CategoryError, key: "The_shadowing_declaration_of_0_is_defined_here_18017", text: "The shadowing declaration of '{0}' is defined here"} + var The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here = &Message{code: 18018, category: CategoryError, key: "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018", text: "The declaration of '{0}' that you probably intended to use is defined here"} + var X_0_modifier_cannot_be_used_with_a_private_identifier = &Message{code: 18019, category: CategoryError, key: "_0_modifier_cannot_be_used_with_a_private_identifier_18019", text: "'{0}' modifier cannot be used with a private identifier."} + var An_enum_member_cannot_be_named_with_a_private_identifier = &Message{code: 18024, category: CategoryError, key: "An_enum_member_cannot_be_named_with_a_private_identifier_18024", text: "An enum member cannot be named with a private identifier."} + var X_can_only_be_used_at_the_start_of_a_file = &Message{code: 18026, category: CategoryError, key: "can_only_be_used_at_the_start_of_a_file_18026", text: "'#!' can only be used at the start of a file."} + var Compiler_reserves_name_0_when_emitting_private_identifier_downlevel = &Message{code: 18027, category: CategoryError, key: "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027", text: "Compiler reserves name '{0}' when emitting private identifier downlevel."} + var Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher = &Message{code: 18028, category: CategoryError, key: "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028", text: "Private identifiers are only available when targeting ECMAScript 2015 and higher."} + var Private_identifiers_are_not_allowed_in_variable_declarations = &Message{code: 18029, category: CategoryError, key: "Private_identifiers_are_not_allowed_in_variable_declarations_18029", text: "Private identifiers are not allowed in variable declarations."} + var An_optional_chain_cannot_contain_private_identifiers = &Message{code: 18030, category: CategoryError, key: "An_optional_chain_cannot_contain_private_identifiers_18030", text: "An optional chain cannot contain private identifiers."} + var The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents = &Message{code: 18031, category: CategoryError, key: "The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031", text: "The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."} + var The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some = &Message{code: 18032, category: CategoryError, key: "The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032", text: "The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."} + var Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values = &Message{code: 18033, category: CategoryError, key: "Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033", text: "Type '{0}' is not assignable to type '{1}' as required for computed enum member values."} + var Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment = &Message{code: 18034, category: CategoryMessage, key: "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", text: "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."} + var Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name = &Message{code: 18035, category: CategoryError, key: "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", text: "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."} + var Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator = &Message{code: 18036, category: CategoryError, key: "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", text: "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."} + var X_await_expression_cannot_be_used_inside_a_class_static_block = &Message{code: 18037, category: CategoryError, key: "await_expression_cannot_be_used_inside_a_class_static_block_18037", text: "'await' expression cannot be used inside a class static block."} + var X_for_await_loops_cannot_be_used_inside_a_class_static_block = &Message{code: 18038, category: CategoryError, key: "for_await_loops_cannot_be_used_inside_a_class_static_block_18038", text: "'for await' loops cannot be used inside a class static block."} + var Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block = &Message{code: 18039, category: CategoryError, key: "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", text: "Invalid use of '{0}'. It cannot be used inside a class static block."} + var A_return_statement_cannot_be_used_inside_a_class_static_block = &Message{code: 18041, category: CategoryError, key: "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", text: "A 'return' statement cannot be used inside a class static block."} + var X_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation = &Message{code: 18042, category: CategoryError, key: "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", text: "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."} + var Types_cannot_appear_in_export_declarations_in_JavaScript_files = &Message{code: 18043, category: CategoryError, key: "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", text: "Types cannot appear in export declarations in JavaScript files."} + var X_0_is_automatically_exported_here = &Message{code: 18044, category: CategoryMessage, key: "_0_is_automatically_exported_here_18044", text: "'{0}' is automatically exported here."} + var Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher = &Message{code: 18045, category: CategoryError, key: "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", text: "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."} + var X_0_is_of_type_unknown = &Message{code: 18046, category: CategoryError, key: "_0_is_of_type_unknown_18046", text: "'{0}' is of type 'unknown'."} + var X_0_is_possibly_null = &Message{code: 18047, category: CategoryError, key: "_0_is_possibly_null_18047", text: "'{0}' is possibly 'null'."} + var X_0_is_possibly_undefined = &Message{code: 18048, category: CategoryError, key: "_0_is_possibly_undefined_18048", text: "'{0}' is possibly 'undefined'."} + var X_0_is_possibly_null_or_undefined = &Message{code: 18049, category: CategoryError, key: "_0_is_possibly_null_or_undefined_18049", text: "'{0}' is possibly 'null' or 'undefined'."} + var The_value_0_cannot_be_used_here = &Message{code: 18050, category: CategoryError, key: "The_value_0_cannot_be_used_here_18050", text: "The value '{0}' cannot be used here."} + var Compiler_option_0_cannot_be_given_an_empty_string = &Message{code: 18051, category: CategoryError, key: "Compiler_option_0_cannot_be_given_an_empty_string_18051", text: "Compiler option '{0}' cannot be given an empty string."} + var Its_type_0_is_not_a_valid_JSX_element_type = &Message{code: 18053, category: CategoryError, key: "Its_type_0_is_not_a_valid_JSX_element_type_18053", text: "Its type '{0}' is not a valid JSX element type."} + var X_await_using_statements_cannot_be_used_inside_a_class_static_block = &Message{code: 18054, category: CategoryError, key: "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", text: "'await using' statements cannot be used inside a class static block."} + var X_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled = &Message{code: 18055, category: CategoryError, key: "_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055", text: "'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."} + var Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled = &Message{code: 18056, category: CategoryError, key: "Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056", text: "Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled."} + var String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020 = &Message{code: 18057, category: CategoryError, key: "String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es_18057", text: "String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'."} + var X_module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node = &Message{code: 69010, category: CategoryMessage, key: "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", text: "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"} + var File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module = &Message{code: 80001, category: CategorySuggestion, key: "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", text: "File is a CommonJS module; it may be converted to an ES module."} + var This_constructor_function_may_be_converted_to_a_class_declaration = &Message{code: 80002, category: CategorySuggestion, key: "This_constructor_function_may_be_converted_to_a_class_declaration_80002", text: "This constructor function may be converted to a class declaration."} + var Import_may_be_converted_to_a_default_import = &Message{code: 80003, category: CategorySuggestion, key: "Import_may_be_converted_to_a_default_import_80003", text: "Import may be converted to a default import."} + var JSDoc_types_may_be_moved_to_TypeScript_types = &Message{code: 80004, category: CategorySuggestion, key: "JSDoc_types_may_be_moved_to_TypeScript_types_80004", text: "JSDoc types may be moved to TypeScript types."} + var X_require_call_may_be_converted_to_an_import = &Message{code: 80005, category: CategorySuggestion, key: "require_call_may_be_converted_to_an_import_80005", text: "'require' call may be converted to an import."} + var This_may_be_converted_to_an_async_function = &Message{code: 80006, category: CategorySuggestion, key: "This_may_be_converted_to_an_async_function_80006", text: "This may be converted to an async function."} + var X_await_has_no_effect_on_the_type_of_this_expression = &Message{code: 80007, category: CategorySuggestion, key: "await_has_no_effect_on_the_type_of_this_expression_80007", text: "'await' has no effect on the type of this expression."} + var Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers = &Message{code: 80008, category: CategorySuggestion, key: "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008", text: "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."} + var JSDoc_typedef_may_be_converted_to_TypeScript_type = &Message{code: 80009, category: CategorySuggestion, key: "JSDoc_typedef_may_be_converted_to_TypeScript_type_80009", text: "JSDoc typedef may be converted to TypeScript type."} + var JSDoc_typedefs_may_be_converted_to_TypeScript_types = &Message{code: 80010, category: CategorySuggestion, key: "JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010", text: "JSDoc typedefs may be converted to TypeScript types."} + var Add_missing_super_call = &Message{code: 90001, category: CategoryMessage, key: "Add_missing_super_call_90001", text: "Add missing 'super()' call"} + var Make_super_call_the_first_statement_in_the_constructor = &Message{code: 90002, category: CategoryMessage, key: "Make_super_call_the_first_statement_in_the_constructor_90002", text: "Make 'super()' call the first statement in the constructor"} + var Change_extends_to_implements = &Message{code: 90003, category: CategoryMessage, key: "Change_extends_to_implements_90003", text: "Change 'extends' to 'implements'"} + var Remove_unused_declaration_for_Colon_0 = &Message{code: 90004, category: CategoryMessage, key: "Remove_unused_declaration_for_Colon_0_90004", text: "Remove unused declaration for: '{0}'"} + var Remove_import_from_0 = &Message{code: 90005, category: CategoryMessage, key: "Remove_import_from_0_90005", text: "Remove import from '{0}'"} + var Implement_interface_0 = &Message{code: 90006, category: CategoryMessage, key: "Implement_interface_0_90006", text: "Implement interface '{0}'"} + var Implement_inherited_abstract_class = &Message{code: 90007, category: CategoryMessage, key: "Implement_inherited_abstract_class_90007", text: "Implement inherited abstract class"} + var Add_0_to_unresolved_variable = &Message{code: 90008, category: CategoryMessage, key: "Add_0_to_unresolved_variable_90008", text: "Add '{0}.' to unresolved variable"} + var Remove_variable_statement = &Message{code: 90010, category: CategoryMessage, key: "Remove_variable_statement_90010", text: "Remove variable statement"} + var Remove_template_tag = &Message{code: 90011, category: CategoryMessage, key: "Remove_template_tag_90011", text: "Remove template tag"} + var Remove_type_parameters = &Message{code: 90012, category: CategoryMessage, key: "Remove_type_parameters_90012", text: "Remove type parameters"} + var Import_0_from_1 = &Message{code: 90013, category: CategoryMessage, key: "Import_0_from_1_90013", text: "Import '{0}' from \"{1}\""} + var Change_0_to_1 = &Message{code: 90014, category: CategoryMessage, key: "Change_0_to_1_90014", text: "Change '{0}' to '{1}'"} + var Declare_property_0 = &Message{code: 90016, category: CategoryMessage, key: "Declare_property_0_90016", text: "Declare property '{0}'"} + var Add_index_signature_for_property_0 = &Message{code: 90017, category: CategoryMessage, key: "Add_index_signature_for_property_0_90017", text: "Add index signature for property '{0}'"} + var Disable_checking_for_this_file = &Message{code: 90018, category: CategoryMessage, key: "Disable_checking_for_this_file_90018", text: "Disable checking for this file"} + var Ignore_this_error_message = &Message{code: 90019, category: CategoryMessage, key: "Ignore_this_error_message_90019", text: "Ignore this error message"} + var Initialize_property_0_in_the_constructor = &Message{code: 90020, category: CategoryMessage, key: "Initialize_property_0_in_the_constructor_90020", text: "Initialize property '{0}' in the constructor"} + var Initialize_static_property_0 = &Message{code: 90021, category: CategoryMessage, key: "Initialize_static_property_0_90021", text: "Initialize static property '{0}'"} + var Change_spelling_to_0 = &Message{code: 90022, category: CategoryMessage, key: "Change_spelling_to_0_90022", text: "Change spelling to '{0}'"} + var Declare_method_0 = &Message{code: 90023, category: CategoryMessage, key: "Declare_method_0_90023", text: "Declare method '{0}'"} + var Declare_static_method_0 = &Message{code: 90024, category: CategoryMessage, key: "Declare_static_method_0_90024", text: "Declare static method '{0}'"} + var Prefix_0_with_an_underscore = &Message{code: 90025, category: CategoryMessage, key: "Prefix_0_with_an_underscore_90025", text: "Prefix '{0}' with an underscore"} + var Rewrite_as_the_indexed_access_type_0 = &Message{code: 90026, category: CategoryMessage, key: "Rewrite_as_the_indexed_access_type_0_90026", text: "Rewrite as the indexed access type '{0}'"} + var Declare_static_property_0 = &Message{code: 90027, category: CategoryMessage, key: "Declare_static_property_0_90027", text: "Declare static property '{0}'"} + var Call_decorator_expression = &Message{code: 90028, category: CategoryMessage, key: "Call_decorator_expression_90028", text: "Call decorator expression"} + var Add_async_modifier_to_containing_function = &Message{code: 90029, category: CategoryMessage, key: "Add_async_modifier_to_containing_function_90029", text: "Add async modifier to containing function"} + var Replace_infer_0_with_unknown = &Message{code: 90030, category: CategoryMessage, key: "Replace_infer_0_with_unknown_90030", text: "Replace 'infer {0}' with 'unknown'"} + var Replace_all_unused_infer_with_unknown = &Message{code: 90031, category: CategoryMessage, key: "Replace_all_unused_infer_with_unknown_90031", text: "Replace all unused 'infer' with 'unknown'"} + var Add_parameter_name = &Message{code: 90034, category: CategoryMessage, key: "Add_parameter_name_90034", text: "Add parameter name"} + var Declare_private_property_0 = &Message{code: 90035, category: CategoryMessage, key: "Declare_private_property_0_90035", text: "Declare private property '{0}'"} + var Replace_0_with_Promise_1 = &Message{code: 90036, category: CategoryMessage, key: "Replace_0_with_Promise_1_90036", text: "Replace '{0}' with 'Promise<{1}>'"} + var Fix_all_incorrect_return_type_of_an_async_functions = &Message{code: 90037, category: CategoryMessage, key: "Fix_all_incorrect_return_type_of_an_async_functions_90037", text: "Fix all incorrect return type of an async functions"} + var Declare_private_method_0 = &Message{code: 90038, category: CategoryMessage, key: "Declare_private_method_0_90038", text: "Declare private method '{0}'"} + var Remove_unused_destructuring_declaration = &Message{code: 90039, category: CategoryMessage, key: "Remove_unused_destructuring_declaration_90039", text: "Remove unused destructuring declaration"} + var Remove_unused_declarations_for_Colon_0 = &Message{code: 90041, category: CategoryMessage, key: "Remove_unused_declarations_for_Colon_0_90041", text: "Remove unused declarations for: '{0}'"} + var Declare_a_private_field_named_0 = &Message{code: 90053, category: CategoryMessage, key: "Declare_a_private_field_named_0_90053", text: "Declare a private field named '{0}'."} + var Includes_imports_of_types_referenced_by_0 = &Message{code: 90054, category: CategoryMessage, key: "Includes_imports_of_types_referenced_by_0_90054", text: "Includes imports of types referenced by '{0}'"} + var Remove_type_from_import_declaration_from_0 = &Message{code: 90055, category: CategoryMessage, key: "Remove_type_from_import_declaration_from_0_90055", text: "Remove 'type' from import declaration from \"{0}\""} + var Remove_type_from_import_of_0_from_1 = &Message{code: 90056, category: CategoryMessage, key: "Remove_type_from_import_of_0_from_1_90056", text: "Remove 'type' from import of '{0}' from \"{1}\""} + var Add_import_from_0 = &Message{code: 90057, category: CategoryMessage, key: "Add_import_from_0_90057", text: "Add import from \"{0}\""} + var Update_import_from_0 = &Message{code: 90058, category: CategoryMessage, key: "Update_import_from_0_90058", text: "Update import from \"{0}\""} + var Export_0_from_module_1 = &Message{code: 90059, category: CategoryMessage, key: "Export_0_from_module_1_90059", text: "Export '{0}' from module '{1}'"} + var Export_all_referenced_locals = &Message{code: 90060, category: CategoryMessage, key: "Export_all_referenced_locals_90060", text: "Export all referenced locals"} + var Update_modifiers_of_0 = &Message{code: 90061, category: CategoryMessage, key: "Update_modifiers_of_0_90061", text: "Update modifiers of '{0}'"} + var Add_annotation_of_type_0 = &Message{code: 90062, category: CategoryMessage, key: "Add_annotation_of_type_0_90062", text: "Add annotation of type '{0}'"} + var Add_return_type_0 = &Message{code: 90063, category: CategoryMessage, key: "Add_return_type_0_90063", text: "Add return type '{0}'"} + var Extract_base_class_to_variable = &Message{code: 90064, category: CategoryMessage, key: "Extract_base_class_to_variable_90064", text: "Extract base class to variable"} + var Extract_default_export_to_variable = &Message{code: 90065, category: CategoryMessage, key: "Extract_default_export_to_variable_90065", text: "Extract default export to variable"} + var Extract_binding_expressions_to_variable = &Message{code: 90066, category: CategoryMessage, key: "Extract_binding_expressions_to_variable_90066", text: "Extract binding expressions to variable"} + var Add_all_missing_type_annotations = &Message{code: 90067, category: CategoryMessage, key: "Add_all_missing_type_annotations_90067", text: "Add all missing type annotations"} + var Add_satisfies_and_an_inline_type_assertion_with_0 = &Message{code: 90068, category: CategoryMessage, key: "Add_satisfies_and_an_inline_type_assertion_with_0_90068", text: "Add satisfies and an inline type assertion with '{0}'"} + var Extract_to_variable_and_replace_with_0_as_typeof_0 = &Message{code: 90069, category: CategoryMessage, key: "Extract_to_variable_and_replace_with_0_as_typeof_0_90069", text: "Extract to variable and replace with '{0} as typeof {0}'"} + var Mark_array_literal_as_const = &Message{code: 90070, category: CategoryMessage, key: "Mark_array_literal_as_const_90070", text: "Mark array literal as const"} + var Annotate_types_of_properties_expando_function_in_a_namespace = &Message{code: 90071, category: CategoryMessage, key: "Annotate_types_of_properties_expando_function_in_a_namespace_90071", text: "Annotate types of properties expando function in a namespace"} + var Convert_function_to_an_ES2015_class = &Message{code: 95001, category: CategoryMessage, key: "Convert_function_to_an_ES2015_class_95001", text: "Convert function to an ES2015 class"} + var Convert_0_to_1_in_0 = &Message{code: 95003, category: CategoryMessage, key: "Convert_0_to_1_in_0_95003", text: "Convert '{0}' to '{1} in {0}'"} + var Extract_to_0_in_1 = &Message{code: 95004, category: CategoryMessage, key: "Extract_to_0_in_1_95004", text: "Extract to {0} in {1}"} + var Extract_function = &Message{code: 95005, category: CategoryMessage, key: "Extract_function_95005", text: "Extract function"} + var Extract_constant = &Message{code: 95006, category: CategoryMessage, key: "Extract_constant_95006", text: "Extract constant"} + var Extract_to_0_in_enclosing_scope = &Message{code: 95007, category: CategoryMessage, key: "Extract_to_0_in_enclosing_scope_95007", text: "Extract to {0} in enclosing scope"} + var Extract_to_0_in_1_scope = &Message{code: 95008, category: CategoryMessage, key: "Extract_to_0_in_1_scope_95008", text: "Extract to {0} in {1} scope"} + var Annotate_with_type_from_JSDoc = &Message{code: 95009, category: CategoryMessage, key: "Annotate_with_type_from_JSDoc_95009", text: "Annotate with type from JSDoc"} + var Infer_type_of_0_from_usage = &Message{code: 95011, category: CategoryMessage, key: "Infer_type_of_0_from_usage_95011", text: "Infer type of '{0}' from usage"} + var Infer_parameter_types_from_usage = &Message{code: 95012, category: CategoryMessage, key: "Infer_parameter_types_from_usage_95012", text: "Infer parameter types from usage"} + var Convert_to_default_import = &Message{code: 95013, category: CategoryMessage, key: "Convert_to_default_import_95013", text: "Convert to default import"} + var Install_0 = &Message{code: 95014, category: CategoryMessage, key: "Install_0_95014", text: "Install '{0}'"} + var Replace_import_with_0 = &Message{code: 95015, category: CategoryMessage, key: "Replace_import_with_0_95015", text: "Replace import with '{0}'."} + var Use_synthetic_default_member = &Message{code: 95016, category: CategoryMessage, key: "Use_synthetic_default_member_95016", text: "Use synthetic 'default' member."} + var Convert_to_ES_module = &Message{code: 95017, category: CategoryMessage, key: "Convert_to_ES_module_95017", text: "Convert to ES module"} + var Add_undefined_type_to_property_0 = &Message{code: 95018, category: CategoryMessage, key: "Add_undefined_type_to_property_0_95018", text: "Add 'undefined' type to property '{0}'"} + var Add_initializer_to_property_0 = &Message{code: 95019, category: CategoryMessage, key: "Add_initializer_to_property_0_95019", text: "Add initializer to property '{0}'"} + var Add_definite_assignment_assertion_to_property_0 = &Message{code: 95020, category: CategoryMessage, key: "Add_definite_assignment_assertion_to_property_0_95020", text: "Add definite assignment assertion to property '{0}'"} + var Convert_all_type_literals_to_mapped_type = &Message{code: 95021, category: CategoryMessage, key: "Convert_all_type_literals_to_mapped_type_95021", text: "Convert all type literals to mapped type"} + var Add_all_missing_members = &Message{code: 95022, category: CategoryMessage, key: "Add_all_missing_members_95022", text: "Add all missing members"} + var Infer_all_types_from_usage = &Message{code: 95023, category: CategoryMessage, key: "Infer_all_types_from_usage_95023", text: "Infer all types from usage"} + var Delete_all_unused_declarations = &Message{code: 95024, category: CategoryMessage, key: "Delete_all_unused_declarations_95024", text: "Delete all unused declarations"} + var Prefix_all_unused_declarations_with_where_possible = &Message{code: 95025, category: CategoryMessage, key: "Prefix_all_unused_declarations_with_where_possible_95025", text: "Prefix all unused declarations with '_' where possible"} + var Fix_all_detected_spelling_errors = &Message{code: 95026, category: CategoryMessage, key: "Fix_all_detected_spelling_errors_95026", text: "Fix all detected spelling errors"} + var Add_initializers_to_all_uninitialized_properties = &Message{code: 95027, category: CategoryMessage, key: "Add_initializers_to_all_uninitialized_properties_95027", text: "Add initializers to all uninitialized properties"} + var Add_definite_assignment_assertions_to_all_uninitialized_properties = &Message{code: 95028, category: CategoryMessage, key: "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028", text: "Add definite assignment assertions to all uninitialized properties"} + var Add_undefined_type_to_all_uninitialized_properties = &Message{code: 95029, category: CategoryMessage, key: "Add_undefined_type_to_all_uninitialized_properties_95029", text: "Add undefined type to all uninitialized properties"} + var Change_all_jsdoc_style_types_to_TypeScript = &Message{code: 95030, category: CategoryMessage, key: "Change_all_jsdoc_style_types_to_TypeScript_95030", text: "Change all jsdoc-style types to TypeScript"} + var Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types = &Message{code: 95031, category: CategoryMessage, key: "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031", text: "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"} + var Implement_all_unimplemented_interfaces = &Message{code: 95032, category: CategoryMessage, key: "Implement_all_unimplemented_interfaces_95032", text: "Implement all unimplemented interfaces"} + var Install_all_missing_types_packages = &Message{code: 95033, category: CategoryMessage, key: "Install_all_missing_types_packages_95033", text: "Install all missing types packages"} + var Rewrite_all_as_indexed_access_types = &Message{code: 95034, category: CategoryMessage, key: "Rewrite_all_as_indexed_access_types_95034", text: "Rewrite all as indexed access types"} + var Convert_all_to_default_imports = &Message{code: 95035, category: CategoryMessage, key: "Convert_all_to_default_imports_95035", text: "Convert all to default imports"} + var Make_all_super_calls_the_first_statement_in_their_constructor = &Message{code: 95036, category: CategoryMessage, key: "Make_all_super_calls_the_first_statement_in_their_constructor_95036", text: "Make all 'super()' calls the first statement in their constructor"} + var Add_qualifier_to_all_unresolved_variables_matching_a_member_name = &Message{code: 95037, category: CategoryMessage, key: "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037", text: "Add qualifier to all unresolved variables matching a member name"} + var Change_all_extended_interfaces_to_implements = &Message{code: 95038, category: CategoryMessage, key: "Change_all_extended_interfaces_to_implements_95038", text: "Change all extended interfaces to 'implements'"} + var Add_all_missing_super_calls = &Message{code: 95039, category: CategoryMessage, key: "Add_all_missing_super_calls_95039", text: "Add all missing super calls"} + var Implement_all_inherited_abstract_classes = &Message{code: 95040, category: CategoryMessage, key: "Implement_all_inherited_abstract_classes_95040", text: "Implement all inherited abstract classes"} + var Add_all_missing_async_modifiers = &Message{code: 95041, category: CategoryMessage, key: "Add_all_missing_async_modifiers_95041", text: "Add all missing 'async' modifiers"} + var Add_ts_ignore_to_all_error_messages = &Message{code: 95042, category: CategoryMessage, key: "Add_ts_ignore_to_all_error_messages_95042", text: "Add '@ts-ignore' to all error messages"} + var Annotate_everything_with_types_from_JSDoc = &Message{code: 95043, category: CategoryMessage, key: "Annotate_everything_with_types_from_JSDoc_95043", text: "Annotate everything with types from JSDoc"} + var Add_to_all_uncalled_decorators = &Message{code: 95044, category: CategoryMessage, key: "Add_to_all_uncalled_decorators_95044", text: "Add '()' to all uncalled decorators"} + var Convert_all_constructor_functions_to_classes = &Message{code: 95045, category: CategoryMessage, key: "Convert_all_constructor_functions_to_classes_95045", text: "Convert all constructor functions to classes"} + var Generate_get_and_set_accessors = &Message{code: 95046, category: CategoryMessage, key: "Generate_get_and_set_accessors_95046", text: "Generate 'get' and 'set' accessors"} + var Convert_require_to_import = &Message{code: 95047, category: CategoryMessage, key: "Convert_require_to_import_95047", text: "Convert 'require' to 'import'"} + var Convert_all_require_to_import = &Message{code: 95048, category: CategoryMessage, key: "Convert_all_require_to_import_95048", text: "Convert all 'require' to 'import'"} + var Move_to_a_new_file = &Message{code: 95049, category: CategoryMessage, key: "Move_to_a_new_file_95049", text: "Move to a new file"} + var Remove_unreachable_code = &Message{code: 95050, category: CategoryMessage, key: "Remove_unreachable_code_95050", text: "Remove unreachable code"} + var Remove_all_unreachable_code = &Message{code: 95051, category: CategoryMessage, key: "Remove_all_unreachable_code_95051", text: "Remove all unreachable code"} + var Add_missing_typeof = &Message{code: 95052, category: CategoryMessage, key: "Add_missing_typeof_95052", text: "Add missing 'typeof'"} + var Remove_unused_label = &Message{code: 95053, category: CategoryMessage, key: "Remove_unused_label_95053", text: "Remove unused label"} + var Remove_all_unused_labels = &Message{code: 95054, category: CategoryMessage, key: "Remove_all_unused_labels_95054", text: "Remove all unused labels"} + var Convert_0_to_mapped_object_type = &Message{code: 95055, category: CategoryMessage, key: "Convert_0_to_mapped_object_type_95055", text: "Convert '{0}' to mapped object type"} + var Convert_namespace_import_to_named_imports = &Message{code: 95056, category: CategoryMessage, key: "Convert_namespace_import_to_named_imports_95056", text: "Convert namespace import to named imports"} + var Convert_named_imports_to_namespace_import = &Message{code: 95057, category: CategoryMessage, key: "Convert_named_imports_to_namespace_import_95057", text: "Convert named imports to namespace import"} + var Add_or_remove_braces_in_an_arrow_function = &Message{code: 95058, category: CategoryMessage, key: "Add_or_remove_braces_in_an_arrow_function_95058", text: "Add or remove braces in an arrow function"} + var Add_braces_to_arrow_function = &Message{code: 95059, category: CategoryMessage, key: "Add_braces_to_arrow_function_95059", text: "Add braces to arrow function"} + var Remove_braces_from_arrow_function = &Message{code: 95060, category: CategoryMessage, key: "Remove_braces_from_arrow_function_95060", text: "Remove braces from arrow function"} + var Convert_default_export_to_named_export = &Message{code: 95061, category: CategoryMessage, key: "Convert_default_export_to_named_export_95061", text: "Convert default export to named export"} + var Convert_named_export_to_default_export = &Message{code: 95062, category: CategoryMessage, key: "Convert_named_export_to_default_export_95062", text: "Convert named export to default export"} + var Add_missing_enum_member_0 = &Message{code: 95063, category: CategoryMessage, key: "Add_missing_enum_member_0_95063", text: "Add missing enum member '{0}'"} + var Add_all_missing_imports = &Message{code: 95064, category: CategoryMessage, key: "Add_all_missing_imports_95064", text: "Add all missing imports"} + var Convert_to_async_function = &Message{code: 95065, category: CategoryMessage, key: "Convert_to_async_function_95065", text: "Convert to async function"} + var Convert_all_to_async_functions = &Message{code: 95066, category: CategoryMessage, key: "Convert_all_to_async_functions_95066", text: "Convert all to async functions"} + var Add_missing_call_parentheses = &Message{code: 95067, category: CategoryMessage, key: "Add_missing_call_parentheses_95067", text: "Add missing call parentheses"} + var Add_all_missing_call_parentheses = &Message{code: 95068, category: CategoryMessage, key: "Add_all_missing_call_parentheses_95068", text: "Add all missing call parentheses"} + var Add_unknown_conversion_for_non_overlapping_types = &Message{code: 95069, category: CategoryMessage, key: "Add_unknown_conversion_for_non_overlapping_types_95069", text: "Add 'unknown' conversion for non-overlapping types"} + var Add_unknown_to_all_conversions_of_non_overlapping_types = &Message{code: 95070, category: CategoryMessage, key: "Add_unknown_to_all_conversions_of_non_overlapping_types_95070", text: "Add 'unknown' to all conversions of non-overlapping types"} + var Add_missing_new_operator_to_call = &Message{code: 95071, category: CategoryMessage, key: "Add_missing_new_operator_to_call_95071", text: "Add missing 'new' operator to call"} + var Add_missing_new_operator_to_all_calls = &Message{code: 95072, category: CategoryMessage, key: "Add_missing_new_operator_to_all_calls_95072", text: "Add missing 'new' operator to all calls"} + var Add_names_to_all_parameters_without_names = &Message{code: 95073, category: CategoryMessage, key: "Add_names_to_all_parameters_without_names_95073", text: "Add names to all parameters without names"} + var Enable_the_experimentalDecorators_option_in_your_configuration_file = &Message{code: 95074, category: CategoryMessage, key: "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", text: "Enable the 'experimentalDecorators' option in your configuration file"} + var Convert_parameters_to_destructured_object = &Message{code: 95075, category: CategoryMessage, key: "Convert_parameters_to_destructured_object_95075", text: "Convert parameters to destructured object"} + var Extract_type = &Message{code: 95077, category: CategoryMessage, key: "Extract_type_95077", text: "Extract type"} + var Extract_to_type_alias = &Message{code: 95078, category: CategoryMessage, key: "Extract_to_type_alias_95078", text: "Extract to type alias"} + var Extract_to_typedef = &Message{code: 95079, category: CategoryMessage, key: "Extract_to_typedef_95079", text: "Extract to typedef"} + var Infer_this_type_of_0_from_usage = &Message{code: 95080, category: CategoryMessage, key: "Infer_this_type_of_0_from_usage_95080", text: "Infer 'this' type of '{0}' from usage"} + var Add_const_to_unresolved_variable = &Message{code: 95081, category: CategoryMessage, key: "Add_const_to_unresolved_variable_95081", text: "Add 'const' to unresolved variable"} + var Add_const_to_all_unresolved_variables = &Message{code: 95082, category: CategoryMessage, key: "Add_const_to_all_unresolved_variables_95082", text: "Add 'const' to all unresolved variables"} + var Add_await = &Message{code: 95083, category: CategoryMessage, key: "Add_await_95083", text: "Add 'await'"} + var Add_await_to_initializer_for_0 = &Message{code: 95084, category: CategoryMessage, key: "Add_await_to_initializer_for_0_95084", text: "Add 'await' to initializer for '{0}'"} + var Fix_all_expressions_possibly_missing_await = &Message{code: 95085, category: CategoryMessage, key: "Fix_all_expressions_possibly_missing_await_95085", text: "Fix all expressions possibly missing 'await'"} + var Remove_unnecessary_await = &Message{code: 95086, category: CategoryMessage, key: "Remove_unnecessary_await_95086", text: "Remove unnecessary 'await'"} + var Remove_all_unnecessary_uses_of_await = &Message{code: 95087, category: CategoryMessage, key: "Remove_all_unnecessary_uses_of_await_95087", text: "Remove all unnecessary uses of 'await'"} + var Enable_the_jsx_flag_in_your_configuration_file = &Message{code: 95088, category: CategoryMessage, key: "Enable_the_jsx_flag_in_your_configuration_file_95088", text: "Enable the '--jsx' flag in your configuration file"} + var Add_await_to_initializers = &Message{code: 95089, category: CategoryMessage, key: "Add_await_to_initializers_95089", text: "Add 'await' to initializers"} + var Extract_to_interface = &Message{code: 95090, category: CategoryMessage, key: "Extract_to_interface_95090", text: "Extract to interface"} + var Convert_to_a_bigint_numeric_literal = &Message{code: 95091, category: CategoryMessage, key: "Convert_to_a_bigint_numeric_literal_95091", text: "Convert to a bigint numeric literal"} + var Convert_all_to_bigint_numeric_literals = &Message{code: 95092, category: CategoryMessage, key: "Convert_all_to_bigint_numeric_literals_95092", text: "Convert all to bigint numeric literals"} + var Convert_const_to_let = &Message{code: 95093, category: CategoryMessage, key: "Convert_const_to_let_95093", text: "Convert 'const' to 'let'"} + var Prefix_with_declare = &Message{code: 95094, category: CategoryMessage, key: "Prefix_with_declare_95094", text: "Prefix with 'declare'"} + var Prefix_all_incorrect_property_declarations_with_declare = &Message{code: 95095, category: CategoryMessage, key: "Prefix_all_incorrect_property_declarations_with_declare_95095", text: "Prefix all incorrect property declarations with 'declare'"} + var Convert_to_template_string = &Message{code: 95096, category: CategoryMessage, key: "Convert_to_template_string_95096", text: "Convert to template string"} + var Add_export_to_make_this_file_into_a_module = &Message{code: 95097, category: CategoryMessage, key: "Add_export_to_make_this_file_into_a_module_95097", text: "Add 'export {}' to make this file into a module"} + var Set_the_target_option_in_your_configuration_file_to_0 = &Message{code: 95098, category: CategoryMessage, key: "Set_the_target_option_in_your_configuration_file_to_0_95098", text: "Set the 'target' option in your configuration file to '{0}'"} + var Set_the_module_option_in_your_configuration_file_to_0 = &Message{code: 95099, category: CategoryMessage, key: "Set_the_module_option_in_your_configuration_file_to_0_95099", text: "Set the 'module' option in your configuration file to '{0}'"} + var Convert_invalid_character_to_its_html_entity_code = &Message{code: 95100, category: CategoryMessage, key: "Convert_invalid_character_to_its_html_entity_code_95100", text: "Convert invalid character to its html entity code"} + var Convert_all_invalid_characters_to_HTML_entity_code = &Message{code: 95101, category: CategoryMessage, key: "Convert_all_invalid_characters_to_HTML_entity_code_95101", text: "Convert all invalid characters to HTML entity code"} + var Convert_all_const_to_let = &Message{code: 95102, category: CategoryMessage, key: "Convert_all_const_to_let_95102", text: "Convert all 'const' to 'let'"} + var Convert_function_expression_0_to_arrow_function = &Message{code: 95105, category: CategoryMessage, key: "Convert_function_expression_0_to_arrow_function_95105", text: "Convert function expression '{0}' to arrow function"} + var Convert_function_declaration_0_to_arrow_function = &Message{code: 95106, category: CategoryMessage, key: "Convert_function_declaration_0_to_arrow_function_95106", text: "Convert function declaration '{0}' to arrow function"} + var Fix_all_implicit_this_errors = &Message{code: 95107, category: CategoryMessage, key: "Fix_all_implicit_this_errors_95107", text: "Fix all implicit-'this' errors"} + var Wrap_invalid_character_in_an_expression_container = &Message{code: 95108, category: CategoryMessage, key: "Wrap_invalid_character_in_an_expression_container_95108", text: "Wrap invalid character in an expression container"} + var Wrap_all_invalid_characters_in_an_expression_container = &Message{code: 95109, category: CategoryMessage, key: "Wrap_all_invalid_characters_in_an_expression_container_95109", text: "Wrap all invalid characters in an expression container"} + var Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file = &Message{code: 95110, category: CategoryMessage, key: "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", text: "Visit https://aka.ms/tsconfig to read more about this file"} + var Add_a_return_statement = &Message{code: 95111, category: CategoryMessage, key: "Add_a_return_statement_95111", text: "Add a return statement"} + var Remove_braces_from_arrow_function_body = &Message{code: 95112, category: CategoryMessage, key: "Remove_braces_from_arrow_function_body_95112", text: "Remove braces from arrow function body"} + var Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal = &Message{code: 95113, category: CategoryMessage, key: "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", text: "Wrap the following body with parentheses which should be an object literal"} + var Add_all_missing_return_statement = &Message{code: 95114, category: CategoryMessage, key: "Add_all_missing_return_statement_95114", text: "Add all missing return statement"} + var Remove_braces_from_all_arrow_function_bodies_with_relevant_issues = &Message{code: 95115, category: CategoryMessage, key: "Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115", text: "Remove braces from all arrow function bodies with relevant issues"} + var Wrap_all_object_literal_with_parentheses = &Message{code: 95116, category: CategoryMessage, key: "Wrap_all_object_literal_with_parentheses_95116", text: "Wrap all object literal with parentheses"} + var Move_labeled_tuple_element_modifiers_to_labels = &Message{code: 95117, category: CategoryMessage, key: "Move_labeled_tuple_element_modifiers_to_labels_95117", text: "Move labeled tuple element modifiers to labels"} + var Convert_overload_list_to_single_signature = &Message{code: 95118, category: CategoryMessage, key: "Convert_overload_list_to_single_signature_95118", text: "Convert overload list to single signature"} + var Generate_get_and_set_accessors_for_all_overriding_properties = &Message{code: 95119, category: CategoryMessage, key: "Generate_get_and_set_accessors_for_all_overriding_properties_95119", text: "Generate 'get' and 'set' accessors for all overriding properties"} + var Wrap_in_JSX_fragment = &Message{code: 95120, category: CategoryMessage, key: "Wrap_in_JSX_fragment_95120", text: "Wrap in JSX fragment"} + var Wrap_all_unparented_JSX_in_JSX_fragment = &Message{code: 95121, category: CategoryMessage, key: "Wrap_all_unparented_JSX_in_JSX_fragment_95121", text: "Wrap all unparented JSX in JSX fragment"} + var Convert_arrow_function_or_function_expression = &Message{code: 95122, category: CategoryMessage, key: "Convert_arrow_function_or_function_expression_95122", text: "Convert arrow function or function expression"} + var Convert_to_anonymous_function = &Message{code: 95123, category: CategoryMessage, key: "Convert_to_anonymous_function_95123", text: "Convert to anonymous function"} + var Convert_to_named_function = &Message{code: 95124, category: CategoryMessage, key: "Convert_to_named_function_95124", text: "Convert to named function"} + var Convert_to_arrow_function = &Message{code: 95125, category: CategoryMessage, key: "Convert_to_arrow_function_95125", text: "Convert to arrow function"} + var Remove_parentheses = &Message{code: 95126, category: CategoryMessage, key: "Remove_parentheses_95126", text: "Remove parentheses"} + var Could_not_find_a_containing_arrow_function = &Message{code: 95127, category: CategoryMessage, key: "Could_not_find_a_containing_arrow_function_95127", text: "Could not find a containing arrow function"} + var Containing_function_is_not_an_arrow_function = &Message{code: 95128, category: CategoryMessage, key: "Containing_function_is_not_an_arrow_function_95128", text: "Containing function is not an arrow function"} + var Could_not_find_export_statement = &Message{code: 95129, category: CategoryMessage, key: "Could_not_find_export_statement_95129", text: "Could not find export statement"} + var This_file_already_has_a_default_export = &Message{code: 95130, category: CategoryMessage, key: "This_file_already_has_a_default_export_95130", text: "This file already has a default export"} + var Could_not_find_import_clause = &Message{code: 95131, category: CategoryMessage, key: "Could_not_find_import_clause_95131", text: "Could not find import clause"} + var Could_not_find_namespace_import_or_named_imports = &Message{code: 95132, category: CategoryMessage, key: "Could_not_find_namespace_import_or_named_imports_95132", text: "Could not find namespace import or named imports"} + var Selection_is_not_a_valid_type_node = &Message{code: 95133, category: CategoryMessage, key: "Selection_is_not_a_valid_type_node_95133", text: "Selection is not a valid type node"} + var No_type_could_be_extracted_from_this_type_node = &Message{code: 95134, category: CategoryMessage, key: "No_type_could_be_extracted_from_this_type_node_95134", text: "No type could be extracted from this type node"} + var Could_not_find_property_for_which_to_generate_accessor = &Message{code: 95135, category: CategoryMessage, key: "Could_not_find_property_for_which_to_generate_accessor_95135", text: "Could not find property for which to generate accessor"} + var Name_is_not_valid = &Message{code: 95136, category: CategoryMessage, key: "Name_is_not_valid_95136", text: "Name is not valid"} + var Can_only_convert_property_with_modifier = &Message{code: 95137, category: CategoryMessage, key: "Can_only_convert_property_with_modifier_95137", text: "Can only convert property with modifier"} + var Switch_each_misused_0_to_1 = &Message{code: 95138, category: CategoryMessage, key: "Switch_each_misused_0_to_1_95138", text: "Switch each misused '{0}' to '{1}'"} + var Convert_to_optional_chain_expression = &Message{code: 95139, category: CategoryMessage, key: "Convert_to_optional_chain_expression_95139", text: "Convert to optional chain expression"} + var Could_not_find_convertible_access_expression = &Message{code: 95140, category: CategoryMessage, key: "Could_not_find_convertible_access_expression_95140", text: "Could not find convertible access expression"} + var Could_not_find_matching_access_expressions = &Message{code: 95141, category: CategoryMessage, key: "Could_not_find_matching_access_expressions_95141", text: "Could not find matching access expressions"} + var Can_only_convert_logical_AND_access_chains = &Message{code: 95142, category: CategoryMessage, key: "Can_only_convert_logical_AND_access_chains_95142", text: "Can only convert logical AND access chains"} + var Add_void_to_Promise_resolved_without_a_value = &Message{code: 95143, category: CategoryMessage, key: "Add_void_to_Promise_resolved_without_a_value_95143", text: "Add 'void' to Promise resolved without a value"} + var Add_void_to_all_Promises_resolved_without_a_value = &Message{code: 95144, category: CategoryMessage, key: "Add_void_to_all_Promises_resolved_without_a_value_95144", text: "Add 'void' to all Promises resolved without a value"} + var Use_element_access_for_0 = &Message{code: 95145, category: CategoryMessage, key: "Use_element_access_for_0_95145", text: "Use element access for '{0}'"} + var Use_element_access_for_all_undeclared_properties = &Message{code: 95146, category: CategoryMessage, key: "Use_element_access_for_all_undeclared_properties_95146", text: "Use element access for all undeclared properties."} + var Delete_all_unused_imports = &Message{code: 95147, category: CategoryMessage, key: "Delete_all_unused_imports_95147", text: "Delete all unused imports"} + var Infer_function_return_type = &Message{code: 95148, category: CategoryMessage, key: "Infer_function_return_type_95148", text: "Infer function return type"} + var Return_type_must_be_inferred_from_a_function = &Message{code: 95149, category: CategoryMessage, key: "Return_type_must_be_inferred_from_a_function_95149", text: "Return type must be inferred from a function"} + var Could_not_determine_function_return_type = &Message{code: 95150, category: CategoryMessage, key: "Could_not_determine_function_return_type_95150", text: "Could not determine function return type"} + var Could_not_convert_to_arrow_function = &Message{code: 95151, category: CategoryMessage, key: "Could_not_convert_to_arrow_function_95151", text: "Could not convert to arrow function"} + var Could_not_convert_to_named_function = &Message{code: 95152, category: CategoryMessage, key: "Could_not_convert_to_named_function_95152", text: "Could not convert to named function"} + var Could_not_convert_to_anonymous_function = &Message{code: 95153, category: CategoryMessage, key: "Could_not_convert_to_anonymous_function_95153", text: "Could not convert to anonymous function"} + var Can_only_convert_string_concatenations_and_string_literals = &Message{code: 95154, category: CategoryMessage, key: "Can_only_convert_string_concatenations_and_string_literals_95154", text: "Can only convert string concatenations and string literals"} + var Selection_is_not_a_valid_statement_or_statements = &Message{code: 95155, category: CategoryMessage, key: "Selection_is_not_a_valid_statement_or_statements_95155", text: "Selection is not a valid statement or statements"} + var Add_missing_function_declaration_0 = &Message{code: 95156, category: CategoryMessage, key: "Add_missing_function_declaration_0_95156", text: "Add missing function declaration '{0}'"} + var Add_all_missing_function_declarations = &Message{code: 95157, category: CategoryMessage, key: "Add_all_missing_function_declarations_95157", text: "Add all missing function declarations"} + var Method_not_implemented = &Message{code: 95158, category: CategoryMessage, key: "Method_not_implemented_95158", text: "Method not implemented."} + var Function_not_implemented = &Message{code: 95159, category: CategoryMessage, key: "Function_not_implemented_95159", text: "Function not implemented."} + var Add_override_modifier = &Message{code: 95160, category: CategoryMessage, key: "Add_override_modifier_95160", text: "Add 'override' modifier"} + var Remove_override_modifier = &Message{code: 95161, category: CategoryMessage, key: "Remove_override_modifier_95161", text: "Remove 'override' modifier"} + var Add_all_missing_override_modifiers = &Message{code: 95162, category: CategoryMessage, key: "Add_all_missing_override_modifiers_95162", text: "Add all missing 'override' modifiers"} + var Remove_all_unnecessary_override_modifiers = &Message{code: 95163, category: CategoryMessage, key: "Remove_all_unnecessary_override_modifiers_95163", text: "Remove all unnecessary 'override' modifiers"} + var Can_only_convert_named_export = &Message{code: 95164, category: CategoryMessage, key: "Can_only_convert_named_export_95164", text: "Can only convert named export"} + var Add_missing_properties = &Message{code: 95165, category: CategoryMessage, key: "Add_missing_properties_95165", text: "Add missing properties"} + var Add_all_missing_properties = &Message{code: 95166, category: CategoryMessage, key: "Add_all_missing_properties_95166", text: "Add all missing properties"} + var Add_missing_attributes = &Message{code: 95167, category: CategoryMessage, key: "Add_missing_attributes_95167", text: "Add missing attributes"} + var Add_all_missing_attributes = &Message{code: 95168, category: CategoryMessage, key: "Add_all_missing_attributes_95168", text: "Add all missing attributes"} + var Add_undefined_to_optional_property_type = &Message{code: 95169, category: CategoryMessage, key: "Add_undefined_to_optional_property_type_95169", text: "Add 'undefined' to optional property type"} + var Convert_named_imports_to_default_import = &Message{code: 95170, category: CategoryMessage, key: "Convert_named_imports_to_default_import_95170", text: "Convert named imports to default import"} + var Delete_unused_param_tag_0 = &Message{code: 95171, category: CategoryMessage, key: "Delete_unused_param_tag_0_95171", text: "Delete unused '@param' tag '{0}'"} + var Delete_all_unused_param_tags = &Message{code: 95172, category: CategoryMessage, key: "Delete_all_unused_param_tags_95172", text: "Delete all unused '@param' tags"} + var Rename_param_tag_name_0_to_1 = &Message{code: 95173, category: CategoryMessage, key: "Rename_param_tag_name_0_to_1_95173", text: "Rename '@param' tag name '{0}' to '{1}'"} + var Use_0 = &Message{code: 95174, category: CategoryMessage, key: "Use_0_95174", text: "Use `{0}`."} + var Use_Number_isNaN_in_all_conditions = &Message{code: 95175, category: CategoryMessage, key: "Use_Number_isNaN_in_all_conditions_95175", text: "Use `Number.isNaN` in all conditions."} + var Convert_typedef_to_TypeScript_type = &Message{code: 95176, category: CategoryMessage, key: "Convert_typedef_to_TypeScript_type_95176", text: "Convert typedef to TypeScript type."} + var Convert_all_typedef_to_TypeScript_types = &Message{code: 95177, category: CategoryMessage, key: "Convert_all_typedef_to_TypeScript_types_95177", text: "Convert all typedef to TypeScript types."} + var Move_to_file = &Message{code: 95178, category: CategoryMessage, key: "Move_to_file_95178", text: "Move to file"} + var Cannot_move_to_file_selected_file_is_invalid = &Message{code: 95179, category: CategoryMessage, key: "Cannot_move_to_file_selected_file_is_invalid_95179", text: "Cannot move to file, selected file is invalid"} + var Use_import_type = &Message{code: 95180, category: CategoryMessage, key: "Use_import_type_95180", text: "Use 'import type'"} + var Use_type_0 = &Message{code: 95181, category: CategoryMessage, key: "Use_type_0_95181", text: "Use 'type {0}'"} + var Fix_all_with_type_only_imports = &Message{code: 95182, category: CategoryMessage, key: "Fix_all_with_type_only_imports_95182", text: "Fix all with type-only imports"} + var Cannot_move_statements_to_the_selected_file = &Message{code: 95183, category: CategoryMessage, key: "Cannot_move_statements_to_the_selected_file_95183", text: "Cannot move statements to the selected file"} + var Inline_variable = &Message{code: 95184, category: CategoryMessage, key: "Inline_variable_95184", text: "Inline variable"} + var Could_not_find_variable_to_inline = &Message{code: 95185, category: CategoryMessage, key: "Could_not_find_variable_to_inline_95185", text: "Could not find variable to inline."} + var Variables_with_multiple_declarations_cannot_be_inlined = &Message{code: 95186, category: CategoryMessage, key: "Variables_with_multiple_declarations_cannot_be_inlined_95186", text: "Variables with multiple declarations cannot be inlined."} + var Add_missing_comma_for_object_member_completion_0 = &Message{code: 95187, category: CategoryMessage, key: "Add_missing_comma_for_object_member_completion_0_95187", text: "Add missing comma for object member completion '{0}'."} + var Add_missing_parameter_to_0 = &Message{code: 95188, category: CategoryMessage, key: "Add_missing_parameter_to_0_95188", text: "Add missing parameter to '{0}'"} + var Add_missing_parameters_to_0 = &Message{code: 95189, category: CategoryMessage, key: "Add_missing_parameters_to_0_95189", text: "Add missing parameters to '{0}'"} + var Add_all_missing_parameters = &Message{code: 95190, category: CategoryMessage, key: "Add_all_missing_parameters_95190", text: "Add all missing parameters"} + var Add_optional_parameter_to_0 = &Message{code: 95191, category: CategoryMessage, key: "Add_optional_parameter_to_0_95191", text: "Add optional parameter to '{0}'"} + var Add_optional_parameters_to_0 = &Message{code: 95192, category: CategoryMessage, key: "Add_optional_parameters_to_0_95192", text: "Add optional parameters to '{0}'"} + var Add_all_optional_parameters = &Message{code: 95193, category: CategoryMessage, key: "Add_all_optional_parameters_95193", text: "Add all optional parameters"} + var Wrap_in_parentheses = &Message{code: 95194, category: CategoryMessage, key: "Wrap_in_parentheses_95194", text: "Wrap in parentheses"} + var Wrap_all_invalid_decorator_expressions_in_parentheses = &Message{code: 95195, category: CategoryMessage, key: "Wrap_all_invalid_decorator_expressions_in_parentheses_95195", text: "Wrap all invalid decorator expressions in parentheses"} + var Add_resolution_mode_import_attribute = &Message{code: 95196, category: CategoryMessage, key: "Add_resolution_mode_import_attribute_95196", text: "Add 'resolution-mode' import attribute"} + var Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it = &Message{code: 95197, category: CategoryMessage, key: "Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197", text: "Add 'resolution-mode' import attribute to all type-only imports that need it"} + var Do_not_print_diagnostics = &Message{code: 100000, category: CategoryMessage, key: "Do_not_print_diagnostics_100000", text: "Do not print diagnostics."} + var Run_in_single_threaded_mode = &Message{code: 100001, category: CategoryMessage, key: "Run_in_single_threaded_mode_100001", text: "Run in single threaded mode."} + var Generate_pprof_CPU_Slashmemory_profiles_to_the_given_directory = &Message{code: 100002, category: CategoryMessage, key: "Generate_pprof_CPU_Slashmemory_profiles_to_the_given_directory_100002", text: "Generate pprof CPU/memory profiles to the given directory."} diff --git a/internal/diagnostics/generate.go b/internal/diagnostics/generate.go index 61c1c767ee..89ae69c0fb 100644 --- a/internal/diagnostics/generate.go +++ b/internal/diagnostics/generate.go @@ -88,7 +88,7 @@ func main() { buf.WriteString(`, reportsDeprecated: true`) } - buf.WriteString("}\n") + buf.WriteString("}\n\n") } formatted, err := format.Source(buf.Bytes()) diff --git a/internal/execute/export_test.go b/internal/execute/export_test.go index 8c47763060..665e0fbc18 100644 --- a/internal/execute/export_test.go +++ b/internal/execute/export_test.go @@ -29,7 +29,10 @@ func RunWatchCycle(w *watcher) { return } // todo: updateProgram() - w.program = compiler.NewProgramFromParsedCommandLine(w.options, w.host) + w.program = compiler.NewProgram(compiler.ProgramOptions{ + Config: w.options, + Host: w.host, + }) if w.hasBeenModified(w.program) { w.compileAndEmit() } diff --git a/internal/execute/outputs.go b/internal/execute/outputs.go index 0515f1d55d..9a1f73d4ca 100644 --- a/internal/execute/outputs.go +++ b/internal/execute/outputs.go @@ -79,6 +79,9 @@ func reportStatistics(sys System, program *compiler.Program, result compileAndEm stats.add("Instantiations", program.InstantiationCount()) stats.add("Memory used", fmt.Sprintf("%vK", memStats.Alloc/1024)) stats.add("Memory allocs", strconv.FormatUint(memStats.Mallocs, 10)) + if result.configTime != 0 { + stats.add("Config time", result.configTime) + } stats.add("Parse time", result.parseTime) if result.bindTime != 0 { stats.add("Bind time", result.bindTime) diff --git a/internal/execute/system.go b/internal/execute/system.go index 55ae2bb2e7..3861a04392 100644 --- a/internal/execute/system.go +++ b/internal/execute/system.go @@ -10,11 +10,13 @@ import ( type System interface { Writer() io.Writer EndWrite() // needed for testing - Now() time.Time FS() vfs.FS DefaultLibraryPath() string GetCurrentDirectory() string NewLine() string // #241 eventually we want to use "\n" + + Now() time.Time + SinceStart() time.Duration } type ExitStatus int diff --git a/internal/execute/testsys_test.go b/internal/execute/testsys_test.go index b512b23866..92eda1f4ad 100644 --- a/internal/execute/testsys_test.go +++ b/internal/execute/testsys_test.go @@ -28,6 +28,7 @@ func newTestSys(fileOrFolderList FileMap, cwd string, args ...string) *testSys { files: slices.Collect(maps.Keys(fileOrFolderList)), output: []string{}, currentWrite: &strings.Builder{}, + start: time.Now(), } } @@ -41,6 +42,8 @@ type testSys struct { defaultLibraryPath string cwd string files []string + + start time.Time } func (s *testSys) IsTestDone() bool { @@ -53,6 +56,10 @@ func (s *testSys) Now() time.Time { return time.Now() } +func (s *testSys) SinceStart() time.Duration { + return time.Since(s.start) +} + func (s *testSys) FS() vfs.FS { return s.fs } diff --git a/internal/execute/tsc.go b/internal/execute/tsc.go index 712e562192..bf694fd235 100644 --- a/internal/execute/tsc.go +++ b/internal/execute/tsc.go @@ -114,8 +114,10 @@ func executeCommandLineWorker(sys System, cb cbType, commandLine *tsoptions.Pars compilerOptionsFromCommandLine := commandLine.CompilerOptions() if configFileName != "" { + configStart := sys.Now() extendedConfigCache := map[tspath.Path]*tsoptions.ExtendedConfigCacheEntry{} configParseResult, errors := tsoptions.GetParsedCommandLineOfConfigFile(configFileName, compilerOptionsFromCommandLine, sys, extendedConfigCache) + configTime := sys.Now().Sub(configStart) if len(errors) != 0 { // these are unrecoverable errors--exit to report them as diagnostics for _, e := range errors { @@ -137,6 +139,7 @@ func executeCommandLineWorker(sys System, cb cbType, commandLine *tsoptions.Pars cb, configParseResult, reportDiagnostic, + configTime, ), nil } else { if compilerOptionsFromCommandLine.ShowConfig.IsTrue() { @@ -155,6 +158,7 @@ func executeCommandLineWorker(sys System, cb cbType, commandLine *tsoptions.Pars cb, commandLine, reportDiagnostic, + 0, /*configTime*/ ), nil } @@ -172,12 +176,15 @@ func findConfigFile(searchPath string, fileExists func(string) bool, configName return result } -func performCompilation(sys System, cb cbType, config *tsoptions.ParsedCommandLine, reportDiagnostic diagnosticReporter) ExitStatus { +func performCompilation(sys System, cb cbType, config *tsoptions.ParsedCommandLine, reportDiagnostic diagnosticReporter, configTime time.Duration) ExitStatus { host := compiler.NewCachedFSCompilerHost(config.CompilerOptions(), sys.GetCurrentDirectory(), sys.FS(), sys.DefaultLibraryPath()) // todo: cache, statistics, tracing - parseStart := time.Now() - program := compiler.NewProgramFromParsedCommandLine(config, host) - parseTime := time.Since(parseStart) + parseStart := sys.Now() + program := compiler.NewProgram(compiler.ProgramOptions{ + Config: config, + Host: host, + }) + parseTime := sys.Now().Sub(parseStart) result := emitFilesAndReportErrors(sys, program, reportDiagnostic) if result.status != ExitStatusSuccess { @@ -185,8 +192,9 @@ func performCompilation(sys System, cb cbType, config *tsoptions.ParsedCommandLi return result.status } + result.configTime = configTime result.parseTime = parseTime - result.totalTime = time.Since(parseStart) + result.totalTime = sys.SinceStart() if config.CompilerOptions().Diagnostics.IsTrue() || config.CompilerOptions().ExtendedDiagnostics.IsTrue() { var memStats runtime.MemStats @@ -214,11 +222,12 @@ type compileAndEmitResult struct { diagnostics []*ast.Diagnostic emitResult *compiler.EmitResult status ExitStatus + configTime time.Duration parseTime time.Duration bindTime time.Duration checkTime time.Duration - emitTime time.Duration totalTime time.Duration + emitTime time.Duration } func emitFilesAndReportErrors(sys System, program *compiler.Program, reportDiagnostic diagnosticReporter) (result compileAndEmitResult) { @@ -233,9 +242,9 @@ func emitFilesAndReportErrors(sys System, program *compiler.Program, reportDiagn // Options diagnostics include global diagnostics (even though we collect them separately), // and global diagnostics create checkers, which then bind all of the files. Do this binding // early so we can track the time. - bindStart := time.Now() + bindStart := sys.Now() _ = program.GetBindDiagnostics(ctx, nil) - result.bindTime = time.Since(bindStart) + result.bindTime = sys.Now().Sub(bindStart) allDiagnostics = append(allDiagnostics, program.GetOptionsDiagnostics(ctx)...) @@ -243,9 +252,9 @@ func emitFilesAndReportErrors(sys System, program *compiler.Program, reportDiagn allDiagnostics = append(allDiagnostics, program.GetGlobalDiagnostics(ctx)...) if len(allDiagnostics) == configFileParsingDiagnosticsLength { - checkStart := time.Now() + checkStart := sys.Now() allDiagnostics = append(allDiagnostics, program.GetSemanticDiagnostics(ctx, nil)...) - result.checkTime = time.Since(checkStart) + result.checkTime = sys.Now().Sub(checkStart) } if options.NoEmit.IsTrue() && options.GetEmitDeclarations() && len(allDiagnostics) == configFileParsingDiagnosticsLength { @@ -256,9 +265,9 @@ func emitFilesAndReportErrors(sys System, program *compiler.Program, reportDiagn emitResult := &compiler.EmitResult{EmitSkipped: true, Diagnostics: []*ast.Diagnostic{}} if !options.ListFilesOnly.IsTrue() { - emitStart := time.Now() + emitStart := sys.Now() emitResult = program.Emit(compiler.EmitOptions{}) - result.emitTime = time.Since(emitStart) + result.emitTime = sys.Now().Sub(emitStart) } allDiagnostics = append(allDiagnostics, emitResult.Diagnostics...) diff --git a/internal/execute/watch.go b/internal/execute/watch.go index 392ab13de9..d02689680e 100644 --- a/internal/execute/watch.go +++ b/internal/execute/watch.go @@ -35,7 +35,10 @@ func (w *watcher) doCycle() { return } // updateProgram() - w.program = compiler.NewProgramFromParsedCommandLine(w.options, w.host) + w.program = compiler.NewProgram(compiler.ProgramOptions{ + Config: w.options, + Host: w.host, + }) if w.hasBeenModified(w.program) { fmt.Fprint(w.sys.Writer(), "build starting at ", w.sys.Now(), w.sys.NewLine()) timeStart := w.sys.Now() diff --git a/internal/format/README.md b/internal/format/README.md new file mode 100644 index 0000000000..d1086eaa0b --- /dev/null +++ b/internal/format/README.md @@ -0,0 +1,26 @@ +# How does TypeScript formatting work? + +To format code you need to have a formatting context and a `SourceFile`. The formatting context contains +all user settings like tab size, newline character, etc. + +The end result of formatting is represented by TextChange objects which hold the new string content, and +the text to replace it with. + +## Internals + +Most of the exposed APIs internally are `Format*` and they all set up and configure `FormatSpan` which could be considered the root call for formatting. Span in this case refers to the range of +the sourcefile which should be formatted. + +The formatSpan then uses a scanner (either with or without JSX support) which starts at the highest +node the covers the span of text and recurses down through the node's children. + +As it recurses, `processNode` is called on the children setting the indentation is decided and passed +through into each of that node's children. + +The meat of formatting decisions is made via `processPair`, the pair here being the current node and the previous node. `processPair` which mutates the formatting context to represent the current place in the scanner and requests a set of rules which can be applied to the items via `createRulesMap`. + +There are a lot of rules, which you can find in [rules.ts](./rules.ts) each one has a left and right reference to nodes or token ranges and note of what action should be applied by the formatter. + +### Where is this used? + +The formatter is used mainly from any language service operation that inserts or modifies code. The formatter is not exported publicly, and so all usage can only come through the language server. diff --git a/internal/format/api.go b/internal/format/api.go new file mode 100644 index 0000000000..db223ef543 --- /dev/null +++ b/internal/format/api.go @@ -0,0 +1,166 @@ +package format + +import ( + "context" + "unicode/utf8" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/scanner" + "github.com/microsoft/typescript-go/internal/stringutil" +) + +type FormatRequestKind int + +const ( + FormatRequestKindFormatDocument FormatRequestKind = iota + FormatRequestKindFormatSelection + FormatRequestKindFormatOnEnter + FormatRequestKindFormatOnSemicolon + FormatRequestKindFormatOnOpeningCurlyBrace + FormatRequestKindFormatOnClosingCurlyBrace +) + +type formatContextKey int + +const ( + formatOptionsKey formatContextKey = iota + formatNewlineKey +) + +func WithFormatCodeSettings(ctx context.Context, options *FormatCodeSettings, newLine string) context.Context { + ctx = context.WithValue(ctx, formatOptionsKey, options) + ctx = context.WithValue(ctx, formatNewlineKey, newLine) + // In strada, the rules map was both globally cached *and* cached into the context, for some reason. We skip that here and just use the global one. + return ctx +} + +func GetFormatCodeSettingsFromContext(ctx context.Context) *FormatCodeSettings { + opt := ctx.Value(formatOptionsKey).(*FormatCodeSettings) + return opt +} + +func GetNewLineOrDefaultFromContext(ctx context.Context) string { // TODO: Move into broader LS - more than just the formatter uses the newline editor setting/host new line + opt := GetFormatCodeSettingsFromContext(ctx) + if opt != nil && len(opt.NewLineCharacter) > 0 { + return opt.NewLineCharacter + } + host := ctx.Value(formatNewlineKey).(string) + if len(host) > 0 { + return host + } + return "\n" +} + +func FormatSpan(ctx context.Context, span core.TextRange, file *ast.SourceFile, kind FormatRequestKind) []core.TextChange { + // find the smallest node that fully wraps the range and compute the initial indentation for the node + enclosingNode := findEnclosingNode(span, file) + opts := GetFormatCodeSettingsFromContext(ctx) + + return newFormattingScanner( + file.Text(), + file.LanguageVariant, + getScanStartPosition(enclosingNode, span, file), + span.End(), + newFormatSpanWorker( + ctx, + span, + enclosingNode, + GetIndentationForNode(enclosingNode, &span, file, opts), + getOwnOrInheritedDelta(enclosingNode, opts, file), + kind, + prepareRangeContainsErrorFunction(file.Diagnostics(), span), + file, + ), + ) +} + +func formatNodeLines(ctx context.Context, sourceFile *ast.SourceFile, node *ast.Node, requestKind FormatRequestKind) []core.TextChange { + if node == nil { + return nil + } + tokenStart := scanner.GetTokenPosOfNode(node, sourceFile, false) + lineStart := getLineStartPositionForPosition(tokenStart, sourceFile) + span := core.NewTextRange(lineStart, node.End()) + return FormatSpan(ctx, span, sourceFile, requestKind) +} + +func FormatDocument(ctx context.Context, sourceFile *ast.SourceFile) []core.TextChange { + return FormatSpan(ctx, core.NewTextRange(0, sourceFile.End()), sourceFile, FormatRequestKindFormatDocument) +} + +func FormatSelection(ctx context.Context, sourceFile *ast.SourceFile, start int, end int) []core.TextChange { + return FormatSpan(ctx, core.NewTextRange(getLineStartPositionForPosition(start, sourceFile), end), sourceFile, FormatRequestKindFormatSelection) +} + +func FormatOnOpeningCurly(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange { + openingCurly := findImmediatelyPrecedingTokenOfKind(position, ast.KindOpenBraceToken, sourceFile) + if openingCurly == nil { + return nil + } + curlyBraceRange := openingCurly.Parent + outermostNode := findOutermostNodeWithinListLevel(curlyBraceRange) + /** + * We limit the span to end at the opening curly to handle the case where + * the brace matched to that just typed will be incorrect after further edits. + * For example, we could type the opening curly for the following method + * body without brace-matching activated: + * ``` + * class C { + * foo() + * } + * ``` + * and we wouldn't want to move the closing brace. + */ + textRange := core.NewTextRange(getLineStartPositionForPosition(scanner.GetTokenPosOfNode(outermostNode, sourceFile, false), sourceFile), position) + return FormatSpan(ctx, textRange, sourceFile, FormatRequestKindFormatOnOpeningCurlyBrace) +} + +func FormatOnClosingCurly(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange { + precedingToken := findImmediatelyPrecedingTokenOfKind(position, ast.KindCloseBraceToken, sourceFile) + return formatNodeLines(ctx, sourceFile, findOutermostNodeWithinListLevel(precedingToken), FormatRequestKindFormatOnClosingCurlyBrace) +} + +func FormatOnSemicolon(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange { + semicolon := findImmediatelyPrecedingTokenOfKind(position, ast.KindSemicolonToken, sourceFile) + return formatNodeLines(ctx, sourceFile, findOutermostNodeWithinListLevel(semicolon), FormatRequestKindFormatOnSemicolon) +} + +func FormatOnEnter(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange { + line, _ := scanner.GetLineAndCharacterOfPosition(sourceFile, position) + if line == 0 { + return nil + } + // get start position for the previous line + startPos := int(scanner.GetLineStarts(sourceFile)[line-1]) + // After the enter key, the cursor is now at a new line. The new line may or may not contain non-whitespace characters. + // If the new line has only whitespaces, we won't want to format this line, because that would remove the indentation as + // trailing whitespaces. So the end of the formatting span should be the later one between: + // 1. the end of the previous line + // 2. the last non-whitespace character in the current line + endOfFormatSpan := scanner.GetEndLinePosition(sourceFile, line) + for endOfFormatSpan > startPos { + ch, s := utf8.DecodeRuneInString(sourceFile.Text()[endOfFormatSpan:]) + if s == 0 || stringutil.IsWhiteSpaceSingleLine(ch) { // on multibyte character keep backing up + endOfFormatSpan-- + continue + } + break + } + + // if the character at the end of the span is a line break, we shouldn't include it, because it indicates we don't want to + // touch the current line at all. Also, on some OSes the line break consists of two characters (\r\n), we should test if the + // previous character before the end of format span is line break character as well. + ch, _ := utf8.DecodeRuneInString(sourceFile.Text()[endOfFormatSpan:]) + if stringutil.IsLineBreak(ch) { + endOfFormatSpan-- + } + + span := core.NewTextRange( + startPos, + // end value is exclusive so add 1 to the result + endOfFormatSpan+1, + ) + + return FormatSpan(ctx, span, sourceFile, FormatRequestKindFormatOnEnter) +} diff --git a/internal/format/api_test.go b/internal/format/api_test.go new file mode 100644 index 0000000000..f1ab160098 --- /dev/null +++ b/internal/format/api_test.go @@ -0,0 +1,123 @@ +package format_test + +import ( + "os" + "path/filepath" + "strings" + "testing" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/format" + "github.com/microsoft/typescript-go/internal/parser" + "github.com/microsoft/typescript-go/internal/printer" + "github.com/microsoft/typescript-go/internal/repo" + "github.com/microsoft/typescript-go/internal/scanner" + "gotest.tools/v3/assert" +) + +func applyBulkEdits(text string, edits []core.TextChange) string { + b := strings.Builder{} + b.Grow(len(text)) + lastEnd := 0 + for _, e := range edits { + start := e.TextRange.Pos() + if start != lastEnd { + b.WriteString(text[lastEnd:e.TextRange.Pos()]) + } + b.WriteString(e.NewText) + + lastEnd = e.TextRange.End() + } + b.WriteString(text[lastEnd:]) + + return b.String() +} + +func TestFormat(t *testing.T) { + t.Parallel() + + t.Run("format checker.ts", func(t *testing.T) { + t.Parallel() + ctx := format.WithFormatCodeSettings(t.Context(), &format.FormatCodeSettings{ + EditorSettings: format.EditorSettings{ + TabSize: 4, + IndentSize: 4, + BaseIndentSize: 4, + NewLineCharacter: "\n", + ConvertTabsToSpaces: true, + IndentStyle: format.IndentStyleSmart, + TrimTrailingWhitespace: true, + }, + InsertSpaceBeforeTypeAnnotation: core.TSTrue, + }, "\n") + repo.SkipIfNoTypeScriptSubmodule(t) + filePath := filepath.Join(repo.TypeScriptSubmodulePath, "src/compiler/checker.ts") + fileContent, err := os.ReadFile(filePath) + assert.NilError(t, err) + text := string(fileContent) + sourceFile := parser.ParseSourceFile( + "/checker.ts", + "/checker.ts", + text, + core.ScriptTargetESNext, + scanner.JSDocParsingModeParseAll, + ) + ast.SetParentInChildren(sourceFile.AsNode()) + edits := format.FormatDocument(ctx, sourceFile) + newText := applyBulkEdits(text, edits) + assert.Assert(t, len(newText) > 0) + assert.Assert(t, text != newText) + }) +} + +func BenchmarkFormat(b *testing.B) { + ctx := format.WithFormatCodeSettings(b.Context(), &format.FormatCodeSettings{ + EditorSettings: format.EditorSettings{ + TabSize: 4, + IndentSize: 4, + BaseIndentSize: 4, + NewLineCharacter: "\n", + ConvertTabsToSpaces: true, + IndentStyle: format.IndentStyleSmart, + TrimTrailingWhitespace: true, + }, + InsertSpaceBeforeTypeAnnotation: core.TSTrue, + }, "\n") + repo.SkipIfNoTypeScriptSubmodule(b) + filePath := filepath.Join(repo.TypeScriptSubmodulePath, "src/compiler/checker.ts") + fileContent, err := os.ReadFile(filePath) + assert.NilError(b, err) + text := string(fileContent) + sourceFile := parser.ParseSourceFile( + "/checker.ts", + "/checker.ts", + text, + core.ScriptTargetESNext, + scanner.JSDocParsingModeParseAll, + ) + ast.SetParentInChildren(sourceFile.AsNode()) + + b.Run("format checker.ts", func(b *testing.B) { + for b.Loop() { + edits := format.FormatDocument(ctx, sourceFile) + newText := applyBulkEdits(text, edits) + assert.Assert(b, len(newText) > 0) + } + }) + + b.Run("format checker.ts (no edit application)", func(b *testing.B) { // for comparison (how long does applying many edits take?) + for b.Loop() { + edits := format.FormatDocument(ctx, sourceFile) + assert.Assert(b, len(edits) > 0) + } + }) + + p := printer.NewPrinter(printer.PrinterOptions{}, printer.PrintHandlers{}, printer.NewEmitContext()) + b.Run("pretty print checker.ts", func(b *testing.B) { // for comparison + for b.Loop() { + newText := p.EmitSourceFile(sourceFile) + assert.Assert(b, len(newText) > 0) + } + }) +} diff --git a/internal/format/context.go b/internal/format/context.go new file mode 100644 index 0000000000..aeb864addd --- /dev/null +++ b/internal/format/context.go @@ -0,0 +1,221 @@ +package format + +import ( + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/scanner" +) + +type IndentStyle int + +const ( + IndentStyleNone IndentStyle = iota + IndentStyleBlock + IndentStyleSmart +) + +type SemicolonPreference string + +const ( + SemicolonPreferenceIgnore SemicolonPreference = "ignore" + SemicolonPreferenceInsert SemicolonPreference = "insert" + SemicolonPreferenceRemove SemicolonPreference = "remove" +) + +type EditorSettings struct { + BaseIndentSize int + IndentSize int + TabSize int + NewLineCharacter string + ConvertTabsToSpaces bool + IndentStyle IndentStyle + TrimTrailingWhitespace bool +} + +type FormatCodeSettings struct { + EditorSettings + InsertSpaceAfterCommaDelimiter core.Tristate + InsertSpaceAfterSemicolonInForStatements core.Tristate + InsertSpaceBeforeAndAfterBinaryOperators core.Tristate + InsertSpaceAfterConstructor core.Tristate + InsertSpaceAfterKeywordsInControlFlowStatements core.Tristate + InsertSpaceAfterFunctionKeywordForAnonymousFunctions core.Tristate + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis core.Tristate + InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets core.Tristate + InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces core.Tristate + InsertSpaceAfterOpeningAndBeforeClosingEmptyBraces core.Tristate + InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces core.Tristate + InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces core.Tristate + InsertSpaceAfterTypeAssertion core.Tristate + InsertSpaceBeforeFunctionParenthesis core.Tristate + PlaceOpenBraceOnNewLineForFunctions core.Tristate + PlaceOpenBraceOnNewLineForControlBlocks core.Tristate + InsertSpaceBeforeTypeAnnotation core.Tristate + IndentMultiLineObjectLiteralBeginningOnBlankLine core.Tristate + Semicolons SemicolonPreference + IndentSwitchCase core.Tristate +} + +func GetDefaultFormatCodeSettings(newLineCharacter string) *FormatCodeSettings { + return &FormatCodeSettings{ + EditorSettings: EditorSettings{ + IndentSize: 4, + TabSize: 4, + NewLineCharacter: newLineCharacter, + ConvertTabsToSpaces: true, + IndentStyle: IndentStyleSmart, + TrimTrailingWhitespace: true, + }, + InsertSpaceAfterConstructor: core.TSFalse, + InsertSpaceAfterCommaDelimiter: core.TSTrue, + InsertSpaceAfterSemicolonInForStatements: core.TSTrue, + InsertSpaceBeforeAndAfterBinaryOperators: core.TSTrue, + InsertSpaceAfterKeywordsInControlFlowStatements: core.TSTrue, + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: core.TSFalse, + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: core.TSFalse, + InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: core.TSFalse, + InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: core.TSTrue, + InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: core.TSFalse, + InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: core.TSFalse, + InsertSpaceBeforeFunctionParenthesis: core.TSFalse, + PlaceOpenBraceOnNewLineForFunctions: core.TSFalse, + PlaceOpenBraceOnNewLineForControlBlocks: core.TSFalse, + Semicolons: SemicolonPreferenceIgnore, + IndentSwitchCase: core.TSTrue, + } +} + +type formattingContext struct { + currentTokenSpan *TextRangeWithKind + nextTokenSpan *TextRangeWithKind + contextNode *ast.Node + currentTokenParent *ast.Node + nextTokenParent *ast.Node + + contextNodeAllOnSameLine core.Tristate + nextNodeAllOnSameLine core.Tristate + tokensAreOnSameLine core.Tristate + contextNodeBlockIsOnOneLine core.Tristate + nextNodeBlockIsOnOneLine core.Tristate + + SourceFile *ast.SourceFile + FormattingRequestKind FormatRequestKind + Options *FormatCodeSettings + + scanner *scanner.Scanner +} + +func NewFormattingContext(file *ast.SourceFile, kind FormatRequestKind, options *FormatCodeSettings) *formattingContext { + res := &formattingContext{ + SourceFile: file, + FormattingRequestKind: kind, + Options: options, + scanner: scanner.NewScanner(), + } + res.scanner.SetText(file.Text()) + res.scanner.SetSkipTrivia(true) + return res +} + +func (this *formattingContext) UpdateContext(cur *TextRangeWithKind, curParent *ast.Node, next *TextRangeWithKind, nextParent *ast.Node, commonParent *ast.Node) { + if cur == nil { + panic("nil current range in update context") + } + if curParent == nil { + panic("nil current range node parent in update context") + } + if next == nil { + panic("nil next range in update context") + } + if nextParent == nil { + panic("nil next range node parent in update context") + } + if commonParent == nil { + panic("nil common parent node in update context") + } + this.currentTokenSpan = cur + this.currentTokenParent = curParent + this.nextTokenSpan = next + this.nextTokenParent = nextParent + this.contextNode = commonParent + + // drop cached results + this.contextNodeAllOnSameLine = core.TSUnknown + this.nextNodeAllOnSameLine = core.TSUnknown + this.tokensAreOnSameLine = core.TSUnknown + this.contextNodeBlockIsOnOneLine = core.TSUnknown + this.nextNodeBlockIsOnOneLine = core.TSUnknown +} + +func (this *formattingContext) rangeIsOnOneLine(node core.TextRange) core.Tristate { + if rangeIsOnOneLine(node, this.SourceFile) { + return core.TSTrue + } + return core.TSFalse +} + +func (this *formattingContext) nodeIsOnOneLine(node *ast.Node) core.Tristate { + return this.rangeIsOnOneLine(withTokenStart(node, this.SourceFile)) +} + +func withTokenStart(loc *ast.Node, file *ast.SourceFile) core.TextRange { + startPos := scanner.GetTokenPosOfNode(loc, file, false) + return core.NewTextRange(startPos, loc.End()) +} + +func (this *formattingContext) blockIsOnOneLine(node *ast.Node) core.Tristate { + // In strada, this relies on token child manifesting - we just use the scanner here, + // so this will have a differing performance profile. Is this OK? Needs profiling to know. + this.scanner.ResetPos(node.Pos()) + end := node.End() + firstOpenBrace := -1 + lastCloseBrace := -1 + for this.scanner.TokenEnd() < end { + // tokenStart instead of tokenfullstart to skip trivia + if firstOpenBrace == -1 && this.scanner.Token() == ast.KindOpenBraceToken { + firstOpenBrace = this.scanner.TokenStart() + } else if this.scanner.Token() == ast.KindCloseBraceToken { + lastCloseBrace = this.scanner.TokenStart() + } + this.scanner.Scan() + } + if firstOpenBrace != -1 && lastCloseBrace != -1 { + return this.rangeIsOnOneLine(core.NewTextRange(firstOpenBrace, lastCloseBrace)) + } + return core.TSFalse +} + +func (this *formattingContext) ContextNodeAllOnSameLine() bool { + if this.contextNodeAllOnSameLine == core.TSUnknown { + this.contextNodeAllOnSameLine = this.nodeIsOnOneLine(this.contextNode) + } + return this.contextNodeAllOnSameLine == core.TSTrue +} + +func (this *formattingContext) NextNodeAllOnSameLine() bool { + if this.nextNodeAllOnSameLine == core.TSUnknown { + this.nextNodeAllOnSameLine = this.nodeIsOnOneLine(this.nextTokenParent) + } + return this.nextNodeAllOnSameLine == core.TSTrue +} + +func (this *formattingContext) TokensAreOnSameLine() bool { + if this.tokensAreOnSameLine == core.TSUnknown { + this.tokensAreOnSameLine = this.rangeIsOnOneLine(core.NewTextRange(this.currentTokenSpan.Loc.Pos(), this.nextTokenSpan.Loc.End())) + } + return this.tokensAreOnSameLine == core.TSTrue +} + +func (this *formattingContext) ContextNodeBlockIsOnOneLine() bool { + if this.contextNodeBlockIsOnOneLine == core.TSUnknown { + this.contextNodeBlockIsOnOneLine = this.blockIsOnOneLine(this.contextNode) + } + return this.contextNodeBlockIsOnOneLine == core.TSTrue +} + +func (this *formattingContext) NextNodeBlockIsOnOneLine() bool { + if this.nextNodeBlockIsOnOneLine == core.TSUnknown { + this.nextNodeBlockIsOnOneLine = this.blockIsOnOneLine(this.nextTokenParent) + } + return this.nextNodeBlockIsOnOneLine == core.TSTrue +} diff --git a/internal/format/indent.go b/internal/format/indent.go new file mode 100644 index 0000000000..8763c46eb6 --- /dev/null +++ b/internal/format/indent.go @@ -0,0 +1,554 @@ +package format + +import ( + "slices" + "unicode/utf8" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/astnav" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/scanner" + "github.com/microsoft/typescript-go/internal/stringutil" +) + +func GetIndentationForNode(n *ast.Node, ignoreActualIndentationRange *core.TextRange, sourceFile *ast.SourceFile, options *FormatCodeSettings) int { + startline, startpos := scanner.GetLineAndCharacterOfPosition(sourceFile, scanner.GetTokenPosOfNode(n, sourceFile, false)) + return getIndentationForNodeWorker(n, startline, startpos, ignoreActualIndentationRange /*indentationDelta*/, 0, sourceFile /*isNextChild*/, false, options) +} + +func getIndentationForNodeWorker( + current *ast.Node, + currentStartLine int, + currentStartCharacter int, + ignoreActualIndentationRange *core.TextRange, + indentationDelta int, + sourceFile *ast.SourceFile, + isNextChild bool, + options *FormatCodeSettings, +) int { + parent := current.Parent + + // Walk up the tree and collect indentation for parent-child node pairs. Indentation is not added if + // * parent and child nodes start on the same line, or + // * parent is an IfStatement and child starts on the same line as an 'else clause'. + for parent != nil { + useActualIndentation := true + if ignoreActualIndentationRange != nil { + start := scanner.GetTokenPosOfNode(current, sourceFile, false) + useActualIndentation = start < ignoreActualIndentationRange.Pos() || start > ignoreActualIndentationRange.End() + } + + containingListOrParentStartLine, containingListOrParentStartCharacter := getContainingListOrParentStart(parent, current, sourceFile) + parentAndChildShareLine := containingListOrParentStartLine == currentStartLine || + childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStartLine, sourceFile) + + if useActualIndentation { + // check if current node is a list item - if yes, take indentation from it + var firstListChild *ast.Node + containerList := getContainingList(current, sourceFile) + if containerList != nil { + firstListChild = core.FirstOrNil(containerList.Nodes) + } + // A list indents its children if the children begin on a later line than the list itself: + // + // f1( L0 - List start + // { L1 - First child start: indented, along with all other children + // prop: 0 + // }, + // { + // prop: 1 + // } + // ) + // + // f2({ L0 - List start and first child start: children are not indented. + // prop: 0 Object properties are indented only one level, because the list + // }, { itself contributes nothing. + // prop: 1 L3 - The indentation of the second object literal is best understood by + // }) looking at the relationship between the list and *first* list item. + listLine, _ := getStartLineAndCharacterForNode(firstListChild, sourceFile) + listIndentsChild := firstListChild != nil && listLine > containingListOrParentStartLine + actualIndentation := getActualIndentationForListItem(current, sourceFile, options, listIndentsChild) + if actualIndentation != -1 { + return actualIndentation + indentationDelta + } + + // try to fetch actual indentation for current node from source text + actualIndentation = getActualIndentationForNode(current, parent, currentStartLine, currentStartCharacter, parentAndChildShareLine, sourceFile, options) + if actualIndentation != -1 { + return actualIndentation + indentationDelta + } + } + + // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line + if ShouldIndentChildNode(options, parent, current, sourceFile, isNextChild) && !parentAndChildShareLine { + indentationDelta += options.IndentSize + } + + // In our AST, a call argument's `parent` is the call-expression, not the argument list. + // We would like to increase indentation based on the relationship between an argument and its argument-list, + // so we spoof the starting position of the (parent) call-expression to match the (non-parent) argument-list. + // But, the spoofed start-value could then cause a problem when comparing the start position of the call-expression + // to *its* parent (in the case of an iife, an expression statement), adding an extra level of indentation. + // + // Instead, when at an argument, we unspoof the starting position of the enclosing call expression + // *after* applying indentation for the argument. + + useTrueStart := isArgumentAndStartLineOverlapsExpressionBeingCalled(parent, current, currentStartLine, sourceFile) + + current = parent + parent = current.Parent + + if useTrueStart { + currentStartLine, currentStartCharacter = scanner.GetLineAndCharacterOfPosition(sourceFile, scanner.GetTokenPosOfNode(current, sourceFile, false)) + } else { + currentStartLine = containingListOrParentStartLine + currentStartCharacter = containingListOrParentStartCharacter + } + } + + return indentationDelta + options.BaseIndentSize +} + +/* +* Function returns -1 if actual indentation for node should not be used (i.e because node is nested expression) + */ +func getActualIndentationForNode(current *ast.Node, parent *ast.Node, cuurentLine int, currentChar int, parentAndChildShareLine bool, sourceFile *ast.SourceFile, options *FormatCodeSettings) int { + // actual indentation is used for statements\declarations if one of cases below is true: + // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually + // - parent and child are not on the same line + useActualIndentation := (ast.IsDeclaration(current) || ast.IsStatementButNotDeclaration(current)) && (parent.Kind == ast.KindSourceFile || !parentAndChildShareLine) + + if !useActualIndentation { + return -1 + } + + return findColumnForFirstNonWhitespaceCharacterInLine(cuurentLine, currentChar, sourceFile, options) +} + +func isArgumentAndStartLineOverlapsExpressionBeingCalled(parent *ast.Node, child *ast.Node, childStartLine int, sourceFile *ast.SourceFile) bool { + if !(ast.IsCallExpression(child) && slices.Contains(parent.AsCallExpression().Arguments.Nodes, child)) { + return false + } + expressionOfCallExpressionEnd := parent.Expression().End() + expressionOfCallExpressionEndLine, _ := scanner.GetLineAndCharacterOfPosition(sourceFile, expressionOfCallExpressionEnd) + return expressionOfCallExpressionEndLine == childStartLine +} + +func getActualIndentationForListItem(node *ast.Node, sourceFile *ast.SourceFile, options *FormatCodeSettings, listIndentsChild bool) int { + if node.Parent != nil && node.Parent.Kind == ast.KindVariableDeclarationList { + // VariableDeclarationList has no wrapping tokens + return -1 + } + containingList := getContainingList(node, sourceFile) + if containingList != nil { + index := core.FindIndex(containingList.Nodes, func(e *ast.Node) bool { return e == node }) + if index != -1 { + result := deriveActualIndentationFromList(containingList, index, sourceFile, options) + if result != -1 { + return result + } + } + delta := 0 + if listIndentsChild { + delta = options.IndentSize + } + return getActualIndentationForListStartLine(containingList, sourceFile, options) + delta + } + return -1 +} + +func getActualIndentationForListStartLine(list *ast.NodeList, sourceFile *ast.SourceFile, options *FormatCodeSettings) int { + if list == nil { + return -1 + } + line, char := scanner.GetLineAndCharacterOfPosition(sourceFile, list.Loc.Pos()) + return findColumnForFirstNonWhitespaceCharacterInLine(line, char, sourceFile, options) +} + +func deriveActualIndentationFromList(list *ast.NodeList, index int, sourceFile *ast.SourceFile, options *FormatCodeSettings) int { + // Debug.assert(index >= 0 && index < list.length); // !!! + + node := list.Nodes[index] + + // walk toward the start of the list starting from current node and check if the line is the same for all items. + // if end line for item [i - 1] differs from the start line for item [i] - find column of the first non-whitespace character on the line of item [i] + + line, char := getStartLineAndCharacterForNode(node, sourceFile) + + for i := index; i >= 0; i-- { + if list.Nodes[i].Kind == ast.KindCommaToken { + continue + } + // skip list items that ends on the same line with the current list element + prevEndLine, _ := scanner.GetLineAndCharacterOfPosition(sourceFile, list.Nodes[i].End()) + if prevEndLine != line { + return findColumnForFirstNonWhitespaceCharacterInLine(line, char, sourceFile, options) + } + + line, char = getStartLineAndCharacterForNode(list.Nodes[i], sourceFile) + } + return -1 +} + +func findColumnForFirstNonWhitespaceCharacterInLine(line int, char int, sourceFile *ast.SourceFile, options *FormatCodeSettings) int { + lineStart := scanner.GetPositionOfLineAndCharacter(sourceFile, line, 0) + return findFirstNonWhitespaceColumn(lineStart, lineStart+char, sourceFile, options) +} + +func findFirstNonWhitespaceColumn(startPos int, endPos int, sourceFile *ast.SourceFile, options *FormatCodeSettings) int { + _, col := findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options) + return col +} + +/** +* Character is the actual index of the character since the beginning of the line. +* Column - position of the character after expanding tabs to spaces. +* "0\t2$" +* value of 'character' for '$' is 3 +* value of 'column' for '$' is 6 (assuming that tab size is 4) + */ +func findFirstNonWhitespaceCharacterAndColumn(startPos int, endPos int, sourceFile *ast.SourceFile, options *FormatCodeSettings) (character int, column int) { + character = 0 + column = 0 + text := sourceFile.Text() + for pos := startPos; pos < endPos; pos++ { + ch, size := utf8.DecodeRuneInString(text[pos:]) + if size == 0 && ch == utf8.RuneError { + continue // multibyte character - TODO: recognize non-tab multicolumn characters? ideographic space? + } + if !stringutil.IsWhiteSpaceSingleLine(ch) { + break + } + + if ch == '\t' { + column += options.TabSize + (column % options.TabSize) + } else { + column++ + } + + character++ + } + return character, column +} + +func childStartsOnTheSameLineWithElseInIfStatement(parent *ast.Node, child *ast.Node, childStartLine int, sourceFile *ast.SourceFile) bool { + if parent.Kind == ast.KindIfStatement && parent.AsIfStatement().ElseStatement == child { + elseKeyword := astnav.FindPrecedingToken(sourceFile, child.Pos()) + // Debug.assert(elseKeyword !== undefined); // !!! + elseKeywordStartLine, _ := getStartLineAndCharacterForNode(elseKeyword, sourceFile) + return elseKeywordStartLine == childStartLine + } + return false +} + +func getStartLineAndCharacterForNode(n *ast.Node, sourceFile *ast.SourceFile) (line int, character int) { + return scanner.GetLineAndCharacterOfPosition(sourceFile, scanner.GetTokenPosOfNode(n, sourceFile, false)) +} + +func getContainingList(node *ast.Node, sourceFile *ast.SourceFile) *ast.NodeList { + if node.Parent == nil { + return nil + } + return getListByRange(scanner.GetTokenPosOfNode(node, sourceFile, false), node.End(), node.Parent, sourceFile) +} + +func getListByPosition(pos int, node *ast.Node, sourceFile *ast.SourceFile) *ast.NodeList { + if node == nil { + return nil + } + return getListByRange(pos, pos, node, sourceFile) +} + +func getListByRange(start int, end int, node *ast.Node, sourceFile *ast.SourceFile) *ast.NodeList { + r := core.NewTextRange(start, end) + switch node.Kind { + case ast.KindTypeReference: + return getList(node.AsTypeReferenceNode().TypeArguments, r, node, sourceFile) + case ast.KindObjectLiteralExpression: + return getList(node.AsObjectLiteralExpression().Properties, r, node, sourceFile) + case ast.KindArrayLiteralExpression: + return getList(node.AsArrayLiteralExpression().Elements, r, node, sourceFile) + case ast.KindTypeLiteral: + return getList(node.AsTypeLiteralNode().Members, r, node, sourceFile) + case ast.KindFunctionDeclaration, + ast.KindFunctionExpression, + ast.KindArrowFunction, + ast.KindMethodDeclaration, + ast.KindMethodSignature, + ast.KindCallSignature, + ast.KindConstructor, + ast.KindConstructorType, + ast.KindConstructSignature: + tpl := getList(node.TypeParameterList(), r, node, sourceFile) + if tpl != nil { + return tpl + } + return getList(node.ParameterList(), r, node, sourceFile) + case ast.KindGetAccessor: + return getList(node.ParameterList(), r, node, sourceFile) + case ast.KindClassDeclaration, + ast.KindClassExpression, + ast.KindInterfaceDeclaration, + ast.KindTypeAliasDeclaration, + ast.KindJSDocTemplateTag: + return getList(node.TypeParameterList(), r, node, sourceFile) + case ast.KindNewExpression, ast.KindCallExpression: + l := getList(node.TypeArgumentList(), r, node, sourceFile) + if l != nil { + return l + } + return getList(node.ArgumentList(), r, node, sourceFile) + case ast.KindVariableDeclarationList: + return getList(node.AsVariableDeclarationList().Declarations, r, node, sourceFile) + case ast.KindNamedImports: + return getList(node.AsNamedImports().Elements, r, node, sourceFile) + case ast.KindNamedExports: + return getList(node.AsNamedExports().Elements, r, node, sourceFile) + case ast.KindObjectBindingPattern, ast.KindArrayBindingPattern: + return getList(node.AsBindingPattern().Elements, r, node, sourceFile) + } + return nil // TODO: should this be a panic? It isn't in strada. +} + +func getList(list *ast.NodeList, r core.TextRange, node *ast.Node, sourceFile *ast.SourceFile) *ast.NodeList { + if list == nil { + return nil + } + if r.ContainedBy(getVisualListRange(node, list.Loc, sourceFile)) { + return list + } + return nil +} + +func getVisualListRange(node *ast.Node, list core.TextRange, sourceFile *ast.SourceFile) core.TextRange { + // In strada, this relied on the services .getChildren method, which manifested synthetic token nodes + // _however_, the logic boils down to "find the child with the matching span and adjust its start to the + // previous (possibly token) child's end and its end to the token start of the following element" - basically + // expanding the range to encompass all the neighboring non-token trivia + // Now, we perform that logic with the scanner instead + prior := astnav.FindPrecedingToken(sourceFile, list.Pos()) + var priorEnd int + if prior == nil { + priorEnd = list.Pos() + } else { + priorEnd = prior.End() + } + next := astnav.FindNextToken(prior, node, sourceFile) + var nextStart int + if next == nil { + nextStart = list.End() + } else { + nextStart = next.Pos() + } + return core.NewTextRange(priorEnd, nextStart) +} + +func getContainingListOrParentStart(parent *ast.Node, child *ast.Node, sourceFile *ast.SourceFile) (line int, character int) { + containingList := getContainingList(child, sourceFile) + var startPos int + if containingList != nil { + startPos = containingList.Loc.Pos() + } else { + startPos = scanner.GetTokenPosOfNode(parent, sourceFile, false) + } + return scanner.GetLineAndCharacterOfPosition(sourceFile, startPos) +} + +func isControlFlowEndingStatement(kind ast.Kind, parentKind ast.Kind) bool { + switch kind { + case ast.KindReturnStatement, ast.KindThrowStatement, ast.KindContinueStatement, ast.KindBreakStatement: + return parentKind != ast.KindBlock + default: + return false + } +} + +/** +* True when the parent node should indent the given child by an explicit rule. +* @param isNextChild If true, we are judging indent of a hypothetical child *after* this one, not the current child. + */ +func ShouldIndentChildNode(settings *FormatCodeSettings, parent *ast.Node, child *ast.Node, sourceFile *ast.SourceFile, isNextChildArg ...bool) bool { + isNextChild := false + if len(isNextChildArg) > 0 { + isNextChild = isNextChildArg[0] + } + + return NodeWillIndentChild(settings, parent, child, sourceFile, false) && !(isNextChild && child != nil && isControlFlowEndingStatement(child.Kind, parent.Kind)) +} + +func NodeWillIndentChild(settings *FormatCodeSettings, parent *ast.Node, child *ast.Node, sourceFile *ast.SourceFile, indentByDefault bool) bool { + childKind := ast.KindUnknown + if child != nil { + childKind = child.Kind + } + + switch parent.Kind { + case ast.KindExpressionStatement, + ast.KindClassDeclaration, + ast.KindClassExpression, + ast.KindInterfaceDeclaration, + ast.KindEnumDeclaration, + ast.KindTypeAliasDeclaration, + ast.KindArrayLiteralExpression, + ast.KindBlock, + ast.KindModuleBlock, + ast.KindObjectLiteralExpression, + ast.KindTypeLiteral, + ast.KindMappedType, + ast.KindTupleType, + ast.KindParenthesizedExpression, + ast.KindPropertyAccessExpression, + ast.KindCallExpression, + ast.KindNewExpression, + ast.KindVariableStatement, + ast.KindExportAssignment, + ast.KindReturnStatement, + ast.KindConditionalExpression, + ast.KindArrayBindingPattern, + ast.KindObjectBindingPattern, + ast.KindJsxOpeningElement, + ast.KindJsxOpeningFragment, + ast.KindJsxSelfClosingElement, + ast.KindJsxExpression, + ast.KindMethodSignature, + ast.KindCallSignature, + ast.KindConstructSignature, + ast.KindParameter, + ast.KindFunctionType, + ast.KindConstructorType, + ast.KindParenthesizedType, + ast.KindTaggedTemplateExpression, + ast.KindAwaitExpression, + ast.KindNamedExports, + ast.KindNamedImports, + ast.KindExportSpecifier, + ast.KindImportSpecifier, + ast.KindPropertyDeclaration, + ast.KindCaseClause, + ast.KindDefaultClause: + return true + case ast.KindCaseBlock: + return settings.IndentSwitchCase.IsTrueOrUnknown() + case ast.KindVariableDeclaration, ast.KindPropertyAssignment, ast.KindBinaryExpression: + if settings.IndentMultiLineObjectLiteralBeginningOnBlankLine.IsFalseOrUnknown() && sourceFile != nil && childKind == ast.KindObjectLiteralExpression { + return rangeIsOnOneLine(child.Loc, sourceFile) + } + if parent.Kind == ast.KindBinaryExpression && sourceFile != nil && childKind == ast.KindJsxElement { + parentStartLine, _ := scanner.GetLineAndCharacterOfPosition(sourceFile, scanner.SkipTrivia(sourceFile.Text(), parent.Pos())) + childStartLine, _ := scanner.GetLineAndCharacterOfPosition(sourceFile, scanner.SkipTrivia(sourceFile.Text(), child.Pos())) + return parentStartLine != childStartLine + } + if parent.Kind != ast.KindBinaryExpression { + return true + } + return indentByDefault + case ast.KindDoStatement, + ast.KindWhileStatement, + ast.KindForInStatement, + ast.KindForOfStatement, + ast.KindForStatement, + ast.KindIfStatement, + ast.KindFunctionDeclaration, + ast.KindFunctionExpression, + ast.KindMethodDeclaration, + ast.KindConstructor, + ast.KindGetAccessor, + ast.KindSetAccessor: + return childKind != ast.KindBlock + case ast.KindArrowFunction: + if sourceFile != nil && childKind == ast.KindParenthesizedExpression { + return rangeIsOnOneLine(child.Loc, sourceFile) + } + return childKind != ast.KindBlock + case ast.KindExportDeclaration: + return childKind != ast.KindNamedExports + case ast.KindImportDeclaration: + return childKind != ast.KindImportClause || (child.AsImportClause().NamedBindings != nil && child.AsImportClause().NamedBindings.Kind != ast.KindNamedImports) + case ast.KindJsxElement: + return childKind != ast.KindJsxClosingElement + case ast.KindJsxFragment: + return childKind != ast.KindJsxClosingFragment + case ast.KindIntersectionType, ast.KindUnionType, ast.KindSatisfiesExpression: + if childKind == ast.KindTypeLiteral || childKind == ast.KindTupleType || childKind == ast.KindMappedType { + return false + } + return indentByDefault + case ast.KindTryStatement: + if childKind == ast.KindBlock { + return false + } + return indentByDefault + } + + // No explicit rule for given nodes so the result will follow the default value argument + return indentByDefault +} + +// A multiline conditional typically increases the indentation of its whenTrue and whenFalse children: +// +// condition +// +// ? whenTrue +// : whenFalse; +// +// However, that indentation does not apply if the subexpressions themselves span multiple lines, +// applying their own indentation: +// +// (() => { +// return complexCalculationForCondition(); +// })() ? { +// +// whenTrue: 'multiline object literal' +// } : ( +// +// whenFalse('multiline parenthesized expression') +// +// ); +// +// In these cases, we must discard the indentation increase that would otherwise be applied to the +// whenTrue and whenFalse children to avoid double-indenting their contents. To identify this scenario, +// we check for the whenTrue branch beginning on the line that the condition ends, and the whenFalse +// branch beginning on the line that the whenTrue branch ends. +func childIsUnindentedBranchOfConditionalExpression(parent *ast.Node, child *ast.Node, childStartLine int, sourceFile *ast.SourceFile) bool { + if parent.Kind == ast.KindConditionalExpression && (child == parent.AsConditionalExpression().WhenTrue || child == parent.AsConditionalExpression().WhenFalse) { + conditionEndLine, _ := scanner.GetLineAndCharacterOfPosition(sourceFile, parent.AsConditionalExpression().Condition.End()) + if child == parent.AsConditionalExpression().WhenTrue { + return childStartLine == conditionEndLine + } else { + // On the whenFalse side, we have to look at the whenTrue side, because if that one was + // indented, whenFalse must also be indented: + // + // const y = true + // ? 1 : ( L1: whenTrue indented because it's on a new line + // 0 L2: indented two stops, one because whenTrue was indented + // ); and one because of the parentheses spanning multiple lines + trueStartLine, _ := getStartLineAndCharacterForNode(parent.AsConditionalExpression().WhenTrue, sourceFile) + trueEndLine, _ := scanner.GetLineAndCharacterOfPosition(sourceFile, parent.AsConditionalExpression().WhenTrue.End()) + return conditionEndLine == trueStartLine && trueEndLine == childStartLine + } + } + return false +} + +func argumentStartsOnSameLineAsPreviousArgument(parent *ast.Node, child *ast.Node, childStartLine int, sourceFile *ast.SourceFile) bool { + if ast.IsCallExpression(parent) || ast.IsNewExpression(parent) { + if len(parent.Arguments()) == 0 { + return false + } + currentIndex := core.FindIndex(parent.Arguments(), func(n *ast.Node) bool { return n == child }) + if currentIndex == -1 { + // If it's not one of the arguments, don't look past this + return false + } + if currentIndex == 0 { + return false // Can't look at previous node if first + } + + previousNode := parent.Arguments()[currentIndex-1] + lineOfPreviousNode, _ := scanner.GetLineAndCharacterOfPosition(sourceFile, previousNode.End()) + if childStartLine == lineOfPreviousNode { + return true + } + } + return false +} diff --git a/internal/format/rule.go b/internal/format/rule.go new file mode 100644 index 0000000000..87e7f8f426 --- /dev/null +++ b/internal/format/rule.go @@ -0,0 +1,109 @@ +package format + +import "github.com/microsoft/typescript-go/internal/ast" + +type ruleImpl struct { + debugName string + context []contextPredicate + action ruleAction + flags ruleFlags +} + +func (r ruleImpl) Action() ruleAction { + return r.action +} + +func (r ruleImpl) Context() []contextPredicate { + return r.context +} + +func (r ruleImpl) Flags() ruleFlags { + return r.flags +} + +func (r ruleImpl) String() string { + return r.debugName +} + +type tokenRange struct { + tokens []ast.Kind + isSpecific bool +} + +type ruleSpec struct { + leftTokenRange tokenRange + rightTokenRange tokenRange + rule *ruleImpl +} + +/** + * A rule takes a two tokens (left/right) and a particular context + * for which you're meant to look at them. You then declare what should the + * whitespace annotation be between these tokens via the action param. + * + * @param debugName Name to print + * @param left The left side of the comparison + * @param right The right side of the comparison + * @param context A set of filters to narrow down the space in which this formatter rule applies + * @param action a declaration of the expected whitespace + * @param flags whether the rule deletes a line or not, defaults to no-op + */ +func rule(debugName string, left any, right any, context []contextPredicate, action ruleAction, flags ...ruleFlags) ruleSpec { + flag := ruleFlagsNone + if len(flags) > 0 { + flag = flags[0] + } + leftRange := toTokenRange(left) + rightRange := toTokenRange(right) + rule := &ruleImpl{ + debugName: debugName, + context: context, + action: action, + flags: flag, + } + return ruleSpec{ + leftTokenRange: leftRange, + rightTokenRange: rightRange, + rule: rule, + } +} + +func toTokenRange(e any) tokenRange { + switch t := e.(type) { + case ast.Kind: + return tokenRange{isSpecific: true, tokens: []ast.Kind{t}} + case []ast.Kind: + return tokenRange{isSpecific: true, tokens: t} + case tokenRange: + return t + } + panic("Unknown argument type passed to toTokenRange - only ast.Kind, []ast.Kind, and tokenRange supported") +} + +type contextPredicate = func(ctx *formattingContext) bool + +var anyContext = []contextPredicate{} + +type ruleAction int + +const ( + ruleActionNone ruleAction = 0 + ruleActionStopProcessingSpaceActions ruleAction = 1 << 0 + ruleActionStopProcessingTokenActions ruleAction = 1 << 1 + ruleActionInsertSpace ruleAction = 1 << 2 + ruleActionInsertNewLine ruleAction = 1 << 3 + ruleActionDeleteSpace ruleAction = 1 << 4 + ruleActionDeleteToken ruleAction = 1 << 5 + ruleActionInsertTrailingSemicolon ruleAction = 1 << 6 + + ruleActionStopAction ruleAction = ruleActionStopProcessingSpaceActions | ruleActionStopProcessingTokenActions + ruleActionModifySpaceAction ruleAction = ruleActionInsertSpace | ruleActionInsertNewLine | ruleActionDeleteSpace + ruleActionModifyTokenAction ruleAction = ruleActionDeleteToken | ruleActionInsertTrailingSemicolon +) + +type ruleFlags int + +const ( + ruleFlagsNone ruleFlags = iota + ruleFlagsCanDeleteNewLines +) diff --git a/internal/format/rulecontext.go b/internal/format/rulecontext.go new file mode 100644 index 0000000000..365d70db1c --- /dev/null +++ b/internal/format/rulecontext.go @@ -0,0 +1,644 @@ +package format + +import ( + "strings" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/astnav" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/lsutil" + "github.com/microsoft/typescript-go/internal/scanner" +) + +/// +/// Contexts +/// + +type ( + optionSelector = func(options *FormatCodeSettings) core.Tristate + anyOptionSelector = func(options *FormatCodeSettings) any +) + +func semicolonOption(options *FormatCodeSettings) any { return options.Semicolons } +func insertSpaceAfterCommaDelimiterOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterCommaDelimiter +} + +func insertSpaceAfterSemicolonInForStatementsOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterSemicolonInForStatements +} + +func insertSpaceBeforeAndAfterBinaryOperatorsOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceBeforeAndAfterBinaryOperators +} + +func insertSpaceAfterConstructorOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterConstructor +} + +func insertSpaceAfterKeywordsInControlFlowStatementsOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterKeywordsInControlFlowStatements +} + +func insertSpaceAfterFunctionKeywordForAnonymousFunctionsOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterFunctionKeywordForAnonymousFunctions +} + +func insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesisOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis +} + +func insertSpaceAfterOpeningAndBeforeClosingNonemptyBracketsOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets +} + +func insertSpaceAfterOpeningAndBeforeClosingNonemptyBracesOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces +} + +func insertSpaceAfterOpeningAndBeforeClosingEmptyBracesOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterOpeningAndBeforeClosingEmptyBraces +} + +func insertSpaceAfterOpeningAndBeforeClosingTemplateStringBracesOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces +} + +func insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBracesOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces +} + +func insertSpaceAfterTypeAssertionOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceAfterTypeAssertion +} + +func insertSpaceBeforeFunctionParenthesisOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceBeforeFunctionParenthesis +} + +func placeOpenBraceOnNewLineForFunctionsOption(options *FormatCodeSettings) core.Tristate { + return options.PlaceOpenBraceOnNewLineForFunctions +} + +func placeOpenBraceOnNewLineForControlBlocksOption(options *FormatCodeSettings) core.Tristate { + return options.PlaceOpenBraceOnNewLineForControlBlocks +} + +func insertSpaceBeforeTypeAnnotationOption(options *FormatCodeSettings) core.Tristate { + return options.InsertSpaceBeforeTypeAnnotation +} + +func indentMultiLineObjectLiteralBeginningOnBlankLineOption(options *FormatCodeSettings) core.Tristate { + return options.IndentMultiLineObjectLiteralBeginningOnBlankLine +} + +func indentSwitchCaseOption(options *FormatCodeSettings) core.Tristate { + return options.IndentSwitchCase +} + +func optionEquals(optionName anyOptionSelector, optionValue any) contextPredicate { + return func(context *formattingContext) bool { + if context.Options == nil { + return false + } + return optionName(context.Options) == optionValue + } +} + +func isOptionEnabled(optionName optionSelector) contextPredicate { + return func(context *formattingContext) bool { + if context.Options == nil { + return false + } + return optionName(context.Options).IsTrue() + } +} + +func isOptionDisabled(optionName optionSelector) contextPredicate { + return func(context *formattingContext) bool { + if context.Options == nil { + return true + } + return optionName(context.Options).IsFalse() + } +} + +func isOptionDisabledOrUndefined(optionName optionSelector) contextPredicate { + return func(context *formattingContext) bool { + if context.Options == nil { + return true + } + return optionName(context.Options).IsFalseOrUnknown() + } +} + +func isOptionDisabledOrUndefinedOrTokensOnSameLine(optionName optionSelector) contextPredicate { + return func(context *formattingContext) bool { + if context.Options == nil { + return true + } + return optionName(context.Options).IsFalseOrUnknown() || context.TokensAreOnSameLine() + } +} + +func isOptionEnabledOrUndefined(optionName optionSelector) contextPredicate { + return func(context *formattingContext) bool { + if context.Options == nil { + return true + } + return optionName(context.Options).IsTrueOrUnknown() + } +} + +func isForContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindForStatement +} + +func isNotForContext(context *formattingContext) bool { + return !isForContext(context) +} + +func isBinaryOpContext(context *formattingContext) bool { + switch context.contextNode.Kind { + case ast.KindBinaryExpression: + return context.contextNode.AsBinaryExpression().OperatorToken.Kind != ast.KindCommaToken + case ast.KindConditionalExpression, + ast.KindConditionalType, + ast.KindAsExpression, + ast.KindExportSpecifier, + ast.KindImportSpecifier, + ast.KindTypePredicate, + ast.KindUnionType, + ast.KindIntersectionType, + ast.KindSatisfiesExpression: + return true + + // equals in binding elements func foo([[x, y] = [1, 2]]) + case ast.KindBindingElement: + // equals in type X = ... + fallthrough + case ast.KindTypeAliasDeclaration: + // equal in import a = module('a'); + fallthrough + case ast.KindImportEqualsDeclaration: + // equal in export = 1 + fallthrough + case ast.KindExportAssignment: + // equal in let a = 0 + fallthrough + case ast.KindVariableDeclaration: + // equal in p = 0 + fallthrough + case ast.KindParameter, + ast.KindEnumMember, + ast.KindPropertyDeclaration, + ast.KindPropertySignature: + return context.currentTokenSpan.Kind == ast.KindEqualsToken || context.nextTokenSpan.Kind == ast.KindEqualsToken + // "in" keyword in for (let x in []) { } + case ast.KindForInStatement: + // "in" keyword in [P in keyof T] T[P] + fallthrough + case ast.KindTypeParameter: + return context.currentTokenSpan.Kind == ast.KindInKeyword || context.nextTokenSpan.Kind == ast.KindInKeyword || context.currentTokenSpan.Kind == ast.KindEqualsToken || context.nextTokenSpan.Kind == ast.KindEqualsToken + // Technically, "of" is not a binary operator, but format it the same way as "in" + case ast.KindForOfStatement: + return context.currentTokenSpan.Kind == ast.KindOfKeyword || context.nextTokenSpan.Kind == ast.KindOfKeyword + } + return false +} + +func isNotBinaryOpContext(context *formattingContext) bool { + return !isBinaryOpContext(context) +} + +func isNotTypeAnnotationContext(context *formattingContext) bool { + return !isTypeAnnotationContext(context) +} + +func isTypeAnnotationContext(context *formattingContext) bool { + contextKind := context.contextNode.Kind + return contextKind == ast.KindPropertyDeclaration || + contextKind == ast.KindPropertySignature || + contextKind == ast.KindParameter || + contextKind == ast.KindVariableDeclaration || + ast.IsFunctionLikeKind(contextKind) +} + +func isOptionalPropertyContext(context *formattingContext) bool { + return ast.IsPropertyDeclaration(context.contextNode) && context.contextNode.AsPropertyDeclaration().PostfixToken != nil && context.contextNode.AsPropertyDeclaration().PostfixToken.Kind == ast.KindQuestionToken +} + +func isNonOptionalPropertyContext(context *formattingContext) bool { + return !isOptionalPropertyContext(context) +} + +func isConditionalOperatorContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindConditionalExpression || + context.contextNode.Kind == ast.KindConditionalType +} + +func isSameLineTokenOrBeforeBlockContext(context *formattingContext) bool { + return context.TokensAreOnSameLine() || isBeforeBlockContext(context) +} + +func isBraceWrappedContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindObjectBindingPattern || + context.contextNode.Kind == ast.KindMappedType || + isSingleLineBlockContext(context) +} + +// This check is done before an open brace in a control construct, a function, or a typescript block declaration +func isBeforeMultilineBlockContext(context *formattingContext) bool { + return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()) +} + +func isMultilineBlockContext(context *formattingContext) bool { + return isBlockContext(context) && !(context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()) +} + +func isSingleLineBlockContext(context *formattingContext) bool { + return isBlockContext(context) && (context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()) +} + +func isBlockContext(context *formattingContext) bool { + return nodeIsBlockContext(context.contextNode) +} + +func isBeforeBlockContext(context *formattingContext) bool { + return nodeIsBlockContext(context.nextTokenParent) +} + +// IMPORTANT!!! This method must return true ONLY for nodes with open and close braces as immediate children +func nodeIsBlockContext(node *ast.Node) bool { + if nodeIsTypeScriptDeclWithBlockContext(node) { + // This means we are in a context that looks like a block to the user, but in the grammar is actually not a node (it's a class, module, enum, object type literal, etc). + return true + } + + switch node.Kind { + case ast.KindBlock, + ast.KindCaseBlock, + ast.KindObjectLiteralExpression, + ast.KindModuleBlock: + return true + } + + return false +} + +func isFunctionDeclContext(context *formattingContext) bool { + switch context.contextNode.Kind { + case ast.KindFunctionDeclaration, + ast.KindMethodDeclaration, + ast.KindMethodSignature: + // case ast.KindMemberFunctionDeclaration: + fallthrough + case ast.KindGetAccessor, + ast.KindSetAccessor: + // case ast.KindMethodSignature: + fallthrough + case ast.KindCallSignature, + ast.KindFunctionExpression, + ast.KindConstructor, + ast.KindArrowFunction: + // case ast.KindConstructorDeclaration: + // case ast.KindSimpleArrowFunctionExpression: + // case ast.KindParenthesizedArrowFunctionExpression: + fallthrough + case ast.KindInterfaceDeclaration: // This one is not truly a function, but for formatting purposes, it acts just like one + return true + } + + return false +} + +func isNotFunctionDeclContext(context *formattingContext) bool { + return !isFunctionDeclContext(context) +} + +func isFunctionDeclarationOrFunctionExpressionContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindFunctionDeclaration || context.contextNode.Kind == ast.KindFunctionExpression +} + +func isTypeScriptDeclWithBlockContext(context *formattingContext) bool { + return nodeIsTypeScriptDeclWithBlockContext(context.contextNode) +} + +func nodeIsTypeScriptDeclWithBlockContext(node *ast.Node) bool { + switch node.Kind { + case ast.KindClassDeclaration, + ast.KindClassExpression, + ast.KindInterfaceDeclaration, + ast.KindEnumDeclaration, + ast.KindTypeLiteral, + ast.KindModuleDeclaration, + ast.KindExportDeclaration, + ast.KindNamedExports, + ast.KindImportDeclaration, + ast.KindNamedImports: + return true + } + + return false +} + +func isAfterCodeBlockContext(context *formattingContext) bool { + switch context.currentTokenParent.Kind { + case ast.KindClassDeclaration, + ast.KindModuleDeclaration, + ast.KindEnumDeclaration, + ast.KindCatchClause, + ast.KindModuleBlock, + ast.KindSwitchStatement: + return true + case ast.KindBlock: + blockParent := context.currentTokenParent.Parent + // In a codefix scenario, we can't rely on parents being set. So just always return true. + if blockParent == nil || blockParent.Kind != ast.KindArrowFunction && blockParent.Kind != ast.KindFunctionExpression { + return true + } + } + return false +} + +func isControlDeclContext(context *formattingContext) bool { + switch context.contextNode.Kind { + case ast.KindIfStatement, + ast.KindSwitchStatement, + ast.KindForStatement, + ast.KindForInStatement, + ast.KindForOfStatement, + ast.KindWhileStatement, + ast.KindTryStatement, + ast.KindDoStatement, + ast.KindWithStatement: + // TODO + // case ast.KindElseClause: + fallthrough + case ast.KindCatchClause: + return true + + default: + return false + } +} + +func isObjectContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindObjectLiteralExpression +} + +func isFunctionCallContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindCallExpression +} + +func isNewContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindNewExpression +} + +func isFunctionCallOrNewContext(context *formattingContext) bool { + return isFunctionCallContext(context) || isNewContext(context) +} + +func isPreviousTokenNotComma(context *formattingContext) bool { + return context.currentTokenSpan.Kind != ast.KindCommaToken +} + +func isNextTokenNotCloseBracket(context *formattingContext) bool { + return context.nextTokenSpan.Kind != ast.KindCloseBracketToken +} + +func isNextTokenNotCloseParen(context *formattingContext) bool { + return context.nextTokenSpan.Kind != ast.KindCloseParenToken +} + +func isArrowFunctionContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindArrowFunction +} + +func isImportTypeContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindImportType +} + +func isNonJsxSameLineTokenContext(context *formattingContext) bool { + return context.TokensAreOnSameLine() && context.contextNode.Kind != ast.KindJsxText +} + +func isNonJsxTextContext(context *formattingContext) bool { + return context.contextNode.Kind != ast.KindJsxText +} + +func isNonJsxElementOrFragmentContext(context *formattingContext) bool { + return context.contextNode.Kind != ast.KindJsxElement && context.contextNode.Kind != ast.KindJsxFragment +} + +func isJsxExpressionContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindJsxExpression || context.contextNode.Kind == ast.KindJsxSpreadAttribute +} + +func isNextTokenParentJsxAttribute(context *formattingContext) bool { + return context.nextTokenParent.Kind == ast.KindJsxAttribute || (context.nextTokenParent.Kind == ast.KindJsxNamespacedName && context.nextTokenParent.Parent.Kind == ast.KindJsxAttribute) +} + +func isJsxAttributeContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindJsxAttribute +} + +func isNextTokenParentNotJsxNamespacedName(context *formattingContext) bool { + return context.nextTokenParent.Kind != ast.KindJsxNamespacedName +} + +func isNextTokenParentJsxNamespacedName(context *formattingContext) bool { + return context.nextTokenParent.Kind == ast.KindJsxNamespacedName +} + +func isJsxSelfClosingElementContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindJsxSelfClosingElement +} + +func isNotBeforeBlockInFunctionDeclarationContext(context *formattingContext) bool { + return !isFunctionDeclContext(context) && !isBeforeBlockContext(context) +} + +func isEndOfDecoratorContextOnSameLine(context *formattingContext) bool { + return context.TokensAreOnSameLine() && + ast.HasDecorators(context.contextNode) && + nodeIsInDecoratorContext(context.currentTokenParent) && + !nodeIsInDecoratorContext(context.nextTokenParent) +} + +func nodeIsInDecoratorContext(node *ast.Node) bool { + for node != nil && ast.IsExpression(node) { + node = node.Parent + } + return node != nil && node.Kind == ast.KindDecorator +} + +func isStartOfVariableDeclarationList(context *formattingContext) bool { + return context.currentTokenParent.Kind == ast.KindVariableDeclarationList && + scanner.GetTokenPosOfNode(context.currentTokenParent, context.SourceFile, false) == context.currentTokenSpan.Loc.Pos() +} + +func isNotFormatOnEnter(context *formattingContext) bool { + return context.FormattingRequestKind != FormatRequestKindFormatOnEnter +} + +func isModuleDeclContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindModuleDeclaration +} + +func isObjectTypeContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindTypeLiteral // && context.contextNode.parent.Kind != ast.KindInterfaceDeclaration; +} + +func isConstructorSignatureContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindConstructSignature +} + +func isTypeArgumentOrParameterOrAssertion(token *TextRangeWithKind, parent *ast.Node) bool { + if token.Kind != ast.KindLessThanToken && token.Kind != ast.KindGreaterThanToken { + return false + } + switch parent.Kind { + case ast.KindTypeReference, + ast.KindTypeAssertionExpression, + ast.KindTypeAliasDeclaration, + ast.KindClassDeclaration, + ast.KindClassExpression, + ast.KindInterfaceDeclaration, + ast.KindFunctionDeclaration, + ast.KindFunctionExpression, + ast.KindArrowFunction, + ast.KindMethodDeclaration, + ast.KindMethodSignature, + ast.KindCallSignature, + ast.KindConstructSignature, + ast.KindCallExpression, + ast.KindNewExpression, + ast.KindExpressionWithTypeArguments: + return true + default: + return false + } +} + +func isTypeArgumentOrParameterOrAssertionContext(context *formattingContext) bool { + return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || + isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent) +} + +func isTypeAssertionContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindTypeAssertionExpression +} + +func isNonTypeAssertionContext(context *formattingContext) bool { + return !isTypeAssertionContext(context) +} + +func isVoidOpContext(context *formattingContext) bool { + return context.currentTokenSpan.Kind == ast.KindVoidKeyword && context.currentTokenParent.Kind == ast.KindVoidExpression +} + +func isYieldOrYieldStarWithOperand(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindYieldExpression && context.contextNode.AsYieldExpression().Expression != nil +} + +func isNonNullAssertionContext(context *formattingContext) bool { + return context.contextNode.Kind == ast.KindNonNullExpression +} + +func isNotStatementConditionContext(context *formattingContext) bool { + return !isStatementConditionContext(context) +} + +func isStatementConditionContext(context *formattingContext) bool { + switch context.contextNode.Kind { + case ast.KindIfStatement, + ast.KindForStatement, + ast.KindForInStatement, + ast.KindForOfStatement, + ast.KindDoStatement, + ast.KindWhileStatement: + return true + + default: + return false + } +} + +func isSemicolonDeletionContext(context *formattingContext) bool { + nextTokenKind := context.nextTokenSpan.Kind + nextTokenStart := context.nextTokenSpan.Loc.Pos() + if ast.IsTrivia(nextTokenKind) { + var nextRealToken *ast.Node + if context.nextTokenParent == context.currentTokenParent { + // !!! TODO: very different from strada, but strada's logic here is wonky - find the first ancestor without a parent? that's just the source file. + nextRealToken = astnav.FindNextToken(context.nextTokenParent, context.SourceFile.AsNode(), context.SourceFile) + } else { + nextRealToken = lsutil.GetFirstToken(context.nextTokenParent, context.SourceFile) + } + + if nextRealToken == nil { + return true + } + nextTokenKind = nextRealToken.Kind + nextTokenStart = scanner.GetTokenPosOfNode(nextRealToken, context.SourceFile, false) + } + + startLine, _ := scanner.GetLineAndCharacterOfPosition(context.SourceFile, context.currentTokenSpan.Loc.Pos()) + endLine, _ := scanner.GetLineAndCharacterOfPosition(context.SourceFile, nextTokenStart) + if startLine == endLine { + return nextTokenKind == ast.KindCloseBraceToken || nextTokenKind == ast.KindEndOfFile + } + + if nextTokenKind == ast.KindSemicolonToken && + context.currentTokenSpan.Kind == ast.KindSemicolonToken { + return true + } + + if nextTokenKind == ast.KindSemicolonClassElement || + nextTokenKind == ast.KindSemicolonToken { + return false + } + + if context.contextNode.Kind == ast.KindInterfaceDeclaration || + context.contextNode.Kind == ast.KindTypeAliasDeclaration { + // Can't remove semicolon after `foo`; it would parse as a method declaration: + // + // interface I { + // foo; + // () void + // } + return context.currentTokenParent.Kind != ast.KindPropertySignature || + context.currentTokenParent.Type() != nil || + nextTokenKind != ast.KindOpenParenToken + } + + if ast.IsPropertyDeclaration(context.currentTokenParent) { + return context.currentTokenParent.Initializer() == nil + } + + return context.currentTokenParent.Kind != ast.KindForStatement && + context.currentTokenParent.Kind != ast.KindEmptyStatement && + context.currentTokenParent.Kind != ast.KindSemicolonClassElement && + nextTokenKind != ast.KindOpenBracketToken && + nextTokenKind != ast.KindOpenParenToken && + nextTokenKind != ast.KindPlusToken && + nextTokenKind != ast.KindMinusToken && + nextTokenKind != ast.KindSlashToken && + nextTokenKind != ast.KindRegularExpressionLiteral && + nextTokenKind != ast.KindCommaToken && + nextTokenKind != ast.KindTemplateExpression && + nextTokenKind != ast.KindTemplateHead && + nextTokenKind != ast.KindNoSubstitutionTemplateLiteral && + nextTokenKind != ast.KindDotToken +} + +func isSemicolonInsertionContext(context *formattingContext) bool { + return lsutil.PositionIsASICandidate(context.currentTokenSpan.Loc.End(), context.currentTokenParent, context.SourceFile) +} + +func isNotPropertyAccessOnIntegerLiteral(context *formattingContext) bool { + return !ast.IsPropertyAccessExpression(context.contextNode) || + !ast.IsNumericLiteral(context.contextNode.Expression()) || + strings.Contains(context.contextNode.Expression().Text(), ".") +} diff --git a/internal/format/rules.go b/internal/format/rules.go new file mode 100644 index 0000000000..c8b31a247e --- /dev/null +++ b/internal/format/rules.go @@ -0,0 +1,446 @@ +package format + +import ( + "slices" + + "github.com/microsoft/typescript-go/internal/ast" +) + +func getAllRules() []ruleSpec { + allTokens := make([]ast.Kind, 0, ast.KindLastToken-ast.KindFirstToken+1) + for token := ast.KindFirstToken; token <= ast.KindLastToken; token++ { + allTokens = append(allTokens, token) + } + + anyTokenExcept := func(tokens ...ast.Kind) tokenRange { + newTokens := make([]ast.Kind, 0, ast.KindLastToken-ast.KindFirstToken+1) + for token := ast.KindFirstToken; token <= ast.KindLastToken; token++ { + if slices.Contains(tokens, token) { + continue + } + newTokens = append(newTokens, token) + } + return tokenRange{ + isSpecific: false, + tokens: newTokens, + } + } + + anyToken := tokenRange{ + isSpecific: false, + tokens: allTokens, + } + + anyTokenIncludingMultilineComments := tokenRangeFromEx(allTokens, ast.KindMultiLineCommentTrivia) + anyTokenIncludingEOF := tokenRangeFromEx(allTokens, ast.KindEndOfFile) + keywords := tokenRangeFromRange(ast.KindFirstKeyword, ast.KindLastKeyword) + binaryOperators := tokenRangeFromRange(ast.KindFirstBinaryOperator, ast.KindLastBinaryOperator) + binaryKeywordOperators := []ast.Kind{ + ast.KindInKeyword, + ast.KindInstanceOfKeyword, + ast.KindOfKeyword, + ast.KindAsKeyword, + ast.KindIsKeyword, + ast.KindSatisfiesKeyword, + } + unaryPrefixOperators := []ast.Kind{ast.KindPlusPlusToken, ast.KindMinusToken, ast.KindTildeToken, ast.KindExclamationToken} + unaryPrefixExpressions := []ast.Kind{ + ast.KindNumericLiteral, + ast.KindBigIntLiteral, + ast.KindIdentifier, + ast.KindOpenParenToken, + ast.KindOpenBracketToken, + ast.KindOpenBraceToken, + ast.KindThisKeyword, + ast.KindNewKeyword, + } + unaryPreincrementExpressions := []ast.Kind{ast.KindIdentifier, ast.KindOpenParenToken, ast.KindThisKeyword, ast.KindNewKeyword} + unaryPostincrementExpressions := []ast.Kind{ast.KindIdentifier, ast.KindCloseParenToken, ast.KindCloseBracketToken, ast.KindNewKeyword} + unaryPredecrementExpressions := []ast.Kind{ast.KindIdentifier, ast.KindOpenParenToken, ast.KindThisKeyword, ast.KindNewKeyword} + unaryPostdecrementExpressions := []ast.Kind{ast.KindIdentifier, ast.KindCloseParenToken, ast.KindCloseBracketToken, ast.KindNewKeyword} + comments := []ast.Kind{ast.KindSingleLineCommentTrivia, ast.KindMultiLineCommentTrivia} + typeKeywords := []ast.Kind{ + ast.KindAnyKeyword, + ast.KindAssertsKeyword, + ast.KindBigIntKeyword, + ast.KindBooleanKeyword, + ast.KindFalseKeyword, + ast.KindInferKeyword, + ast.KindKeyOfKeyword, + ast.KindNeverKeyword, + ast.KindNullKeyword, + ast.KindNumberKeyword, + ast.KindObjectKeyword, + ast.KindReadonlyKeyword, + ast.KindStringKeyword, + ast.KindSymbolKeyword, + ast.KindTypeOfKeyword, + ast.KindTrueKeyword, + ast.KindVoidKeyword, + ast.KindUndefinedKeyword, + ast.KindUniqueKeyword, + ast.KindUnknownKeyword, + } + typeNames := append([]ast.Kind{ast.KindIdentifier}, typeKeywords...) + + // Place a space before open brace in a function declaration + // TypeScript: Function can have return types, which can be made of tons of different token kinds + functionOpenBraceLeftTokenRange := anyTokenIncludingMultilineComments + + // Place a space before open brace in a TypeScript declaration that has braces as children (class, module, enum, etc) + typeScriptOpenBraceLeftTokenRange := tokenRangeFrom(ast.KindIdentifier, ast.KindGreaterThanToken, ast.KindMultiLineCommentTrivia, ast.KindClassKeyword, ast.KindExportKeyword, ast.KindImportKeyword) + + // Place a space before open brace in a control flow construct + controlOpenBraceLeftTokenRange := tokenRangeFrom(ast.KindCloseParenToken, ast.KindMultiLineCommentTrivia, ast.KindDoKeyword, ast.KindTryKeyword, ast.KindFinallyKeyword, ast.KindElseKeyword, ast.KindCatchKeyword) + + // These rules are higher in priority than user-configurable + highPriorityCommonRules := []ruleSpec{ + // Leave comments alone + rule("IgnoreBeforeComment", anyToken, comments, anyContext, ruleActionStopProcessingSpaceActions), + rule("IgnoreAfterLineComment", ast.KindSingleLineCommentTrivia, anyToken, anyContext, ruleActionStopProcessingSpaceActions), + + rule("NotSpaceBeforeColon", anyToken, ast.KindColonToken, []contextPredicate{isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext}, ruleActionDeleteSpace), + rule("SpaceAfterColon", ast.KindColonToken, anyToken, []contextPredicate{isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNextTokenParentNotJsxNamespacedName}, ruleActionInsertSpace), + rule("NoSpaceBeforeQuestionMark", anyToken, ast.KindQuestionToken, []contextPredicate{isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext}, ruleActionDeleteSpace), + // insert space after '?' only when it is used in conditional operator + rule("SpaceAfterQuestionMarkInConditionalOperator", ast.KindQuestionToken, anyToken, []contextPredicate{isNonJsxSameLineTokenContext, isConditionalOperatorContext}, ruleActionInsertSpace), + + // in other cases there should be no space between '?' and next token + rule("NoSpaceAfterQuestionMark", ast.KindQuestionToken, anyToken, []contextPredicate{isNonJsxSameLineTokenContext, isNonOptionalPropertyContext}, ruleActionDeleteSpace), + + rule("NoSpaceBeforeDot", anyToken, []ast.Kind{ast.KindDotToken, ast.KindQuestionDotToken}, []contextPredicate{isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral}, ruleActionDeleteSpace), + rule("NoSpaceAfterDot", []ast.Kind{ast.KindDotToken, ast.KindQuestionDotToken}, anyToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + + rule("NoSpaceBetweenImportParenInImportType", ast.KindImportKeyword, ast.KindOpenParenToken, []contextPredicate{isNonJsxSameLineTokenContext, isImportTypeContext}, ruleActionDeleteSpace), + + // Special handling of unary operators. + // Prefix operators generally shouldn't have a space between + // them and their target unary expression. + rule("NoSpaceAfterUnaryPrefixOperator", unaryPrefixOperators, unaryPrefixExpressions, []contextPredicate{isNonJsxSameLineTokenContext, isNotBinaryOpContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterUnaryPreincrementOperator", ast.KindPlusPlusToken, unaryPreincrementExpressions, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterUnaryPredecrementOperator", ast.KindMinusMinusToken, unaryPredecrementExpressions, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceBeforeUnaryPostincrementOperator", unaryPostincrementExpressions, ast.KindPlusPlusToken, []contextPredicate{isNonJsxSameLineTokenContext, isNotStatementConditionContext}, ruleActionDeleteSpace), + rule("NoSpaceBeforeUnaryPostdecrementOperator", unaryPostdecrementExpressions, ast.KindMinusMinusToken, []contextPredicate{isNonJsxSameLineTokenContext, isNotStatementConditionContext}, ruleActionDeleteSpace), + + // More unary operator special-casing. + // DevDiv 181814: Be careful when removing leading whitespace + // around unary operators. Examples: + // 1 - -2 --X--> 1--2 + // a + ++b --X--> a+++b + rule("SpaceAfterPostincrementWhenFollowedByAdd", ast.KindPlusPlusToken, ast.KindPlusToken, []contextPredicate{isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionInsertSpace), + rule("SpaceAfterAddWhenFollowedByUnaryPlus", ast.KindPlusToken, ast.KindPlusToken, []contextPredicate{isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionInsertSpace), + rule("SpaceAfterAddWhenFollowedByPreincrement", ast.KindPlusToken, ast.KindPlusPlusToken, []contextPredicate{isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionInsertSpace), + rule("SpaceAfterPostdecrementWhenFollowedBySubtract", ast.KindMinusMinusToken, ast.KindMinusToken, []contextPredicate{isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionInsertSpace), + rule("SpaceAfterSubtractWhenFollowedByUnaryMinus", ast.KindMinusToken, ast.KindMinusToken, []contextPredicate{isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionInsertSpace), + rule("SpaceAfterSubtractWhenFollowedByPredecrement", ast.KindMinusToken, ast.KindMinusMinusToken, []contextPredicate{isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionInsertSpace), + + rule("NoSpaceAfterCloseBrace", ast.KindCloseBraceToken, []ast.Kind{ast.KindCommaToken, ast.KindSemicolonToken}, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + // For functions and control block place } on a new line []ast.Kind{multi-line rule} + rule("NewLineBeforeCloseBraceInBlockContext", anyTokenIncludingMultilineComments, ast.KindCloseBraceToken, []contextPredicate{isMultilineBlockContext}, ruleActionInsertNewLine), + + // Space/new line after }. + rule("SpaceAfterCloseBrace", ast.KindCloseBraceToken, anyTokenExcept(ast.KindCloseParenToken), []contextPredicate{isNonJsxSameLineTokenContext, isAfterCodeBlockContext}, ruleActionInsertSpace), + // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied + // Also should not apply to }) + rule("SpaceBetweenCloseBraceAndElse", ast.KindCloseBraceToken, ast.KindElseKeyword, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("SpaceBetweenCloseBraceAndWhile", ast.KindCloseBraceToken, ast.KindWhileKeyword, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("NoSpaceBetweenEmptyBraceBrackets", ast.KindOpenBraceToken, ast.KindCloseBraceToken, []contextPredicate{isNonJsxSameLineTokenContext, isObjectContext}, ruleActionDeleteSpace), + + // Add a space after control dec context if the next character is an open bracket ex: 'if (false)[]ast.Kind{a, b} = []ast.Kind{1, 2};' -> 'if (false) []ast.Kind{a, b} = []ast.Kind{1, 2};' + rule("SpaceAfterConditionalClosingParen", ast.KindCloseParenToken, ast.KindOpenBracketToken, []contextPredicate{isControlDeclContext}, ruleActionInsertSpace), + + rule("NoSpaceBetweenFunctionKeywordAndStar", ast.KindFunctionKeyword, ast.KindAsteriskToken, []contextPredicate{isFunctionDeclarationOrFunctionExpressionContext}, ruleActionDeleteSpace), + rule("SpaceAfterStarInGeneratorDeclaration", ast.KindAsteriskToken, ast.KindIdentifier, []contextPredicate{isFunctionDeclarationOrFunctionExpressionContext}, ruleActionInsertSpace), + + rule("SpaceAfterFunctionInFuncDecl", ast.KindFunctionKeyword, anyToken, []contextPredicate{isFunctionDeclContext}, ruleActionInsertSpace), + // Insert new line after { and before } in multi-line contexts. + rule("NewLineAfterOpenBraceInBlockContext", ast.KindOpenBraceToken, anyToken, []contextPredicate{isMultilineBlockContext}, ruleActionInsertNewLine), + + // For get/set members, we check for (identifier,identifier) since get/set don't have tokens and they are represented as just an identifier token. + // Though, we do extra check on the context to make sure we are dealing with get/set node. Example: + // get x() {} + // set x(val) {} + rule("SpaceAfterGetSetInMember", []ast.Kind{ast.KindGetKeyword, ast.KindSetKeyword}, ast.KindIdentifier, []contextPredicate{isFunctionDeclContext}, ruleActionInsertSpace), + + rule("NoSpaceBetweenYieldKeywordAndStar", ast.KindYieldKeyword, ast.KindAsteriskToken, []contextPredicate{isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand}, ruleActionDeleteSpace), + rule("SpaceBetweenYieldOrYieldStarAndOperand", []ast.Kind{ast.KindYieldKeyword, ast.KindAsteriskToken}, anyToken, []contextPredicate{isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand}, ruleActionInsertSpace), + + rule("NoSpaceBetweenReturnAndSemicolon", ast.KindReturnKeyword, ast.KindSemicolonToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("SpaceAfterCertainKeywords", []ast.Kind{ast.KindVarKeyword, ast.KindThrowKeyword, ast.KindNewKeyword, ast.KindDeleteKeyword, ast.KindReturnKeyword, ast.KindTypeOfKeyword, ast.KindAwaitKeyword}, anyToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("SpaceAfterLetConstInVariableDeclaration", []ast.Kind{ast.KindLetKeyword, ast.KindConstKeyword}, anyToken, []contextPredicate{isNonJsxSameLineTokenContext, isStartOfVariableDeclarationList}, ruleActionInsertSpace), + rule("NoSpaceBeforeOpenParenInFuncCall", anyToken, ast.KindOpenParenToken, []contextPredicate{isNonJsxSameLineTokenContext, isFunctionCallOrNewContext, isPreviousTokenNotComma}, ruleActionDeleteSpace), + + // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. + rule("SpaceBeforeBinaryKeywordOperator", anyToken, binaryKeywordOperators, []contextPredicate{isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionInsertSpace), + rule("SpaceAfterBinaryKeywordOperator", binaryKeywordOperators, anyToken, []contextPredicate{isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionInsertSpace), + + rule("SpaceAfterVoidOperator", ast.KindVoidKeyword, anyToken, []contextPredicate{isNonJsxSameLineTokenContext, isVoidOpContext}, ruleActionInsertSpace), + + // Async-await + rule("SpaceBetweenAsyncAndOpenParen", ast.KindAsyncKeyword, ast.KindOpenParenToken, []contextPredicate{isArrowFunctionContext, isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("SpaceBetweenAsyncAndFunctionKeyword", ast.KindAsyncKeyword, []ast.Kind{ast.KindFunctionKeyword, ast.KindIdentifier}, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + + // Template string + rule("NoSpaceBetweenTagAndTemplateString", []ast.Kind{ast.KindIdentifier, ast.KindCloseParenToken}, []ast.Kind{ast.KindNoSubstitutionTemplateLiteral, ast.KindTemplateHead}, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + + // JSX opening elements + rule("SpaceBeforeJsxAttribute", anyToken, ast.KindIdentifier, []contextPredicate{isNextTokenParentJsxAttribute, isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("SpaceBeforeSlashInJsxOpeningElement", anyToken, ast.KindSlashToken, []contextPredicate{isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", ast.KindSlashToken, ast.KindGreaterThanToken, []contextPredicate{isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceBeforeEqualInJsxAttribute", anyToken, ast.KindEqualsToken, []contextPredicate{isJsxAttributeContext, isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterEqualInJsxAttribute", ast.KindEqualsToken, anyToken, []contextPredicate{isJsxAttributeContext, isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceBeforeJsxNamespaceColon", ast.KindIdentifier, ast.KindColonToken, []contextPredicate{isNextTokenParentJsxNamespacedName}, ruleActionDeleteSpace), + rule("NoSpaceAfterJsxNamespaceColon", ast.KindColonToken, ast.KindIdentifier, []contextPredicate{isNextTokenParentJsxNamespacedName}, ruleActionDeleteSpace), + + // TypeScript-specific rules + // Use of module as a function call. e.g.: import m2 = module("m2"); + rule("NoSpaceAfterModuleImport", []ast.Kind{ast.KindModuleKeyword, ast.KindRequireKeyword}, ast.KindOpenParenToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + // Add a space around certain TypeScript keywords + rule( + "SpaceAfterCertainTypeScriptKeywords", + []ast.Kind{ + ast.KindAbstractKeyword, + ast.KindAccessorKeyword, + ast.KindClassKeyword, + ast.KindDeclareKeyword, + ast.KindDefaultKeyword, + ast.KindEnumKeyword, + ast.KindExportKeyword, + ast.KindExtendsKeyword, + ast.KindGetKeyword, + ast.KindImplementsKeyword, + ast.KindImportKeyword, + ast.KindInterfaceKeyword, + ast.KindModuleKeyword, + ast.KindNamespaceKeyword, + ast.KindPrivateKeyword, + ast.KindPublicKeyword, + ast.KindProtectedKeyword, + ast.KindReadonlyKeyword, + ast.KindSetKeyword, + ast.KindStaticKeyword, + ast.KindTypeKeyword, + ast.KindFromKeyword, + ast.KindKeyOfKeyword, + ast.KindInferKeyword, + }, + anyToken, + []contextPredicate{isNonJsxSameLineTokenContext}, + ruleActionInsertSpace, + ), + rule( + "SpaceBeforeCertainTypeScriptKeywords", + anyToken, + []ast.Kind{ast.KindExtendsKeyword, ast.KindImplementsKeyword, ast.KindFromKeyword}, + []contextPredicate{isNonJsxSameLineTokenContext}, + ruleActionInsertSpace, + ), + // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { + rule("SpaceAfterModuleName", ast.KindStringLiteral, ast.KindOpenBraceToken, []contextPredicate{isModuleDeclContext}, ruleActionInsertSpace), + + // Lambda expressions + rule("SpaceBeforeArrow", anyToken, ast.KindEqualsGreaterThanToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("SpaceAfterArrow", ast.KindEqualsGreaterThanToken, anyToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + + // Optional parameters and let args + rule("NoSpaceAfterEllipsis", ast.KindDotDotDotToken, ast.KindIdentifier, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterOptionalParameters", ast.KindQuestionToken, []ast.Kind{ast.KindCloseParenToken, ast.KindCommaToken}, []contextPredicate{isNonJsxSameLineTokenContext, isNotBinaryOpContext}, ruleActionDeleteSpace), + + // Remove spaces in empty interface literals. e.g.: x: {} + rule("NoSpaceBetweenEmptyInterfaceBraceBrackets", ast.KindOpenBraceToken, ast.KindCloseBraceToken, []contextPredicate{isNonJsxSameLineTokenContext, isObjectTypeContext}, ruleActionDeleteSpace), + + // generics and type assertions + rule("NoSpaceBeforeOpenAngularBracket", typeNames, ast.KindLessThanToken, []contextPredicate{isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext}, ruleActionDeleteSpace), + rule("NoSpaceBetweenCloseParenAndAngularBracket", ast.KindCloseParenToken, ast.KindLessThanToken, []contextPredicate{isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterOpenAngularBracket", ast.KindLessThanToken, anyToken, []contextPredicate{isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext}, ruleActionDeleteSpace), + rule("NoSpaceBeforeCloseAngularBracket", anyToken, ast.KindGreaterThanToken, []contextPredicate{isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterCloseAngularBracket", ast.KindGreaterThanToken, []ast.Kind{ast.KindOpenParenToken, ast.KindOpenBracketToken, ast.KindGreaterThanToken, ast.KindCommaToken}, []contextPredicate{ + isNonJsxSameLineTokenContext, + isTypeArgumentOrParameterOrAssertionContext, + isNotFunctionDeclContext, /*To prevent an interference with the SpaceBeforeOpenParenInFuncDecl rule*/ + isNonTypeAssertionContext, + }, ruleActionDeleteSpace), + + // decorators + rule("SpaceBeforeAt", []ast.Kind{ast.KindCloseParenToken, ast.KindIdentifier}, ast.KindAtToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("NoSpaceAfterAt", ast.KindAtToken, anyToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + // Insert space after @ in decorator + rule( + "SpaceAfterDecorator", + anyToken, + []ast.Kind{ + ast.KindAbstractKeyword, + ast.KindIdentifier, + ast.KindExportKeyword, + ast.KindDefaultKeyword, + ast.KindClassKeyword, + ast.KindStaticKeyword, + ast.KindPublicKeyword, + ast.KindPrivateKeyword, + ast.KindProtectedKeyword, + ast.KindGetKeyword, + ast.KindSetKeyword, + ast.KindOpenBracketToken, + ast.KindAsteriskToken, + }, + []contextPredicate{isEndOfDecoratorContextOnSameLine}, + ruleActionInsertSpace, + ), + + rule("NoSpaceBeforeNonNullAssertionOperator", anyToken, ast.KindExclamationToken, []contextPredicate{isNonJsxSameLineTokenContext, isNonNullAssertionContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterNewKeywordOnConstructorSignature", ast.KindNewKeyword, ast.KindOpenParenToken, []contextPredicate{isNonJsxSameLineTokenContext, isConstructorSignatureContext}, ruleActionDeleteSpace), + rule("SpaceLessThanAndNonJSXTypeAnnotation", ast.KindLessThanToken, ast.KindLessThanToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + } + + // These rules are applied after high priority + userConfigurableRules := []ruleSpec{ + // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses + rule("SpaceAfterConstructor", ast.KindConstructorKeyword, ast.KindOpenParenToken, []contextPredicate{isOptionEnabled(insertSpaceAfterConstructorOption), isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("NoSpaceAfterConstructor", ast.KindConstructorKeyword, ast.KindOpenParenToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterConstructorOption), isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + + rule("SpaceAfterComma", ast.KindCommaToken, anyToken, []contextPredicate{isOptionEnabled(insertSpaceAfterCommaDelimiterOption), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket, isNextTokenNotCloseParen}, ruleActionInsertSpace), + rule("NoSpaceAfterComma", ast.KindCommaToken, anyToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterCommaDelimiterOption), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext}, ruleActionDeleteSpace), + + // Insert space after function keyword for anonymous functions + rule("SpaceAfterAnonymousFunctionKeyword", []ast.Kind{ast.KindFunctionKeyword, ast.KindAsteriskToken}, ast.KindOpenParenToken, []contextPredicate{isOptionEnabled(insertSpaceAfterFunctionKeywordForAnonymousFunctionsOption), isFunctionDeclContext}, ruleActionInsertSpace), + rule("NoSpaceAfterAnonymousFunctionKeyword", []ast.Kind{ast.KindFunctionKeyword, ast.KindAsteriskToken}, ast.KindOpenParenToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterFunctionKeywordForAnonymousFunctionsOption), isFunctionDeclContext}, ruleActionDeleteSpace), + + // Insert space after keywords in control flow statements + rule("SpaceAfterKeywordInControl", keywords, ast.KindOpenParenToken, []contextPredicate{isOptionEnabled(insertSpaceAfterKeywordsInControlFlowStatementsOption), isControlDeclContext}, ruleActionInsertSpace), + rule("NoSpaceAfterKeywordInControl", keywords, ast.KindOpenParenToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterKeywordsInControlFlowStatementsOption), isControlDeclContext}, ruleActionDeleteSpace), + + // Insert space after opening and before closing nonempty parenthesis + rule("SpaceAfterOpenParen", ast.KindOpenParenToken, anyToken, []contextPredicate{isOptionEnabled(insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesisOption), isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("SpaceBeforeCloseParen", anyToken, ast.KindCloseParenToken, []contextPredicate{isOptionEnabled(insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesisOption), isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("SpaceBetweenOpenParens", ast.KindOpenParenToken, ast.KindOpenParenToken, []contextPredicate{isOptionEnabled(insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesisOption), isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("NoSpaceBetweenParens", ast.KindOpenParenToken, ast.KindCloseParenToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterOpenParen", ast.KindOpenParenToken, anyToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesisOption), isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceBeforeCloseParen", anyToken, ast.KindCloseParenToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesisOption), isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + + // Insert space after opening and before closing nonempty brackets + rule("SpaceAfterOpenBracket", ast.KindOpenBracketToken, anyToken, []contextPredicate{isOptionEnabled(insertSpaceAfterOpeningAndBeforeClosingNonemptyBracketsOption), isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("SpaceBeforeCloseBracket", anyToken, ast.KindCloseBracketToken, []contextPredicate{isOptionEnabled(insertSpaceAfterOpeningAndBeforeClosingNonemptyBracketsOption), isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("NoSpaceBetweenBrackets", ast.KindOpenBracketToken, ast.KindCloseBracketToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterOpenBracket", ast.KindOpenBracketToken, anyToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterOpeningAndBeforeClosingNonemptyBracketsOption), isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceBeforeCloseBracket", anyToken, ast.KindCloseBracketToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterOpeningAndBeforeClosingNonemptyBracketsOption), isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + + // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. + rule("SpaceAfterOpenBrace", ast.KindOpenBraceToken, anyToken, []contextPredicate{isOptionEnabledOrUndefined(insertSpaceAfterOpeningAndBeforeClosingNonemptyBracesOption), isBraceWrappedContext}, ruleActionInsertSpace), + rule("SpaceBeforeCloseBrace", anyToken, ast.KindCloseBraceToken, []contextPredicate{isOptionEnabledOrUndefined(insertSpaceAfterOpeningAndBeforeClosingNonemptyBracesOption), isBraceWrappedContext}, ruleActionInsertSpace), + rule("NoSpaceBetweenEmptyBraceBrackets", ast.KindOpenBraceToken, ast.KindCloseBraceToken, []contextPredicate{isNonJsxSameLineTokenContext, isObjectContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterOpenBrace", ast.KindOpenBraceToken, anyToken, []contextPredicate{isOptionDisabled(insertSpaceAfterOpeningAndBeforeClosingNonemptyBracesOption), isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceBeforeCloseBrace", anyToken, ast.KindCloseBraceToken, []contextPredicate{isOptionDisabled(insertSpaceAfterOpeningAndBeforeClosingNonemptyBracesOption), isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + + // Insert a space after opening and before closing empty brace brackets + rule("SpaceBetweenEmptyBraceBrackets", ast.KindOpenBraceToken, ast.KindCloseBraceToken, []contextPredicate{isOptionEnabled(insertSpaceAfterOpeningAndBeforeClosingEmptyBracesOption)}, ruleActionInsertSpace), + rule("NoSpaceBetweenEmptyBraceBrackets", ast.KindOpenBraceToken, ast.KindCloseBraceToken, []contextPredicate{isOptionDisabled(insertSpaceAfterOpeningAndBeforeClosingEmptyBracesOption), isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + + // Insert space after opening and before closing template string braces + rule("SpaceAfterTemplateHeadAndMiddle", []ast.Kind{ast.KindTemplateHead, ast.KindTemplateMiddle}, anyToken, []contextPredicate{isOptionEnabled(insertSpaceAfterOpeningAndBeforeClosingTemplateStringBracesOption), isNonJsxTextContext}, ruleActionInsertSpace, ruleFlagsCanDeleteNewLines), + rule("SpaceBeforeTemplateMiddleAndTail", anyToken, []ast.Kind{ast.KindTemplateMiddle, ast.KindTemplateTail}, []contextPredicate{isOptionEnabled(insertSpaceAfterOpeningAndBeforeClosingTemplateStringBracesOption), isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + rule("NoSpaceAfterTemplateHeadAndMiddle", []ast.Kind{ast.KindTemplateHead, ast.KindTemplateMiddle}, anyToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterOpeningAndBeforeClosingTemplateStringBracesOption), isNonJsxTextContext}, ruleActionDeleteSpace, ruleFlagsCanDeleteNewLines), + rule("NoSpaceBeforeTemplateMiddleAndTail", anyToken, []ast.Kind{ast.KindTemplateMiddle, ast.KindTemplateTail}, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterOpeningAndBeforeClosingTemplateStringBracesOption), isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + + // No space after { and before } in JSX expression + rule("SpaceAfterOpenBraceInJsxExpression", ast.KindOpenBraceToken, anyToken, []contextPredicate{isOptionEnabled(insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBracesOption), isNonJsxSameLineTokenContext, isJsxExpressionContext}, ruleActionInsertSpace), + rule("SpaceBeforeCloseBraceInJsxExpression", anyToken, ast.KindCloseBraceToken, []contextPredicate{isOptionEnabled(insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBracesOption), isNonJsxSameLineTokenContext, isJsxExpressionContext}, ruleActionInsertSpace), + rule("NoSpaceAfterOpenBraceInJsxExpression", ast.KindOpenBraceToken, anyToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBracesOption), isNonJsxSameLineTokenContext, isJsxExpressionContext}, ruleActionDeleteSpace), + rule("NoSpaceBeforeCloseBraceInJsxExpression", anyToken, ast.KindCloseBraceToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBracesOption), isNonJsxSameLineTokenContext, isJsxExpressionContext}, ruleActionDeleteSpace), + + // Insert space after semicolon in for statement + rule("SpaceAfterSemicolonInFor", ast.KindSemicolonToken, anyToken, []contextPredicate{isOptionEnabled(insertSpaceAfterSemicolonInForStatementsOption), isNonJsxSameLineTokenContext, isForContext}, ruleActionInsertSpace), + rule("NoSpaceAfterSemicolonInFor", ast.KindSemicolonToken, anyToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterSemicolonInForStatementsOption), isNonJsxSameLineTokenContext, isForContext}, ruleActionDeleteSpace), + + // Insert space before and after binary operators + rule("SpaceBeforeBinaryOperator", anyToken, binaryOperators, []contextPredicate{isOptionEnabled(insertSpaceBeforeAndAfterBinaryOperatorsOption), isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionInsertSpace), + rule("SpaceAfterBinaryOperator", binaryOperators, anyToken, []contextPredicate{isOptionEnabled(insertSpaceBeforeAndAfterBinaryOperatorsOption), isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionInsertSpace), + rule("NoSpaceBeforeBinaryOperator", anyToken, binaryOperators, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceBeforeAndAfterBinaryOperatorsOption), isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterBinaryOperator", binaryOperators, anyToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceBeforeAndAfterBinaryOperatorsOption), isNonJsxSameLineTokenContext, isBinaryOpContext}, ruleActionDeleteSpace), + + rule("SpaceBeforeOpenParenInFuncDecl", anyToken, ast.KindOpenParenToken, []contextPredicate{isOptionEnabled(insertSpaceBeforeFunctionParenthesisOption), isNonJsxSameLineTokenContext, isFunctionDeclContext}, ruleActionInsertSpace), + rule("NoSpaceBeforeOpenParenInFuncDecl", anyToken, ast.KindOpenParenToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceBeforeFunctionParenthesisOption), isNonJsxSameLineTokenContext, isFunctionDeclContext}, ruleActionDeleteSpace), + + // Open Brace braces after control block + rule("NewLineBeforeOpenBraceInControl", controlOpenBraceLeftTokenRange, ast.KindOpenBraceToken, []contextPredicate{isOptionEnabled(placeOpenBraceOnNewLineForControlBlocksOption), isControlDeclContext, isBeforeMultilineBlockContext}, ruleActionInsertNewLine, ruleFlagsCanDeleteNewLines), + + // Open Brace braces after function + // TypeScript: Function can have return types, which can be made of tons of different token kinds + rule("NewLineBeforeOpenBraceInFunction", functionOpenBraceLeftTokenRange, ast.KindOpenBraceToken, []contextPredicate{isOptionEnabled(placeOpenBraceOnNewLineForFunctionsOption), isFunctionDeclContext, isBeforeMultilineBlockContext}, ruleActionInsertNewLine, ruleFlagsCanDeleteNewLines), + // Open Brace braces after TypeScript module/class/interface + rule("NewLineBeforeOpenBraceInTypeScriptDeclWithBlock", typeScriptOpenBraceLeftTokenRange, ast.KindOpenBraceToken, []contextPredicate{isOptionEnabled(placeOpenBraceOnNewLineForFunctionsOption), isTypeScriptDeclWithBlockContext, isBeforeMultilineBlockContext}, ruleActionInsertNewLine, ruleFlagsCanDeleteNewLines), + + rule("SpaceAfterTypeAssertion", ast.KindGreaterThanToken, anyToken, []contextPredicate{isOptionEnabled(insertSpaceAfterTypeAssertionOption), isNonJsxSameLineTokenContext, isTypeAssertionContext}, ruleActionInsertSpace), + rule("NoSpaceAfterTypeAssertion", ast.KindGreaterThanToken, anyToken, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceAfterTypeAssertionOption), isNonJsxSameLineTokenContext, isTypeAssertionContext}, ruleActionDeleteSpace), + + rule("SpaceBeforeTypeAnnotation", anyToken, []ast.Kind{ast.KindQuestionToken, ast.KindColonToken}, []contextPredicate{isOptionEnabled(insertSpaceBeforeTypeAnnotationOption), isNonJsxSameLineTokenContext, isTypeAnnotationContext}, ruleActionInsertSpace), + rule("NoSpaceBeforeTypeAnnotation", anyToken, []ast.Kind{ast.KindQuestionToken, ast.KindColonToken}, []contextPredicate{isOptionDisabledOrUndefined(insertSpaceBeforeTypeAnnotationOption), isNonJsxSameLineTokenContext, isTypeAnnotationContext}, ruleActionDeleteSpace), + + rule("NoOptionalSemicolon", ast.KindSemicolonToken, anyTokenIncludingEOF, []contextPredicate{optionEquals(semicolonOption, SemicolonPreferenceRemove), isSemicolonDeletionContext}, ruleActionDeleteToken), + rule("OptionalSemicolon", anyToken, anyTokenIncludingEOF, []contextPredicate{optionEquals(semicolonOption, SemicolonPreferenceInsert), isSemicolonInsertionContext}, ruleActionInsertTrailingSemicolon), + } + + // These rules are lower in priority than user-configurable. Rules earlier in this list have priority over rules later in the list. + lowPriorityCommonRules := []ruleSpec{ + // Space after keyword but not before ; or : or ? + rule("NoSpaceBeforeSemicolon", anyToken, ast.KindSemicolonToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + + rule("SpaceBeforeOpenBraceInControl", controlOpenBraceLeftTokenRange, ast.KindOpenBraceToken, []contextPredicate{isOptionDisabledOrUndefinedOrTokensOnSameLine(placeOpenBraceOnNewLineForControlBlocksOption), isControlDeclContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext}, ruleActionInsertSpace, ruleFlagsCanDeleteNewLines), + rule("SpaceBeforeOpenBraceInFunction", functionOpenBraceLeftTokenRange, ast.KindOpenBraceToken, []contextPredicate{isOptionDisabledOrUndefinedOrTokensOnSameLine(placeOpenBraceOnNewLineForFunctionsOption), isFunctionDeclContext, isBeforeBlockContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext}, ruleActionInsertSpace, ruleFlagsCanDeleteNewLines), + rule("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock", typeScriptOpenBraceLeftTokenRange, ast.KindOpenBraceToken, []contextPredicate{isOptionDisabledOrUndefinedOrTokensOnSameLine(placeOpenBraceOnNewLineForFunctionsOption), isTypeScriptDeclWithBlockContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext}, ruleActionInsertSpace, ruleFlagsCanDeleteNewLines), + + rule("NoSpaceBeforeComma", anyToken, ast.KindCommaToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + + // No space before and after indexer `x[]ast.Kind{}` + rule("NoSpaceBeforeOpenBracket", anyTokenExcept(ast.KindAsyncKeyword, ast.KindCaseKeyword), ast.KindOpenBracketToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + rule("NoSpaceAfterCloseBracket", ast.KindCloseBracketToken, anyToken, []contextPredicate{isNonJsxSameLineTokenContext, isNotBeforeBlockInFunctionDeclarationContext}, ruleActionDeleteSpace), + rule("SpaceAfterSemicolon", ast.KindSemicolonToken, anyToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + + // Remove extra space between for and await + rule("SpaceBetweenForAndAwaitKeyword", ast.KindForKeyword, ast.KindAwaitKeyword, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + + // Remove extra spaces between ... and type name in tuple spread + rule("SpaceBetweenDotDotDotAndTypeName", ast.KindDotDotDotToken, typeNames, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionDeleteSpace), + + // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. + // So, we have a rule to add a space for []ast.Kind{),Any}, []ast.Kind{do,Any}, []ast.Kind{else,Any}, and []ast.Kind{case,Any} + rule( + "SpaceBetweenStatements", + []ast.Kind{ast.KindCloseParenToken, ast.KindDoKeyword, ast.KindElseKeyword, ast.KindCaseKeyword}, + anyToken, + []contextPredicate{isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNotForContext}, + ruleActionInsertSpace, + ), + // This low-pri rule takes care of "try {", "catch {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. + rule("SpaceAfterTryCatchFinally", []ast.Kind{ast.KindTryKeyword, ast.KindCatchKeyword, ast.KindFinallyKeyword}, ast.KindOpenBraceToken, []contextPredicate{isNonJsxSameLineTokenContext}, ruleActionInsertSpace), + } + + result := make([]ruleSpec, 0, len(highPriorityCommonRules)+len(userConfigurableRules)+len(lowPriorityCommonRules)) + result = append(result, highPriorityCommonRules...) + result = append(result, userConfigurableRules...) + result = append(result, lowPriorityCommonRules...) + return result +} + +func tokenRangeFrom(tokens ...ast.Kind) tokenRange { + return tokenRange{ + isSpecific: true, + tokens: tokens, + } +} + +func tokenRangeFromEx(prefix []ast.Kind, tokens ...ast.Kind) tokenRange { + tokens = append(prefix, tokens...) + return tokenRange{ + isSpecific: true, + tokens: tokens, + } +} + +func tokenRangeFromRange(start ast.Kind, end ast.Kind) tokenRange { + tokens := make([]ast.Kind, 0, end-start+1) + for token := start; token <= end; token++ { + tokens = append(tokens, token) + } + + return tokenRangeFrom(tokens...) +} diff --git a/internal/format/rulesmap.go b/internal/format/rulesmap.go new file mode 100644 index 0000000000..e88810387b --- /dev/null +++ b/internal/format/rulesmap.go @@ -0,0 +1,156 @@ +package format + +import ( + "slices" + "sync" + + "github.com/microsoft/typescript-go/internal/ast" +) + +func getRules(context *formattingContext) []*ruleImpl { + bucket := getRulesMap()[getRuleBucketIndex(context.currentTokenSpan.Kind, context.nextTokenSpan.Kind)] + if len(bucket) > 0 { + var rules []*ruleImpl + ruleActionMask := ruleActionNone + outer: + for _, rule := range bucket { + acceptRuleActions := ^getRuleActionExclusion(ruleActionMask) + if rule.Action()&acceptRuleActions != 0 { + preds := rule.Context() + for _, p := range preds { + if !p(context) { + continue outer + } + } + rules = append(rules, rule) + ruleActionMask |= rule.Action() + } + } + return rules + } + return nil +} + +func getRuleBucketIndex(row ast.Kind, column ast.Kind) int { + // Debug.assert(row <= SyntaxKind.LastKeyword && column <= SyntaxKind.LastKeyword, "Must compute formatting context from tokens") // !!! + return (int(row) * mapRowLength) + int(column) +} + +const ( + maskBitSize = 5 + mask = 0b11111 // MaskBitSize bits + mapRowLength = int(ast.KindLastToken) + 1 +) + +/** + * For a given rule action, gets a mask of other rule actions that + * cannot be applied at the same position. + */ +func getRuleActionExclusion(ruleAction ruleAction) ruleAction { + mask := ruleActionNone + if ruleAction&ruleActionStopProcessingSpaceActions != 0 { + mask |= ruleActionModifySpaceAction + } + if ruleAction&ruleActionStopProcessingTokenActions != 0 { + mask |= ruleActionModifyTokenAction + } + if ruleAction&ruleActionModifySpaceAction != 0 { + mask |= ruleActionModifySpaceAction + } + if ruleAction&ruleActionModifyTokenAction != 0 { + mask |= ruleActionModifyTokenAction + } + return mask +} + +var getRulesMap = sync.OnceValue(buildRulesMap) + +func buildRulesMap() [][]*ruleImpl { + rules := getAllRules() + // Map from bucket index to array of rules + m := make([][]*ruleImpl, mapRowLength*mapRowLength) + // This array is used only during construction of the rulesbucket in the map + rulesBucketConstructionStateList := make([]int, len(m)) + for _, rule := range rules { + specificRule := rule.leftTokenRange.isSpecific && rule.rightTokenRange.isSpecific + + for _, left := range rule.leftTokenRange.tokens { + for _, right := range rule.rightTokenRange.tokens { + index := getRuleBucketIndex(left, right) + m[index] = addRule(m[index], rule.rule, specificRule, rulesBucketConstructionStateList, index) + } + } + } + return m +} + +type RulesPosition int + +const ( + RulesPositionStopRulesSpecific RulesPosition = 0 + RulesPositionStopRulesAny RulesPosition = maskBitSize * 1 + RulesPositionContextRulesSpecific RulesPosition = maskBitSize * 2 + RulesPositionContextRulesAny RulesPosition = maskBitSize * 3 + RulesPositionNoContextRulesSpecific RulesPosition = maskBitSize * 4 + RulesPositionNoContextRulesAny RulesPosition = maskBitSize * 5 +) + +// The Rules list contains all the inserted rules into a rulebucket in the following order: +// +// 1- Ignore rules with specific token combination +// 2- Ignore rules with any token combination +// 3- Context rules with specific token combination +// 4- Context rules with any token combination +// 5- Non-context rules with specific token combination +// 6- Non-context rules with any token combination +// +// The member rulesInsertionIndexBitmap is used to describe the number of rules +// in each sub-bucket (above) hence can be used to know the index of where to insert +// the next rule. It's a bitmap which contains 6 different sections each is given 5 bits. +// +// Example: +// In order to insert a rule to the end of sub-bucket (3), we get the index by adding +// the values in the bitmap segments 3rd, 2nd, and 1st. +func addRule(rules []*ruleImpl, rule *ruleImpl, specificTokens bool, constructionState []int, rulesBucketIndex int) []*ruleImpl { + var position RulesPosition + if rule.Action()&ruleActionStopAction != 0 { + if specificTokens { + position = RulesPositionStopRulesSpecific + } else { + position = RulesPositionStopRulesAny + } + } else if len(rule.Context()) != 0 { + if specificTokens { + position = RulesPositionContextRulesSpecific + } else { + position = RulesPositionContextRulesAny + } + } else { + if specificTokens { + position = RulesPositionNoContextRulesSpecific + } else { + position = RulesPositionNoContextRulesAny + } + } + + state := constructionState[rulesBucketIndex] + + rules = slices.Insert(rules, getRuleInsertionIndex(state, position), rule) + constructionState[rulesBucketIndex] = increaseInsertionIndex(state, position) + return rules +} + +func getRuleInsertionIndex(indexBitmap int, maskPosition RulesPosition) int { + index := 0 + for pos := 0; pos <= int(maskPosition); pos += maskBitSize { + index += indexBitmap & mask + indexBitmap >>= maskBitSize + } + return index +} + +func increaseInsertionIndex(indexBitmap int, maskPosition RulesPosition) int { + value := ((indexBitmap >> maskPosition) & mask) + 1 + // Debug.assert((value & mask) === value, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."); // !!! + return (indexBitmap & ^(mask << maskPosition)) | (value << maskPosition) +} diff --git a/internal/format/scanner.go b/internal/format/scanner.go new file mode 100644 index 0000000000..0658fb3646 --- /dev/null +++ b/internal/format/scanner.go @@ -0,0 +1,352 @@ +package format + +import ( + "slices" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/scanner" +) + +type TextRangeWithKind struct { + Loc core.TextRange + Kind ast.Kind +} + +func NewTextRangeWithKind(pos int, end int, kind ast.Kind) *TextRangeWithKind { + return &TextRangeWithKind{ + Loc: core.NewTextRange(pos, end), + Kind: kind, + } +} + +type tokenInfo struct { + leadingTrivia []*TextRangeWithKind + token *TextRangeWithKind + trailingTrivia []*TextRangeWithKind +} + +type formattingScanner struct { + s *scanner.Scanner + startPos int + endPos int + savedPos int + lastTokenInfo *tokenInfo + lastScanAction scanAction + leadingTrivia []*TextRangeWithKind + trailingTrivia []*TextRangeWithKind + wasNewLine bool +} + +func newFormattingScanner(text string, languageVariant core.LanguageVariant, startPos int, endPos int, worker *formatSpanWorker) []core.TextChange { + scan := scanner.NewScanner() + scan.Reset() + scan.SetSkipTrivia(false) + scan.SetLanguageVariant(languageVariant) + scan.SetText(text) + + fmtScn := &formattingScanner{ + s: scan, + startPos: startPos, + endPos: endPos, + wasNewLine: true, + } + + res := worker.execute(fmtScn) + + fmtScn.lastTokenInfo = nil + scan.Reset() + + return res +} + +func (s *formattingScanner) advance() { + s.lastTokenInfo = nil + isStarted := s.s.TokenFullStart() != s.startPos + + if isStarted { + s.wasNewLine = len(s.trailingTrivia) > 0 && core.LastOrNil(s.trailingTrivia).Kind == ast.KindNewLineTrivia + } else { + s.s.Scan() + } + + s.leadingTrivia = nil + s.trailingTrivia = nil + + pos := s.s.TokenFullStart() + + // Read leading trivia and token + for pos < s.endPos { + t := s.s.Token() + if !ast.IsTrivia(t) { + break + } + + // consume leading trivia + s.s.Scan() + item := NewTextRangeWithKind(pos, s.s.TokenFullStart(), t) + + pos = s.s.TokenFullStart() + + s.leadingTrivia = append(s.leadingTrivia, item) + } + + s.savedPos = s.s.TokenFullStart() +} + +func shouldRescanGreaterThanToken(node *ast.Node) bool { + switch node.Kind { + case ast.KindGreaterThanEqualsToken, + ast.KindGreaterThanGreaterThanEqualsToken, + ast.KindGreaterThanGreaterThanGreaterThanEqualsToken, + ast.KindGreaterThanGreaterThanGreaterThanToken, + ast.KindGreaterThanGreaterThanToken: + return true + } + return false +} + +func shouldRescanJsxIdentifier(node *ast.Node) bool { + if node.Parent != nil { + switch node.Parent.Kind { + case ast.KindJsxAttribute, + ast.KindJsxOpeningElement, + ast.KindJsxClosingElement, + ast.KindJsxSelfClosingElement: + // May parse an identifier like `module-layout`; that will be scanned as a keyword at first, but we should parse the whole thing to get an identifier. + return ast.IsKeywordKind(node.Kind) || node.Kind == ast.KindIdentifier + } + } + return false +} + +func (s *formattingScanner) shouldRescanJsxText(node *ast.Node) bool { + if ast.IsJsxText(node) { + return true + } + if !ast.IsJsxElement(node) || s.lastTokenInfo == nil { + return false + } + + return s.lastTokenInfo.token.Kind == ast.KindJsxText +} + +func shouldRescanSlashToken(container *ast.Node) bool { + return container.Kind == ast.KindRegularExpressionLiteral +} + +func shouldRescanTemplateToken(container *ast.Node) bool { + return container.Kind == ast.KindTemplateMiddle || + container.Kind == ast.KindTemplateTail +} + +func shouldRescanJsxAttributeValue(node *ast.Node) bool { + return node.Parent != nil && ast.IsJsxAttribute(node.Parent) && node.Parent.Initializer() == node +} + +func startsWithSlashToken(t ast.Kind) bool { + return t == ast.KindSlashToken || t == ast.KindSlashEqualsToken +} + +type scanAction int + +const ( + actionScan scanAction = iota + actionRescanGreaterThanToken + actionRescanSlashToken + actionRescanTemplateToken + actionRescanJsxIdentifier + actionRescanJsxText + actionRescanJsxAttributeValue +) + +func fixTokenKind(tokenInfo *tokenInfo, container *ast.Node) *tokenInfo { + if ast.IsTokenKind(container.Kind) && tokenInfo.token.Kind != container.Kind { + tokenInfo.token.Kind = container.Kind + } + return tokenInfo +} + +func (s *formattingScanner) readTokenInfo(n *ast.Node) *tokenInfo { + // Debug.assert(isOnToken()); // !!! + + // normally scanner returns the smallest available token + // check the kind of context node to determine if scanner should have more greedy behavior and consume more text. + + var expectedScanAction scanAction + if shouldRescanGreaterThanToken(n) { + expectedScanAction = actionRescanGreaterThanToken + } else if shouldRescanSlashToken(n) { + expectedScanAction = actionRescanSlashToken + } else if shouldRescanTemplateToken(n) { + expectedScanAction = actionRescanTemplateToken + } else if shouldRescanJsxIdentifier(n) { + expectedScanAction = actionRescanJsxIdentifier + } else if s.shouldRescanJsxText(n) { + expectedScanAction = actionRescanJsxText + } else if shouldRescanJsxAttributeValue(n) { + expectedScanAction = actionRescanJsxAttributeValue + } else { + expectedScanAction = actionScan + } + + if s.lastTokenInfo != nil && expectedScanAction == s.lastScanAction { + // readTokenInfo was called before with the same expected scan action. + // No need to re-scan text, return existing 'lastTokenInfo' + // it is ok to call fixTokenKind here since it does not affect + // what portion of text is consumed. In contrast rescanning can change it, + // i.e. for '>=' when originally scanner eats just one character + // and rescanning forces it to consume more. + return fixTokenKind(s.lastTokenInfo, n) + } + + if s.s.TokenFullStart() != s.savedPos { + // Debug.assert(lastTokenInfo !== undefined); // !!! + // readTokenInfo was called before but scan action differs - rescan text + s.s.ResetTokenState(s.savedPos) + s.s.Scan() + } + + currentToken := s.getNextToken(n, expectedScanAction) + + token := NewTextRangeWithKind( + s.s.TokenFullStart(), + s.s.TokenEnd(), + currentToken, + ) + + // consume trailing trivia + s.trailingTrivia = nil + for s.s.TokenFullStart() < s.endPos { + currentToken = s.s.Scan() + if !ast.IsTrivia(currentToken) { + break + } + trivia := NewTextRangeWithKind( + s.s.TokenFullStart(), + s.s.TokenEnd(), + currentToken, + ) + + s.trailingTrivia = append(s.trailingTrivia, trivia) + + if currentToken == ast.KindNewLineTrivia { + // move past new line + s.s.Scan() + break + } + } + + s.lastTokenInfo = &tokenInfo{ + leadingTrivia: slices.Clone(s.leadingTrivia), + token: token, + trailingTrivia: slices.Clone(s.trailingTrivia), + } + + return fixTokenKind(s.lastTokenInfo, n) +} + +func (s *formattingScanner) getNextToken(n *ast.Node, expectedScanAction scanAction) ast.Kind { + token := s.s.Token() + s.lastScanAction = actionScan + switch expectedScanAction { + case actionRescanGreaterThanToken: + if token == ast.KindGreaterThanToken { + s.lastScanAction = actionRescanGreaterThanToken + newToken := s.s.ReScanGreaterThanToken() + // Debug.assert(n.kind == newToken); // !!! + return newToken + } + case actionRescanSlashToken: + if startsWithSlashToken(token) { + s.lastScanAction = actionRescanSlashToken + newToken := s.s.ReScanSlashToken() + // Debug.assert(n.kind == newToken); // !!! + return newToken + } + case actionRescanTemplateToken: + if token == ast.KindCloseBraceToken { + s.lastScanAction = actionRescanTemplateToken + return s.s.ReScanTemplateToken( /*isTaggedTemplate*/ false) + } + case actionRescanJsxIdentifier: + s.lastScanAction = actionRescanJsxIdentifier + return s.s.ScanJsxIdentifier() + case actionRescanJsxText: + s.lastScanAction = actionRescanJsxText + return s.s.ReScanJsxToken( /*allowMultilineJsxText*/ false) + case actionRescanJsxAttributeValue: + s.lastScanAction = actionRescanJsxAttributeValue + return s.s.ReScanJsxAttributeValue() + case actionScan: + break + default: + // Debug.assertNever(expectedScanAction); !!! + panic("unhandled scan action kind") + } + return token +} + +func (s *formattingScanner) readEOFTokenRange() *TextRangeWithKind { + // Debug.assert(isOnEOF()); // !!! + return NewTextRangeWithKind( + s.s.TokenFullStart(), + s.s.TokenEnd(), + ast.KindEndOfFile, + ) +} + +func (s *formattingScanner) isOnToken() bool { + current := s.s.Token() + if s.lastTokenInfo != nil { + current = s.lastTokenInfo.token.Kind + } + return current != ast.KindEndOfFile && !ast.IsTrivia(current) +} + +func (s *formattingScanner) isOnEOF() bool { + current := s.s.Token() + if s.lastTokenInfo != nil { + current = s.lastTokenInfo.token.Kind + } + return current == ast.KindEndOfFile +} + +func (s *formattingScanner) skipToEndOf(r *core.TextRange) { + s.s.ResetTokenState(r.End()) + s.savedPos = s.s.TokenFullStart() + s.lastScanAction = actionScan + s.lastTokenInfo = nil + s.wasNewLine = false + s.leadingTrivia = nil + s.trailingTrivia = nil +} + +func (s *formattingScanner) skipToStartOf(r *core.TextRange) { + s.s.ResetTokenState(r.Pos()) + s.savedPos = s.s.TokenFullStart() + s.lastScanAction = actionScan + s.lastTokenInfo = nil + s.wasNewLine = false + s.leadingTrivia = nil + s.trailingTrivia = nil +} + +func (s *formattingScanner) getCurrentLeadingTrivia() []*TextRangeWithKind { + return s.leadingTrivia +} + +func (s *formattingScanner) lastTrailingTriviaWasNewLine() bool { + return s.wasNewLine +} + +func (s *formattingScanner) getTokenFullStart() int { + if s.lastTokenInfo != nil { + return s.lastTokenInfo.token.Loc.Pos() + } + return s.s.TokenFullStart() +} + +func (s *formattingScanner) getStartPos() int { // TODO: redundant? + return s.getTokenFullStart() +} diff --git a/internal/format/span.go b/internal/format/span.go new file mode 100644 index 0000000000..c3a90590fe --- /dev/null +++ b/internal/format/span.go @@ -0,0 +1,1204 @@ +package format + +import ( + "context" + "math" + "slices" + "strings" + "unicode/utf8" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/astnav" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/scanner" + "github.com/microsoft/typescript-go/internal/stringutil" +) + +/** find node that fully contains given text range */ +func findEnclosingNode(r core.TextRange, sourceFile *ast.SourceFile) *ast.Node { + var find func(*ast.Node) *ast.Node + find = func(n *ast.Node) *ast.Node { + var candidate *ast.Node + n.ForEachChild(func(c *ast.Node) bool { + if r.ContainedBy(withTokenStart(c, sourceFile)) { + candidate = c + return true + } + return false + }) + if candidate != nil { + result := find(candidate) + if result != nil { + return result + } + } + + return n + } + return find(sourceFile.AsNode()) +} + +/** + * Start of the original range might fall inside the comment - scanner will not yield appropriate results + * This function will look for token that is located before the start of target range + * and return its end as start position for the scanner. + */ +func getScanStartPosition(enclosingNode *ast.Node, originalRange core.TextRange, sourceFile *ast.SourceFile) int { + adjusted := withTokenStart(enclosingNode, sourceFile) + start := adjusted.Pos() + if start == originalRange.Pos() && enclosingNode.End() == originalRange.End() { + return start + } + + precedingToken := astnav.FindPrecedingToken(sourceFile, originalRange.Pos()) + if precedingToken == nil { + // no preceding token found - start from the beginning of enclosing node + return enclosingNode.Pos() + } + + // preceding token ends after the start of original range (i.e when originalRange.pos falls in the middle of literal) + // start from the beginning of enclosingNode to handle the entire 'originalRange' + if precedingToken.End() >= originalRange.Pos() { + return enclosingNode.Pos() + } + + return precedingToken.End() +} + +/* + * For cases like + * if (a || + * b ||$ + * c) {...} + * If we hit Enter at $ we want line ' b ||' to be indented. + * Formatting will be applied to the last two lines. + * Node that fully encloses these lines is binary expression 'a ||...'. + * Initial indentation for this node will be 0. + * Binary expressions don't introduce new indentation scopes, however it is possible + * that some parent node on the same line does - like if statement in this case. + * Note that we are considering parents only from the same line with initial node - + * if parent is on the different line - its delta was already contributed + * to the initial indentation. + */ +func getOwnOrInheritedDelta(n *ast.Node, options *FormatCodeSettings, sourceFile *ast.SourceFile) int { + previousLine := -1 + var child *ast.Node + for n != nil { + line, _ := scanner.GetLineAndCharacterOfPosition(sourceFile, withTokenStart(n, sourceFile).Pos()) + if previousLine != -1 && line != previousLine { + break + } + + if ShouldIndentChildNode(options, n, child, sourceFile) { + return options.IndentSize // !!! nil check??? + } + + previousLine = line + child = n + n = n.Parent + } + return 0 +} + +func rangeHasNoErrors(_ core.TextRange) bool { + return false +} + +func prepareRangeContainsErrorFunction(errors []*ast.Diagnostic, originalRange core.TextRange) func(r core.TextRange) bool { + if len(errors) == 0 { + return rangeHasNoErrors + } + + // pick only errors that fall in range + sorted := core.Filter(errors, func(d *ast.Diagnostic) bool { + return originalRange.Overlaps(d.Loc()) + }) + if len(sorted) == 0 { + return rangeHasNoErrors + } + slices.SortStableFunc(sorted, func(a *ast.Diagnostic, b *ast.Diagnostic) int { return a.Pos() - b.Pos() }) + + index := 0 + return func(r core.TextRange) bool { + // in current implementation sequence of arguments [r1, r2...] is monotonically increasing. + // 'index' tracks the index of the most recent error that was checked. + for true { + if index >= len(sorted) { + // all errors in the range were already checked -> no error in specified range + return false + } + + err := sorted[index] + + if r.End() <= err.Pos() { + // specified range ends before the error referred by 'index' - no error in range + return false + } + + if r.Overlaps(err.Loc()) { + // specified range overlaps with error range + return true + } + + index++ + } + return false // unreachable + } +} + +type formatSpanWorker struct { + originalRange core.TextRange + enclosingNode *ast.Node + initialIndentation int + delta int + requestKind FormatRequestKind + rangeContainsError func(r core.TextRange) bool + sourceFile *ast.SourceFile + + ctx context.Context + + formattingScanner *formattingScanner + formattingContext *formattingContext + + edits []core.TextChange + previousRange *TextRangeWithKind + previousRangeTriviaEnd int + previousParent *ast.Node + previousRangeStartLine int + + childContextNode *ast.Node + lastIndentedLine int + indentationOnLastIndentedLine int + + visitor *ast.NodeVisitor + visitingNode *ast.Node + visitingIndenter *dynamicIndenter + visitingNodeStartLine int + visitingUndecoratedNodeStartLine int +} + +func newFormatSpanWorker( + ctx context.Context, + originalRange core.TextRange, + enclosingNode *ast.Node, + initialIndentation int, + delta int, + requestKind FormatRequestKind, + rangeContainsError func(r core.TextRange) bool, + sourceFile *ast.SourceFile, +) *formatSpanWorker { + return &formatSpanWorker{ + ctx: ctx, + originalRange: originalRange, + enclosingNode: enclosingNode, + initialIndentation: initialIndentation, + delta: delta, + requestKind: requestKind, + rangeContainsError: rangeContainsError, + sourceFile: sourceFile, + } +} + +func getNonDecoratorTokenPosOfNode(node *ast.Node, file *ast.SourceFile) int { + var lastDecorator *ast.Node + if ast.HasDecorators(node) { + lastDecorator = core.FindLast(node.Modifiers().Nodes, ast.IsDecorator) + } + if file == nil { + file = ast.GetSourceFileOfNode(node) + } + if lastDecorator == nil { + return withTokenStart(node, file).Pos() + } + return scanner.SkipTrivia(file.Text(), lastDecorator.End()) +} + +func (w *formatSpanWorker) execute(s *formattingScanner) []core.TextChange { + w.formattingScanner = s + w.indentationOnLastIndentedLine = -1 + opt := GetFormatCodeSettingsFromContext(w.ctx) + w.formattingContext = NewFormattingContext(w.sourceFile, w.requestKind, opt) + // formatting context is used by rules provider + w.visitor = ast.NewNodeVisitor(func(child *ast.Node) *ast.Node { + if child == nil { + return child + } + w.processChildNode(w.visitingNode, w.visitingIndenter, w.visitingNodeStartLine, w.visitingUndecoratedNodeStartLine, child, -1, w.visitingNode, w.visitingIndenter, w.visitingNodeStartLine, w.visitingUndecoratedNodeStartLine, false, false) + return child + }, &ast.NodeFactory{}, ast.NodeVisitorHooks{ + VisitNodes: func(nodes *ast.NodeList, v *ast.NodeVisitor) *ast.NodeList { + if nodes == nil { + return nodes + } + w.processChildNodes(w.visitingNode, w.visitingIndenter, w.visitingNodeStartLine, w.visitingUndecoratedNodeStartLine, nodes, w.visitingNode, w.visitingNodeStartLine, w.visitingIndenter) + return nodes + }, + }) + + w.formattingScanner.advance() + + if w.formattingScanner.isOnToken() { + startLine, _ := scanner.GetLineAndCharacterOfPosition(w.sourceFile, withTokenStart(w.enclosingNode, w.sourceFile).Pos()) + undecoratedStartLine := startLine + if ast.HasDecorators(w.enclosingNode) { + undecoratedStartLine, _ = scanner.GetLineAndCharacterOfPosition(w.sourceFile, getNonDecoratorTokenPosOfNode(w.enclosingNode, w.sourceFile)) + } + + w.processNode(w.enclosingNode, w.enclosingNode, startLine, undecoratedStartLine, w.initialIndentation, w.delta) + } + + // Leading trivia items get attached to and processed with the token that proceeds them. If the + // range ends in the middle of some leading trivia, the token that proceeds them won't be in the + // range and thus won't get processed. So we process those remaining trivia items here. + remainingTrivia := w.formattingScanner.getCurrentLeadingTrivia() + if len(remainingTrivia) > 0 { + indentation := w.initialIndentation + if NodeWillIndentChild(w.formattingContext.Options, w.enclosingNode, nil, w.sourceFile, false) { + indentation += opt.IndentSize // !!! TODO: nil check??? + } + + w.indentTriviaItems(remainingTrivia, indentation, true, func(item *TextRangeWithKind) { + startLine, startChar := scanner.GetLineAndCharacterOfPosition(w.sourceFile, item.Loc.Pos()) + w.processRange(item, startLine, startChar, w.enclosingNode, w.enclosingNode, nil) + w.insertIndentation(item.Loc.Pos(), indentation, false) + }) + + if opt.TrimTrailingWhitespace != false { + w.trimTrailingWhitespacesForRemainingRange(remainingTrivia) + } + } + + if w.previousRange != nil && w.formattingScanner.getTokenFullStart() >= w.originalRange.End() { + // Formatting edits happen by looking at pairs of contiguous tokens (see `processPair`), + // typically inserting or deleting whitespace between them. The recursive `processNode` + // logic above bails out as soon as it encounters a token that is beyond the end of the + // range we're supposed to format (or if we reach the end of the file). But this potentially + // leaves out an edit that would occur *inside* the requested range but cannot be discovered + // without looking at one token *beyond* the end of the range: consider the line `x = { }` + // with a selection from the beginning of the line to the space inside the curly braces, + // inclusive. We would expect a format-selection would delete the space (if rules apply), + // but in order to do that, we need to process the pair ["{", "}"], but we stopped processing + // just before getting there. This block handles this trailing edit. + var tokenInfo *TextRangeWithKind + if w.formattingScanner.isOnEOF() { + tokenInfo = w.formattingScanner.readEOFTokenRange() + } else if w.formattingScanner.isOnToken() { + tokenInfo = w.formattingScanner.readTokenInfo(w.enclosingNode).token + } + + if tokenInfo != nil && tokenInfo.Loc.Pos() == w.previousRangeTriviaEnd { + // We need to check that tokenInfo and previousRange are contiguous: the `originalRange` + // may have ended in the middle of a token, which means we will have stopped formatting + // on that token, leaving `previousRange` pointing to the token before it, but already + // having moved the formatting scanner (where we just got `tokenInfo`) to the next token. + // If this happens, our supposed pair [previousRange, tokenInfo] actually straddles the + // token that intersects the end of the range we're supposed to format, so the pair will + // produce bogus edits if we try to `processPair`. Recall that the point of this logic is + // to perform a trailing edit at the end of the selection range: but there can be no valid + // edit in the middle of a token where the range ended, so if we have a non-contiguous + // pair here, we're already done and we can ignore it. + parent := astnav.FindPrecedingToken(w.sourceFile, tokenInfo.Loc.End()) + if parent == nil { + parent = w.previousParent + } + line, _ := scanner.GetLineAndCharacterOfPosition(w.sourceFile, tokenInfo.Loc.Pos()) + w.processPair( + tokenInfo, + line, + parent, + w.previousRange, + w.previousRangeStartLine, + w.previousParent, + parent, + nil, + ) + } + } + + return w.edits +} + +func (w *formatSpanWorker) processChildNode( + node *ast.Node, + indenter *dynamicIndenter, + nodeStartLine int, + undecoratedNodeStartLine int, + child *ast.Node, + inheritedIndentation int, + parent *ast.Node, + parentDynamicIndentation *dynamicIndenter, + parentStartLine int, + undecoratedParentStartLine int, + isListItem bool, + isFirstListItem bool, +) int { + // Debug.assert(!nodeIsSynthesized(child)); // !!! + + if ast.NodeIsMissing(child) || isGrammarError(parent, child) { + return inheritedIndentation + } + + childStartPos := scanner.GetTokenPosOfNode(child, w.sourceFile, false) + childStartLine, _ := scanner.GetLineAndCharacterOfPosition(w.sourceFile, childStartPos) + + undecoratedChildStartLine := childStartLine + if ast.HasDecorators(child) { + undecoratedChildStartLine, _ = scanner.GetLineAndCharacterOfPosition(w.sourceFile, getNonDecoratorTokenPosOfNode(child, w.sourceFile)) + } + + // if child is a list item - try to get its indentation, only if parent is within the original range. + childIndentationAmount := -1 + + if isListItem && parent.Loc.ContainedBy(w.originalRange) { + childIndentationAmount = w.tryComputeIndentationForListItem(childStartPos, child.End(), parentStartLine, w.originalRange, inheritedIndentation) + if childIndentationAmount != -1 { + inheritedIndentation = childIndentationAmount + } + } + + // child node is outside the target range - do not dive inside + if !w.originalRange.Overlaps(child.Loc) { + if child.End() < w.originalRange.Pos() { + w.formattingScanner.skipToEndOf(&child.Loc) + } + return inheritedIndentation + } + + if child.Loc.Len() == 0 { + return inheritedIndentation + } + + for w.formattingScanner.isOnToken() && w.formattingScanner.getTokenFullStart() < w.originalRange.End() { + // proceed any parent tokens that are located prior to child.getStart() + tokenInfo := w.formattingScanner.readTokenInfo(node) + if tokenInfo.token.Loc.End() > w.originalRange.End() { + return inheritedIndentation + } + if tokenInfo.token.Loc.End() > childStartPos { + if tokenInfo.token.Loc.Pos() > childStartPos { + w.formattingScanner.skipToStartOf(&child.Loc) + } + // stop when formatting scanner advances past the beginning of the child + break + } + + w.consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node, false) + } + + if !w.formattingScanner.isOnToken() || w.formattingScanner.getTokenFullStart() >= w.originalRange.End() { + return inheritedIndentation + } + + if ast.IsTokenKind(child.Kind) { + // if child node is a token, it does not impact indentation, proceed it using parent indentation scope rules + tokenInfo := w.formattingScanner.readTokenInfo(child) + // JSX text shouldn't affect indenting + if child.Kind != ast.KindJsxText { + // Debug.assert(tokenInfo.token.end === child.end, "Token end is child end"); // !!! + w.consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child, false) + return inheritedIndentation + } + } + + effectiveParentStartLine := undecoratedParentStartLine + if child.Kind == ast.KindDecorator { + effectiveParentStartLine = childStartLine + } + childIndentation, delta := w.computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine) + + w.processNode(child, w.childContextNode, childStartLine, undecoratedChildStartLine, childIndentation, delta) + + w.childContextNode = node + + if isFirstListItem && parent.Kind == ast.KindArrayLiteralExpression && inheritedIndentation == -1 { + inheritedIndentation = childIndentation + } + + return inheritedIndentation +} + +func (w *formatSpanWorker) processChildNodes( + node *ast.Node, + indenter *dynamicIndenter, + nodeStartLine int, + undecoratedNodeStartLine int, + nodes *ast.NodeList, + parent *ast.Node, + parentStartLine int, + parentDynamicIndentation *dynamicIndenter, +) { + // Debug.assert(isNodeArray(nodes)); // !!! + // Debug.assert(!nodeIsSynthesized(nodes)); // !!! + + listStartToken := getOpenTokenForList(parent, nodes) + + listDynamicIndentation := parentDynamicIndentation + startLine := parentStartLine + + // node range is outside the target range - do not dive inside + if !w.originalRange.Overlaps(nodes.Loc) { + if nodes.End() < w.originalRange.Pos() { + w.formattingScanner.skipToEndOf(&nodes.Loc) + } + return + } + + if listStartToken != -1 { + // introduce a new indentation scope for lists (including list start and end tokens) + for w.formattingScanner.isOnToken() && w.formattingScanner.getTokenFullStart() < w.originalRange.End() { + tokenInfo := w.formattingScanner.readTokenInfo(parent) + if tokenInfo.token.Loc.End() > nodes.Pos() { + // stop when formatting scanner moves past the beginning of node list + break + } else if tokenInfo.token.Kind == listStartToken { + // consume list start token + startLine, _ = scanner.GetLineAndCharacterOfPosition(w.sourceFile, tokenInfo.token.Loc.Pos()) + + w.consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation, parent, false) + + indentationOnListStartToken := 0 + if w.indentationOnLastIndentedLine != -1 { + // scanner just processed list start token so consider last indentation as list indentation + // function foo(): { // last indentation was 0, list item will be indented based on this value + // foo: number; + // }: {}; + indentationOnListStartToken = w.indentationOnLastIndentedLine + } else { + startLinePosition := getLineStartPositionForPosition(tokenInfo.token.Loc.Pos(), w.sourceFile) + indentationOnListStartToken = findFirstNonWhitespaceColumn(startLinePosition, tokenInfo.token.Loc.Pos(), w.sourceFile, w.formattingContext.Options) + } + + listDynamicIndentation = w.getDynamicIndentation(parent, parentStartLine, indentationOnListStartToken, w.formattingContext.Options.IndentSize) + } else { + // consume any tokens that precede the list as child elements of 'node' using its indentation scope + w.consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation, parent, false) + } + } + } + + inheritedIndentation := -1 + for i := range len(nodes.Nodes) { + child := nodes.Nodes[i] + inheritedIndentation = w.processChildNode(node, indenter, nodeStartLine, undecoratedNodeStartLine, child, inheritedIndentation, node, listDynamicIndentation, startLine, startLine, true, i == 0) + } + + listEndToken := getCloseTokenForOpenToken(listStartToken) + if listEndToken != ast.KindUnknown && w.formattingScanner.isOnToken() && w.formattingScanner.getTokenFullStart() < w.originalRange.End() { + tokenInfo := w.formattingScanner.readTokenInfo(parent) + if tokenInfo.token.Kind == ast.KindCommaToken { + // consume the comma + w.consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation, parent, false) + if w.formattingScanner.isOnToken() { + tokenInfo = w.formattingScanner.readTokenInfo(parent) + } else { + tokenInfo = nil + } + } + + // consume the list end token only if it is still belong to the parent + // there might be the case when current token matches end token but does not considered as one + // function (x: function) <-- + // without this check close paren will be interpreted as list end token for function expression which is wrong + if tokenInfo != nil && tokenInfo.token.Kind == listEndToken && tokenInfo.token.Loc.ContainedBy(parent.Loc) { + // consume list end token + w.consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation, parent /*isListEndToken*/, true) + } + } +} + +func (w *formatSpanWorker) executeProcessNodeVisitor(node *ast.Node, indenter *dynamicIndenter, nodeStartLine int, undecoratedNodeStartLine int) { + oldNode := w.visitingNode + oldIndenter := w.visitingIndenter + oldStart := w.visitingNodeStartLine + oldUndecoratedStart := w.visitingUndecoratedNodeStartLine + w.visitingNode = node + w.visitingIndenter = indenter + w.visitingNodeStartLine = nodeStartLine + w.visitingUndecoratedNodeStartLine = undecoratedNodeStartLine + node.VisitEachChild(w.visitor) + w.visitingNode = oldNode + w.visitingIndenter = oldIndenter + w.visitingNodeStartLine = oldStart + w.visitingUndecoratedNodeStartLine = oldUndecoratedStart +} + +func (w *formatSpanWorker) computeIndentation(node *ast.Node, startLine int, inheritedIndentation int, parent *ast.Node, parentDynamicIndentation *dynamicIndenter, effectiveParentStartLine int) (indentation int, delta int) { + delta = 0 + if ShouldIndentChildNode(w.formattingContext.Options, node, nil, nil) { + delta = w.formattingContext.Options.IndentSize + } + + if effectiveParentStartLine == startLine { + // if node is located on the same line with the parent + // - inherit indentation from the parent + // - push children if either parent of node itself has non-zero delta + indentation = w.indentationOnLastIndentedLine + if startLine != w.lastIndentedLine { + indentation = parentDynamicIndentation.getIndentation() + } + delta = min(w.formattingContext.Options.IndentSize, parentDynamicIndentation.getDelta(node)+delta) + return indentation, delta + } else if inheritedIndentation == -1 { + if node.Kind == ast.KindOpenParenToken && startLine == w.lastIndentedLine { + // the is used for chaining methods formatting + // - we need to get the indentation on last line and the delta of parent + return w.indentationOnLastIndentedLine, parentDynamicIndentation.getDelta(node) + } else if childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, w.sourceFile) || + childIsUnindentedBranchOfConditionalExpression(parent, node, startLine, w.sourceFile) || + argumentStartsOnSameLineAsPreviousArgument(parent, node, startLine, w.sourceFile) { + return parentDynamicIndentation.getIndentation(), delta + } else { + return parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(node), delta + } + } + + return inheritedIndentation, delta +} + +/** Tries to compute the indentation for a list element. +* If list element is not in range then +* function will pick its actual indentation +* so it can be pushed downstream as inherited indentation. +* If list element is in the range - its indentation will be equal +* to inherited indentation from its predecessors. + */ +func (w *formatSpanWorker) tryComputeIndentationForListItem(startPos int, endPos int, parentStartLine int, r core.TextRange, inheritedIndentation int) int { + r2 := core.NewTextRange(startPos, endPos) + if r.Overlaps(r2) || r2.ContainedBy(r) { /* Not to miss zero-range nodes e.g. JsxText */ + if inheritedIndentation != -1 { + return inheritedIndentation + } + } else { + startLine, _ := scanner.GetLineAndCharacterOfPosition(w.sourceFile, startPos) + startLinePosition := getLineStartPositionForPosition(startPos, w.sourceFile) + column := findFirstNonWhitespaceColumn(startLinePosition, startPos, w.sourceFile, w.formattingContext.Options) + if startLine != parentStartLine || startPos == column { + // Use the base indent size if it is greater than + // the indentation of the inherited predecessor. + baseIndentSize := w.formattingContext.Options.BaseIndentSize + if baseIndentSize > column { + return baseIndentSize + } + return column + } + } + return -1 +} + +func (w *formatSpanWorker) processNode(node *ast.Node, contextNode *ast.Node, nodeStartLine int, undecoratedNodeStartLine int, indentation int, delta int) { + if !w.originalRange.Overlaps(withTokenStart(node, w.sourceFile)) { + return + } + + nodeDynamicIndentation := w.getDynamicIndentation(node, nodeStartLine, indentation, delta) + + // a useful observations when tracking context node + // / + // [a] + // / | \ + // [b] [c] [d] + // node 'a' is a context node for nodes 'b', 'c', 'd' + // except for the leftmost leaf token in [b] - in this case context node ('e') is located somewhere above 'a' + // this rule can be applied recursively to child nodes of 'a'. + // + // context node is set to parent node value after processing every child node + // context node is set to parent of the token after processing every token + + w.childContextNode = contextNode + + // if there are any tokens that logically belong to node and interleave child nodes + // such tokens will be consumed in processChildNode for the child that follows them + w.executeProcessNodeVisitor(node, nodeDynamicIndentation, nodeStartLine, undecoratedNodeStartLine) + + // proceed any tokens in the node that are located after child nodes + for w.formattingScanner.isOnToken() && w.formattingScanner.getTokenFullStart() < w.originalRange.End() { + tokenInfo := w.formattingScanner.readTokenInfo(node) + if tokenInfo.token.Loc.End() > min(node.End(), w.originalRange.End()) { + break + } + w.consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node, false) + } +} + +func (w *formatSpanWorker) processPair(currentItem *TextRangeWithKind, currentStartLine int, currentParent *ast.Node, previousItem *TextRangeWithKind, previousStartLine int, previousParent *ast.Node, contextNode *ast.Node, dynamicIndentation *dynamicIndenter) LineAction { + w.formattingContext.UpdateContext(previousItem, previousParent, currentItem, currentParent, contextNode) + + rules := getRules(w.formattingContext) + + trimTrailingWhitespaces := w.formattingContext.Options.TrimTrailingWhitespace != false + lineAction := LineActionNone + + if len(rules) > 0 { + // Apply rules in reverse order so that higher priority rules (which are first in the array) + // win in a conflict with lower priority rules. + for i := len(rules) - 1; i >= 0; i-- { + rule := rules[i] + lineAction = w.applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine) + if dynamicIndentation != nil { + switch lineAction { + case LineActionLineRemoved: + // Handle the case where the next line is moved to be the end of this line. + // In this case we don't indent the next line in the next pass. + if scanner.GetTokenPosOfNode(currentParent, w.sourceFile, false) == currentItem.Loc.Pos() { + dynamicIndentation.recomputeIndentation( /*lineAddedByFormatting*/ false, contextNode) + } + case LineActionLineAdded: + // Handle the case where token2 is moved to the new line. + // In this case we indent token2 in the next pass but we set + // sameLineIndent flag to notify the indenter that the indentation is within the line. + if scanner.GetTokenPosOfNode(currentParent, w.sourceFile, false) == currentItem.Loc.Pos() { + dynamicIndentation.recomputeIndentation( /*lineAddedByFormatting*/ true, contextNode) + } + default: + // Debug.assert(lineAction === LineAction.None); // !!! + } + } + + // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line + trimTrailingWhitespaces = trimTrailingWhitespaces && (rule.Action()&ruleActionDeleteSpace == 0) && rule.Flags() != ruleFlagsCanDeleteNewLines + } + } else { + trimTrailingWhitespaces = trimTrailingWhitespaces && currentItem.Kind != ast.KindEndOfFile + } + + if currentStartLine != previousStartLine && trimTrailingWhitespaces { + // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line + w.trimTrailingWhitespacesForLines(previousStartLine, currentStartLine, previousItem) + } + + return lineAction +} + +func (w *formatSpanWorker) applyRuleEdits(rule *ruleImpl, previousRange *TextRangeWithKind, previousStartLine int, currentRange *TextRangeWithKind, currentStartLine int) LineAction { + onLaterLine := currentStartLine != previousStartLine + switch rule.Action() { + case ruleActionStopProcessingSpaceActions: + // no action required + return LineActionNone + case ruleActionDeleteSpace: + if previousRange.Loc.End() != currentRange.Loc.Pos() { + // delete characters starting from t1.end up to t2.pos exclusive + w.recordDelete(previousRange.Loc.End(), currentRange.Loc.Pos()-previousRange.Loc.End()) + if onLaterLine { + return LineActionLineRemoved + } + return LineActionNone + } + case ruleActionDeleteToken: + w.recordDelete(previousRange.Loc.Pos(), previousRange.Loc.Len()) + case ruleActionInsertNewLine: + // exit early if we on different lines and rule cannot change number of newlines + // if line1 and line2 are on subsequent lines then no edits are required - ok to exit + // if line1 and line2 are separated with more than one newline - ok to exit since we cannot delete extra new lines + if rule.Flags() != ruleFlagsCanDeleteNewLines && previousStartLine != currentStartLine { + return LineActionNone + } + + // edit should not be applied if we have one line feed between elements + lineDelta := currentStartLine - previousStartLine + if lineDelta != 1 { + w.recordReplace(previousRange.Loc.End(), currentRange.Loc.Pos()-previousRange.Loc.End(), GetNewLineOrDefaultFromContext(w.ctx)) + if onLaterLine { + return LineActionNone + } + return LineActionLineAdded + } + case ruleActionInsertSpace: + // exit early if we on different lines and rule cannot change number of newlines + if rule.Flags() != ruleFlagsCanDeleteNewLines && previousStartLine != currentStartLine { + return LineActionNone + } + + posDelta := currentRange.Loc.Pos() - previousRange.Loc.End() + if posDelta != 1 || !strings.HasPrefix(w.sourceFile.Text()[previousRange.Loc.End():], " ") { + w.recordReplace(previousRange.Loc.End(), posDelta, " ") + if onLaterLine { + return LineActionLineRemoved + } + return LineActionNone + } + case ruleActionInsertTrailingSemicolon: + w.recordInsert(previousRange.Loc.End(), ";") + } + return LineActionNone +} + +type LineAction int + +const ( + LineActionNone LineAction = iota + LineActionLineAdded + LineActionLineRemoved +) + +func (w *formatSpanWorker) processRange(r *TextRangeWithKind, rangeStartLine int, rangeStartCharacter int, parent *ast.Node, contextNode *ast.Node, dynamicIndentation *dynamicIndenter) LineAction { + rangeHasError := w.rangeContainsError(r.Loc) + lineAction := LineActionNone + if !rangeHasError { + if w.previousRange == nil { + // trim whitespaces starting from the beginning of the span up to the current line + originalStartLine, _ := scanner.GetLineAndCharacterOfPosition(w.sourceFile, w.originalRange.Pos()) + w.trimTrailingWhitespacesForLines(originalStartLine, rangeStartLine, nil) + } else { + lineAction = w.processPair(r, rangeStartLine, parent, w.previousRange, w.previousRangeStartLine, w.previousParent, contextNode, dynamicIndentation) + } + } + + w.previousRange = r + w.previousRangeTriviaEnd = r.Loc.End() + w.previousParent = parent + w.previousRangeStartLine = rangeStartLine + + return lineAction +} + +func (w *formatSpanWorker) processTrivia(trivia []*TextRangeWithKind, parent *ast.Node, contextNode *ast.Node, dynamicIndentation *dynamicIndenter) { + for _, triviaItem := range trivia { + if isComment(triviaItem.Kind) && triviaItem.Loc.ContainedBy(w.originalRange) { + triviaItemStartLine, triviaItemStartCharacter := scanner.GetLineAndCharacterOfPosition(w.sourceFile, triviaItem.Loc.Pos()) + w.processRange(triviaItem, triviaItemStartLine, triviaItemStartCharacter, parent, contextNode, dynamicIndentation) + } + } +} + +/** +* Trimming will be done for lines after the previous range. +* Exclude comments as they had been previously processed. + */ +func (w *formatSpanWorker) trimTrailingWhitespacesForRemainingRange(trivias []*TextRangeWithKind) { + startPos := w.originalRange.Pos() + if w.previousRange != nil { + startPos = w.previousRange.Loc.End() + } + + for _, trivia := range trivias { + if isComment(trivia.Kind) { + if startPos < trivia.Loc.Pos() { + w.trimTrailingWitespacesForPositions(startPos, trivia.Loc.Pos()-1, w.previousRange) + } + + startPos = trivia.Loc.End() + 1 + } + } + + if startPos < w.originalRange.End() { + w.trimTrailingWitespacesForPositions(startPos, w.originalRange.End(), w.previousRange) + } +} + +func (w *formatSpanWorker) trimTrailingWitespacesForPositions(startPos int, endPos int, previousRange *TextRangeWithKind) { + startLine, _ := scanner.GetLineAndCharacterOfPosition(w.sourceFile, startPos) + endLine, _ := scanner.GetLineAndCharacterOfPosition(w.sourceFile, endPos) + + w.trimTrailingWhitespacesForLines(startLine, endLine+1, previousRange) +} + +func (w *formatSpanWorker) trimTrailingWhitespacesForLines(line1 int, line2 int, r *TextRangeWithKind) { + lineStarts := scanner.GetLineStarts(w.sourceFile) + for line := line1; line < line2; line++ { + lineStartPosition := int(lineStarts[line]) + lineEndPosition := scanner.GetEndLinePosition(w.sourceFile, line) + + // do not trim whitespaces in comments or template expression + if r != nil && (isComment(r.Kind) || isStringOrRegularExpressionOrTemplateLiteral(r.Kind)) && r.Loc.Pos() <= lineEndPosition && r.Loc.End() > lineEndPosition { + continue + } + + whitespaceStart := w.getTrailingWhitespaceStartPosition(lineStartPosition, lineEndPosition) + if whitespaceStart != -1 { + // Debug.assert(whitespaceStart === lineStartPosition || !isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(whitespaceStart - 1))); // !!! + w.recordDelete(whitespaceStart, lineEndPosition+1-whitespaceStart) + } + } +} + +/** +* @param start The position of the first character in range +* @param end The position of the last character in range + */ +func (w *formatSpanWorker) getTrailingWhitespaceStartPosition(start int, end int) int { + pos := end + text := w.sourceFile.Text() + for pos >= start { + ch, size := utf8.DecodeRuneInString(text[pos:]) + if size == 0 { + pos-- // multibyte character, rewind more + continue + } + if !stringutil.IsWhiteSpaceSingleLine(ch) { + break + } + pos-- + } + if pos != end { + return pos + 1 + } + return -1 +} + +func isStringOrRegularExpressionOrTemplateLiteral(kind ast.Kind) bool { + return kind == ast.KindStringLiteral || kind == ast.KindRegularExpressionLiteral || ast.IsTemplateLiteralKind(kind) +} + +func isComment(kind ast.Kind) bool { + return kind == ast.KindSingleLineCommentTrivia || kind == ast.KindMultiLineCommentTrivia +} + +func (w *formatSpanWorker) insertIndentation(pos int, indentation int, lineAdded bool) { + indentationString := getIndentationString(indentation, w.formattingContext.Options) + if lineAdded { + // new line is added before the token by the formatting rules + // insert indentation string at the very beginning of the token + w.recordReplace(pos, 0, indentationString) + } else { + tokenStartLine, tokenStartCharacter := scanner.GetLineAndCharacterOfPosition(w.sourceFile, pos) + startLinePosition := int(scanner.GetLineStarts(w.sourceFile)[tokenStartLine]) + if indentation != w.characterToColumn(startLinePosition, tokenStartCharacter) || w.indentationIsDifferent(indentationString, startLinePosition) { + w.recordReplace(startLinePosition, tokenStartCharacter, indentationString) + } + } +} + +func (w *formatSpanWorker) characterToColumn(startLinePosition int, characterInLine int) int { + column := 0 + for i := range characterInLine { + if w.sourceFile.Text()[startLinePosition+i] == '\t' { + column += w.formattingContext.Options.TabSize - (column % w.formattingContext.Options.TabSize) + } else { + column++ + } + } + return column +} + +func (w *formatSpanWorker) indentationIsDifferent(indentationString string, startLinePosition int) bool { + return indentationString != w.sourceFile.Text()[startLinePosition:startLinePosition+len(indentationString)] +} + +func (w *formatSpanWorker) indentTriviaItems(trivia []*TextRangeWithKind, commentIndentation int, indentNextTokenOrTrivia bool, indentSingleLine func(item *TextRangeWithKind)) bool { + for _, triviaItem := range trivia { + triviaInRange := triviaItem.Loc.ContainedBy(w.originalRange) + switch triviaItem.Kind { + case ast.KindMultiLineCommentTrivia: + if triviaInRange { + w.indentMultilineComment(triviaItem.Loc, commentIndentation, !indentNextTokenOrTrivia, true) + } + indentNextTokenOrTrivia = false + case ast.KindSingleLineCommentTrivia: + if indentNextTokenOrTrivia && triviaInRange { + indentSingleLine(triviaItem) + } + indentNextTokenOrTrivia = false + case ast.KindNewLineTrivia: + indentNextTokenOrTrivia = true + } + } + return indentNextTokenOrTrivia +} + +func (w *formatSpanWorker) indentMultilineComment(commentRange core.TextRange, indentation int, firstLineIsIndented bool, indentFinalLine bool) { + // split comment in lines + startLine, _ := scanner.GetLineAndCharacterOfPosition(w.sourceFile, commentRange.Pos()) + endLine, _ := scanner.GetLineAndCharacterOfPosition(w.sourceFile, commentRange.End()) + + if startLine == endLine { + if !firstLineIsIndented { + // treat as single line comment + w.insertIndentation(commentRange.Pos(), indentation, false) + } + return + } + + parts := make([]core.TextRange, 0, strings.Count(w.sourceFile.Text()[commentRange.Pos():commentRange.End()], "\n")) + startPos := commentRange.Pos() + for line := startLine; line < endLine; line++ { + endOfLine := scanner.GetEndLinePosition(w.sourceFile, line) + parts = append(parts, core.NewTextRange(startPos, endOfLine)) + startPos = int(scanner.GetLineStarts(w.sourceFile)[line]) + } + + if indentFinalLine { + parts = append(parts, core.NewTextRange(startPos, commentRange.End())) + } + + if len(parts) == 0 { + return + } + + startLinePos := int(scanner.GetLineStarts(w.sourceFile)[startLine]) + + nonWhitespaceInFirstPartCharacter, nonWhitespaceInFirstPartColumn := findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].Pos(), w.sourceFile, w.formattingContext.Options) + + startIndex := 0 + + if firstLineIsIndented { + startIndex = 1 + startLine++ + } + + // shift all parts on the delta size + delta := indentation - nonWhitespaceInFirstPartColumn + for i := startIndex; i < len(parts); i++ { + startLinePos := int(scanner.GetLineStarts(w.sourceFile)[startLine]) + nonWhitespaceCharacter := nonWhitespaceInFirstPartCharacter + nonWhitespaceColumn := nonWhitespaceInFirstPartColumn + if i != 0 { + nonWhitespaceCharacter, nonWhitespaceColumn = findFirstNonWhitespaceCharacterAndColumn(parts[i].Pos(), parts[i].End(), w.sourceFile, w.formattingContext.Options) + } + newIndentation := nonWhitespaceColumn + delta + if newIndentation > 0 { + indentationString := getIndentationString(newIndentation, w.formattingContext.Options) + w.recordReplace(startLinePos, nonWhitespaceCharacter, indentationString) + } else { + w.recordDelete(startLinePos, nonWhitespaceCharacter) + } + + startLine++ + } +} + +func getIndentationString(indentation int, options *FormatCodeSettings) string { + // go's `strings.Repeat` already has static, global caching for repeated tabs and spaces, so there's no need to cache here like in strada + if !options.ConvertTabsToSpaces { + tabs := int(math.Floor(float64(indentation) / float64(options.TabSize))) + spaces := indentation - (tabs * options.TabSize) + res := strings.Repeat("\t", tabs) + if spaces > 0 { + res = strings.Repeat(" ", spaces) + res + } + + return res + } else { + return strings.Repeat(" ", indentation) + } +} + +func createTextChangeFromStartLength(start int, length int, newText string) core.TextChange { + return core.TextChange{ + NewText: newText, + TextRange: core.NewTextRange(start, start+length), + } +} + +func (w *formatSpanWorker) recordDelete(start int, length int) { + if length != 0 { + w.edits = append(w.edits, createTextChangeFromStartLength(start, length, "")) + } +} + +func (w *formatSpanWorker) recordReplace(start int, length int, newText string) { + if length != 0 || newText != "" { + w.edits = append(w.edits, createTextChangeFromStartLength(start, length, newText)) + } +} + +func (w *formatSpanWorker) recordInsert(start int, text string) { + if text != "" { + w.edits = append(w.edits, createTextChangeFromStartLength(start, 0, text)) + } +} + +func (w *formatSpanWorker) consumeTokenAndAdvanceScanner(currentTokenInfo *tokenInfo, parent *ast.Node, dynamicIndenation *dynamicIndenter, container *ast.Node, isListEndToken bool) { + // assert(currentTokenInfo.token.Loc.ContainedBy(parent.Loc)) // !!! + lastTriviaWasNewLine := w.formattingScanner.lastTrailingTriviaWasNewLine() + indentToken := false + + if len(currentTokenInfo.leadingTrivia) > 0 { + w.processTrivia(currentTokenInfo.leadingTrivia, parent, w.childContextNode, dynamicIndenation) + } + + lineAction := LineActionNone + isTokenInRange := currentTokenInfo.token.Loc.ContainedBy(w.originalRange) + + tokenStartLine, tokenStartChar := scanner.GetLineAndCharacterOfPosition(w.sourceFile, currentTokenInfo.token.Loc.Pos()) + + if isTokenInRange { + rangeHasError := w.rangeContainsError(currentTokenInfo.token.Loc) + // save previousRange since processRange will overwrite this value with current one + savePreviousRange := w.previousRange + lineAction = w.processRange(currentTokenInfo.token, tokenStartLine, tokenStartChar, parent, w.childContextNode, dynamicIndenation) + // do not indent comments\token if token range overlaps with some error + if !rangeHasError { + if lineAction == LineActionNone { + // indent token only if end line of previous range does not match start line of the token + if savePreviousRange != nil { + prevEndLine, _ := scanner.GetLineAndCharacterOfPosition(w.sourceFile, savePreviousRange.Loc.End()) + indentToken = lastTriviaWasNewLine && tokenStartLine != prevEndLine + } + } else { + indentToken = lineAction == LineActionLineAdded + } + } + } + + if len(currentTokenInfo.trailingTrivia) > 0 { + w.previousRangeTriviaEnd = core.LastOrNil(currentTokenInfo.trailingTrivia).Loc.End() + w.processTrivia(currentTokenInfo.trailingTrivia, parent, w.childContextNode, dynamicIndenation) + } + + if indentToken { + tokenIndentation := -1 + if isTokenInRange && !w.rangeContainsError(currentTokenInfo.token.Loc) { + tokenIndentation = dynamicIndenation.getIndentationForToken(tokenStartLine, currentTokenInfo.token.Kind, container, !!isListEndToken) + } + indentNextTokenOrTrivia := true + if len(currentTokenInfo.leadingTrivia) > 0 { + commentIndentation := dynamicIndenation.getIndentationForComment(currentTokenInfo.token.Kind, tokenIndentation, container) + indentNextTokenOrTrivia = w.indentTriviaItems(currentTokenInfo.leadingTrivia, commentIndentation, indentNextTokenOrTrivia, func(item *TextRangeWithKind) { + w.insertIndentation(item.Loc.Pos(), commentIndentation, false) + }) + } + + // indent token only if is it is in target range and does not overlap with any error ranges + if tokenIndentation != -1 && indentNextTokenOrTrivia { + w.insertIndentation(currentTokenInfo.token.Loc.Pos(), tokenIndentation, lineAction == LineActionLineAdded) + + w.lastIndentedLine = tokenStartLine + w.indentationOnLastIndentedLine = tokenIndentation + } + } + + w.formattingScanner.advance() + + w.childContextNode = parent +} + +type dynamicIndenter struct { + node *ast.Node + nodeStartLine int + indentation int + delta int + + options *FormatCodeSettings + sourceFile *ast.SourceFile +} + +func (i *dynamicIndenter) getIndentationForComment(kind ast.Kind, tokenIndentation int, container *ast.Node) int { + switch kind { + // preceding comment to the token that closes the indentation scope inherits the indentation from the scope + // .. { + // // comment + // } + case ast.KindCloseBraceToken, ast.KindCloseBracketToken, ast.KindCloseParenToken: + return i.indentation + i.getDelta(container) + } + return i.indentation +} + +// if list end token is LessThanToken '>' then its delta should be explicitly suppressed +// so that LessThanToken as a binary operator can still be indented. +// foo.then +// +// < +// number, +// string, +// >(); +// +// vs +// var a = xValue +// +// > yValue; +func (i *dynamicIndenter) getIndentationForToken(line int, kind ast.Kind, container *ast.Node, suppressDelta bool) int { + if !suppressDelta && i.shouldAddDelta(line, kind, container) { + return i.indentation + i.getDelta(container) + } + return i.indentation +} + +func (i *dynamicIndenter) getIndentation() int { + return i.indentation +} + +func (i *dynamicIndenter) getDelta(child *ast.Node) int { + // Delta value should be zero when the node explicitly prevents indentation of the child node + if NodeWillIndentChild(i.options, i.node, child, i.sourceFile, true) { + return i.delta + } + return 0 +} + +func (i *dynamicIndenter) recomputeIndentation(lineAdded bool, parent *ast.Node) { + if ShouldIndentChildNode(i.options, parent, i.node, i.sourceFile) { + if lineAdded { + i.indentation += i.options.IndentSize // !!! no nil check??? + } else { + i.indentation -= i.options.IndentSize // !!! no nil check??? + } + if ShouldIndentChildNode(i.options, i.node, nil, nil) { + i.delta = i.options.IndentSize + } else { + i.delta = 0 + } + } +} + +func (i *dynamicIndenter) shouldAddDelta(line int, kind ast.Kind, container *ast.Node) bool { + switch kind { + // open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent + case ast.KindOpenBraceToken, ast.KindCloseBraceToken, ast.KindCloseParenToken, ast.KindElseKeyword, ast.KindWhileKeyword, ast.KindAtToken: + return false + case ast.KindSlashToken, ast.KindGreaterThanToken: + switch container.Kind { + case ast.KindJsxOpeningElement, ast.KindJsxClosingElement, ast.KindJsxSelfClosingElement: + return false + } + break + case ast.KindOpenBracketToken, ast.KindCloseBracketToken: + if container.Kind != ast.KindMappedType { + return false + } + break + } + // if token line equals to the line of containing node (this is a first token in the node) - use node indentation + return i.nodeStartLine != line && + // if this token is the first token following the list of decorators, we do not need to indent + !(ast.HasDecorators(i.node) && kind == getFirstNonDecoratorTokenOfNode(i.node)) +} + +func getFirstNonDecoratorTokenOfNode(node *ast.Node) ast.Kind { + if ast.CanHaveModifiers(node) { + modifier := core.Find(node.Modifiers().Nodes[core.FindIndex(node.Modifiers().Nodes, ast.IsDecorator):], ast.IsModifier) + if modifier != nil { + return modifier.Kind + } + } + + switch node.Kind { + case ast.KindClassDeclaration: + return ast.KindClassKeyword + case ast.KindInterfaceDeclaration: + return ast.KindInterfaceKeyword + case ast.KindFunctionDeclaration: + return ast.KindFunctionKeyword + case ast.KindEnumDeclaration: + return ast.KindEnumDeclaration + case ast.KindGetAccessor: + return ast.KindGetKeyword + case ast.KindSetAccessor: + return ast.KindSetKeyword + case ast.KindMethodDeclaration: + if node.AsMethodDeclaration().AsteriskToken != nil { + return ast.KindAsteriskToken + } + fallthrough + + case ast.KindPropertyDeclaration, ast.KindParameter: + name := ast.GetNameOfDeclaration(node) + if name != nil { + return name.Kind + } + } + + return ast.KindUnknown +} + +func (w *formatSpanWorker) getDynamicIndentation(node *ast.Node, nodeStartLine int, indentation int, delta int) *dynamicIndenter { + return &dynamicIndenter{ + node: node, + nodeStartLine: nodeStartLine, + indentation: indentation, + delta: delta, + options: w.formattingContext.Options, + sourceFile: w.sourceFile, + } +} diff --git a/internal/format/util.go b/internal/format/util.go new file mode 100644 index 0000000000..a7b08f2899 --- /dev/null +++ b/internal/format/util.go @@ -0,0 +1,190 @@ +package format + +import ( + "slices" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/astnav" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/scanner" +) + +func rangeIsOnOneLine(node core.TextRange, file *ast.SourceFile) bool { + startLine, _ := scanner.GetLineAndCharacterOfPosition(file, node.Pos()) + endLine, _ := scanner.GetLineAndCharacterOfPosition(file, node.End()) + return startLine == endLine +} + +func getOpenTokenForList(node *ast.Node, list *ast.NodeList) ast.Kind { + switch node.Kind { + case ast.KindConstructor, + ast.KindFunctionDeclaration, + ast.KindFunctionExpression, + ast.KindMethodDeclaration, + ast.KindMethodSignature, + ast.KindArrowFunction, + ast.KindCallSignature, + ast.KindConstructSignature, + ast.KindFunctionType, + ast.KindConstructorType, + ast.KindGetAccessor, + ast.KindSetAccessor: + if node.TypeParameterList() == list { + return ast.KindLessThanToken + } else if node.ParameterList() == list { + return ast.KindOpenParenToken + } + case ast.KindCallExpression, ast.KindNewExpression: + if node.TypeArgumentList() == list { + return ast.KindLessThanToken + } else if node.ArgumentList() == list { + return ast.KindOpenParenToken + } + case ast.KindClassDeclaration, + ast.KindClassExpression, + ast.KindInterfaceDeclaration, + ast.KindTypeAliasDeclaration: + if node.TypeParameterList() == list { + return ast.KindLessThanToken + } + case ast.KindTypeReference, + ast.KindTaggedTemplateExpression, + ast.KindTypeQuery, + ast.KindExpressionWithTypeArguments, + ast.KindImportType: + if node.TypeArgumentList() == list { + return ast.KindLessThanToken + } + case ast.KindTypeLiteral: + return ast.KindOpenBraceToken + } + + return ast.KindUnknown +} + +func getCloseTokenForOpenToken(kind ast.Kind) ast.Kind { + // TODO: matches strada - seems like it could handle more pairs of braces, though? [] notably missing + switch kind { + case ast.KindOpenParenToken: + return ast.KindCloseParenToken + case ast.KindLessThanToken: + return ast.KindGreaterThanToken + case ast.KindOpenBraceToken: + return ast.KindCloseBraceToken + } + return ast.KindUnknown +} + +func getLineStartPositionForPosition(position int, sourceFile *ast.SourceFile) int { + lineStarts := scanner.GetLineStarts(sourceFile) + line, _ := scanner.GetLineAndCharacterOfPosition(sourceFile, position) + return int(lineStarts[line]) +} + +/** + * Tests whether `child` is a grammar error on `parent`. + * In strada, this also checked node arrays, but it is never acually called with one in practice. + */ +func isGrammarError(parent *ast.Node, child *ast.Node) bool { + if ast.IsTypeParameterDeclaration(parent) { + return child == parent.AsTypeParameter().Expression + } + if ast.IsPropertySignatureDeclaration(parent) { + return child == parent.AsPropertySignatureDeclaration().Initializer + } + if ast.IsPropertyDeclaration(parent) { + return ast.IsAutoAccessorPropertyDeclaration(parent) && child == parent.AsPropertyDeclaration().PostfixToken && child.Kind == ast.KindQuestionToken + } + if ast.IsPropertyAssignment(parent) { + pa := parent.AsPropertyAssignment() + mods := pa.Modifiers() + return child == pa.PostfixToken || (mods != nil && isGrammarErrorElement(&mods.NodeList, child, ast.IsModifierLike)) + } + if ast.IsShorthandPropertyAssignment(parent) { + sp := parent.AsShorthandPropertyAssignment() + mods := sp.Modifiers() + return child == sp.EqualsToken || child == sp.PostfixToken || (mods != nil && isGrammarErrorElement(&mods.NodeList, child, ast.IsModifierLike)) + } + if ast.IsMethodDeclaration(parent) { + return child == parent.AsMethodDeclaration().PostfixToken && child.Kind == ast.KindExclamationToken + } + if ast.IsConstructorDeclaration(parent) { + return child == parent.AsConstructorDeclaration().Type || isGrammarErrorElement(parent.AsConstructorDeclaration().TypeParameters, child, ast.IsTypeParameterDeclaration) + } + if ast.IsGetAccessorDeclaration(parent) { + return isGrammarErrorElement(parent.AsGetAccessorDeclaration().TypeParameters, child, ast.IsTypeParameterDeclaration) + } + if ast.IsSetAccessorDeclaration(parent) { + return child == parent.AsSetAccessorDeclaration().Type || isGrammarErrorElement(parent.AsSetAccessorDeclaration().TypeParameters, child, ast.IsTypeParameterDeclaration) + } + if ast.IsNamespaceExportDeclaration(parent) { + mods := parent.AsNamespaceExportDeclaration().Modifiers() + return mods != nil && isGrammarErrorElement(&mods.NodeList, child, ast.IsModifierLike) + } + return false +} + +func isGrammarErrorElement(list *ast.NodeList, child *ast.Node, isPossibleElement func(node *ast.Node) bool) bool { + if list == nil || len(list.Nodes) == 0 { + return false + } + if !isPossibleElement(child) { + return false + } + return slices.Contains(list.Nodes, child) +} + +/** + * Validating `expectedTokenKind` ensures the token was typed in the context we expect (eg: not a comment). + * @param expectedTokenKind The kind of the last token constituting the desired parent node. + */ +func findImmediatelyPrecedingTokenOfKind(end int, expectedTokenKind ast.Kind, sourceFile *ast.SourceFile) *ast.Node { + precedingToken := astnav.FindPrecedingToken(sourceFile, end) + if precedingToken == nil || precedingToken.Kind != expectedTokenKind || precedingToken.End() != end { + return nil + } + return precedingToken +} + +/** + * Finds the highest node enclosing `node` at the same list level as `node` + * and whose end does not exceed `node.end`. + * + * Consider typing the following + * ``` + * let x = 1; + * while (true) { + * } + * ``` + * Upon typing the closing curly, we want to format the entire `while`-statement, but not the preceding + * variable declaration. + */ +func findOutermostNodeWithinListLevel(node *ast.Node) *ast.Node { + current := node + for current != nil && + current.Parent != nil && + current.Parent.End() == node.End() && + !isListElement(current.Parent, current) { + current = current.Parent + } + + return current +} + +// Returns true if node is a element in some list in parent +// i.e. parent is class declaration with the list of members and node is one of members. +func isListElement(parent *ast.Node, node *ast.Node) bool { + switch parent.Kind { + case ast.KindClassDeclaration, ast.KindInterfaceDeclaration: + return node.Loc.ContainedBy(parent.MemberList().Loc) + case ast.KindModuleDeclaration: + body := parent.Body() + return body != nil && body.Kind == ast.KindModuleBlock && node.Loc.ContainedBy(body.StatementList().Loc) + case ast.KindSourceFile, ast.KindBlock, ast.KindModuleBlock: + return node.Loc.ContainedBy(parent.StatementList().Loc) + case ast.KindCatchClause: + return node.Loc.ContainedBy(parent.AsCatchClause().Block.StatementList().Loc) + } + + return false +} diff --git a/internal/fourslash/_scripts/convertFourslash.mts b/internal/fourslash/_scripts/convertFourslash.mts new file mode 100644 index 0000000000..ce2089b4d8 --- /dev/null +++ b/internal/fourslash/_scripts/convertFourslash.mts @@ -0,0 +1,623 @@ +import * as cp from "child_process"; +import * as fs from "fs"; +import * as path from "path"; +import * as ts from "typescript"; +import which from "which"; + +const stradaFourslashPath = path.resolve(import.meta.dirname, "../", "../", "../", "_submodules", "TypeScript", "tests", "cases", "fourslash"); + +let inputFileSet: Set | undefined; + +const failingTestsPath = path.join(import.meta.dirname, "failingTests.txt"); +const failingTestsList = fs.readFileSync(failingTestsPath, "utf-8").split("\n").map(line => line.trim().substring(4)).filter(line => line.length > 0); +const failingTests = new Set(failingTestsList); + +const outputDir = path.join(import.meta.dirname, "../", "tests", "gen"); + +const unparsedFiles: string[] = []; + +function main() { + const args = process.argv.slice(2); + const inputFilesPath = args[0]; + if (inputFilesPath) { + const inputFiles = fs.readFileSync(inputFilesPath, "utf-8") + .split("\n").map(line => line.trim()) + .filter(line => line.length > 0) + .map(line => path.basename(line)); + inputFileSet = new Set(inputFiles); + } + + if (!fs.existsSync(outputDir)) { + fs.mkdirSync(outputDir, { recursive: true }); + } + + generateHelperFile(); + parseTypeScriptFiles(stradaFourslashPath); + console.log(unparsedFiles.join("\n")); + const gofmt = which.sync("go"); + cp.execFileSync(gofmt, ["tool", "mvdan.cc/gofumpt", "-lang=go1.24", "-w", outputDir]); +} + +function parseTypeScriptFiles(folder: string): void { + const files = fs.readdirSync(folder); + + files.forEach(file => { + const filePath = path.join(folder, file); + const stat = fs.statSync(filePath); + if (inputFileSet && !inputFileSet.has(file)) { + return; + } + + if (stat.isDirectory()) { + parseTypeScriptFiles(filePath); + } + else if (file.endsWith(".ts")) { + const content = fs.readFileSync(filePath, "utf-8"); + const test = parseFileContent(file, content); + if (test) { + const testContent = generateGoTest(test); + const testPath = path.join(outputDir, `${test.name}_test.go`); + fs.writeFileSync(testPath, testContent, "utf-8"); + } + } + }); +} + +function parseFileContent(filename: string, content: string): GoTest | undefined { + console.error(`Parsing file: ${filename}`); + const sourceFile = ts.createSourceFile("temp.ts", content, ts.ScriptTarget.Latest, true /*setParentNodes*/); + const statements = sourceFile.statements; + const goTest: GoTest = { + name: filename.replace(".ts", ""), + content: getTestInput(content), + commands: [], + }; + for (const statement of statements) { + const result = parseFourslashStatement(statement); + if (!result) { + unparsedFiles.push(filename); + return undefined; + } + else { + goTest.commands.push(...result); + } + } + return goTest; +} + +function getTestInput(content: string): string { + const lines = content.split("\n"); + let testInput: string[] = []; + for (const line of lines) { + let newLine = ""; + if (line.startsWith("////")) { + const parts = line.substring(4).split("`"); + for (let i = 0; i < parts.length; i++) { + if (i > 0) { + newLine += `\` + "\`" + \``; + } + newLine += parts[i]; + } + testInput.push(newLine); + } + else if (line.startsWith("// @") || line.startsWith("//@")) { + testInput.push(line); + } + // !!! preserve non-input comments? + } + + // chomp leading spaces + if (!testInput.some(line => line.length != 0 && !line.startsWith(" ") && !line.startsWith("// "))) { + testInput = testInput.map(line => { + if (line.startsWith(" ")) return line.substring(1); + return line; + }); + } + return `\`${testInput.join("\n")}\``; +} + +/** + * Parses a Strada fourslash statement and returns the corresponding Corsa commands. + * @returns an array of commands if the statement is a valid fourslash command, or `false` if the statement could not be parsed. + */ +function parseFourslashStatement(statement: ts.Statement): Cmd[] | undefined { + if (ts.isVariableStatement(statement)) { + // variable declarations (for ranges and markers), e.g. `const range = test.ranges()[0];` + return []; + } + else if (ts.isExpressionStatement(statement) && ts.isCallExpression(statement.expression)) { + const callExpression = statement.expression; + if (!ts.isPropertyAccessExpression(callExpression.expression)) { + console.error(`Expected property access expression, got ${callExpression.expression.getText()}`); + return undefined; + } + const namespace = callExpression.expression.expression; + const func = callExpression.expression.name; + if (!ts.isIdentifier(namespace) || !ts.isIdentifier(func)) { + console.error(`Expected identifiers for namespace and function, got ${namespace.getText()} and ${func.getText()}`); + return undefined; + } + // `verify.completions(...)` + if (namespace.text === "verify" && func.text === "completions") { + return parseVerifyCompletionsArgs(callExpression.arguments); + } + // `goTo.marker(...)` + if (namespace.text === "goTo" && func.text === "marker") { + return parseGoToMarkerArgs(callExpression.arguments); + } + // !!! other fourslash commands + } + console.error(`Unrecognized fourslash statement: ${statement.getText()}`); + return undefined; +} + +function getGoStringLiteral(text: string): string { + return `${JSON.stringify(text)}`; +} + +function parseGoToMarkerArgs(args: readonly ts.Expression[]): GoToMarkerCmd[] | undefined { + if (args.length !== 1) { + console.error(`Expected exactly one argument in goTo.marker, got ${args.length}`); + return undefined; + } + const arg = args[0]; + if (!ts.isStringLiteral(arg)) { + console.error(`Unrecognized argument in goTo.marker: ${arg.getText()}`); + return undefined; + } + return [{ + kind: "goToMarker", + marker: getGoStringLiteral(arg.text), + }]; +} + +function parseVerifyCompletionsArgs(args: readonly ts.Expression[]): VerifyCompletionsCmd[] | undefined { + const cmds = []; + for (const arg of args) { + const result = parseVerifyCompletionArg(arg); + if (!result) { + return undefined; + } + cmds.push(result); + } + return cmds; +} + +function parseVerifyCompletionArg(arg: ts.Expression): VerifyCompletionsCmd | undefined { + let marker: string | undefined; + let goArgs: VerifyCompletionsArgs | undefined; + if (!ts.isObjectLiteralExpression(arg)) { + console.error(`Expected object literal expression in verify.completions, got ${arg.getText()}`); + return undefined; + } + let isNewIdentifierLocation: true | undefined; + for (const prop of arg.properties) { + if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name)) { + console.error(`Expected property assignment with identifier name, got ${prop.getText()}`); + return undefined; + } + const propName = prop.name.text; + const init = prop.initializer; + switch (propName) { + case "marker": + if (ts.isStringLiteral(init)) { + marker = getGoStringLiteral(init.text); + } + else if (ts.isArrayLiteralExpression(init)) { + marker = "[]string{"; + for (const elem of init.elements) { + if (!ts.isStringLiteral(elem)) { + console.error(`Expected string literal in marker array, got ${elem.getText()}`); + return undefined; // !!! parse marker arrays? + } + marker += `${getGoStringLiteral(elem.text)}, `; + } + marker += "}"; + } + else if (ts.isObjectLiteralExpression(init)) { + // !!! parse marker objects? + console.error(`Unrecognized marker initializer: ${init.getText()}`); + return undefined; + } + else if (init.getText() === "test.markers()") { + marker = "f.Markers()"; + } + else { + console.error(`Unrecognized marker initializer: ${init.getText()}`); + return undefined; + } + break; + case "exact": + case "includes": + if (init.getText() === "undefined") { + return { + kind: "verifyCompletions", + marker: marker ? marker : "nil", + args: undefined, + }; + } + let expected = "[]fourslash.ExpectedCompletionItem{"; + if (ts.isArrayLiteralExpression(init)) { + for (const elem of init.elements) { + const result = parseExpectedCompletionItem(elem); + if (!result) { + return undefined; + } + expected += result + ", "; + } + } + else { + const result = parseExpectedCompletionItem(init); + if (!result) { + return undefined; + } + expected += result; + } + expected += "}"; + if (propName === "includes") { + (goArgs ??= {}).includes = expected; + } + else { + (goArgs ??= {}).exact = expected; + } + break; // !!! parse these args + case "excludes": + let excludes = "[]string{"; + if (ts.isStringLiteral(init)) { + excludes += `${getGoStringLiteral(init.text)}, `; + } + else if (ts.isArrayLiteralExpression(init)) { + for (const elem of init.elements) { + if (!ts.isStringLiteral(elem)) { + return undefined; // Shouldn't happen + } + excludes += `${getGoStringLiteral(elem.text)}, `; + } + } + excludes += "}"; + (goArgs ??= {}).excludes = excludes; + break; + case "isNewIdentifierLocation": + if (init.kind === ts.SyntaxKind.TrueKeyword) { + isNewIdentifierLocation = true; + } + break; + case "preferences": + case "triggerCharacter": + case "defaultCommitCharacters": + break; // !!! parse once they're supported in fourslash + case "optionalReplacementSpan": + case "isGlobalCompletion": + break; // Ignored, unused + default: + console.error(`Unrecognized expected completion item: ${init.parent.getText()}`); + return undefined; + } + } + return { + kind: "verifyCompletions", + marker: marker ? marker : "nil", + args: goArgs, + isNewIdentifierLocation: isNewIdentifierLocation, + }; +} + +function parseExpectedCompletionItem(expr: ts.Expression): string | undefined { + if (ts.isStringLiteral(expr)) { + return getGoStringLiteral(expr.text); + } + if (ts.isObjectLiteralExpression(expr)) { + let isDeprecated = false; // !!! + let isOptional = false; + let extensions: string[] = []; // !!! + let item = "&lsproto.CompletionItem{"; + let name: string | undefined; + let insertText: string | undefined; + let filterText: string | undefined; + for (const prop of expr.properties) { + if (!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name)) { + console.error(`Expected property assignment with identifier name for completion item, got ${prop.getText()}`); + return undefined; + } + const propName = prop.name.text; + const init = prop.initializer; + switch (propName) { + case "name": + if (ts.isStringLiteral(init)) { + name = init.text; + } + else { + console.error(`Expected string literal for completion item name, got ${init.getText()}`); + return undefined; + } + break; + case "sortText": + const result = parseSortText(init); + if (!result) { + return undefined; + } + item += `SortText: ptrTo(string(${result})), `; + break; + case "insertText": + if (ts.isStringLiteral(init)) { + insertText = init.text; + } + else { + console.error(`Expected string literal for insertText, got ${init.getText()}`); + return undefined; + } + break; + case "filterText": + if (ts.isStringLiteral(init)) { + filterText = init.text; + } + else { + console.error(`Expected string literal for filterText, got ${init.getText()}`); + return undefined; + } + break; + case "isRecommended": + if (init.kind === ts.SyntaxKind.TrueKeyword) { + item += `Preselect: ptrTo(true), `; + } + break; + case "kind": + const kind = parseKind(init); + if (!kind) { + return undefined; + } + item += `Kind: ptrTo(${kind}), `; + break; + case "kindModifiers": + const modifiers = parseKindModifiers(init); + if (!modifiers) { + return undefined; + } + ({ isDeprecated, isOptional, extensions } = modifiers); + break; + case "commitCharacters": + case "replacementSpan": + // !!! support these later + break; + default: + console.error(`Unrecognized property in expected completion item: ${propName}`); + return undefined; // Unsupported property + } + } + if (!name) { + return undefined; // Shouldn't happen + } + if (isOptional) { + insertText ??= name; + filterText ??= name; + name += "?"; + } + item += `Label: ${getGoStringLiteral(name!)}, `; + if (insertText) item += `InsertText: ptrTo(${getGoStringLiteral(insertText)}), `; + if (filterText) item += `FilterText: ptrTo(${getGoStringLiteral(filterText)}), `; + item += "}"; + return item; + } + console.error(`Expected string literal or object literal for expected completion item, got ${expr.getText()}`); + return undefined; // Unsupported expression type +} + +function parseKind(expr: ts.Expression): string | undefined { + if (!ts.isStringLiteral(expr)) { + console.error(`Expected string literal for kind, got ${expr.getText()}`); + return undefined; + } + switch (expr.text) { + case "primitive type": + case "keyword": + return "lsproto.CompletionItemKindKeyword"; + case "const": + case "let": + case "var": + case "local var": + case "alias": + case "parameter": + return "lsproto.CompletionItemKindVariable"; + case "property": + case "getter": + case "setter": + return "lsproto.CompletionItemKindField"; + case "function": + case "local function": + return "lsproto.CompletionItemKindFunction"; + case "method": + case "construct": + case "call": + case "index": + return "lsproto.CompletionItemKindMethod"; + case "enum": + return "lsproto.CompletionItemKindEnum"; + case "enum member": + return "lsproto.CompletionItemKindEnumMember"; + case "module": + case "external module name": + return "lsproto.CompletionItemKindModule"; + case "class": + case "type": + return "lsproto.CompletionItemKindClass"; + case "interface": + return "lsproto.CompletionItemKindInterface"; + case "warning": + return "lsproto.CompletionItemKindText"; + case "script": + return "lsproto.CompletionItemKindFile"; + case "directory": + return "lsproto.CompletionItemKindFolder"; + case "string": + return "lsproto.CompletionItemKindConstant"; + default: + return "lsproto.CompletionItemKindProperty"; + } +} + +const fileKindModifiers = new Set([".d.ts", ".ts", ".tsx", ".js", ".jsx", ".json"]); + +function parseKindModifiers(expr: ts.Expression): { isOptional: boolean; isDeprecated: boolean; extensions: string[]; } | undefined { + if (!ts.isStringLiteral(expr)) { + console.error(`Expected string literal for kind modifiers, got ${expr.getText()}`); + return undefined; + } + let isOptional = false; + let isDeprecated = false; + const extensions: string[] = []; + const modifiers = expr.text.split(","); + for (const modifier of modifiers) { + switch (modifier) { + case "optional": + isOptional = true; + break; + case "deprecated": + isDeprecated = true; + break; + default: + if (fileKindModifiers.has(modifier)) { + extensions.push(modifier); + } + } + } + return { + isOptional, + isDeprecated, + extensions, + }; +} + +function parseSortText(expr: ts.Expression): string | undefined { + const text = expr.getText(); + switch (text) { + case "completion.SortText.LocalDeclarationPriority": + return "ls.SortTextLocalDeclarationPriority"; + case "completion.SortText.LocationPriority": + return "ls.SortTextLocationPriority"; + case "completion.SortText.OptionalMember": + return "ls.SortTextOptionalMember"; + case "completion.SortText.MemberDeclaredBySpreadAssignment": + return "ls.SortTextMemberDeclaredBySpreadAssignment"; + case "completion.SortText.SuggestedClassMember": + return "ls.SortTextSuggestedClassMember"; + case "completion.SortText.GlobalsOrKeywords": + return "ls.SortTextGlobalsOrKeywords"; + case "completion.SortText.AutoImportSuggestions": + return "ls.SortTextAutoImportSuggestions"; + case "completion.SortText.ClassMemberSnippets": + return "ls.SortTextClassMemberSnippets"; + case "completion.SortText.JavaScriptIdentifiers": + return "ls.SortTextJavaScriptIdentifiers"; + default: + console.error(`Unrecognized sort text: ${text}`); + return undefined; // !!! support deprecated/obj literal prop/etc + } +} + +interface VerifyCompletionsCmd { + kind: "verifyCompletions"; + marker: string; + isNewIdentifierLocation?: true; + args?: VerifyCompletionsArgs; +} + +interface VerifyCompletionsArgs { + includes?: string; + excludes?: string; + exact?: string; +} + +interface GoToMarkerCmd { + kind: "goToMarker"; + marker: string; +} + +type Cmd = VerifyCompletionsCmd | GoToMarkerCmd; + +function generateVerifyCompletions({ marker, args }: VerifyCompletionsCmd): string { + let expectedList = "nil"; + if (args) { + const expected = []; + if (args.includes) expected.push(`Includes: ${args.includes},`); + if (args.excludes) expected.push(`Excludes: ${args.excludes},`); + if (args.exact) expected.push(`Exact: ${args.exact},`); + // !!! isIncomplete + // !!! itemDefaults/commitCharacters from `isNewIdentifierLocation` + expectedList = `&fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + ${expected.join("\n")} + }, +}`; + } + return `f.VerifyCompletions(t, ${marker}, ${expectedList})`; +} + +function generateGoToMarker({ marker }: GoToMarkerCmd): string { + return `f.GoToMarker(t, ${marker})`; +} + +function generateCmd(cmd: Cmd): string { + switch (cmd.kind) { + case "verifyCompletions": + return generateVerifyCompletions(cmd as VerifyCompletionsCmd); + case "goToMarker": + return generateGoToMarker(cmd as GoToMarkerCmd); + default: + throw new Error(`Unknown command kind: ${cmd}`); + } +} + +interface GoTest { + name: string; + content: string; + commands: Cmd[]; +} + +function generateGoTest(test: GoTest): string { + const testName = test.name[0].toUpperCase() + test.name.substring(1); + const content = test.content; + const commands = test.commands.map(cmd => generateCmd(cmd)).join("\n"); + const imports = [`"github.com/microsoft/typescript-go/internal/fourslash"`]; + // Only include these imports if the commands use them to avoid unused import errors. + if (commands.includes("ls.")) { + imports.push(`"github.com/microsoft/typescript-go/internal/ls"`); + } + if (commands.includes("lsproto.")) { + imports.push(`"github.com/microsoft/typescript-go/internal/lsp/lsproto"`); + } + imports.push(`"github.com/microsoft/typescript-go/internal/testutil"`); + const template = `package fourslash_test + +import ( + "testing" + + ${imports.join("\n\t")} +) + +func Test${testName}(t *testing.T) { + t.Parallel() + ${failingTests.has(testName) ? "t.Skip()" : ""} + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = ${content} + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + ${commands} +}`; + return template; +} + +function generateHelperFile() { + const helper = `package fourslash_test + +func ptrTo[T any](v T) *T { + return &v +} + +var defaultCommitCharacters = []string{".", ",", ";"}`; + fs.writeFileSync(path.join(outputDir, "util_test.go"), helper, "utf-8"); +} + +main(); diff --git a/internal/fourslash/_scripts/failingTests.txt b/internal/fourslash/_scripts/failingTests.txt new file mode 100644 index 0000000000..358c98fff7 --- /dev/null +++ b/internal/fourslash/_scripts/failingTests.txt @@ -0,0 +1,333 @@ +TestAsOperatorCompletion +TestAutoImportsWithRootDirsAndRootedPath01 +TestClosedCommentsInConstructor +TestCompletionAsKeyword +TestCompletionAtDottedNamespace +TestCompletionCloneQuestionToken +TestCompletionEntryAfterASIExpressionInClass +TestCompletionEntryForArgumentConstrainedToString +TestCompletionEntryForShorthandPropertyAssignment +TestCompletionExportFrom +TestCompletionForComputedStringProperties +TestCompletionForStringLiteral +TestCompletionForStringLiteral12 +TestCompletionForStringLiteral13 +TestCompletionForStringLiteral15 +TestCompletionForStringLiteral16 +TestCompletionForStringLiteral2 +TestCompletionForStringLiteral3 +TestCompletionForStringLiteral5 +TestCompletionForStringLiteralExport +TestCompletionForStringLiteralFromSignature +TestCompletionForStringLiteralFromSignature2 +TestCompletionForStringLiteralImport1 +TestCompletionForStringLiteralImport2 +TestCompletionForStringLiteralNonrelativeImport10 +TestCompletionForStringLiteralNonrelativeImport12 +TestCompletionForStringLiteralNonrelativeImport14 +TestCompletionForStringLiteralNonrelativeImport16 +TestCompletionForStringLiteralNonrelativeImport17 +TestCompletionForStringLiteralNonrelativeImport18 +TestCompletionForStringLiteralNonrelativeImport2 +TestCompletionForStringLiteralNonrelativeImport3 +TestCompletionForStringLiteralNonrelativeImport4 +TestCompletionForStringLiteralNonrelativeImport7 +TestCompletionForStringLiteralNonrelativeImport8 +TestCompletionForStringLiteralNonrelativeImport9 +TestCompletionForStringLiteralNonrelativeImportTypings1 +TestCompletionForStringLiteralNonrelativeImportTypings2 +TestCompletionForStringLiteralNonrelativeImportTypings3 +TestCompletionForStringLiteralRelativeImport4 +TestCompletionForStringLiteralRelativeImport6 +TestCompletionForStringLiteralRelativeImportAllowJSTrue +TestCompletionForStringLiteralWithDynamicImport +TestCompletionForStringLiteral_quotePreference +TestCompletionForStringLiteral_quotePreference1 +TestCompletionForStringLiteral_quotePreference2 +TestCompletionForStringLiteral_quotePreference3 +TestCompletionForStringLiteral_quotePreference4 +TestCompletionForStringLiteral_quotePreference5 +TestCompletionForStringLiteral_quotePreference6 +TestCompletionImportMeta +TestCompletionImportMetaWithGlobalDeclaration +TestCompletionImportModuleSpecifierEndingDts +TestCompletionImportModuleSpecifierEndingJs +TestCompletionImportModuleSpecifierEndingJsx +TestCompletionImportModuleSpecifierEndingTs +TestCompletionImportModuleSpecifierEndingTsxPreserve +TestCompletionImportModuleSpecifierEndingTsxReact +TestCompletionImportModuleSpecifierEndingUnsupportedExtension +TestCompletionInFunctionLikeBody_includesPrimitiveTypes +TestCompletionInJSDocFunctionNew +TestCompletionInJSDocFunctionThis +TestCompletionInJsDoc +TestCompletionInfoWithExplicitTypeArguments +TestCompletionInsideObjectLiteralExpressionWithInstantiatedClassType +TestCompletionListAndMemberListOnCommentedDot +TestCompletionListAndMemberListOnCommentedLine +TestCompletionListAndMemberListOnCommentedWhiteSpace +TestCompletionListAtBeginningOfFile01 +TestCompletionListAtEndOfWordInArrowFunction02 +TestCompletionListAtInvalidLocations +TestCompletionListAtThisType +TestCompletionListClassThisJS +TestCompletionListForExportEquals +TestCompletionListForExportEquals2 +TestCompletionListForTransitivelyExportedMembers01 +TestCompletionListForTransitivelyExportedMembers04 +TestCompletionListForUnicodeEscapeName +TestCompletionListInClosedObjectTypeLiteralInSignature04 +TestCompletionListInComments +TestCompletionListInComments2 +TestCompletionListInExportClause02 +TestCompletionListInExportClause03 +TestCompletionListInImportClause01 +TestCompletionListInImportClause02 +TestCompletionListInImportClause03 +TestCompletionListInImportClause05 +TestCompletionListInImportClause06 +TestCompletionListInObjectBindingPattern16 +TestCompletionListInObjectLiteral5 +TestCompletionListInObjectLiteral6 +TestCompletionListInObjectLiteral8 +TestCompletionListInObjectLiteralPropertyAssignment +TestCompletionListInScope +TestCompletionListInStringLiterals1 +TestCompletionListInStringLiterals2 +TestCompletionListInTemplateLiteralPartsNegatives1 +TestCompletionListInTypeLiteralInTypeParameter2 +TestCompletionListInTypeLiteralInTypeParameter3 +TestCompletionListInTypeLiteralInTypeParameter4 +TestCompletionListInTypeLiteralInTypeParameter5 +TestCompletionListInTypeLiteralInTypeParameter6 +TestCompletionListInTypeLiteralInTypeParameter7 +TestCompletionListInTypeLiteralInTypeParameter8 +TestCompletionListInUnclosedCommaExpression02 +TestCompletionListInUnclosedFunction10 +TestCompletionListInUnclosedFunction11 +TestCompletionListInUnclosedObjectTypeLiteralInSignature04 +TestCompletionListInvalidMemberNames_withExistingIdentifier +TestCompletionListOutsideOfClosedArrowFunction01 +TestCompletionListOutsideOfClosedFunctionDeclaration01 +TestCompletionListStaticProtectedMembers +TestCompletionListStringParenthesizedExpression +TestCompletionListStringParenthesizedType +TestCompletionListWithUnresolvedModule +TestCompletionListsStringLiteralTypeAsIndexedAccessTypeObject +TestCompletionNoAutoInsertQuestionDotWithUserPreferencesOff +TestCompletionOfAwaitPromise6 +TestCompletionPreferredSuggestions1 +TestCompletionSatisfiesKeyword +TestCompletionUsingKeyword +TestCompletionWithConditionalOperatorMissingColon +TestCompletionsAfterJSDoc +TestCompletionsAfterKeywordsInBlock +TestCompletionsAsserts +TestCompletionsAtIncompleteObjectLiteralProperty +TestCompletionsBigIntShowNoCompletions +TestCompletionsClassPropertiesAfterPrivateProperty +TestCompletionsCombineOverloads +TestCompletionsCombineOverloads_restParameter +TestCompletionsConditionalMember +TestCompletionsECMAPrivateMemberTriggerCharacter +TestCompletionsGeneratorFunctions +TestCompletionsGenericIndexedAccess1 +TestCompletionsGenericIndexedAccess2 +TestCompletionsGenericIndexedAccess3 +TestCompletionsGenericIndexedAccess4 +TestCompletionsGenericIndexedAccess5 +TestCompletionsGenericIndexedAccess6 +TestCompletionsGenericUnconstrained +TestCompletionsImportDeclarationAttributesEmptyModuleSpecifier1 +TestCompletionsImportDeclarationAttributesErrorModuleSpecifier1 +TestCompletionsImportDefaultExportCrash1 +TestCompletionsImport_notFromUnrelatedNodeModules +TestCompletionsImport_promoteTypeOnly2 +TestCompletionsImport_umdDefaultNoCrash2 +TestCompletionsInExport_invalid +TestCompletionsInRequire +TestCompletionsIndexSignatureConstraint1 +TestCompletionsInterfaceElement +TestCompletionsJSDocImportTagAttributesEmptyModuleSpecifier1 +TestCompletionsJSDocImportTagAttributesErrorModuleSpecifier1 +TestCompletionsJSDocImportTagEmptyModuleSpecifier1 +TestCompletionsJSDocNoCrash1 +TestCompletionsJSDocNoCrash3 +TestCompletionsJsPropertyAssignment +TestCompletionsJsxAttribute2 +TestCompletionsKeyof +TestCompletionsKeywordsExtends +TestCompletionsLiteralMatchingGenericSignature +TestCompletionsNamespaceName +TestCompletionsNewTarget +TestCompletionsNonExistentImport +TestCompletionsObjectLiteralMethod6 +TestCompletionsObjectLiteralModuleExports +TestCompletionsObjectLiteralUnionStringMappingType +TestCompletionsObjectLiteralUnionTemplateLiteralType +TestCompletionsObjectLiteralWithPartialConstraint +TestCompletionsOptionalKindModifier +TestCompletionsOptionalMethod +TestCompletionsOverridingMethod1 +TestCompletionsOverridingMethod14 +TestCompletionsOverridingMethod17 +TestCompletionsOverridingMethod3 +TestCompletionsOverridingMethod4 +TestCompletionsOverridingMethod9 +TestCompletionsOverridingMethodCrash1 +TestCompletionsOverridingProperties1 +TestCompletionsPathsJsonModule +TestCompletionsPathsJsonModuleWithAmd +TestCompletionsPathsJsonModuleWithoutResolveJsonModule +TestCompletionsPathsRelativeJsonModule +TestCompletionsPaths_importType +TestCompletionsPaths_kinds +TestCompletionsPaths_pathMapping +TestCompletionsPaths_pathMapping_nonTrailingWildcard1 +TestCompletionsPaths_pathMapping_notInNestedDirectory +TestCompletionsPaths_pathMapping_parentDirectory +TestCompletionsPrivateProperties_Js +TestCompletionsPropertiesPriorities +TestCompletionsPropertiesWithPromiseUnionType +TestCompletionsQuotedObjectLiteralUnion +TestCompletionsRecommended_union +TestCompletionsRedeclareModuleAsGlobal +TestCompletionsSelfDeclaring1 +TestCompletionsSelfDeclaring3 +TestCompletionsStringLiteral_fromTypeConstraint +TestCompletionsStringsWithTriggerCharacter +TestCompletionsSymbolMembers +TestCompletionsTriggerCharacter +TestCompletionsUniqueSymbol1 +TestCompletionsWithDeprecatedTag3 +TestCompletionsWithGenericStringLiteral +TestCompletionsWithOptionalPropertiesGeneric +TestCompletionsWithOptionalPropertiesGenericConstructor +TestCompletionsWithOptionalPropertiesGenericDeep +TestCompletionsWithOptionalPropertiesGenericPartial +TestCompletionsWithOptionalPropertiesGenericPartial2 +TestCompletionsWithOptionalPropertiesGenericPartial3 +TestCompletionsWithOptionalPropertiesGenericValidBoolean +TestCompletionsWithOverride1 +TestCompletionsWithOverride2 +TestCompletionsWithStringReplacementMode1 +TestExtendsKeywordCompletion1 +TestExtendsKeywordCompletion2 +TestGetJavaScriptCompletions1 +TestGetJavaScriptCompletions10 +TestGetJavaScriptCompletions11 +TestGetJavaScriptCompletions14 +TestGetJavaScriptCompletions2 +TestGetJavaScriptCompletions21 +TestGetJavaScriptCompletions3 +TestGetJavaScriptCompletions4 +TestGetJavaScriptCompletions5 +TestGetJavaScriptCompletions8 +TestGetJavaScriptCompletions9 +TestGetJavaScriptCompletions_tsCheck +TestImportCompletionsPackageJsonExportsSpecifierEndsInTs +TestImportCompletionsPackageJsonExportsTrailingSlash1 +TestImportCompletionsPackageJsonImportsConditions1 +TestImportCompletionsPackageJsonImportsLength1 +TestImportCompletionsPackageJsonImportsLength2 +TestImportCompletionsPackageJsonImportsPattern +TestImportCompletionsPackageJsonImportsPattern2 +TestImportCompletionsPackageJsonImportsPattern_capsInPath1 +TestImportCompletionsPackageJsonImportsPattern_capsInPath2 +TestImportCompletionsPackageJsonImportsPattern_js_ts +TestImportCompletionsPackageJsonImportsPattern_ts +TestImportCompletionsPackageJsonImportsPattern_ts_ts +TestImportCompletionsPackageJsonImports_ts +TestImportCompletions_importsMap1 +TestImportCompletions_importsMap2 +TestImportCompletions_importsMap3 +TestImportCompletions_importsMap4 +TestImportCompletions_importsMap5 +TestImportStatementCompletions4 +TestImportStatementCompletions_noPatternAmbient +TestImportStatementCompletions_pnpmTransitive +TestImportTypeMemberCompletions +TestJavaScriptModules12 +TestJavaScriptModules14 +TestJavaScriptModules18 +TestJavaScriptModulesWithBackticks +TestJavascriptModules25 +TestJavascriptModulesTypeImport +TestJavascriptModulesTypeImportAsValue +TestJsDocGenerics1 +TestJsdocImportTagCompletion1 +TestJsdocNullableUnion +TestJsdocOverloadTagCompletion +TestJsdocParamTagSpecialKeywords +TestJsdocParameterNameCompletion +TestJsdocPropTagCompletion +TestJsdocSatisfiesTagCompletion2 +TestJsdocTemplatePrototypeCompletions +TestJsdocTypedefTag1 +TestJsdocTypedefTag2 +TestJsxAriaLikeCompletions +TestMemberListErrorRecovery +TestMemberListInWithBlock +TestNoCompletionListOnCommentsInsideObjectLiterals +TestNodeModulesImportCompletions1 +TestPathCompletionsAllowModuleAugmentationExtensions +TestPathCompletionsPackageJsonExportsBundlerNoNodeCondition +TestPathCompletionsPackageJsonExportsCustomConditions +TestPathCompletionsPackageJsonExportsWildcard1 +TestPathCompletionsPackageJsonExportsWildcard10 +TestPathCompletionsPackageJsonExportsWildcard11 +TestPathCompletionsPackageJsonExportsWildcard12 +TestPathCompletionsPackageJsonExportsWildcard5 +TestPathCompletionsPackageJsonExportsWildcard6 +TestPathCompletionsPackageJsonExportsWildcard7 +TestPathCompletionsPackageJsonExportsWildcard8 +TestPathCompletionsPackageJsonExportsWildcard9 +TestPathCompletionsPackageJsonImportsBundlerNoNodeCondition +TestPathCompletionsPackageJsonImportsCustomConditions +TestPathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1 +TestPathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2 +TestPathCompletionsPackageJsonImportsOnlyFromClosestScope1 +TestPathCompletionsPackageJsonImportsSrcNoDistWildcard1 +TestPathCompletionsPackageJsonImportsSrcNoDistWildcard5 +TestPathCompletionsPackageJsonImportsSrcNoDistWildcard6 +TestPathCompletionsPackageJsonImportsSrcNoDistWildcard7 +TestPathCompletionsPackageJsonImportsSrcNoDistWildcard8 +TestPathCompletionsPackageJsonImportsSrcNoDistWildcard9 +TestPathCompletionsPackageJsonImportsWildcard1 +TestPathCompletionsPackageJsonImportsWildcard10 +TestPathCompletionsPackageJsonImportsWildcard11 +TestPathCompletionsPackageJsonImportsWildcard12 +TestPathCompletionsPackageJsonImportsWildcard5 +TestPathCompletionsPackageJsonImportsWildcard6 +TestPathCompletionsPackageJsonImportsWildcard7 +TestPathCompletionsPackageJsonImportsWildcard8 +TestPathCompletionsPackageJsonImportsWildcard9 +TestPathCompletionsTypesVersionsLocal +TestPathCompletionsTypesVersionsWildcard2 +TestSatisfiesOperatorCompletion +TestSpecialIntersectionsOrderIndependent +TestStringCompletionsFromGenericConditionalTypesUsingTemplateLiteralTypes +TestStringCompletionsImportOrExportSpecifier +TestStringCompletionsVsEscaping +TestStringLiteralCompletionsForGenericConditionalTypesUsingTemplateLiteralTypes +TestStringLiteralCompletionsForOpenEndedTemplateLiteralType +TestStringLiteralCompletionsForStringEnumContextualType +TestStringLiteralCompletionsInArgUsingInferenceResultFromPreviousArg +TestStringLiteralCompletionsInJsxAttributeInitializer +TestStringLiteralCompletionsInPositionTypedUsingRest +TestStringLiteralTypeCompletionsInTypeArgForNonGeneric1 +TestTripleSlashRefPathCompletionAbsolutePaths +TestTripleSlashRefPathCompletionContext +TestTripleSlashRefPathCompletionExtensionsAllowJSFalse +TestTripleSlashRefPathCompletionExtensionsAllowJSTrue +TestTripleSlashRefPathCompletionHiddenFile +TestTripleSlashRefPathCompletionRootdirs +TestTsxCompletion12 +TestTsxCompletion13 +TestTsxCompletion14 +TestTsxCompletion15 +TestTsxCompletion8 +TestTsxCompletionNonTagLessThan +TestTypeKeywordInFunction +TestTypeOfKeywordCompletion +TestUnclosedCommentsInConstructor diff --git a/internal/fourslash/_scripts/tsconfig.json b/internal/fourslash/_scripts/tsconfig.json new file mode 100644 index 0000000000..3337b2f1d7 --- /dev/null +++ b/internal/fourslash/_scripts/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "strict": true, + "noEmit": true, + "module": "nodenext" + } +} diff --git a/internal/fourslash/fourslash.go b/internal/fourslash/fourslash.go new file mode 100644 index 0000000000..79061b65d0 --- /dev/null +++ b/internal/fourslash/fourslash.go @@ -0,0 +1,515 @@ +package fourslash + +import ( + "fmt" + "io" + "strings" + "testing" + "unicode" + "unicode/utf8" + + "github.com/google/go-cmp/cmp" + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/bundled" + "github.com/microsoft/typescript-go/internal/collections" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/project" + "github.com/microsoft/typescript-go/internal/testutil/harnessutil" + "github.com/microsoft/typescript-go/internal/tspath" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" + "gotest.tools/v3/assert" +) + +type FourslashTest struct { + server *lsp.Server + in *lspWriter + out *lspReader + id int32 + + testData *TestData + + currentCaretPosition lsproto.Position + currentFilename string + lastKnownMarkerName string + activeFilename string +} + +type lspReader struct { + c <-chan *lsproto.Message +} + +func (r *lspReader) Read() (*lsproto.Message, error) { + msg, ok := <-r.c + if !ok { + return nil, io.EOF + } + return msg, nil +} + +type lspWriter struct { + c chan<- *lsproto.Message +} + +func (w *lspWriter) Write(msg *lsproto.Message) error { + w.c <- msg + return nil +} + +func (r *lspWriter) Close() { + close(r.c) +} + +var ( + _ lsp.Reader = (*lspReader)(nil) + _ lsp.Writer = (*lspWriter)(nil) +) + +func newLSPPipe() (*lspReader, *lspWriter) { + c := make(chan *lsproto.Message, 100) + return &lspReader{c: c}, &lspWriter{c: c} +} + +var sourceFileCache collections.SyncMap[harnessutil.SourceFileCacheKey, *ast.SourceFile] + +type parsedFileCache struct{} + +func (c *parsedFileCache) GetFile( + fileName string, + path tspath.Path, + text string, + scriptTarget core.ScriptTarget, + options core.SourceFileAffectingCompilerOptions, +) *ast.SourceFile { + key := harnessutil.GetSourceFileCacheKey( + options, + fileName, + path, + scriptTarget, + text, + ) + + cachedFile, ok := sourceFileCache.Load(key) + if !ok { + return nil + } + return cachedFile +} + +func (c *parsedFileCache) CacheFile( + fileName string, + path tspath.Path, + text string, + scriptTarget core.ScriptTarget, + options core.SourceFileAffectingCompilerOptions, + sourceFile *ast.SourceFile, +) { + key := harnessutil.GetSourceFileCacheKey( + options, + fileName, + path, + scriptTarget, + text, + ) + sourceFileCache.Store(key, sourceFile) +} + +var _ project.ParsedFileCache = (*parsedFileCache)(nil) + +func NewFourslash(t *testing.T, capabilities *lsproto.ClientCapabilities, content string) *FourslashTest { + if !bundled.Embedded { + // Without embedding, we'd need to read all of the lib files out from disk into the MapFS. + // Just skip this for now. + t.Skip("bundled files are not embedded") + } + rootDir := "/" + fileName := getFileNameFromTest(t) + testfs := make(map[string]string) + testData := ParseTestData(t, content, fileName) + for _, file := range testData.Files { + filePath := tspath.GetNormalizedAbsolutePath(file.Filename, rootDir) + testfs[filePath] = file.Content + } + + compilerOptions := &core.CompilerOptions{} + harnessutil.SetCompilerOptionsFromTestConfig(t, testData.GlobalOptions, compilerOptions) + compilerOptions.SkipDefaultLibCheck = core.TSTrue + + inputReader, inputWriter := newLSPPipe() + outputReader, outputWriter := newLSPPipe() + fs := vfstest.FromMap(testfs, true /*useCaseSensitiveFileNames*/) + + var err strings.Builder + server := lsp.NewServer(&lsp.ServerOptions{ + In: inputReader, + Out: outputWriter, + Err: &err, + + Cwd: "/", + NewLine: core.NewLineKindLF, + FS: bundled.WrapFS(fs), + DefaultLibraryPath: bundled.LibPath(), + + ParsedFileCache: &parsedFileCache{}, + }) + + go func() { + defer func() { + outputWriter.Close() + }() + err := server.Run() + if err != nil { + t.Error("server error:", err) + } + }() + + f := &FourslashTest{ + server: server, + in: inputWriter, + out: outputReader, + testData: &testData, + } + + // !!! temporary; remove when we have `handleDidChangeConfiguration`/implicit project config support + // !!! replace with a proper request *after initialize* + f.server.SetCompilerOptionsForInferredProjects(compilerOptions) + f.initialize(t, capabilities) + f.openFile(t, f.testData.Files[0]) + + t.Cleanup(func() { + inputWriter.Close() + }) + return f +} + +func getFileNameFromTest(t *testing.T) string { + name := strings.TrimPrefix(t.Name(), "Test") + char, size := utf8.DecodeRuneInString(name) + return string(unicode.ToLower(char)) + name[size:] + tspath.ExtensionTs +} + +func (f *FourslashTest) nextID() int32 { + id := f.id + f.id++ + return id +} + +func (f *FourslashTest) initialize(t *testing.T, capabilities *lsproto.ClientCapabilities) { + params := &lsproto.InitializeParams{} + params.Capabilities = getCapabilitiesWithDefaults(capabilities) + // !!! check for errors? + f.sendRequest(t, lsproto.MethodInitialize, params) + f.sendNotification(t, lsproto.MethodInitialized, &lsproto.InitializedParams{}) +} + +var ( + ptrTrue = ptrTo(true) + defaultCompletionCapabilities = &lsproto.CompletionClientCapabilities{ + CompletionItem: &lsproto.ClientCompletionItemOptions{ + SnippetSupport: ptrTrue, + CommitCharactersSupport: ptrTrue, + PreselectSupport: ptrTrue, + LabelDetailsSupport: ptrTrue, + InsertReplaceSupport: ptrTrue, + }, + CompletionList: &lsproto.CompletionListCapabilities{ + ItemDefaults: &[]string{"commitCharacters"}, + }, + } +) + +func getCapabilitiesWithDefaults(capabilities *lsproto.ClientCapabilities) *lsproto.ClientCapabilities { + var capabilitiesWithDefaults lsproto.ClientCapabilities + if capabilities != nil { + capabilitiesWithDefaults = *capabilities + } + capabilitiesWithDefaults.General = &lsproto.GeneralClientCapabilities{ + PositionEncodings: &[]lsproto.PositionEncodingKind{lsproto.PositionEncodingKindUTF8}, + } + if capabilitiesWithDefaults.TextDocument == nil { + capabilitiesWithDefaults.TextDocument = &lsproto.TextDocumentClientCapabilities{} + } + if capabilitiesWithDefaults.TextDocument.Completion == nil { + capabilitiesWithDefaults.TextDocument.Completion = defaultCompletionCapabilities + } + return &capabilitiesWithDefaults +} + +func (f *FourslashTest) sendRequest(t *testing.T, method lsproto.Method, params any) *lsproto.Message { + id := f.nextID() + req := lsproto.NewRequestMessage( + method, + lsproto.NewID(lsproto.IntegerOrString{Integer: &id}), + params, + ) + f.writeMsg(t, req.Message()) + return f.readMsg(t) +} + +func (f *FourslashTest) sendNotification(t *testing.T, method lsproto.Method, params any) { + notification := lsproto.NewNotificationMessage( + method, + params, + ) + f.writeMsg(t, notification.Message()) +} + +func (f *FourslashTest) writeMsg(t *testing.T, msg *lsproto.Message) { + if err := f.in.Write(msg); err != nil { + t.Fatalf("failed to write message: %v", err) + } +} + +func (f *FourslashTest) readMsg(t *testing.T) *lsproto.Message { + // !!! filter out response by id etc + msg, err := f.out.Read() + if err != nil { + t.Fatalf("failed to read message: %v", err) + } + return msg +} + +func (f *FourslashTest) GoToMarker(t *testing.T, markerName string) { + marker, ok := f.testData.MarkerPositions[markerName] + if !ok { + t.Fatalf("Marker %s not found", markerName) + } + f.ensureActiveFile(t, marker.Filename) + f.currentCaretPosition = marker.LSPosition + f.currentFilename = marker.Filename + f.lastKnownMarkerName = marker.Name +} + +func (f *FourslashTest) Markers() []*Marker { + return f.testData.Markers +} + +func (f *FourslashTest) ensureActiveFile(t *testing.T, filename string) { + if f.activeFilename != filename { + file := core.Find(f.testData.Files, func(f *TestFileInfo) bool { + return f.Filename == filename + }) + if file == nil { + t.Fatalf("File %s not found in test data", filename) + } + f.openFile(t, file) + } +} + +func (f *FourslashTest) openFile(t *testing.T, file *TestFileInfo) { + f.activeFilename = file.Filename + f.sendNotification(t, lsproto.MethodTextDocumentDidOpen, &lsproto.DidOpenTextDocumentParams{ + TextDocument: &lsproto.TextDocumentItem{ + Uri: ls.FileNameToDocumentURI(file.Filename), + LanguageId: getLanguageKind(file.Filename), + Text: file.Content, + }, + }) +} + +func getLanguageKind(filename string) lsproto.LanguageKind { + if tspath.FileExtensionIsOneOf( + filename, + []string{ + tspath.ExtensionTs, tspath.ExtensionMts, tspath.ExtensionCts, + tspath.ExtensionDmts, tspath.ExtensionDcts, tspath.ExtensionDts, + }) { + return lsproto.LanguageKindTypeScript + } + if tspath.FileExtensionIsOneOf(filename, []string{tspath.ExtensionJs, tspath.ExtensionMjs, tspath.ExtensionCjs}) { + return lsproto.LanguageKindJavaScript + } + if tspath.FileExtensionIs(filename, tspath.ExtensionJsx) { + return lsproto.LanguageKindJavaScriptReact + } + if tspath.FileExtensionIs(filename, tspath.ExtensionTsx) { + return lsproto.LanguageKindTypeScriptReact + } + if tspath.FileExtensionIs(filename, tspath.ExtensionJson) { + return lsproto.LanguageKindJSON + } + return lsproto.LanguageKindTypeScript // !!! should we error in this case? +} + +// !!! break up this file into smaller files? +// !!! add constant items like `classElementKeywords` +type VerifyCompletionsExpectedList struct { + IsIncomplete bool + ItemDefaults *lsproto.CompletionItemDefaults + Items *VerifyCompletionsExpectedItems +} + +// *lsproto.CompletionItem | string +type ExpectedCompletionItem = any + +// !!! unsorted completions? only used in 47 tests +type VerifyCompletionsExpectedItems struct { + Includes []ExpectedCompletionItem + Excludes []string + Exact []ExpectedCompletionItem +} + +// string | *Marker | []string | []*Marker +type MarkerInput = any + +// !!! user preferences param +// !!! completion context param +// !!! go to marker: use current marker if none specified/support nil marker input +func (f *FourslashTest) VerifyCompletions(t *testing.T, markerInput MarkerInput, expected *VerifyCompletionsExpectedList) { + switch marker := markerInput.(type) { + case string: + f.verifyCompletionsAtMarker(t, marker, expected) + case *Marker: + f.verifyCompletionsAtMarker(t, marker.Name, expected) + case []string: + for _, markerName := range marker { + f.verifyCompletionsAtMarker(t, markerName, expected) + } + case []*Marker: + for _, marker := range marker { + f.verifyCompletionsAtMarker(t, marker.Name, expected) + } + default: + t.Fatalf("Invalid marker input type: %T. Expected string, *Marker, []string, or []*Marker.", markerInput) + } +} + +func (f *FourslashTest) verifyCompletionsAtMarker(t *testing.T, markerName string, expected *VerifyCompletionsExpectedList) { + f.GoToMarker(t, markerName) + f.verifyCompletionsWorker(t, expected) +} + +func (f *FourslashTest) verifyCompletionsWorker(t *testing.T, expected *VerifyCompletionsExpectedList) { + params := &lsproto.CompletionParams{ + TextDocumentPositionParams: lsproto.TextDocumentPositionParams{ + TextDocument: lsproto.TextDocumentIdentifier{ + Uri: ls.FileNameToDocumentURI(f.currentFilename), + }, + Position: f.currentCaretPosition, + }, + Context: &lsproto.CompletionContext{}, + } + resMsg := f.sendRequest(t, lsproto.MethodTextDocumentCompletion, params) + if resMsg == nil { + t.Fatalf("Nil response received for completion request at marker %s", f.lastKnownMarkerName) + } + result := resMsg.AsResponse().Result + switch result := result.(type) { + case *lsproto.CompletionList: + verifyCompletionsResult(t, f.lastKnownMarkerName, result, expected) + default: + t.Fatalf("Unexpected response type for completion request at marker %s: %v", f.lastKnownMarkerName, result) + } +} + +func verifyCompletionsResult(t *testing.T, markerName string, actual *lsproto.CompletionList, expected *VerifyCompletionsExpectedList) { + prefix := fmt.Sprintf("At marker '%s': ", markerName) + if actual == nil { + if expected != nil { + t.Fatal(prefix + "Expected completion list but got nil.") + } + return + } else if expected == nil { + // !!! cmp.Diff(actual, nil) should probably be a .String() call here and elswhere + t.Fatalf(prefix+"Expected nil completion list but got non-nil: %s", cmp.Diff(actual, nil)) + } + assert.Equal(t, actual.IsIncomplete, expected.IsIncomplete, prefix+"IsIncomplete mismatch") + assertDeepEqual(t, actual.ItemDefaults, expected.ItemDefaults, prefix+"ItemDefaults mismatch") + verifyCompletionsItems(t, prefix, actual.Items, expected.Items) +} + +func verifyCompletionsItems(t *testing.T, prefix string, actual []*lsproto.CompletionItem, expected *VerifyCompletionsExpectedItems) { + if expected == nil { + if actual != nil { + t.Fatalf(prefix+"Expected nil completion items but got non-nil: %s", cmp.Diff(actual, nil)) + } + return + } + if expected.Exact != nil { + if expected.Includes != nil { + t.Fatal(prefix + "Expected exact completion list but also specified 'includes'.") + } + if expected.Excludes != nil { + t.Fatal(prefix + "Expected exact completion list but also specified 'excludes'.") + } + if len(actual) != len(expected.Exact) { + t.Fatalf(prefix+"Expected %d exact completion items but got %d: %s", len(expected.Exact), len(actual), cmp.Diff(actual, expected.Exact)) + } + verifyCompletionsAreExactly(t, prefix, actual, expected.Exact) + return + } + nameToActualItem := make(map[string]*lsproto.CompletionItem) + if actual != nil { + for _, item := range actual { + nameToActualItem[item.Label] = item + } + } + if expected.Includes != nil { + for _, item := range expected.Includes { + switch item := item.(type) { + case string: + _, ok := nameToActualItem[item] + if !ok { + t.Fatalf("%sLabel '%s' not found in actual items. Actual items: %s", prefix, item, cmp.Diff(actual, nil)) + } + case *lsproto.CompletionItem: + actualItem, ok := nameToActualItem[item.Label] + if !ok { + t.Fatalf("%sLabel '%s' not found in actual items. Actual items: %s", prefix, item.Label, cmp.Diff(actual, nil)) + } + assertDeepEqual(t, actualItem, item, prefix+"Includes completion item mismatch for label "+item.Label) + default: + t.Fatalf("%sExpected completion item to be a string or *lsproto.CompletionItem, got %T", prefix, item) + } + } + } + for _, exclude := range expected.Excludes { + if _, ok := nameToActualItem[exclude]; ok { + t.Fatalf("%sLabel '%s' should not be in actual items but was found. Actual items: %s", prefix, exclude, cmp.Diff(actual, nil)) + } + } +} + +func verifyCompletionsAreExactly(t *testing.T, prefix string, actual []*lsproto.CompletionItem, expected []ExpectedCompletionItem) { + // Verify labels first + assertDeepEqual(t, core.Map(actual, func(item *lsproto.CompletionItem) string { + return item.Label + }), core.Map(expected, func(item ExpectedCompletionItem) string { + return getExpectedLabel(t, item) + }), prefix+"Labels mismatch") + for i, actualItem := range actual { + switch expectedItem := expected[i].(type) { + case string: + continue // already checked labels + case *lsproto.CompletionItem: + assertDeepEqual(t, actualItem, expectedItem, prefix+"Completion item mismatch for label "+actualItem.Label) + } + } +} + +func getExpectedLabel(t *testing.T, item ExpectedCompletionItem) string { + switch item := item.(type) { + case string: + return item + case *lsproto.CompletionItem: + return item.Label + default: + t.Fatalf("Expected completion item to be a string or *lsproto.CompletionItem, got %T", item) + return "" + } +} + +func assertDeepEqual(t *testing.T, actual any, expected any, prefix string) { + t.Helper() + + diff := cmp.Diff(actual, expected) + if diff != "" { + t.Fatalf("%s:\n%s", prefix, diff) + } +} + +func ptrTo[T any](v T) *T { + return &v +} diff --git a/internal/fourslash/test_parser.go b/internal/fourslash/test_parser.go new file mode 100644 index 0000000000..d7f593f193 --- /dev/null +++ b/internal/fourslash/test_parser.go @@ -0,0 +1,256 @@ +package fourslash + +import ( + "strings" + "testing" + "unicode/utf8" + + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/stringutil" + "github.com/microsoft/typescript-go/internal/testrunner" + "github.com/microsoft/typescript-go/internal/tspath" +) + +// Inserted in source files by surrounding desired text +// in a range with `[|` and `|]`. For example, +// +// [|text in range|] +// +// is a range with `text in range` "selected". +type markerRange struct { + core.TextRange + filename string + position int + data string +} + +type Marker struct { + Filename string + Position int + LSPosition lsproto.Position + Name string +} + +type TestData struct { + Files []*TestFileInfo + MarkerPositions map[string]*Marker + Markers []*Marker + Symlinks map[string]string + GlobalOptions map[string]string + Ranges []*markerRange +} + +type testFileWithMarkers struct { + file *TestFileInfo + markers []*Marker +} + +func ParseTestData(t *testing.T, contents string, fileName string) TestData { + // List of all the subfiles we've parsed out + var files []*TestFileInfo + + markerPositions := make(map[string]*Marker) + var markers []*Marker + filesWithMarker, symlinks, _, globalOptions := testrunner.ParseTestFilesAndSymlinks( + contents, + fileName, + parseFileContent, + ) + + hasTSConfig := false + for _, file := range filesWithMarker { + files = append(files, file.file) + hasTSConfig = hasTSConfig || isConfigFile(file.file.Filename) + markers = append(markers, file.markers...) + for _, marker := range file.markers { + if _, ok := markerPositions[marker.Name]; ok { + t.Fatalf("Duplicate marker name: %s", marker.Name) + } + markerPositions[marker.Name] = marker + } + } + + if hasTSConfig && len(globalOptions) > 0 { + t.Fatalf("It is not allowed to use global options along with config files.") + } + + return TestData{ + Files: files, + MarkerPositions: markerPositions, + Markers: markers, + Symlinks: symlinks, + GlobalOptions: globalOptions, + Ranges: nil, + } +} + +func isConfigFile(filename string) bool { + filename = strings.ToLower(filename) + return strings.HasSuffix(filename, "tsconfig.json") || strings.HasSuffix(filename, "jsconfig.json") +} + +type locationInformation struct { + position int + sourcePosition int + sourceLine int + sourceColumn int +} + +type TestFileInfo struct { + Filename string + // The contents of the file (with markers, etc stripped out) + Content string + emit bool +} + +// FileName implements ls.Script. +func (t *TestFileInfo) FileName() string { + return t.Filename +} + +// Text implements ls.Script. +func (t *TestFileInfo) Text() string { + return t.Content +} + +var _ ls.Script = (*TestFileInfo)(nil) + +const emitThisFileOption = "emitthisfile" + +type parserState int + +const ( + stateNone parserState = iota + stateInSlashStarMarker + stateInObjectMarker +) + +func parseFileContent(filename string, content string, fileOptions map[string]string) *testFileWithMarkers { + filename = tspath.GetNormalizedAbsolutePath(filename, "/") + + // The file content (minus metacharacters) so far + var output strings.Builder + + var markers []*Marker + + // The total number of metacharacters removed from the file (so far) + difference := 0 + + // One-based current position data + line := 1 + column := 1 + + // The current marker (or maybe multi-line comment?) we're parsing, possibly + var openMarker locationInformation + + // The latest position of the start of an unflushed plain text area + lastNormalCharPosition := 0 + + flush := func(lastSafeCharIndex int) { + if lastSafeCharIndex != -1 { + output.WriteString(content[lastNormalCharPosition:lastSafeCharIndex]) + } else { + output.WriteString(content[lastNormalCharPosition:]) + } + } + + state := stateNone + previousCharacter, i := utf8.DecodeRuneInString(content) + var size int + var currentCharacter rune + for ; i < len(content); i = i + size { + currentCharacter, size = utf8.DecodeRuneInString(content[i:]) + switch state { + case stateNone: + // !!! case '[', '|' + // !!! case '|', ']' + if previousCharacter == '/' && currentCharacter == '*' { + // found a possible marker start + state = stateInSlashStarMarker + openMarker = locationInformation{ + position: (i - 1) - difference, + sourcePosition: i - 1, + sourceLine: line, + sourceColumn: column - 1, + } + } + // !!! case '{', '|' + case stateInObjectMarker: + // !!! object marker + case stateInSlashStarMarker: + if previousCharacter == '*' && currentCharacter == '/' { + // Record the marker + // start + 2 to ignore the */, -1 on the end to ignore the * (/ is next) + markerNameText := strings.TrimSpace(content[openMarker.sourcePosition+2 : i-1]) + marker := &Marker{ + Filename: filename, + Position: openMarker.position, + Name: markerNameText, + } + markers = append(markers, marker) + + // Set the current start to point to the end of the current marker to ignore its text + flush(openMarker.sourcePosition) + lastNormalCharPosition = i + 1 + difference += i + 1 - openMarker.sourcePosition + + // Reset the state + openMarker = locationInformation{} + state = stateNone + } else if !(stringutil.IsDigit(currentCharacter) || + stringutil.IsASCIILetter(currentCharacter) || + currentCharacter == '$' || + currentCharacter == '_') { // Invalid marker character + if currentCharacter == '*' && i < len(content)-1 && content[i+1] == '/' { + // The marker is about to be closed, ignore the 'invalid' char + } else { + // We've hit a non-valid marker character, so we were actually in a block comment + // Bail out the text we've gathered so far back into the output + flush(i) + lastNormalCharPosition = i + openMarker = locationInformation{} + state = stateNone + } + } + } + if currentCharacter == '\n' && previousCharacter == '\r' { + // Ignore trailing \n after \r + continue + } else if currentCharacter == '\n' || currentCharacter == '\r' { + line++ + column = 1 + continue + } + column++ + previousCharacter = currentCharacter + } + + // Add the remaining text + flush(-1) + + outputString := output.String() + // Set LS positions for markers + lineMap := ls.ComputeLineStarts(outputString) + converters := ls.NewConverters(lsproto.PositionEncodingKindUTF8, func(_ string) *ls.LineMap { + return lineMap + }) + + emit := fileOptions[emitThisFileOption] == "true" + + testFileInfo := &TestFileInfo{ + Filename: filename, + Content: outputString, + emit: emit, + } + + for _, marker := range markers { + marker.LSPosition = converters.PositionToLineAndCharacter(testFileInfo, core.TextPos(marker.Position)) + } + + return &testFileWithMarkers{ + file: testFileInfo, + markers: markers, + } +} diff --git a/internal/fourslash/tests/basicInterfaceMembers_test.go b/internal/fourslash/tests/basicInterfaceMembers_test.go new file mode 100644 index 0000000000..86c7fbccf1 --- /dev/null +++ b/internal/fourslash/tests/basicInterfaceMembers_test.go @@ -0,0 +1,53 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestBasicInterfaceMembers(t *testing.T) { + t.Parallel() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `export {}; +interface Point { + x: number; + y: number; +} +declare const p: Point; +p./*a*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "a", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{ + &lsproto.CompletionItem{ + Label: "x", + Kind: ptrTo(lsproto.CompletionItemKindField), + SortText: ptrTo(string(ls.SortTextLocationPriority)), + FilterText: ptrTo(".x"), + TextEdit: &lsproto.TextEditOrInsertReplaceEdit{ + InsertReplaceEdit: &lsproto.InsertReplaceEdit{ + NewText: "x", + Insert: lsproto.Range{ + Start: lsproto.Position{Line: 6, Character: 2}, + End: lsproto.Position{Line: 6, Character: 2}, + }, + Replace: lsproto.Range{ + Start: lsproto.Position{Line: 6, Character: 2}, + End: lsproto.Position{Line: 6, Character: 2}, + }, + }, + }, + }, + "y", + }, + }, + }) +} diff --git a/internal/fourslash/tests/basicMultifileCompletions_test.go b/internal/fourslash/tests/basicMultifileCompletions_test.go new file mode 100644 index 0000000000..84d77649fc --- /dev/null +++ b/internal/fourslash/tests/basicMultifileCompletions_test.go @@ -0,0 +1,51 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestBasicMultifileCompletions(t *testing.T) { + t.Parallel() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /a.ts +export const foo = { bar: 'baz' }; + +// @Filename: /b.ts +import { foo } from './a'; +const test = foo./*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{ + &lsproto.CompletionItem{ + Label: "bar", + Kind: ptrTo(lsproto.CompletionItemKindField), + SortText: ptrTo(string(ls.SortTextLocationPriority)), + FilterText: ptrTo(".bar"), + TextEdit: &lsproto.TextEditOrInsertReplaceEdit{ + InsertReplaceEdit: &lsproto.InsertReplaceEdit{ + NewText: "bar", + Insert: lsproto.Range{ + Start: lsproto.Position{Line: 1, Character: 17}, + End: lsproto.Position{Line: 1, Character: 17}, + }, + Replace: lsproto.Range{ + Start: lsproto.Position{Line: 1, Character: 17}, + End: lsproto.Position{Line: 1, Character: 17}, + }, + }, + }, + }, + }, + }, + }) +} diff --git a/internal/fourslash/tests/gen/asOperatorCompletion_test.go b/internal/fourslash/tests/gen/asOperatorCompletion_test.go new file mode 100644 index 0000000000..4fd2c7decb --- /dev/null +++ b/internal/fourslash/tests/gen/asOperatorCompletion_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestAsOperatorCompletion(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type T = number; +var x; +var y = x as /**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"T"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/autoImportsWithRootDirsAndRootedPath01_test.go b/internal/fourslash/tests/gen/autoImportsWithRootDirsAndRootedPath01_test.go new file mode 100644 index 0000000000..daa681273f --- /dev/null +++ b/internal/fourslash/tests/gen/autoImportsWithRootDirsAndRootedPath01_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestAutoImportsWithRootDirsAndRootedPath01(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /dir/foo.ts + export function foo() {} +// @Filename: /dir/bar.ts + /*$*/ +// @Filename: /dir/tsconfig.json +{ + "compilerOptions": { + "module": "amd", + "moduleResolution": "classic", + "rootDirs": ["D:/"] + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "$") + f.VerifyCompletions(t, nil, nil) +} diff --git a/internal/fourslash/tests/gen/closedCommentsInConstructor_test.go b/internal/fourslash/tests/gen/closedCommentsInConstructor_test.go new file mode 100644 index 0000000000..8d84c42ae8 --- /dev/null +++ b/internal/fourslash/tests/gen/closedCommentsInConstructor_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestClosedCommentsInConstructor(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + constructor(/* /**/ */) { } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionAsKeyword_test.go b/internal/fourslash/tests/gen/completionAsKeyword_test.go new file mode 100644 index 0000000000..c701b70a05 --- /dev/null +++ b/internal/fourslash/tests/gen/completionAsKeyword_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionAsKeyword(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const x = this /*1*/ +function foo() { + const x = this /*2*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "as"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionAtDottedNamespace_test.go b/internal/fourslash/tests/gen/completionAtDottedNamespace_test.go new file mode 100644 index 0000000000..7954c4cd76 --- /dev/null +++ b/internal/fourslash/tests/gen/completionAtDottedNamespace_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionAtDottedNamespace(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `namespace wwer./**/w` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionCloneQuestionToken_test.go b/internal/fourslash/tests/gen/completionCloneQuestionToken_test.go new file mode 100644 index 0000000000..aa696aa7b8 --- /dev/null +++ b/internal/fourslash/tests/gen/completionCloneQuestionToken_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionCloneQuestionToken(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /file2.ts +type TCallback = (options: T) => any; +type InKeyOf = { [K in keyof E]?: TCallback; }; +export class Bar { + baz(a: InKeyOf): void { } +} +// @Filename: /file1.ts +import { Bar } from './file2'; +type TwoKeys = Record<'a' | 'b', { thisFails?: any; }> +class Foo extends Bar { + /**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "baz", InsertText: ptrTo("baz(a: { a?: (options: { thisFails?: any; }) => any; b?: (options: { thisFails?: any; }) => any; }): void {\n}"), FilterText: ptrTo("baz")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionEntryAfterASIExpressionInClass_test.go b/internal/fourslash/tests/gen/completionEntryAfterASIExpressionInClass_test.go new file mode 100644 index 0000000000..062aad6598 --- /dev/null +++ b/internal/fourslash/tests/gen/completionEntryAfterASIExpressionInClass_test.go @@ -0,0 +1,42 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionEntryAfterASIExpressionInClass(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Parent { + protected shouldWork() { + console.log(); + } +} + +class Child extends Parent { + // this assumes ASI, but on next line wants to + x = () => 1 + shoul/*insideid*/ +} + +class ChildTwo extends Parent { + // this assumes ASI, but on next line wants to + x = () => 1 + /*root*/ //nothing +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"insideid", "root"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"shouldWork"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionEntryForArgumentConstrainedToString_test.go b/internal/fourslash/tests/gen/completionEntryForArgumentConstrainedToString_test.go new file mode 100644 index 0000000000..13042b27db --- /dev/null +++ b/internal/fourslash/tests/gen/completionEntryForArgumentConstrainedToString_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionEntryForArgumentConstrainedToString(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function test

(p: P): void; + +test(/*ts*/) +` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"\"a\"", "\"b\""}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionEntryForArrayElementConstrainedToString2_test.go b/internal/fourslash/tests/gen/completionEntryForArrayElementConstrainedToString2_test.go new file mode 100644 index 0000000000..fda062aee7 --- /dev/null +++ b/internal/fourslash/tests/gen/completionEntryForArrayElementConstrainedToString2_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionEntryForArrayElementConstrainedToString2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function test(a: { foo: T[] }): void + +test({ foo: ['a', /*ts*/] })` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"\"a\"", "\"b\""}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionEntryForArrayElementConstrainedToString_test.go b/internal/fourslash/tests/gen/completionEntryForArrayElementConstrainedToString_test.go new file mode 100644 index 0000000000..0801407ddf --- /dev/null +++ b/internal/fourslash/tests/gen/completionEntryForArrayElementConstrainedToString_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionEntryForArrayElementConstrainedToString(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function test(a: { foo: T[] }): void + +test({ foo: [/*ts*/] })` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"\"a\"", "\"b\""}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionEntryForDeferredMappedTypeMembers_test.go b/internal/fourslash/tests/gen/completionEntryForDeferredMappedTypeMembers_test.go new file mode 100644 index 0000000000..59e3891c98 --- /dev/null +++ b/internal/fourslash/tests/gen/completionEntryForDeferredMappedTypeMembers_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionEntryForDeferredMappedTypeMembers(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: test.ts +interface A { a: A } +declare let a: A; +type Deep = { [K in keyof T]: Deep } +declare function foo(deep: Deep): T; +const out = foo(a); +out./*1*/a +out.a./*2*/a +out.a.a./*3*/a` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionEntryForPropertyConstrainedToString_test.go b/internal/fourslash/tests/gen/completionEntryForPropertyConstrainedToString_test.go new file mode 100644 index 0000000000..8c1938f7c0 --- /dev/null +++ b/internal/fourslash/tests/gen/completionEntryForPropertyConstrainedToString_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionEntryForPropertyConstrainedToString(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function test

(p: { type: P }): void; + +test({ type: /*ts*/ })` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"\"a\"", "\"b\""}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionEntryForShorthandPropertyAssignment_test.go b/internal/fourslash/tests/gen/completionEntryForShorthandPropertyAssignment_test.go new file mode 100644 index 0000000000..5352c7f4e5 --- /dev/null +++ b/internal/fourslash/tests/gen/completionEntryForShorthandPropertyAssignment_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionEntryForShorthandPropertyAssignment(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var person: {name:string; id:number} = {n/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), Label: "name"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionExportFrom_test.go b/internal/fourslash/tests/gen/completionExportFrom_test.go new file mode 100644 index 0000000000..1b3ee0df48 --- /dev/null +++ b/internal/fourslash/tests/gen/completionExportFrom_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionExportFrom(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `export * /*1*/; +export {} /*2*/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "from"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForComputedStringProperties_test.go b/internal/fourslash/tests/gen/completionForComputedStringProperties_test.go new file mode 100644 index 0000000000..90ecd92999 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForComputedStringProperties_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForComputedStringProperties(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const p2 = "p2"; +interface A { + ["p1"]: string; + [p2]: string; +} +declare const a: A; +a[|./**/|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "p1"}, &lsproto.CompletionItem{Label: "p2", InsertText: ptrTo("[p2]")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral11_test.go b/internal/fourslash/tests/gen/completionForStringLiteral11_test.go new file mode 100644 index 0000000000..db0ab84bed --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral11_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral11(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type As = 'arf' | 'abacus' | 'abaddon'; +let a: As; +switch (a) { + case '[|/**/|] +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"abacus", "abaddon", "arf"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral12_test.go b/internal/fourslash/tests/gen/completionForStringLiteral12_test.go new file mode 100644 index 0000000000..fe633280b6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral12_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral12(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: "bla"): void; +function foo(x: "bla"): void; +function foo(x: string) {} +foo("[|/**/|]")` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "bla"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral13_test.go b/internal/fourslash/tests/gen/completionForStringLiteral13_test.go new file mode 100644 index 0000000000..3a94e2c5ee --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral13_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral13(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface SymbolConstructor { + readonly species: symbol; +} +var Symbol: SymbolConstructor; +interface PromiseConstructor { + [Symbol.species]: PromiseConstructor; +} +var Promise: PromiseConstructor; +Promise["/*1*/"];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral15_test.go b/internal/fourslash/tests/gen/completionForStringLiteral15_test.go new file mode 100644 index 0000000000..57eb48ebfa --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral15_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral15(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `let x: { [_ in "foo"]: string } = { + "[|/**/|]" +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "foo"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral16_test.go b/internal/fourslash/tests/gen/completionForStringLiteral16_test.go new file mode 100644 index 0000000000..dc9ff6f604 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral16_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral16(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo { + a: string; + b: number; + c: string; +} + +declare function f1(key: keyof T): T; +declare function f2(a: keyof T, b: keyof T): T; + +f1("/*1*/",); +f1("/*2*/"); +f1("/*3*/",,,); +f2("/*4*/", "/*5*/",); +f2("/*6*/", "/*7*/"); +f2("/*8*/", "/*9*/",,,);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "b", "c"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral2_test.go b/internal/fourslash/tests/gen/completionForStringLiteral2_test.go new file mode 100644 index 0000000000..2e4ac9a0cd --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral2_test.go @@ -0,0 +1,53 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var o = { + foo() { }, + bar: 0, + "some other name": 1 +}; +declare const p: { [s: string]: any, a: number }; + +o["[|/*1*/bar|]"]; +o["/*2*/ ; +p["[|/*3*/|]"];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "bar"}, &lsproto.CompletionItem{Label: "foo"}, &lsproto.CompletionItem{Label: "some other name"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar", "foo", "some other name"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral3_test.go b/internal/fourslash/tests/gen/completionForStringLiteral3_test.go new file mode 100644 index 0000000000..1a4200b974 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral3_test.go @@ -0,0 +1,42 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function f(a: "A", b: number): void; +declare function f(a: "B", b: number): void; +declare function f(a: "C", b: number): void; +declare function f(a: string, b: number): void; + +f("[|/*1*/C|]", 2); + +f("/*2*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "A"}, &lsproto.CompletionItem{Label: "B"}, &lsproto.CompletionItem{Label: "C"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"A", "B", "C"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral5_test.go b/internal/fourslash/tests/gen/completionForStringLiteral5_test.go new file mode 100644 index 0000000000..ace6ee7902 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral5_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral5(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo { + foo: string; + bar: string; +} + +function f(a: K) { }; +f("/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar", "foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral8_test.go b/internal/fourslash/tests/gen/completionForStringLiteral8_test.go new file mode 100644 index 0000000000..b4294043ae --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral8_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral8(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type As = 'arf' | 'abacus' | 'abaddon'; +let a: As; +if (a === '/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"abacus", "abaddon", "arf"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralExport_test.go b/internal/fourslash/tests/gen/completionForStringLiteralExport_test.go new file mode 100644 index 0000000000..0b68100447 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralExport_test.go @@ -0,0 +1,65 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralExport(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @typeRoots: my_typings +// @Filename: test.ts +export * from "./some/*0*/ +export * from "./sub/some/*1*/"; +export * from "[|some-/*2*/|]"; +export * from "..//*3*/"; +export {} from ".//*4*/"; +// @Filename: someFile1.ts +/*someFile1*/ +// @Filename: sub/someFile2.ts +/*someFile2*/ +// @Filename: my_typings/some-module/index.d.ts +export var x = 9;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"0", "4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"someFile1", "my_typings", "sub"}, + }, + }) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"someFile2"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "some-module"}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"fourslash"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralFromSignature2_test.go b/internal/fourslash/tests/gen/completionForStringLiteralFromSignature2_test.go new file mode 100644 index 0000000000..7c277129ca --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralFromSignature2_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralFromSignature2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function f(a: "x"): void; +declare function f(a: string, b: number): void; +f("/**/", 0);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralFromSignature_test.go b/internal/fourslash/tests/gen/completionForStringLiteralFromSignature_test.go new file mode 100644 index 0000000000..bfbf298f5c --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralFromSignature_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralFromSignature(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function f(a: "x"): void; +declare function f(a: string): void; +f("[|/**/|]");` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "x"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralImport1_test.go b/internal/fourslash/tests/gen/completionForStringLiteralImport1_test.go new file mode 100644 index 0000000000..3cd9db7f4a --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralImport1_test.go @@ -0,0 +1,64 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralImport1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @typeRoots: my_typings +// @Filename: test.ts +import * as foo0 from "./some/*0*/ +import * as foo1 from "./sub/some/*1*/ +import * as foo2 from "[|some-|]/*2*/" +import * as foo3 from "..//*3*/"; +// @Filename: someFile1.ts +/*someFile1*/ +// @Filename: sub/someFile2.ts +/*someFile2*/ +// @Filename: my_typings/some-module/index.d.ts +export var x = 9;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"someFile1", "my_typings", "sub"}, + }, + }) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"someFile2"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "some-module"}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"fourslash"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralImport2_test.go b/internal/fourslash/tests/gen/completionForStringLiteralImport2_test.go new file mode 100644 index 0000000000..984154dc1e --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralImport2_test.go @@ -0,0 +1,64 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralImport2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @typeRoots: my_typings +// @Filename: test.ts +/// +/// +// @Filename: someFile.ts +/*someFile*/ +// @Filename: sub/someOtherFile.ts +/*someOtherFile*/ +// @Filename: my_typings/some-module/index.d.ts +export var x = 9;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"someFile.ts", "my_typings", "sub"}, + }, + }) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"some-module"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"someOtherFile.ts"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"some-module"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport10_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport10_test.go new file mode 100644 index 0000000000..b072f15ae9 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport10_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport10(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @moduleResolution: classic +// @Filename: dir1/dir2/dir3/dir4/test0.ts +import * as foo1 from "f/*import_as0*/ +import * as foo3 from "fake-module/*import_as1*/ +import foo4 = require("f/*import_equals0*/ +import foo6 = require("fake-module/*import_equals1*/ +var foo7 = require("f/*require0*/ +var foo9 = require("fake-module/*require1*/ +// @Filename: package.json +{ "dependencies": { "fake-module": "latest" } } +// @Filename: node_modules/fake-module/ts.ts + +// @Filename: dir1/dir2/dir3/package.json +{ "dependencies": { "fake-module3": "latest" } } +// @Filename: dir1/dir2/dir3/node_modules/fake-module3/ts.ts +` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport12_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport12_test.go new file mode 100644 index 0000000000..c24f356ab6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport12_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport12(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: tests/test0.ts +import * as foo1 from "m/*import_as0*/ +import foo2 = require("m/*import_equals0*/ +var foo3 = require("m/*require0*/ +// @Filename: package.json +{ + "dependencies": { "module": "latest" }, + "devDependencies": { "dev-module": "latest" }, + "optionalDependencies": { "optional-module": "latest" }, + "peerDependencies": { "peer-module": "latest" } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"module", "dev-module", "peer-module", "optional-module"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport14_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport14_test.go new file mode 100644 index 0000000000..69861d4f3d --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport14_test.go @@ -0,0 +1,61 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport14(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./modules", + "paths": { + "/module1": ["some/path/whatever.ts"], + "/module2": ["some/other/path.ts"] + } + } +} +// @Filename: tests/test0.ts +import * as foo1 from "//*import_as0*/ +import foo2 = require("//*import_equals0*/ +var foo3 = require("//*require0*/ +// @Filename: some/path/whatever.ts +export var x = 9; +// @Filename: some/other/path.ts +export var y = 10;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"import_as0"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"lib", "lib.decorators", "lib.decorators.legacy", "tests", &lsproto.CompletionItem{Label: "/module1"}, &lsproto.CompletionItem{Label: "/module2"}}, + }, + }) + f.VerifyCompletions(t, []string{"import_equals0"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"lib", "lib.decorators", "lib.decorators.legacy", "tests", &lsproto.CompletionItem{Label: "/module1"}, &lsproto.CompletionItem{Label: "/module2"}}, + }, + }) + f.VerifyCompletions(t, []string{"require0"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"lib", "lib.decorators", "lib.decorators.legacy", "tests", &lsproto.CompletionItem{Label: "/module1"}, &lsproto.CompletionItem{Label: "/module2"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport16_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport16_test.go new file mode 100644 index 0000000000..3771971c28 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport16_test.go @@ -0,0 +1,48 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport16(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./", + "paths": { + "module1/path1": ["some/path/whatever.ts"], + } + } +} +// @Filename: test0.ts +import * as foo1 from "m/*first*/ +import * as foo1 from "module1/pa/*second*/ +// @Filename: some/path/whatever.ts +export var x = 9;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"first"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"test0", "some", &lsproto.CompletionItem{Label: "module1/path1"}}, + }, + }) + f.VerifyCompletions(t, []string{"second"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "module1/path1"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport17_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport17_test.go new file mode 100644 index 0000000000..89f1e2a317 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport17_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport17(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: tsconfig.json +{ + "compilerOptions": { + "paths": { + "module1/*": ["some/path/*"], + } + } +} +// @Filename: test0.ts +import * as foo1 from "module1/w/*first*/ +// @Filename: some/path/whatever.ts +export {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"first"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"whatever"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport18_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport18_test.go new file mode 100644 index 0000000000..34e310cb12 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport18_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport18(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: tsconfig.json +{ + "compilerOptions": { + "paths": { + "/*": ["./*"] + }, + } +} +// @Filename: test0.ts +import * as foo1 from "/path/w/*first*/ +// @Filename: path/whatever.ts +export {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"first"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"whatever"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport2_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport2_test.go new file mode 100644 index 0000000000..960f9eabd2 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport2_test.go @@ -0,0 +1,45 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: tests/test0.ts +import * as foo1 from "fake-module//*import_as0*/ +import foo2 = require("fake-module//*import_equals0*/ +var foo3 = require("fake-module//*require0*/ +// @Filename: package.json +{ "dependencies": { "fake-module": "latest" }, "devDependencies": { "fake-module-dev": "latest" } } +// @Filename: node_modules/fake-module/repeated.ts +/*repeatedts*/ +// @Filename: node_modules/fake-module/repeated.tsx +/*repeatedtsx*/ +// @Filename: node_modules/fake-module/repeated.d.ts +/*repeateddts*/ +// @Filename: node_modules/fake-module/other.js +/*other*/ +// @Filename: node_modules/fake-module/other2.js +/*other2*/ +// @Filename: node_modules/unlisted-module/index.js +/*unlisted-module*/ +// @Filename: ambient.ts +declare module "fake-module/other"` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"import_as0", "import_equals0", "require0"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"other", "repeated"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport3_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport3_test.go new file mode 100644 index 0000000000..2f40cade0d --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport3_test.go @@ -0,0 +1,46 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: tests/test0.ts +import * as foo1 from "fake-module//*import_as0*/ +import foo2 = require("fake-module//*import_equals0*/ +var foo3 = require("fake-module//*require0*/ +// @Filename: package.json +{ "dependencies": { "fake-module": "latest" } } +// @Filename: node_modules/fake-module/ts.ts +/*ts*/ +// @Filename: node_modules/fake-module/tsx.tsx +/*tsx*/ +// @Filename: node_modules/fake-module/dts.d.ts +/*dts*/ +// @Filename: node_modules/fake-module/js.js +/*js*/ +// @Filename: node_modules/fake-module/jsx.jsx +/*jsx*/ +// @Filename: node_modules/fake-module/repeated.js +/*repeatedjs*/ +// @Filename: node_modules/fake-module/repeated.jsx +/*repeatedjsx*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"import_as0", "import_equals0", "require0"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"dts", "js", "jsx", "repeated", "ts", "tsx"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport4_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport4_test.go new file mode 100644 index 0000000000..09355775d1 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport4_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport4(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: dir1/dir2/dir3/dir4/test0.ts +import * as foo1 from "f/*import_as0*/ +import foo4 = require("f/*import_equals0*/ +var foo7 = require("f/*require0*/ +// @Filename: package.json +{ "dependencies": { "fake-module": "latest" } } +// @Filename: node_modules/fake-module/ts.ts + +// @Filename: dir1/package.json +{ "dependencies": { "fake-module2": "latest" } } +// @Filename: dir1/node_modules/fake-module2/index.ts + +// @Filename: dir1/dir2/dir3/package.json +{ "dependencies": { "fake-module3": "latest" } } +// @Filename: dir1/dir2/dir3/node_modules/fake-module3/ts.ts +` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"fake-module3", "fake-module2", "fake-module"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport7_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport7_test.go new file mode 100644 index 0000000000..b560935955 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport7_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport7(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @baseUrl: tests/cases/fourslash/modules +// @Filename: tests/test0.ts +import * as foo1 from "mod/*import_as0*/ +import foo2 = require("mod/*import_equals0*/ +var foo3 = require("mod/*require0*/ +// @Filename: modules/module.ts +export var x = 5; +// @Filename: package.json +{ "dependencies": { "module-from-node": "latest" } } +// @Filename: node_modules/module-from-node/index.ts +` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"module", "module-from-node"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport8_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport8_test.go new file mode 100644 index 0000000000..7641a6daa9 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport8_test.go @@ -0,0 +1,54 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport8(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./modules", + "paths": { + "*": [ + "prefix/0*/suffix.ts", + "prefix-only/*", + "*/suffix-only.ts" + ] + } + } +} +// @Filename: tests/test0.ts +import * as foo1 from "f/*import_as0*/ +import foo2 = require("f/*import_equals0*/ +var foo3 = require("f/*require0*/ +import * as foo1 from "f/*import_as1*/ +import foo2 = require("f/*import_equals1*/ +var foo3 = require("f/*require1*/ +import * as foo1 from "f/*import_as2*/ +import foo2 = require("f/*import_equals2*/ +var foo3 = require("f/*require2*/ +// @Filename: modules/prefix/00test/suffix.ts +export var x = 5; +// @Filename: modules/prefix-only/1test.ts +export var y = 5; +// @Filename: modules/2test/suffix-only.ts +export var z = 5;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"2test", "prefix", "prefix-only", "0test", "1test"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport9_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport9_test.go new file mode 100644 index 0000000000..8304288246 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImport9_test.go @@ -0,0 +1,43 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImport9(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: tsconfig.json +{ + "compilerOptions": { + "baseUrl": "./modules", + "paths": { + "module1": ["some/path/whatever.ts"], + "module2": ["some/other/path.ts"] + } + } +} +// @Filename: tests/test0.ts +import * as foo1 from "m/*import_as0*/ +import foo2 = require("m/*import_equals0*/ +var foo3 = require("m/*require0*/ +// @Filename: some/path/whatever.ts +export var x = 9; +// @Filename: some/other/path.ts +export var y = 10;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"module1", "module2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings1_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings1_test.go new file mode 100644 index 0000000000..0b37e76659 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings1_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImportTypings1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @typeRoots: my_typings,my_other_typings +// @Filename: tests/test0.ts +/// +import * as foo1 from "m/*import_as0*/ +import foo2 = require("m/*import_equals0*/ +var foo3 = require("m/*require0*/ +// @Filename: my_typings/module-x/index.d.ts +export var x = 9; +// @Filename: my_typings/module-x/whatever.d.ts +export var w = 9; +// @Filename: my_typings/module-y/index.d.ts +export var y = 9; +// @Filename: my_other_typings/module-z/index.d.ts +export var z = 9;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"module-x", "module-y", "module-z"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings2_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings2_test.go new file mode 100644 index 0000000000..ba005b3b28 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings2_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImportTypings2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @typeRoots: my_typings,my_other_typings +// @types: module-x,module-z +// @Filename: tests/test0.ts +/// +import * as foo1 from "m/*import_as0*/ +import foo2 = require("m/*import_equals0*/ +var foo3 = require("m/*require0*/ +// @Filename: my_typings/module-x/index.d.ts +export var x = 9; +// @Filename: my_typings/module-y/index.d.ts +export var y = 9; +// @Filename: my_other_typings/module-z/index.d.ts +export var z = 9;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"module-x", "module-z"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings3_test.go b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings3_test.go new file mode 100644 index 0000000000..214a94439d --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralNonrelativeImportTypings3_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralNonrelativeImportTypings3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: subdirectory/test0.ts +/// +import * as foo1 from "m/*import_as0*/ +import foo2 = require("m/*import_equals0*/ +var foo3 = require("m/*require0*/ +// @Filename: subdirectory/node_modules/@types/module-x/index.d.ts +export var x = 9; +// @Filename: subdirectory/package.json +{ "dependencies": { "@types/module-x": "latest" } } +// @Filename: node_modules/@types/module-y/index.d.ts +export var y = 9; +// @Filename: package.json +{ "dependencies": { "@types/module-y": "latest" } }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"types_ref0", "import_as0", "import_equals0", "require0"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"module-x", "module-y"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralRelativeImport4_test.go b/internal/fourslash/tests/gen/completionForStringLiteralRelativeImport4_test.go new file mode 100644 index 0000000000..b9bc28287f --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralRelativeImport4_test.go @@ -0,0 +1,65 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralRelativeImport4(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @rootDirs: /sub/src1,/src2 +// @Filename: /src2/test0.ts + import * as foo1 from "./mo/*import_as0*/ + import foo2 = require("./mo/*import_equals0*/ + var foo3 = require("./mo/*require0*/ +// @Filename: /src2/inner/inner0.ts +import * as s from ".//*inner*/"; +// @Filename: /src2/inner/inner1.ts +export const x = 0; +// @Filename: /src2/module0.ts + export var w = 0; +// @Filename: /sub/src1/module1.ts + export var x = 0; +// @Filename: /sub/src1/module2.ts + export var y = 0; +// @Filename: /sub/src1/more/module3.ts + export var z = 0; +// @Filename: f1.ts + +// @Filename: f2.tsx + +// @Filename: folder/f1.ts + +// @Filename: f3.js + +// @Filename: f4.jsx + +// @Filename: e1.ts + +// @Filename: e2.js +` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"import_as0", "import_equals0", "require0"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"module1", "module2", "more", "module0", "inner"}, + }, + }) + f.VerifyCompletions(t, "inner", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"inner1"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralRelativeImport6_test.go b/internal/fourslash/tests/gen/completionForStringLiteralRelativeImport6_test.go new file mode 100644 index 0000000000..d27bfd752a --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralRelativeImport6_test.go @@ -0,0 +1,47 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralRelativeImport6(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @rootDirs: /repo/src1,/repo/src2/,/repo/generated1,/repo/generated2/ +// @Filename: /repo/src1/test1.ts +import * as foo1 from "./dir//*import_as1*/ +import foo2 = require("./dir//*import_equals1*/ +var foo3 = require("./dir//*require1*/ +// @Filename: /repo/src2/test2.ts +import * as foo1 from "./dir//*import_as2*/ +import foo2 = require("./dir//*import_equals2*/ +var foo3 = require("./dir//*require2*/ +// @Filename: /repo/generated1/dir/f1.ts +/*f1*/ +// @Filename: /repo/generated2/dir/f2.ts +/*f2*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"import_as1", "import_equals1", "require1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"f1", "f2"}, + }, + }) + f.VerifyCompletions(t, []string{"import_as2", "import_equals2", "require2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"f1", "f2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralRelativeImportAllowJSTrue_test.go b/internal/fourslash/tests/gen/completionForStringLiteralRelativeImportAllowJSTrue_test.go new file mode 100644 index 0000000000..28bf2db2a0 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralRelativeImportAllowJSTrue_test.go @@ -0,0 +1,49 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralRelativeImportAllowJSTrue(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: test0.ts +import * as foo1 from ".//*import_as0*/ +import * as foo2 from "./f/*import_as1*/ +import foo3 = require(".//*import_equals0*/ +import foo4 = require("./f/*import_equals1*/ +var foo5 = require(".//*require0*/ +var foo6 = require("./f/*require1*/ +// @Filename: f1.ts + +// @Filename: f2.js + +// @Filename: f3.d.ts + +// @Filename: f4.tsx + +// @Filename: f5.js + +// @Filename: f6.jsx + +// @Filename: g1.ts + +// @Filename: g2.js +` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"f1", "f2", "f3", "f4", "f5", "f6", "g1", "g2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteralWithDynamicImport_test.go b/internal/fourslash/tests/gen/completionForStringLiteralWithDynamicImport_test.go new file mode 100644 index 0000000000..9622fc0927 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteralWithDynamicImport_test.go @@ -0,0 +1,64 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteralWithDynamicImport(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @typeRoots: my_typings +// @Filename: test.ts +const a = import("./some/*0*/ +const a = import("./sub/some/*1*/"); +const a = import("[|some-/*2*/|]"); +const a = import("..//*3*/"); +// @Filename: someFile1.ts +/*someFile1*/ +// @Filename: sub/someFile2.ts +/*someFile2*/ +// @Filename: my_typings/some-module/index.d.ts +export var x = 9;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"someFile1", "my_typings", "sub"}, + }, + }) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"someFile2"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "some-module"}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"fourslash"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference1_test.go b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference1_test.go new file mode 100644 index 0000000000..5f673f2b54 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference1_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral_quotePreference1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `enum A { + A, + B, + C +} +interface B { + a: keyof typeof A; +} +const b: B = { + a: /**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "\"A\""}, &lsproto.CompletionItem{Label: "\"B\""}, &lsproto.CompletionItem{Label: "\"C\""}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference2_test.go b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference2_test.go new file mode 100644 index 0000000000..e409a15e19 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference2_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral_quotePreference2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const a = { + '#': 'a' +}; +a[|./**/|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "#", InsertText: ptrTo("['#']")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference3_test.go b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference3_test.go new file mode 100644 index 0000000000..fa388370eb --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference3_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral_quotePreference3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const a = { + "#": "a" +}; +a[|./**/|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "#", InsertText: ptrTo("[\"#\"]")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference4_test.go b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference4_test.go new file mode 100644 index 0000000000..f4161dacc0 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference4_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral_quotePreference4(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type T = 0 | 1; +const t: T = /**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "0"}, &lsproto.CompletionItem{Label: "1"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference5_test.go b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference5_test.go new file mode 100644 index 0000000000..5ed67427e6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference5_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral_quotePreference5(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type T = "0" | "1"; +const t: T = /**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "'1'"}, &lsproto.CompletionItem{Label: "'0'"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference6_test.go b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference6_test.go new file mode 100644 index 0000000000..c5569d51fa --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference6_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral_quotePreference6(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type T = "0" | "1"; +const t: T = /**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "\"1\""}, &lsproto.CompletionItem{Label: "\"0\""}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference_test.go b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference_test.go new file mode 100644 index 0000000000..6c63124e02 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral_quotePreference_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral_quotePreference(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `enum A { + A, + B, + C +} +interface B { + a: keyof typeof A; +} +const b: B = { + a: /**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "'A'"}, &lsproto.CompletionItem{Label: "'B'"}, &lsproto.CompletionItem{Label: "'C'"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionForStringLiteral_test.go b/internal/fourslash/tests/gen/completionForStringLiteral_test.go new file mode 100644 index 0000000000..dc83f14ca4 --- /dev/null +++ b/internal/fourslash/tests/gen/completionForStringLiteral_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionForStringLiteral(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type Options = "Option 1" | "Option 2" | "Option 3"; +var x: Options = "[|/*1*/Option 3|]"; + +function f(a: Options) { }; +f("/*2*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "Option 1"}, &lsproto.CompletionItem{Label: "Option 2"}, &lsproto.CompletionItem{Label: "Option 3"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "Option 1"}, &lsproto.CompletionItem{Label: "Option 2"}, &lsproto.CompletionItem{Label: "Option 3"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionImportMetaWithGlobalDeclaration_test.go b/internal/fourslash/tests/gen/completionImportMetaWithGlobalDeclaration_test.go new file mode 100644 index 0000000000..981ff40a7e --- /dev/null +++ b/internal/fourslash/tests/gen/completionImportMetaWithGlobalDeclaration_test.go @@ -0,0 +1,67 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionImportMetaWithGlobalDeclaration(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +import./*1*/ +// @Filename: b.ts +declare global { + interface ImportMeta { + url: string; + } +} +import.meta./*2*/ +// @Filename: c.ts +import.meta./*3*/url +// @Filename: d.ts +import./*4*/meta` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"meta"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"url"}, + Excludes: []string{"meta"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"url"}, + Excludes: []string{"meta"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"meta"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionImportMeta_test.go b/internal/fourslash/tests/gen/completionImportMeta_test.go new file mode 100644 index 0000000000..4417cf143f --- /dev/null +++ b/internal/fourslash/tests/gen/completionImportMeta_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionImportMeta(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +import./*1*/ +// @Filename: b.ts +import.meta./*2*/ +// @Filename: c.ts +import./*3*/meta` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"meta"}, + }, + }) + f.VerifyCompletions(t, "2", nil) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"meta"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingDts_test.go b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingDts_test.go new file mode 100644 index 0000000000..16859e39b5 --- /dev/null +++ b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingDts_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionImportModuleSpecifierEndingDts(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename:test.d.ts + export declare class Test {} +//@Filename:module.ts +import { Test } from ".//**/"` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test.js"}}, + }, + }) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingJs_test.go b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingJs_test.go new file mode 100644 index 0000000000..ec7df31beb --- /dev/null +++ b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingJs_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionImportModuleSpecifierEndingJs(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@allowJs: true +//@Filename:test.js +export function f(){ + return 1 +} +//@Filename:module.js +import { f } from ".//**/"` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test.js"}}, + }, + }) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingJsx_test.go b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingJsx_test.go new file mode 100644 index 0000000000..3d324b5d2c --- /dev/null +++ b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingJsx_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionImportModuleSpecifierEndingJsx(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@allowJs: true +//@jsx:preserve +//@Filename:test.jsx + export class Test { } +//@Filename:module.jsx +import { Test } from ".//**/"` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test.jsx"}}, + }, + }) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTs_test.go b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTs_test.go new file mode 100644 index 0000000000..460bcea8a2 --- /dev/null +++ b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTs_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionImportModuleSpecifierEndingTs(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename:test.ts +export function f(){ + return 1 +} +//@Filename:module.ts +import { f } from ".//**/"` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test.js"}}, + }, + }) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTsxPreserve_test.go b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTsxPreserve_test.go new file mode 100644 index 0000000000..15c7461bb3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTsxPreserve_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionImportModuleSpecifierEndingTsxPreserve(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@jsx:preserve +//@Filename:test.tsx + export class Test { } +//@Filename:module.tsx +import { Test } from ".//**/"` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test.jsx"}}, + }, + }) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTsxReact_test.go b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTsxReact_test.go new file mode 100644 index 0000000000..ef2195ba90 --- /dev/null +++ b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingTsxReact_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionImportModuleSpecifierEndingTsxReact(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@jsx:react +//@Filename:test.tsx + export class Test { } +//@Filename:module.tsx +import { Test } from ".//**/"` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test.js"}}, + }, + }) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "test"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingUnsupportedExtension_test.go b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingUnsupportedExtension_test.go new file mode 100644 index 0000000000..ed5ea265bf --- /dev/null +++ b/internal/fourslash/tests/gen/completionImportModuleSpecifierEndingUnsupportedExtension_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionImportModuleSpecifierEndingUnsupportedExtension(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename:index.css + body {} +//@Filename:module.ts +import ".//**/"` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"index.css"}, + }, + }) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"index"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionInAugmentedClassModule_test.go b/internal/fourslash/tests/gen/completionInAugmentedClassModule_test.go new file mode 100644 index 0000000000..6a620153ab --- /dev/null +++ b/internal/fourslash/tests/gen/completionInAugmentedClassModule_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionInAugmentedClassModule(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare class m3f { foo(x: number): void } +module m3f { export interface I { foo(): void } } +var x: m3f./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"I"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionInFunctionLikeBody_includesPrimitiveTypes_test.go b/internal/fourslash/tests/gen/completionInFunctionLikeBody_includesPrimitiveTypes_test.go new file mode 100644 index 0000000000..103f332556 --- /dev/null +++ b/internal/fourslash/tests/gen/completionInFunctionLikeBody_includesPrimitiveTypes_test.go @@ -0,0 +1,46 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionInFunctionLikeBody_includesPrimitiveTypes(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { } +class Bar { } +function includesTypes() { + new Foo(x: T, y: number): void; +f({ /*f*/ }); + +declare function g(x: keyof T, y: number): void; +g("[|/*g*/|]");` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "f", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "x"}, &lsproto.CompletionItem{Label: "y"}}, + }, + }) + f.VerifyCompletions(t, "g", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "x"}, &lsproto.CompletionItem{Label: "y"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionInsideFunctionContainsArguments_test.go b/internal/fourslash/tests/gen/completionInsideFunctionContainsArguments_test.go new file mode 100644 index 0000000000..6ffa34be0f --- /dev/null +++ b/internal/fourslash/tests/gen/completionInsideFunctionContainsArguments_test.go @@ -0,0 +1,43 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionInsideFunctionContainsArguments(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function testArguments() {/*1*/} +/*2*/ +function testNestedArguments() { + function nestedfunction(){/*3*/} +} +function f() { + let g = () => /*4*/ +} +let g = () => /*5*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "3", "4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"arguments"}, + }, + }) + f.VerifyCompletions(t, []string{"2", "5"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"arguments"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionInsideObjectLiteralExpressionWithInstantiatedClassType_test.go b/internal/fourslash/tests/gen/completionInsideObjectLiteralExpressionWithInstantiatedClassType_test.go new file mode 100644 index 0000000000..23eb2e4dc6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionInsideObjectLiteralExpressionWithInstantiatedClassType_test.go @@ -0,0 +1,67 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionInsideObjectLiteralExpressionWithInstantiatedClassType(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class C1 { + public a: string; + protected b: string; + private c: string; + + constructor(a: string, b = "", c = "") { + this.a = a; + this.b = b; + this.c = c; + } +} +class C2 { + public a: string; + constructor(a: string) { + this.a = a; + } +} +function f1(foo: C1 | C2 | { d: number }) {} +f1({ /*1*/ }); +function f2(foo: C1 | C2) {} +f2({ /*2*/ }); + +function f3(foo: C2) {} +f3({ /*3*/ });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "d"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionJSDocNamePath_test.go b/internal/fourslash/tests/gen/completionJSDocNamePath_test.go new file mode 100644 index 0000000000..a3a074e5ae --- /dev/null +++ b/internal/fourslash/tests/gen/completionJSDocNamePath_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionJSDocNamePath(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @noLib: true +/** + * @returns {modu/*1*/le:ControlFlow} + */ +export function cargo() { +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "1") + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"module", "ControlFlow"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAfterAnyType_test.go b/internal/fourslash/tests/gen/completionListAfterAnyType_test.go new file mode 100644 index 0000000000..f8962f45aa --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterAnyType_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterAnyType(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = ` declare class myString { + charAt(pos: number): string; + } + + function bar(a: myString) { + var x: any = a./**/ + }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"charAt"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAfterClassExtends_test.go b/internal/fourslash/tests/gen/completionListAfterClassExtends_test.go new file mode 100644 index 0000000000..2d7fb3b4fd --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterClassExtends_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterClassExtends(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module Bar { + export class Bleah { + } + export class Foo extends /**/Bleah { + } +} + +function Blah(x: Bar.Bleah) { +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"Bar", "Bleah", "Foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAfterFunction3_test.go b/internal/fourslash/tests/gen/completionListAfterFunction3_test.go new file mode 100644 index 0000000000..4a8a783e35 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterFunction3_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterFunction3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// Outside the function expression +var x1 = (a: number) => { }/*1*/; + +var x2 = (b: number) => {/*2*/ };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"a"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAfterFunction_test.go b/internal/fourslash/tests/gen/completionListAfterFunction_test.go new file mode 100644 index 0000000000..930648011e --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterFunction_test.go @@ -0,0 +1,63 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterFunction(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// Outside the function +declare function f1(a: number);/*1*/ + +// inside the function +declare function f2(b: number, b2 = /*2*/ + +// Outside the function +function f3(c: number) { }/*3*/ + +// inside the function +function f4(d: number) { /*4*/}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"a"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"b"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"c"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"d"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAfterInvalidCharacter_test.go b/internal/fourslash/tests/gen/completionListAfterInvalidCharacter_test.go new file mode 100644 index 0000000000..6b9ddddfc8 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterInvalidCharacter_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterInvalidCharacter(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// Completion after invalid character +module testModule { + export var foo = 1; +} +@ +testModule./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAfterNumericLiteral1_test.go b/internal/fourslash/tests/gen/completionListAfterNumericLiteral1_test.go new file mode 100644 index 0000000000..2e422d8d0a --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterNumericLiteral1_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterNumericLiteral1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `5../**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"toExponential", "toFixed", "toLocaleString", "toPrecision", "toString", "valueOf"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAfterNumericLiteral_test.go b/internal/fourslash/tests/gen/completionListAfterNumericLiteral_test.go new file mode 100644 index 0000000000..f83d7ad69c --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterNumericLiteral_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterNumericLiteral(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: f1.ts +0./*dotOnNumberExpressions1*/ +// @Filename: f2.ts +0.0./*dotOnNumberExpressions2*/ +// @Filename: f3.ts +0.0.0./*dotOnNumberExpressions3*/ +// @Filename: f4.ts +0./** comment *//*dotOnNumberExpressions4*/ +// @Filename: f5.ts +(0)./*validDotOnNumberExpressions1*/ +// @Filename: f6.ts +(0.)./*validDotOnNumberExpressions2*/ +// @Filename: f7.ts +(0.0)./*validDotOnNumberExpressions3*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"dotOnNumberExpressions1", "dotOnNumberExpressions4"}, nil) + f.VerifyCompletions(t, []string{"dotOnNumberExpressions2", "dotOnNumberExpressions3", "validDotOnNumberExpressions1", "validDotOnNumberExpressions2", "validDotOnNumberExpressions3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"toExponential"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAfterObjectLiteral1_test.go b/internal/fourslash/tests/gen/completionListAfterObjectLiteral1_test.go new file mode 100644 index 0000000000..5707bfa8fc --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterObjectLiteral1_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterObjectLiteral1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var v = { x: 4, y: 3 }./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x", "y"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral02_test.go b/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral02_test.go new file mode 100644 index 0000000000..005f53f664 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral02_test.go @@ -0,0 +1,18 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterRegularExpressionLiteral02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `let v = 100; +let x = /absidey//**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral03_test.go b/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral03_test.go new file mode 100644 index 0000000000..f1c6b2c8cc --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral03_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterRegularExpressionLiteral03(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `let v = 100; +let x = /absidey/ +/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"v"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral04_test.go b/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral04_test.go new file mode 100644 index 0000000000..367c7f5c29 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral04_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterRegularExpressionLiteral04(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `let v = 100; +let x = /absidey/ /**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"v"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral05_test.go b/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral05_test.go new file mode 100644 index 0000000000..c4a640c83e --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterRegularExpressionLiteral05_test.go @@ -0,0 +1,18 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterRegularExpressionLiteral05(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `let v = 100; +let x = /absidey/g/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListAfterSlash_test.go b/internal/fourslash/tests/gen/completionListAfterSlash_test.go new file mode 100644 index 0000000000..3c421d3162 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterSlash_test.go @@ -0,0 +1,18 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterSlash(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var a = 0; +a/./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListAfterSpreadOperator01_test.go b/internal/fourslash/tests/gen/completionListAfterSpreadOperator01_test.go new file mode 100644 index 0000000000..fdc54425d4 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAfterSpreadOperator01_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAfterSpreadOperator01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `let v = [1,2,3,4]; +let x = [.../**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"v"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAndMemberListOnCommentedDot_test.go b/internal/fourslash/tests/gen/completionListAndMemberListOnCommentedDot_test.go new file mode 100644 index 0000000000..5ebe168356 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAndMemberListOnCommentedDot_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAndMemberListOnCommentedDot(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module M { + export class C { public pub = 0; private priv = 1; } + export var V = 0; +} + + +var c = new M.C(); + +c. // test on c. + +//Test for comment +//c./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListAndMemberListOnCommentedLine_test.go b/internal/fourslash/tests/gen/completionListAndMemberListOnCommentedLine_test.go new file mode 100644 index 0000000000..ea4da7a03d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAndMemberListOnCommentedLine_test.go @@ -0,0 +1,18 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAndMemberListOnCommentedLine(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// /**/ +var` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListAndMemberListOnCommentedWhiteSpace_test.go b/internal/fourslash/tests/gen/completionListAndMemberListOnCommentedWhiteSpace_test.go new file mode 100644 index 0000000000..4e1111c843 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAndMemberListOnCommentedWhiteSpace_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAndMemberListOnCommentedWhiteSpace(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module M { + export class C { public pub = 0; private priv = 1; } + export var V = 0; +} + + +var c = new M.C(); + +c. // test on c. + +//Test for comment +//c. /**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListAtBeginningOfFile01_test.go b/internal/fourslash/tests/gen/completionListAtBeginningOfFile01_test.go new file mode 100644 index 0000000000..8dd5b0412a --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAtBeginningOfFile01_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAtBeginningOfFile01(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/*1*/ +var x = 0, y = 1, z = 2; +enum E { + A, B, C +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"x", "y", "z", "E"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAtBeginningOfIdentifierInArrowFunction01_test.go b/internal/fourslash/tests/gen/completionListAtBeginningOfIdentifierInArrowFunction01_test.go new file mode 100644 index 0000000000..61282652df --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAtBeginningOfIdentifierInArrowFunction01_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAtBeginningOfIdentifierInArrowFunction01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `xyz => /*1*/x` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"xyz"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAtDeclarationOfParameterType_test.go b/internal/fourslash/tests/gen/completionListAtDeclarationOfParameterType_test.go new file mode 100644 index 0000000000..4082a0b1f3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAtDeclarationOfParameterType_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAtDeclarationOfParameterType(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module Bar { + export class Bleah { + } + export class Foo extends Bleah { + } +} + +function Blah(x: /**/Bar.Bleah) { +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"Bar"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAtEndOfWordInArrowFunction01_test.go b/internal/fourslash/tests/gen/completionListAtEndOfWordInArrowFunction01_test.go new file mode 100644 index 0000000000..1616fdda3f --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAtEndOfWordInArrowFunction01_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAtEndOfWordInArrowFunction01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `xyz => x/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"xyz"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAtEndOfWordInArrowFunction02_test.go b/internal/fourslash/tests/gen/completionListAtEndOfWordInArrowFunction02_test.go new file mode 100644 index 0000000000..1a062035fb --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAtEndOfWordInArrowFunction02_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAtEndOfWordInArrowFunction02(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `(d, defaultIsAnInvalidParameterName) => d/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"d", "defaultIsAnInvalidParameterName", &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "default"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_Generics_test.go b/internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_Generics_test.go new file mode 100644 index 0000000000..36140ce65d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_Generics_test.go @@ -0,0 +1,22 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAtIdentifierDefinitionLocations_Generics(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface A = T extends { a: (x: infer /*1*/) => void; b: (x: infer U/*2*/) => void } + ? U + : never;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), nil) +} diff --git a/internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_interfaces_test.go b/internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_interfaces_test.go new file mode 100644 index 0000000000..4de5912ca7 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_interfaces_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAtIdentifierDefinitionLocations_interfaces(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var aa = 1; +interface /*interfaceName1*/ +interface a/*interfaceName2*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), nil) +} diff --git a/internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_varDeclarations_test.go b/internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_varDeclarations_test.go new file mode 100644 index 0000000000..4d7744cc74 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAtIdentifierDefinitionLocations_varDeclarations_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAtIdentifierDefinitionLocations_varDeclarations(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var aa = 1; +var /*varName1*/ +var a/*varName2*/ +var a2,/*varName3*/ +var a2, a/*varName4*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), nil) +} diff --git a/internal/fourslash/tests/gen/completionListAtInvalidLocations_test.go b/internal/fourslash/tests/gen/completionListAtInvalidLocations_test.go new file mode 100644 index 0000000000..ba5253541d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAtInvalidLocations_test.go @@ -0,0 +1,46 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAtInvalidLocations(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = ` var v1 = ''; + " /*openString1*/ + var v2 = ''; + "/*openString2*/ + var v3 = ''; + " bar./*openString3*/ + var v4 = ''; + // bar./*inComment1*/ + var v6 = ''; + // /*inComment2*/ + var v7 = ''; + /* /*inComment3*/ + var v11 = ''; + // /*inComment4*/ + var v12 = ''; + type htm/*inTypeAlias*/ + + // /*inComment5*/ + foo; + var v10 = /reg/*inRegExp1*/ex/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"openString1", "openString2", "openString3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) + f.VerifyCompletions(t, []string{"inComment1", "inComment2", "inComment3", "inComment4", "inTypeAlias", "inComment5", "inRegExp1"}, nil) +} diff --git a/internal/fourslash/tests/gen/completionListAtNodeBoundary_test.go b/internal/fourslash/tests/gen/completionListAtNodeBoundary_test.go new file mode 100644 index 0000000000..75b0df5af0 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAtNodeBoundary_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAtNodeBoundary(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Iterator { + (value: T, index: any, list: any): U; +} + +interface WrappedArray { + map(iterator: Iterator, context?: any): U[]; +} + +interface Underscore { + (list: T[]): WrappedArray; + map(list: T[], iterator: Iterator, context?: any): U[]; +} + +declare var _: Underscore; +var a: string[]; +var e = a.map(x => x./**/);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"charAt"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListAtThisType_test.go b/internal/fourslash/tests/gen/completionListAtThisType_test.go new file mode 100644 index 0000000000..7fae8c4bf8 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListAtThisType_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListAtThisType(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Test { + foo() {} + + bar() { + this.baz(this, "/*1*/"); + + const t = new Test() + this.baz(t, "/*2*/"); + } + + baz(a: T, k: keyof T) {} +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar", "baz", "foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListBeforeKeyword_test.go b/internal/fourslash/tests/gen/completionListBeforeKeyword_test.go new file mode 100644 index 0000000000..612e61f2dd --- /dev/null +++ b/internal/fourslash/tests/gen/completionListBeforeKeyword_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListBeforeKeyword(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// Completion after dot in named type, when the following line has a keyword +module TypeModule1 { + export class C1 {} + export class C2 {} +} +var x : TypeModule1./*TypeReference*/ +module TypeModule2 { + export class Test3 {} +} + +// Completion after dot in named type, when the following line has a keyword +TypeModule1./*ValueReference*/ +module TypeModule3 { + export class Test3 {} +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"C1", "C2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListBeforeNewScope01_test.go b/internal/fourslash/tests/gen/completionListBeforeNewScope01_test.go new file mode 100644 index 0000000000..2b2e2edeec --- /dev/null +++ b/internal/fourslash/tests/gen/completionListBeforeNewScope01_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListBeforeNewScope01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `p/*1*/ + +function fun(param) { + let party = Math.random() < 0.99; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"param", "party"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListBeforeNewScope02_test.go b/internal/fourslash/tests/gen/completionListBeforeNewScope02_test.go new file mode 100644 index 0000000000..9404794e6d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListBeforeNewScope02_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListBeforeNewScope02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `a/*1*/ + +{ + let aaaaaa = 10; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"aaaaaa"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListClassThisJS_test.go b/internal/fourslash/tests/gen/completionListClassThisJS_test.go new file mode 100644 index 0000000000..2e4cdf7cd1 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListClassThisJS_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListClassThisJS(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: completionListClassThisJS.js +// @allowJs: true +/** @typedef {number} CallbackContext */ +class Foo { + bar() { + this/**/ + } + /** @param {function (this: CallbackContext): any} cb */ + baz(cb) { + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindKeyword), SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "this"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListEnumValues_test.go b/internal/fourslash/tests/gen/completionListEnumValues_test.go new file mode 100644 index 0000000000..a409e0abab --- /dev/null +++ b/internal/fourslash/tests/gen/completionListEnumValues_test.go @@ -0,0 +1,46 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListEnumValues(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `enum Colors { + Red, + Green +} + +Colors./*enumVariable*/; + +var x = Colors.Red; +x./*variableOfEnumType*/; + +function foo(): Colors { return null; } +foo()./*callOfEnumReturnType*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "enumVariable", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Green", "Red"}, + }, + }) + f.VerifyCompletions(t, []string{"variableOfEnumType", "callOfEnumReturnType"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"toExponential", "toFixed", "toLocaleString", "toPrecision", "toString", "valueOf"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListForExportEquals2_test.go b/internal/fourslash/tests/gen/completionListForExportEquals2_test.go new file mode 100644 index 0000000000..850155f1c0 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListForExportEquals2_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListForExportEquals2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /node_modules/foo/index.d.ts +export = Foo; +interface Foo { bar: number; } +declare namespace Foo { + interface Static {} +} +// @Filename: /a.ts +import { /**/ } from "foo";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Static", &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "type"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListForExportEquals_test.go b/internal/fourslash/tests/gen/completionListForExportEquals_test.go new file mode 100644 index 0000000000..d82afbfd17 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListForExportEquals_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListForExportEquals(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /node_modules/foo/index.d.ts +export = Foo; +declare var Foo: Foo.Static; +declare namespace Foo { + interface Static { + foo(): void; + } +} +// @Filename: /a.ts +import { /**/ } from "foo";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo", "Static", &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "type"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListForNonExportedMemberInAmbientModuleWithExportAssignment1_test.go b/internal/fourslash/tests/gen/completionListForNonExportedMemberInAmbientModuleWithExportAssignment1_test.go new file mode 100644 index 0000000000..cd9584dc0c --- /dev/null +++ b/internal/fourslash/tests/gen/completionListForNonExportedMemberInAmbientModuleWithExportAssignment1_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListForNonExportedMemberInAmbientModuleWithExportAssignment1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: completionListForNonExportedMemberInAmbientModuleWithExportAssignment1_file0.ts +var x: Date; +export = x; +// @Filename: completionListForNonExportedMemberInAmbientModuleWithExportAssignment1_file1.ts +/// + import test = require("completionListForNonExportedMemberInAmbientModuleWithExportAssignment1_file0"); + test./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListForShorthandPropertyAssignment2_test.go b/internal/fourslash/tests/gen/completionListForShorthandPropertyAssignment2_test.go new file mode 100644 index 0000000000..5841300b0a --- /dev/null +++ b/internal/fourslash/tests/gen/completionListForShorthandPropertyAssignment2_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListForShorthandPropertyAssignment2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var person: {name:string; id: number} = { n/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"id", "name"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListForShorthandPropertyAssignment_test.go b/internal/fourslash/tests/gen/completionListForShorthandPropertyAssignment_test.go new file mode 100644 index 0000000000..1087accee1 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListForShorthandPropertyAssignment_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListForShorthandPropertyAssignment(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var person: {name:string; id: number} = { n/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"id", "name"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers01_test.go b/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers01_test.go new file mode 100644 index 0000000000..3ca86f4b11 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers01_test.go @@ -0,0 +1,52 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListForTransitivelyExportedMembers01(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: A.ts +export interface I1 { one: number } +export interface I2 { two: string } +export type I1_OR_I2 = I1 | I2; + +export class C1 { + one: string; +} + +export module Inner { + export interface I3 { + three: boolean + } + + export var varVar = 100; + export let letVar = 200; + export const constVar = 300; +} +// @Filename: B.ts +export var bVar = "bee!"; +// @Filename: C.ts +export var cVar = "see!"; +export * from "./A"; +export * from "./B" +// @Filename: D.ts +import * as c from "./C"; +var x = c./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bVar", "C1", "cVar", "Inner"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers02_test.go b/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers02_test.go new file mode 100644 index 0000000000..7e7647874c --- /dev/null +++ b/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers02_test.go @@ -0,0 +1,52 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListForTransitivelyExportedMembers02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: A.ts +export interface I1 { one: number } +export interface I2 { two: string } +export type I1_OR_I2 = I1 | I2; + +export class C1 { + one: string; +} + +export module Inner { + export interface I3 { + three: boolean + } + + export var varVar = 100; + export let letVar = 200; + export const constVar = 300; +} +// @Filename: B.ts +export var bVar = "bee!"; +// @Filename: C.ts +export var cVar = "see!"; +export * from "./A"; +export * from "./B" +// @Filename: D.ts +import * as c from "./C"; +var x = c.Inner./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"constVar", "letVar", "varVar"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers03_test.go b/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers03_test.go new file mode 100644 index 0000000000..88bf5e9803 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers03_test.go @@ -0,0 +1,52 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListForTransitivelyExportedMembers03(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: A.ts +export interface I1 { one: number } +export interface I2 { two: string } +export type I1_OR_I2 = I1 | I2; + +export class C1 { + one: string; +} + +export module Inner { + export interface I3 { + three: boolean + } + + export var varVar = 100; + export let letVar = 200; + export const constVar = 300; +} +// @Filename: B.ts +export var bVar = "bee!"; +// @Filename: C.ts +export var cVar = "see!"; +export * from "./A"; +export * from "./B" +// @Filename: D.ts +import * as c from "./C"; +var x: c./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"I1", "I2", "I1_OR_I2", "C1"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers04_test.go b/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers04_test.go new file mode 100644 index 0000000000..371ce753b0 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListForTransitivelyExportedMembers04_test.go @@ -0,0 +1,53 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListForTransitivelyExportedMembers04(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @ModuleResolution: classic +// @Filename: A.ts +export interface I1 { one: number } +export interface I2 { two: string } +export type I1_OR_I2 = I1 | I2; + +export class C1 { + one: string; +} + +export module Inner { + export interface I3 { + three: boolean + } + + export var varVar = 100; + export let letVar = 200; + export const constVar = 300; +} +// @Filename: B.ts +export var bVar = "bee!"; +// @Filename: C.ts +export var cVar = "see!"; +export * from "A"; +export * from "B" +// @Filename: D.ts +import * as c from "C"; +var x: c.Inner./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"I3"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListForUnicodeEscapeName_test.go b/internal/fourslash/tests/gen/completionListForUnicodeEscapeName_test.go new file mode 100644 index 0000000000..d1f4d04bd9 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListForUnicodeEscapeName_test.go @@ -0,0 +1,47 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListForUnicodeEscapeName(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function \u0042 () { /*0*/ } +export default function \u0043 () {} +class \u0041 { /*2*/ } +/*3*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"B"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"C", "A"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"B", "A", "C"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListImplementingInterfaceFunctions_test.go b/internal/fourslash/tests/gen/completionListImplementingInterfaceFunctions_test.go new file mode 100644 index 0000000000..38e3a1bb5c --- /dev/null +++ b/internal/fourslash/tests/gen/completionListImplementingInterfaceFunctions_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListImplementingInterfaceFunctions(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I1 { + a(): void; + b(): void; +} + +var imp1: I1 = { + a() {}, + /*0*/ +} + +var imp2: I1 = { + a: () => {}, + /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"0", "1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInArrowFunctionInUnclosedCallSite01_test.go b/internal/fourslash/tests/gen/completionListInArrowFunctionInUnclosedCallSite01_test.go new file mode 100644 index 0000000000..6504d0f2fc --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInArrowFunctionInUnclosedCallSite01_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInArrowFunctionInUnclosedCallSite01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function foo(...params: any[]): any; +function getAllFiles(rootFileNames: string[]) { + var processedFiles = rootFileNames.map(fileName => foo(/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"fileName", "rootFileNames", "getAllFiles", "foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInClosedFunction01_test.go b/internal/fourslash/tests/gen/completionListInClosedFunction01_test.go new file mode 100644 index 0000000000..8528402265 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInClosedFunction01_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInClosedFunction01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"x", "y", "z"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInClosedFunction02_test.go b/internal/fourslash/tests/gen/completionListInClosedFunction02_test.go new file mode 100644 index 0000000000..6a1f53603b --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInClosedFunction02_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInClosedFunction02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string, c: typeof /*1*/) { + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInClosedFunction03_test.go b/internal/fourslash/tests/gen/completionListInClosedFunction03_test.go new file mode 100644 index 0000000000..d5095fc85c --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInClosedFunction03_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInClosedFunction03(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string, c: typeof x = /*1*/) { + + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInClosedFunction04_test.go b/internal/fourslash/tests/gen/completionListInClosedFunction04_test.go new file mode 100644 index 0000000000..a88b8c5af7 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInClosedFunction04_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInClosedFunction04(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = /*1*/, c: typeof x = "hello") { + + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInClosedFunction05_test.go b/internal/fourslash/tests/gen/completionListInClosedFunction05_test.go new file mode 100644 index 0000000000..5ce3f33f73 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInClosedFunction05_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInClosedFunction05(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = /*1*/ + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b", "c"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInClosedFunction06_test.go b/internal/fourslash/tests/gen/completionListInClosedFunction06_test.go new file mode 100644 index 0000000000..25ccf749df --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInClosedFunction06_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInClosedFunction06(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (x: /*1*/); + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"MyType"}, + Excludes: []string{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInClosedFunction07_test.go b/internal/fourslash/tests/gen/completionListInClosedFunction07_test.go new file mode 100644 index 0000000000..e1508dd8b5 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInClosedFunction07_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInClosedFunction07(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (p: MyType) => /*1*/; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b", "c", "v", "p"}, + Excludes: []string{"MyType"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature01_test.go b/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature01_test.go new file mode 100644 index 0000000000..746d58c270 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature01_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInClosedObjectTypeLiteralInSignature01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [s: string]: TString; + [s: number]: TNumber; +} + +declare function foo(obj: I): { str: T/*1*/ }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"I", "TString", "TNumber"}, + Excludes: []string{"foo", "obj"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature02_test.go b/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature02_test.go new file mode 100644 index 0000000000..a5170d210d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature02_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInClosedObjectTypeLiteralInSignature02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [s: string]: TString; + [s: number]: TNumber; +} + +declare function foo(obj: I): { str: TStr/*1*/ }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"I", "TString", "TNumber"}, + Excludes: []string{"foo", "obj"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature03_test.go b/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature03_test.go new file mode 100644 index 0000000000..411fc364e8 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature03_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInClosedObjectTypeLiteralInSignature03(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [s: string]: TString; + [s: number]: TNumber; +} + +declare function foo(obj: I): { str: TString/*1*/ }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"I", "TString", "TNumber"}, + Excludes: []string{"foo", "obj"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature04_test.go b/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature04_test.go new file mode 100644 index 0000000000..4e40788374 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInClosedObjectTypeLiteralInSignature04_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInClosedObjectTypeLiteralInSignature04(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [s: string]: TString; + [s: number]: TNumber; +} + +declare function foo(obj: I): { /*1*/ }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "readonly"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInComments2_test.go b/internal/fourslash/tests/gen/completionListInComments2_test.go new file mode 100644 index 0000000000..a8330b3d1e --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInComments2_test.go @@ -0,0 +1,17 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInComments2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// */{| "name" : "1" |}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", nil) +} diff --git a/internal/fourslash/tests/gen/completionListInComments_test.go b/internal/fourslash/tests/gen/completionListInComments_test.go new file mode 100644 index 0000000000..92a049e46b --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInComments_test.go @@ -0,0 +1,18 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInComments(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var foo = ''; +( // f/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListInContextuallyTypedArgument_test.go b/internal/fourslash/tests/gen/completionListInContextuallyTypedArgument_test.go new file mode 100644 index 0000000000..452520d3d4 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInContextuallyTypedArgument_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInContextuallyTypedArgument(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyPoint { + x1: number; + y1: number; +} + +function foo(a: (e: MyPoint) => string) { } +foo((e) => { + e./*1*/ +} ); + +class test { + constructor(a: (e: MyPoint) => string) { } +} +var t = new test((e) => { + e./*2*/ +} );` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x1", "y1"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInEmptyFile_test.go b/internal/fourslash/tests/gen/completionListInEmptyFile_test.go new file mode 100644 index 0000000000..e392e3df16 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInEmptyFile_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInEmptyFile(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var a = 0; +/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInExportClause02_test.go b/internal/fourslash/tests/gen/completionListInExportClause02_test.go new file mode 100644 index 0000000000..e15a4800e3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInExportClause02_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInExportClause02(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare module "M1" { + export var V; +} +var W; +declare module "M2" { + export { /**/ } from "M1" +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"V", &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "type"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInExportClause03_test.go b/internal/fourslash/tests/gen/completionListInExportClause03_test.go new file mode 100644 index 0000000000..88e528da29 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInExportClause03_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInExportClause03(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare module "M1" { + export var abc: number; + export var def: string; +} + +declare module "M2" { + export { abc/**/ } from "M1"; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"abc", "def", &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "type"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInExtendsClauseAtEOF_test.go b/internal/fourslash/tests/gen/completionListInExtendsClauseAtEOF_test.go new file mode 100644 index 0000000000..fd201d0578 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInExtendsClauseAtEOF_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInExtendsClauseAtEOF(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare module mod { + class Foo { } +} +class Bar extends mod./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"Foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInImportClause01_test.go b/internal/fourslash/tests/gen/completionListInImportClause01_test.go new file mode 100644 index 0000000000..a0841f8260 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInImportClause01_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInImportClause01(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @ModuleResolution: classic +// @Filename: m1.ts +export var foo: number = 1; +export function bar() { return 10; } +export function baz() { return 10; } +// @Filename: m2.ts +import {/*1*/, /*2*/ from "m1" +import {/*3*/} from "m1" +import {foo,/*4*/ from "m1" +import {bar as /*5*/, /*6*/ from "m1" +import {foo, bar, baz as b,/*7*/} from "m1" +import { type /*8*/ } from "m1"; +import { type b/*9*/ } from "m1";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"8", "9"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar", "baz", "foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInImportClause02_test.go b/internal/fourslash/tests/gen/completionListInImportClause02_test.go new file mode 100644 index 0000000000..d22759cbbf --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInImportClause02_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInImportClause02(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare module "M1" { + export var V; +} + +declare module "M2" { + import { /**/ } from "M1" +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"V", &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "type"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInImportClause03_test.go b/internal/fourslash/tests/gen/completionListInImportClause03_test.go new file mode 100644 index 0000000000..38d42894a8 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInImportClause03_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInImportClause03(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare module "M1" { + export var abc: number; + export var def: string; +} + +declare module "M2" { + import { abc/**/ } from "M1"; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"abc", "def", &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "type"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInImportClause05_test.go b/internal/fourslash/tests/gen/completionListInImportClause05_test.go new file mode 100644 index 0000000000..839a875d78 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInImportClause05_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInImportClause05(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: app.ts +import * as A from "/*1*/"; +// @Filename: /node_modules/@types/a__b/index.d.ts +declare module "@e/f" { function fun(): string; } +// @Filename: /node_modules/@types/c__d/index.d.ts +export declare let x: number;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"@e/f", "@a/b", "@c/d"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInImportClause06_test.go b/internal/fourslash/tests/gen/completionListInImportClause06_test.go new file mode 100644 index 0000000000..6668c5bd09 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInImportClause06_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInImportClause06(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @typeRoots: T1,T2 +// @Filename: app.ts +import * as A from "/*1*/"; +// @Filename: T1/a__b/index.d.ts +export declare let x: number; +// @Filename: T2/a__b/index.d.ts +export declare let x: number;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"@a/b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInMiddleOfIdentifierInArrowFunction01_test.go b/internal/fourslash/tests/gen/completionListInMiddleOfIdentifierInArrowFunction01_test.go new file mode 100644 index 0000000000..91da3cab82 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInMiddleOfIdentifierInArrowFunction01_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInMiddleOfIdentifierInArrowFunction01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `xyz => x/*1*/y` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"xyz"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInNamespaceImportName01_test.go b/internal/fourslash/tests/gen/completionListInNamespaceImportName01_test.go new file mode 100644 index 0000000000..17410db7b6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInNamespaceImportName01_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInNamespaceImportName01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: m1.ts +export var foo: number = 1; +// @Filename: m2.ts +import * as /**/ from "m1"` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern01_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern01_test.go new file mode 100644 index 0000000000..a4b2228f14 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern01_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + property1: number; + property2: string; +} + +var foo: I; +var { /**/ } = foo;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"property1", "property2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern02_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern02_test.go new file mode 100644 index 0000000000..26968ed15f --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern02_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + property1: number; + property2: string; +} + +var foo: I; +var { property1, /**/ } = foo;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"property2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern03_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern03_test.go new file mode 100644 index 0000000000..a4d97d9cb5 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern03_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern03(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + property1: number; + property2: string; +} + +var foo: I; +var { property1: /**/ } = foo;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern04_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern04_test.go new file mode 100644 index 0000000000..de484b33c3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern04_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern04(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + property1: number; + property2: string; +} + +var foo: I; +var { prope/**/ } = foo;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"property1", "property2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern05_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern05_test.go new file mode 100644 index 0000000000..a4eaf99063 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern05_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern05(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + property1: number; + property2: string; +} + +var foo: I; +var { property1/**/ } = foo;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"property1", "property2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern06_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern06_test.go new file mode 100644 index 0000000000..18a5d8c236 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern06_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern06(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + property1: number; + property2: string; +} + +var foo: I; +var { property1, property2, /**/ } = foo;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern07_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern07_test.go new file mode 100644 index 0000000000..6028e0a596 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern07_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern07(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + propertyOfI_1: number; + propertyOfI_2: string; +} +interface J { + property1: I; + property2: string; +} + +var foo: J; +var { property1: { /**/ } } = foo;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"propertyOfI_1", "propertyOfI_2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern08_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern08_test.go new file mode 100644 index 0000000000..838786093d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern08_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern08(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + propertyOfI_1: number; + propertyOfI_2: string; +} +interface J { + property1: I; + property2: string; +} + +var foo: J; +var { property1: { propertyOfI_1, /**/ } } = foo;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"propertyOfI_2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern09_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern09_test.go new file mode 100644 index 0000000000..d26f54575a --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern09_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern09(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + propertyOfI_1: number; + propertyOfI_2: string; +} +interface J { + property1: I; + property2: string; +} + +var foo: J; +var { property1: { propertyOfI_1, }, /**/ } = foo;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"property2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern10_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern10_test.go new file mode 100644 index 0000000000..ccf32cb1a6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern10_test.go @@ -0,0 +1,45 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern10(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + propertyOfI_1: number; + propertyOfI_2: string; +} +interface J { + property1: I; + property2: string; +} + +var foo: J[]; +var [{ property1: { propertyOfI_1, }, /*1*/ }, { /*2*/ }] = foo;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"property2"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"property1", "property2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern11_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern11_test.go new file mode 100644 index 0000000000..1ea94c5044 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern11_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern11(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + property1: number; + property2: string; +} + +var { property1: prop1, /**/ }: I;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"property2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern12_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern12_test.go new file mode 100644 index 0000000000..e0e24b6df3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern12_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern12(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + property1: number; + property2: string; +} + +function f({ property1, /**/ }: I): void { +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"property2"}, + Excludes: []string{"property1"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern13_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern13_test.go new file mode 100644 index 0000000000..abd11f6942 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern13_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern13(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + x: number; + y: string; + z: boolean; +} + +interface J { + x: string; + y: string; +} + +let { /**/ }: I | J = { x: 10 };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x", "y"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern14_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern14_test.go new file mode 100644 index 0000000000..810143adf5 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern14_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern14(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const { b/**/ } = new class { + private ab; + protected bc; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectBindingPattern16_test.go b/internal/fourslash/tests/gen/completionListInObjectBindingPattern16_test.go new file mode 100644 index 0000000000..6332f4bf52 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectBindingPattern16_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectBindingPattern16(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @checkJs: true +// @filename: a.js +/** + * @typedef Foo + * @property {number} a + * @property {string} b + */ + +/** + * @param {Foo} options + */ +function f({ /**/ }) {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteral2_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteral2_test.go new file mode 100644 index 0000000000..78f7758b0e --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteral2_test.go @@ -0,0 +1,45 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteral2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface TelemetryService { + publicLog(eventName: string, data: any): any; +}; +class SearchResult { + count() { return 5; } + isEmpty() { return true; } + fileCount(): string { return ""; } +} +class Foo { + public telemetryService: TelemetryService; // If telemetry service is of type 'any' (i.e. uncomment below line), the drop-down list works + public telemetryService2; + private test() { + var onComplete = (searchResult: SearchResult) => { + var hasResults = !searchResult.isEmpty(); // Drop-down list on searchResult fine here + // No drop-down list available on searchResult members within object literal below + this.telemetryService.publicLog('searchResultsShown', { count: searchResult./*1*/count(), fileCount: searchResult.fileCount() }); + this.telemetryService2.publicLog('searchResultsShown', { count: searchResult./*2*/count(), fileCount: searchResult.fileCount() }); + }; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"count", "fileCount", "isEmpty"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteral3_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteral3_test.go new file mode 100644 index 0000000000..204e7d14e3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteral3_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteral3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface IASTNode { + name: string; + children: IASTNode[]; +} +var ast2: IASTNode = { + /**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"children", "name"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteral4_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteral4_test.go new file mode 100644 index 0000000000..e769739569 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteral4_test.go @@ -0,0 +1,44 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteral4(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strictNullChecks: true +interface Thing { + hello: number; + world: string; +} + +declare function funcA(x : Thing): void; +declare function funcB(x?: Thing): void; +declare function funcC(x : Thing | null): void; +declare function funcD(x : Thing | undefined): void; +declare function funcE(x : Thing | null | undefined): void; +declare function funcF(x?: Thing | null | undefined): void; + +funcA({ /*A*/ }); +funcB({ /*B*/ }); +funcC({ /*C*/ }); +funcD({ /*D*/ }); +funcE({ /*E*/ }); +funcF({ /*F*/ });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"hello", "world"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteral5_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteral5_test.go new file mode 100644 index 0000000000..4f8367e2d5 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteral5_test.go @@ -0,0 +1,74 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteral5(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const o = 'something' +const obj = { + prop: o/*1*/, + pro() { + const obj1 = { + p:{ + s: { + h: { + hh: o/*2*/ + }, + someFun() { + o/*3*/ + } + } + } + } + }, + o/*4*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"o"}, + Excludes: []string{"obj"}, + }, + }) + f.VerifyCompletions(t, []string{"2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"o", "obj"}, + Excludes: []string{"obj1"}, + }, + }) + f.VerifyCompletions(t, []string{"3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"o", "obj", "obj1"}, + }, + }) + f.VerifyCompletions(t, []string{"4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"o"}, + Excludes: []string{"obj"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteral6_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteral6_test.go new file mode 100644 index 0000000000..5ac8533038 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteral6_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteral6(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const foo = { + a: "a", + b: "b" +}; +function fn(obj: T, events: { [Key in ` + "`" + `on_${string & keyof T}` + "`" + `]?: Key }) {} + +fn(foo, { + /*1*/ +}) +fn({ a: "a", b: "b" }, { + /*2*/ +})` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "on_a"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "on_b"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteral7_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteral7_test.go new file mode 100644 index 0000000000..b997232f96 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteral7_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteral7(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type Foo = { foo: boolean }; +function f(shape: Foo): any; +function f(shape: () => Foo): any; +function f(arg: any) { + return arg; +} + +f({ /*1*/ }); +f(() => ({ /*2*/ })); +f(() => (({ /*3*/ })));` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2", "3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteral8_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteral8_test.go new file mode 100644 index 0000000000..64a8a8558a --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteral8_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteral8(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function test< + Variants extends Partial>, +>(v: Variants): void + +test({ + hover: "", + /**/ +});` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "pressed"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteralAssignmentPattern1_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteralAssignmentPattern1_test.go new file mode 100644 index 0000000000..ac54e319a7 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteralAssignmentPattern1_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteralAssignmentPattern1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `let x = { a: 1, b: 2 }; +let y = ({ /**/ } = x, 1);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteralAssignmentPattern2_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteralAssignmentPattern2_test.go new file mode 100644 index 0000000000..f2add86941 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteralAssignmentPattern2_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteralAssignmentPattern2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `let x = { a: 1, b: 2 }; +let y = ({ a, /**/ } = x, 1);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteralPropertyAssignment_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteralPropertyAssignment_test.go new file mode 100644 index 0000000000..22d7b5c394 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteralPropertyAssignment_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteralPropertyAssignment(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var foo; +interface I { + metadata: string; + wat: string; +} +var x: I = { + metadata: "/*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteralThatIsParameterOfFunctionCall_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteralThatIsParameterOfFunctionCall_test.go new file mode 100644 index 0000000000..af5649a19c --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteralThatIsParameterOfFunctionCall_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteralThatIsParameterOfFunctionCall(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function f(a: { xa: number; xb: number; }) { } +var xc; +f({ + /**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"xa", "xb"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInObjectLiteral_test.go b/internal/fourslash/tests/gen/completionListInObjectLiteral_test.go new file mode 100644 index 0000000000..419f8d69cd --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInObjectLiteral_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInObjectLiteral(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface point { + x: number; + y: number; +} +interface thing { + name: string; + pos: point; +} +var t: thing; +t.pos = { x: 4, y: 3 + t./**/ };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"name", "pos"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInReturnWithContextualThis_test.go b/internal/fourslash/tests/gen/completionListInReturnWithContextualThis_test.go new file mode 100644 index 0000000000..b5797f99c5 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInReturnWithContextualThis_test.go @@ -0,0 +1,52 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInReturnWithContextualThis(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Ctx { + foo(): { + x: number + }; +} + +declare function wrap(cb: (this: Ctx) => any): void; + +wrap(function () { + const xs = this.foo(); + return xs./*inReturn*/ +}); + +wrap(function () { + const xs = this.foo(); + const y = xs./*involvedInReturn*/ + return y; +});` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "inReturn", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) + f.VerifyCompletions(t, "involvedInReturn", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInScope_doesNotIncludeAugmentations_test.go b/internal/fourslash/tests/gen/completionListInScope_doesNotIncludeAugmentations_test.go new file mode 100644 index 0000000000..b41c6bbf8d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInScope_doesNotIncludeAugmentations_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInScope_doesNotIncludeAugmentations(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /a.ts +import * as self from "./a"; + +declare module "a" { + export const a: number; +} + +/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInScope_test.go b/internal/fourslash/tests/gen/completionListInScope_test.go new file mode 100644 index 0000000000..92a9afb74f --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInScope_test.go @@ -0,0 +1,103 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInScope(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module TestModule { + var localVariable = ""; + export var exportedVariable = 0; + + function localFunction() { } + export function exportedFunction() { } + + class localClass { } + export class exportedClass { } + + interface localInterface {} + export interface exportedInterface {} + + module localModule { + export var x = 0; + } + export module exportedModule { + export var x = 0; + } + + var v = /*valueReference*/ 0; + var t :/*typeReference*/; +} + +// Add some new items to the module +module TestModule { + var localVariable2 = ""; + export var exportedVariable2 = 0; + + function localFunction2() { } + export function exportedFunction2() { } + + class localClass2 { } + export class exportedClass2 { } + + interface localInterface2 {} + export interface exportedInterface2 {} + + module localModule2 { + export var x = 0; + } + export module exportedModule2 { + export var x = 0; + } +} +var globalVar: string = ""; +function globalFunction() { } + +class TestClass { + property: number; + method() { } + staticMethod() { } + testMethod(param: number) { + var localVar = 0; + function localFunction() {}; + /*insideMethod*/ + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "valueReference", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"localVariable", "exportedVariable", "localFunction", "exportedFunction", "localClass", "exportedClass", "localModule", "exportedModule", "exportedVariable2", "exportedFunction2", "exportedClass2", "exportedModule2"}, + }, + }) + f.VerifyCompletions(t, "typeReference", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"localInterface", "exportedInterface", "localClass", "exportedClass", "exportedClass2"}, + Excludes: []string{"localModule", "exportedModule", "exportedModule2"}, + }, + }) + f.VerifyCompletions(t, "insideMethod", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"globalVar", "globalFunction", "param", "localVar", "localFunction"}, + Excludes: []string{"property", "testMethod", "staticMethod"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInStringLiterals1_test.go b/internal/fourslash/tests/gen/completionListInStringLiterals1_test.go new file mode 100644 index 0000000000..449b123321 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInStringLiterals1_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInStringLiterals1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `"/*1*/ /*2*/\/*3*/ + /*4*/ \\/*5*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInStringLiterals2_test.go b/internal/fourslash/tests/gen/completionListInStringLiterals2_test.go new file mode 100644 index 0000000000..a5a9e95eb6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInStringLiterals2_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInStringLiterals2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `"/*1*/ /*2*/\/*3*/ + /*4*/ \\\/*5*/ + /*6*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInTemplateLiteralPartsNegatives1_test.go b/internal/fourslash/tests/gen/completionListInTemplateLiteralPartsNegatives1_test.go new file mode 100644 index 0000000000..6776926b0a --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInTemplateLiteralPartsNegatives1_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInTemplateLiteralPartsNegatives1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `` + "`" + `/*0*/ /*1*/$ /*2*/{ /*3*/$/*4*/{ 10 + 1.1 }/*5*/ 12312/*6*/` + "`" + ` + +` + "`" + `asdasd$/*7*/{ 2 + 1.1 }/*8*/ 12312 /*9*/{/*10*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), nil) +} diff --git a/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter2_test.go b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter2_test.go new file mode 100644 index 0000000000..3945564b63 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter2_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInTypeLiteralInTypeParameter2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo { + one: string; + two: number; +} + +interface Bar { + foo: T; +} + +var foobar: Bar<{ on/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"one", "two"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter3_test.go b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter3_test.go new file mode 100644 index 0000000000..95fa6c0e46 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter3_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInTypeLiteralInTypeParameter3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo { + one: string; + two: number; +} + +interface Bar { + foo: T; +} + +var foobar: Bar<{ one: string, /**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"two"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter4_test.go b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter4_test.go new file mode 100644 index 0000000000..f47e772703 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter4_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInTypeLiteralInTypeParameter4(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo { + one: string; + two: number; +} + +interface Bar { + foo: T; +} + +var foobar: Bar<{ one: string } & {/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"two"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter5_test.go b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter5_test.go new file mode 100644 index 0000000000..df6fa6a5b8 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter5_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInTypeLiteralInTypeParameter5(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo { + one: string; + two: number; +} + +interface Bar { + foo: T; +} + +var foobar: Bar<{ prop1: string } & {/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"one", "two"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter6_test.go b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter6_test.go new file mode 100644 index 0000000000..66edd009ba --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter6_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInTypeLiteralInTypeParameter6(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo { + one: string; + two: number; +} + +interface Bar { + foo: T; +} + +var foobar: Bar<{ one: string } | {/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"one", "two"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter7_test.go b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter7_test.go new file mode 100644 index 0000000000..32a9f4935c --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter7_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInTypeLiteralInTypeParameter7(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo { + one: string; + two: { + three: number; + } +} + +interface Bar { + foo: T; +} + +var foobar: Bar<{ + two: {/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"three"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter8_test.go b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter8_test.go new file mode 100644 index 0000000000..24e219a27e --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInTypeLiteralInTypeParameter8_test.go @@ -0,0 +1,67 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInTypeLiteralInTypeParameter8(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo { + one: string; + two: { + three: { + four: number; + five: string; + } + } +} + +interface Bar { + foo: T; +} + +var foobar: Bar<{ + two: { + three: { + five: string, + /*4*/ + }, + /*0*/ + }, + /*1*/ +}>;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"four"}, + }, + }) + f.VerifyCompletions(t, "0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"one"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInTypeParameterOfTypeAlias1_test.go b/internal/fourslash/tests/gen/completionListInTypeParameterOfTypeAlias1_test.go new file mode 100644 index 0000000000..fd226dac95 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInTypeParameterOfTypeAlias1_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInTypeParameterOfTypeAlias1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type List1 = T[]; +type List4 = /*2*/T[]; +type List3 = /*3*/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"0", "1"}, nil) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"T"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"T1"}, + Excludes: []string{"T"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInTypeParameterOfTypeAlias2_test.go b/internal/fourslash/tests/gen/completionListInTypeParameterOfTypeAlias2_test.go new file mode 100644 index 0000000000..d1a3d57ea7 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInTypeParameterOfTypeAlias2_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInTypeParameterOfTypeAlias2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type Map1 = []; +type Map1 = /*2*/[]; +type Map1 = = new a,/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedCommaExpression02_test.go b/internal/fourslash/tests/gen/completionListInUnclosedCommaExpression02_test.go new file mode 100644 index 0000000000..4997fa6a00 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedCommaExpression02_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedCommaExpression02(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// should NOT see a and b +foo((a, b) => (a,/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedDeleteExpression01_test.go b/internal/fourslash/tests/gen/completionListInUnclosedDeleteExpression01_test.go new file mode 100644 index 0000000000..58c71bc188 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedDeleteExpression01_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedDeleteExpression01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = delete /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedDeleteExpression02_test.go b/internal/fourslash/tests/gen/completionListInUnclosedDeleteExpression02_test.go new file mode 100644 index 0000000000..2b2fb121f7 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedDeleteExpression02_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedDeleteExpression02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = (p) => delete /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"x", "p"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedElementAccessExpression01_test.go b/internal/fourslash/tests/gen/completionListInUnclosedElementAccessExpression01_test.go new file mode 100644 index 0000000000..3d420c7272 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedElementAccessExpression01_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedElementAccessExpression01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = x[/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedElementAccessExpression02_test.go b/internal/fourslash/tests/gen/completionListInUnclosedElementAccessExpression02_test.go new file mode 100644 index 0000000000..d9412a56a9 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedElementAccessExpression02_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedElementAccessExpression02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = (p) => x[/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"p", "x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedForLoop01_test.go b/internal/fourslash/tests/gen/completionListInUnclosedForLoop01_test.go new file mode 100644 index 0000000000..c25ef1734d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedForLoop01_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedForLoop01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `for (let i = 0; /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"i"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedForLoop02_test.go b/internal/fourslash/tests/gen/completionListInUnclosedForLoop02_test.go new file mode 100644 index 0000000000..4b399c9467 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedForLoop02_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedForLoop02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `for (let i = 0; i < 10; i++) /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"i"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction01_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction01_test.go new file mode 100644 index 0000000000..80879944f4 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction01_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + /*1*/ +` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction02_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction02_test.go new file mode 100644 index 0000000000..8b355b190d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction02_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string, c: typeof /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction03_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction03_test.go new file mode 100644 index 0000000000..e226e36e0c --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction03_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction03(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string, c: typeof /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction04_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction04_test.go new file mode 100644 index 0000000000..94341aa074 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction04_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction04(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string, c: typeof x = /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction05_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction05_test.go new file mode 100644 index 0000000000..00bda44e36 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction05_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction05(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string, c: typeof x = /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction06_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction06_test.go new file mode 100644 index 0000000000..04e8b5e350 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction06_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction06(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = /*1*/, c: typeof x = "hello" +` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction07_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction07_test.go new file mode 100644 index 0000000000..aac3e57647 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction07_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction07(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = /*1*/, c: typeof x = "hello" +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction08_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction08_test.go new file mode 100644 index 0000000000..72fd2e0878 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction08_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction08(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b", "c"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction09_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction09_test.go new file mode 100644 index 0000000000..1854fcd9ce --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction09_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction09(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b", "c"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction10_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction10_test.go new file mode 100644 index 0000000000..69385ce51c --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction10_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction10(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (p: /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"MyType"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction11_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction11_test.go new file mode 100644 index 0000000000..7d44565b75 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction11_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction11(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (p: /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"MyType"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction12_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction12_test.go new file mode 100644 index 0000000000..bc3ae62dd0 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction12_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction12(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (p: /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"MyType"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction13_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction13_test.go new file mode 100644 index 0000000000..211be4fe4c --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction13_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction13(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (p: /*1*/ + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"MyType"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction14_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction14_test.go new file mode 100644 index 0000000000..3126445e8e --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction14_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction14(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (p: MyType) => /*1*/ + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b", "c", "v", "p"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction15_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction15_test.go new file mode 100644 index 0000000000..9462854272 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction15_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction15(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (p: MyType) => /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b", "c", "v", "p"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction16_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction16_test.go new file mode 100644 index 0000000000..28335d573e --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction16_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction16(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (p: MyType) => /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b", "c", "v", "p"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction17_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction17_test.go new file mode 100644 index 0000000000..20699cc250 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction17_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction17(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (p: MyType) => y + /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b", "c", "v", "p"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction18_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction18_test.go new file mode 100644 index 0000000000..aeaa2b5b54 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction18_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction18(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (p: MyType) => y + /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b", "c", "v", "p"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedFunction19_test.go b/internal/fourslash/tests/gen/completionListInUnclosedFunction19_test.go new file mode 100644 index 0000000000..108876f2aa --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedFunction19_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedFunction19(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyType { +} + +function foo(x: string, y: number, z: boolean) { + function bar(a: number, b: string = "hello", c: typeof x = "hello") { + var v = (p: MyType) => { return y + /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "x", "y", "z", "bar", "a", "b", "c", "v", "p"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedIndexSignature01_test.go b/internal/fourslash/tests/gen/completionListInUnclosedIndexSignature01_test.go new file mode 100644 index 0000000000..c83673ca0a --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedIndexSignature01_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedIndexSignature01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class C { + [foo: string]: typeof /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "C"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedIndexSignature03_test.go b/internal/fourslash/tests/gen/completionListInUnclosedIndexSignature03_test.go new file mode 100644 index 0000000000..35d9807311 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedIndexSignature03_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedIndexSignature03(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class C { + [foo: string]: { x: typeof /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "C"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature01_test.go b/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature01_test.go new file mode 100644 index 0000000000..df6eef5386 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature01_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedObjectTypeLiteralInSignature01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [s: string]: TString; + [s: number]: TNumber; +} + +declare function foo(obj: I): { str: T/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"I", "TString", "TNumber"}, + Excludes: []string{"foo", "obj"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature02_test.go b/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature02_test.go new file mode 100644 index 0000000000..137e60f73b --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature02_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedObjectTypeLiteralInSignature02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [s: string]: TString; + [s: number]: TNumber; +} + +declare function foo(obj: I): { str: TStr/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"I", "TString", "TNumber"}, + Excludes: []string{"foo", "obj"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature03_test.go b/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature03_test.go new file mode 100644 index 0000000000..0642b7999f --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature03_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedObjectTypeLiteralInSignature03(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [s: string]: TString; + [s: number]: TNumber; +} + +declare function foo(obj: I): { str: TString/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"I", "TString", "TNumber"}, + Excludes: []string{"foo", "obj"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature04_test.go b/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature04_test.go new file mode 100644 index 0000000000..c65067a4ec --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedObjectTypeLiteralInSignature04_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedObjectTypeLiteralInSignature04(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + [s: string]: TString; + [s: number]: TNumber; +} + +declare function foo(obj: I): { /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "readonly"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedSpreadExpression01_test.go b/internal/fourslash/tests/gen/completionListInUnclosedSpreadExpression01_test.go new file mode 100644 index 0000000000..5f787e4eed --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedSpreadExpression01_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedSpreadExpression01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = [1,2,.../*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedSpreadExpression02_test.go b/internal/fourslash/tests/gen/completionListInUnclosedSpreadExpression02_test.go new file mode 100644 index 0000000000..cc79502348 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedSpreadExpression02_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedSpreadExpression02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = (p) => [1,2,.../*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"p", "x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedTaggedTemplate01_test.go b/internal/fourslash/tests/gen/completionListInUnclosedTaggedTemplate01_test.go new file mode 100644 index 0000000000..a1f09baa67 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedTaggedTemplate01_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedTaggedTemplate01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = (p) => x ` + "`" + `abc ${ /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"p", "x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedTaggedTemplate02_test.go b/internal/fourslash/tests/gen/completionListInUnclosedTaggedTemplate02_test.go new file mode 100644 index 0000000000..e46f13ee8a --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedTaggedTemplate02_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedTaggedTemplate02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = (p) => x ` + "`" + `abc ${ 123 } ${ /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"p", "x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedTemplate01_test.go b/internal/fourslash/tests/gen/completionListInUnclosedTemplate01_test.go new file mode 100644 index 0000000000..35a051e0d6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedTemplate01_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedTemplate01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = (p) => ` + "`" + `abc ${ /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"p", "x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedTemplate02_test.go b/internal/fourslash/tests/gen/completionListInUnclosedTemplate02_test.go new file mode 100644 index 0000000000..a31726238d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedTemplate02_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedTemplate02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = (p) => ` + "`" + `abc ${ 123 } ${ /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"p", "x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedTypeOfExpression01_test.go b/internal/fourslash/tests/gen/completionListInUnclosedTypeOfExpression01_test.go new file mode 100644 index 0000000000..c4884f5e0b --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedTypeOfExpression01_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedTypeOfExpression01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = typeof /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedTypeOfExpression02_test.go b/internal/fourslash/tests/gen/completionListInUnclosedTypeOfExpression02_test.go new file mode 100644 index 0000000000..89ba25975d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedTypeOfExpression02_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedTypeOfExpression02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = (p) => typeof /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"x", "p"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInUnclosedVoidExpression01_test.go b/internal/fourslash/tests/gen/completionListInUnclosedVoidExpression01_test.go new file mode 100644 index 0000000000..8f73527d2b --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInUnclosedVoidExpression01_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInUnclosedVoidExpression01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x; +var y = (p) => void /*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"p", "x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInferKeyword_test.go b/internal/fourslash/tests/gen/completionListInferKeyword_test.go new file mode 100644 index 0000000000..3119c6fb56 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInferKeyword_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInferKeyword(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type Bar = T extends { a: (x: in/**/) => void } + ? U + : never;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindKeyword), SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "infer"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInstanceProtectedMembers2_test.go b/internal/fourslash/tests/gen/completionListInstanceProtectedMembers2_test.go new file mode 100644 index 0000000000..224261d624 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInstanceProtectedMembers2_test.go @@ -0,0 +1,85 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInstanceProtectedMembers2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Base { + private privateMethod() { } + private privateProperty; + + protected protectedMethod() { } + protected protectedProperty; + + public publicMethod() { } + public publicProperty; + + protected protectedOverriddenMethod() { } + protected protectedOverriddenProperty; +} + +class C1 extends Base { + protected protectedOverriddenMethod() { } + protected protectedOverriddenProperty; + + test() { + this./*1*/; + super./*2*/; + + var b: Base; + var c: C1; + + b./*3*/; + c./*4*/; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"protectedMethod", "protectedProperty", "publicMethod", "publicProperty", "protectedOverriddenMethod", "protectedOverriddenProperty"}, + Excludes: []string{"privateMethod", "privateProperty"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"protectedMethod", "publicMethod", "protectedOverriddenMethod"}, + Excludes: []string{"privateMethod", "privateProperty", "protectedProperty", "publicProperty", "protectedOverriddenProperty"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"publicMethod", "publicProperty"}, + Excludes: []string{"privateMethod", "privateProperty", "protectedMethod", "protectedProperty", "protectedOverriddenMethod", "protectedOverriddenProperty"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"protectedMethod", "protectedProperty", "publicMethod", "publicProperty", "protectedOverriddenMethod", "protectedOverriddenProperty"}, + Excludes: []string{"privateMethod", "privateProperty"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInstanceProtectedMembers3_test.go b/internal/fourslash/tests/gen/completionListInstanceProtectedMembers3_test.go new file mode 100644 index 0000000000..3a8d058188 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInstanceProtectedMembers3_test.go @@ -0,0 +1,48 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInstanceProtectedMembers3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Base { + private privateMethod() { } + private privateProperty; + + protected protectedMethod() { } + protected protectedProperty; + + public publicMethod() { } + public publicProperty; + + protected protectedOverriddenMethod() { } + protected protectedOverriddenProperty; +} + +class C1 extends Base { + protected protectedOverriddenMethod() { } + protected protectedOverriddenProperty; +} + + var b: Base; + var c: C1; + b./*1*/; + c./*2*/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"publicMethod", "publicProperty"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInstanceProtectedMembers4_test.go b/internal/fourslash/tests/gen/completionListInstanceProtectedMembers4_test.go new file mode 100644 index 0000000000..466f61f459 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInstanceProtectedMembers4_test.go @@ -0,0 +1,46 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInstanceProtectedMembers4(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Base { + private privateMethod() { } + private privateProperty; + + protected protectedMethod() { } + protected protectedProperty; + + public publicMethod() { } + public publicProperty; + + protected protectedOverriddenMethod() { } + protected protectedOverriddenProperty; +} + +class C1 extends Base { + public protectedOverriddenMethod() { } + public protectedOverriddenProperty; +} + + var c: C1; + c./*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"protectedOverriddenMethod", "protectedOverriddenProperty", "publicMethod", "publicProperty"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListInvalidMemberNames_withExistingIdentifier_test.go b/internal/fourslash/tests/gen/completionListInvalidMemberNames_withExistingIdentifier_test.go new file mode 100644 index 0000000000..3bff28f9aa --- /dev/null +++ b/internal/fourslash/tests/gen/completionListInvalidMemberNames_withExistingIdentifier_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListInvalidMemberNames_withExistingIdentifier(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare const x: { "foo ": "space in the name", }; +x[|.fo/*0*/|]; +x[|./*1*/|] +unrelatedIdentifier;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "foo ", InsertText: ptrTo("[\"foo \"]")}}, + }, + }) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "foo ", InsertText: ptrTo("[\"foo \"]")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListNewIdentifierBindingElement_test.go b/internal/fourslash/tests/gen/completionListNewIdentifierBindingElement_test.go new file mode 100644 index 0000000000..99d66a309c --- /dev/null +++ b/internal/fourslash/tests/gen/completionListNewIdentifierBindingElement_test.go @@ -0,0 +1,17 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListNewIdentifierBindingElement(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var { x:html/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", nil) +} diff --git a/internal/fourslash/tests/gen/completionListNewIdentifierVariableDeclaration_test.go b/internal/fourslash/tests/gen/completionListNewIdentifierVariableDeclaration_test.go new file mode 100644 index 0000000000..83d9a1160d --- /dev/null +++ b/internal/fourslash/tests/gen/completionListNewIdentifierVariableDeclaration_test.go @@ -0,0 +1,17 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListNewIdentifierVariableDeclaration(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var y : (s:string, list/*2*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "2", nil) +} diff --git a/internal/fourslash/tests/gen/completionListOnAliasedModule_test.go b/internal/fourslash/tests/gen/completionListOnAliasedModule_test.go new file mode 100644 index 0000000000..45c4f70a0f --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOnAliasedModule_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOnAliasedModule(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module M { + export module N { + export function foo() { } + function bar() { } + } +} +import p = M.N; +p./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListOnAliases3_test.go b/internal/fourslash/tests/gen/completionListOnAliases3_test.go new file mode 100644 index 0000000000..348b4b1fd9 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOnAliases3_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOnAliases3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare module 'foobar' { + interface Q { x: number; } +} +declare module 'thing' { + import x = require('foobar'); + var m: x./*1*/; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Q"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListOnFunctionCallWithOptionalArgument_test.go b/internal/fourslash/tests/gen/completionListOnFunctionCallWithOptionalArgument_test.go new file mode 100644 index 0000000000..12031f8baa --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOnFunctionCallWithOptionalArgument_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOnFunctionCallWithOptionalArgument(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function Foo(arg1?: Function): { q: number }; +Foo(function () { } )./**/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"q"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListOnMethodParameterName_test.go b/internal/fourslash/tests/gen/completionListOnMethodParameterName_test.go new file mode 100644 index 0000000000..7db3db4a0f --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOnMethodParameterName_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOnMethodParameterName(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class A { + foo(nu/**/: number) { + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionListOnParamInClass_test.go b/internal/fourslash/tests/gen/completionListOnParamInClass_test.go new file mode 100644 index 0000000000..2fdcd6abdf --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOnParamInClass_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOnParamInClass(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `export class encoder { + static getEncoding(buffer: buffer/**/Pointer +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"encoder"}, + Excludes: []string{"parseInt"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListOnParam_test.go b/internal/fourslash/tests/gen/completionListOnParam_test.go new file mode 100644 index 0000000000..70f5f7b4e0 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOnParam_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOnParam(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module Bar { + export class Blah { } +} + +class Point { + public Foo(x: Bar./**/Blah, y: Bar.Blah) { } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Blah"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListOnSuper_test.go b/internal/fourslash/tests/gen/completionListOnSuper_test.go new file mode 100644 index 0000000000..63704bc4ef --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOnSuper_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOnSuper(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class TAB{ + foo(x: T) { + } + bar(a: number, b: number) { + } +} + +class TAD extends TAB { + constructor() { + super(); + } + bar(f: number) { + super./**/ + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar", "foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListOnVarBetweenModules_test.go b/internal/fourslash/tests/gen/completionListOnVarBetweenModules_test.go new file mode 100644 index 0000000000..130bd04717 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOnVarBetweenModules_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOnVarBetweenModules(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module M1 { + export class C1 { + } + export class C2 { + } +} +var x: M1./**/ +module M2 { + export class Test3 { + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"C1", "C2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListOutsideOfClosedArrowFunction01_test.go b/internal/fourslash/tests/gen/completionListOutsideOfClosedArrowFunction01_test.go new file mode 100644 index 0000000000..cd30cfc6d6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOutsideOfClosedArrowFunction01_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOutsideOfClosedArrowFunction01(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// no a or b +/*1*/(a, b) => { }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListOutsideOfClosedArrowFunction02_test.go b/internal/fourslash/tests/gen/completionListOutsideOfClosedArrowFunction02_test.go new file mode 100644 index 0000000000..c108e08180 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOutsideOfClosedArrowFunction02_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOutsideOfClosedArrowFunction02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// no a or b +(a, b) => { }/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListOutsideOfClosedFunctionDeclaration01_test.go b/internal/fourslash/tests/gen/completionListOutsideOfClosedFunctionDeclaration01_test.go new file mode 100644 index 0000000000..bd22ea2eb4 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOutsideOfClosedFunctionDeclaration01_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOutsideOfClosedFunctionDeclaration01(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// no a or b +/*1*/function f (a, b) {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListOutsideOfForLoop01_test.go b/internal/fourslash/tests/gen/completionListOutsideOfForLoop01_test.go new file mode 100644 index 0000000000..b4e22bd164 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOutsideOfForLoop01_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOutsideOfForLoop01(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `for (let i = 0; i < 10; i++) i;/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"i"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListOutsideOfForLoop02_test.go b/internal/fourslash/tests/gen/completionListOutsideOfForLoop02_test.go new file mode 100644 index 0000000000..922330aa89 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListOutsideOfForLoop02_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListOutsideOfForLoop02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `for (let i = 0; i < 10; i++);/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"i"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListPrivateMembers2_test.go b/internal/fourslash/tests/gen/completionListPrivateMembers2_test.go new file mode 100644 index 0000000000..f5333bc4a7 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListPrivateMembers2_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListPrivateMembers2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + private y; + constructor(private x) {} + method() { this./*1*/; } +} +var f:Foo; +f./*2*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"method", "x", "y"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"method"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListPrivateMembers3_test.go b/internal/fourslash/tests/gen/completionListPrivateMembers3_test.go new file mode 100644 index 0000000000..546132cdaa --- /dev/null +++ b/internal/fourslash/tests/gen/completionListPrivateMembers3_test.go @@ -0,0 +1,42 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListPrivateMembers3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Other { + public p; + protected p2 + private p3; +} + +class Self { + private other: Other; + + method() { + this.other./*1*/; + + this.other.p/*2*/; + + this.other.p/*3*/.toString(); + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2", "3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"p"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListPrivateMembers_test.go b/internal/fourslash/tests/gen/completionListPrivateMembers_test.go new file mode 100644 index 0000000000..ecc0d4c49e --- /dev/null +++ b/internal/fourslash/tests/gen/completionListPrivateMembers_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListPrivateMembers(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + private x; +} + +class Bar extends Foo { + private y; + foo() { + this./**/ + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo", "y"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListStaticProtectedMembers_test.go b/internal/fourslash/tests/gen/completionListStaticProtectedMembers_test.go new file mode 100644 index 0000000000..bc8c631b90 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListStaticProtectedMembers_test.go @@ -0,0 +1,60 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListStaticProtectedMembers(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Base { + private static privateMethod() { } + private static privateProperty; + + protected static protectedMethod() { } + protected static protectedProperty; + + public static publicMethod() { } + public static publicProperty; + + protected static protectedOverriddenMethod() { } + protected static protectedOverriddenProperty; + + static test() { + Base./*1*/; + this./*2*/; + C1./*3*/; + } +} + +class C1 extends Base { + protected static protectedOverriddenMethod() { } + protected static protectedOverriddenProperty; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "privateMethod"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "privateProperty"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "protectedMethod"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "protectedProperty"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "publicMethod"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "publicProperty"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "protectedOverriddenMethod"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "protectedOverriddenProperty"}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "privateMethod"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "privateProperty"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "protectedMethod"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "protectedProperty"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "publicMethod"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "publicProperty"}}, + Excludes: []string{"protectedOverriddenMethod", "protectedOverriddenProperty"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListStringParenthesizedExpression_test.go b/internal/fourslash/tests/gen/completionListStringParenthesizedExpression_test.go new file mode 100644 index 0000000000..3356dc6cd2 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListStringParenthesizedExpression_test.go @@ -0,0 +1,51 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListStringParenthesizedExpression(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const foo = { + a: 1, + b: 1, + c: 1 +} +const a = foo["[|/*1*/|]"]; +const b = foo[("[|/*2*/|]")]; +const c = foo[(("[|/*3*/|]"))];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}, &lsproto.CompletionItem{Label: "c"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}, &lsproto.CompletionItem{Label: "c"}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}, &lsproto.CompletionItem{Label: "c"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListStringParenthesizedType_test.go b/internal/fourslash/tests/gen/completionListStringParenthesizedType_test.go new file mode 100644 index 0000000000..55227f7979 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListStringParenthesizedType_test.go @@ -0,0 +1,106 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListStringParenthesizedType(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type T1 = "a" | "b" | "c"; +type T2 = {}; + +type T3 = T2<"[|/*1*/|]">; +type T4 = T2<("[|/*2*/|]")>; +type T5 = T2<(("[|/*3*/|]"))>; +type T6 = T2<((("[|/*4*/|]")))>; + +type T7

= {}; +type T8 = T7<"a", ((("[|/*5*/|]")))>; + +interface Foo { + a: number; + b: number; +} +const a: Foo["[|/*6*/|]"]; +const b: Foo[("[|/*7*/|]")]; +const b: Foo[(("[|/*8*/|]"))];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}, &lsproto.CompletionItem{Label: "c"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}, &lsproto.CompletionItem{Label: "c"}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}, &lsproto.CompletionItem{Label: "c"}}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}, &lsproto.CompletionItem{Label: "c"}}, + }, + }) + f.VerifyCompletions(t, "5", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}, &lsproto.CompletionItem{Label: "c"}}, + }, + }) + f.VerifyCompletions(t, "6", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}}, + }, + }) + f.VerifyCompletions(t, "7", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}}, + }, + }) + f.VerifyCompletions(t, "8", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListSuperMembers_test.go b/internal/fourslash/tests/gen/completionListSuperMembers_test.go new file mode 100644 index 0000000000..02c7c5a52f --- /dev/null +++ b/internal/fourslash/tests/gen/completionListSuperMembers_test.go @@ -0,0 +1,48 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListSuperMembers(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Base { + private privateInstanceMethod() { } + public publicInstanceMethod() { } + + private privateProperty = 1; + public publicProperty = 1; + + private static privateStaticProperty = 1; + public static publicStaticProperty = 1; + + private static privateStaticMethod() { } + public static publicStaticMethod() { + Class./*staticsInsideClassScope*/publicStaticMethod(); + var c = new Class(); + c./*instanceMembersInsideClassScope*/privateProperty; + } +} +class Class extends Base { + private test() { + super./**/ + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"publicInstanceMethod"}, + Excludes: []string{"publicProperty", "publicStaticProperty", "publicStaticMethod", "privateProperty", "privateInstanceMethod"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListWithAmbientDeclaration_test.go b/internal/fourslash/tests/gen/completionListWithAmbientDeclaration_test.go new file mode 100644 index 0000000000..1f7f073998 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListWithAmbientDeclaration_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListWithAmbientDeclaration(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare module "http" { + var x; + /*1*/ +} +declare module 'https' { +} +/*2*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"http"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"http", "https"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListWithLabel_test.go b/internal/fourslash/tests/gen/completionListWithLabel_test.go new file mode 100644 index 0000000000..40b390cfeb --- /dev/null +++ b/internal/fourslash/tests/gen/completionListWithLabel_test.go @@ -0,0 +1,55 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListWithLabel(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = ` label: while (true) { + break /*1*/ + continue /*2*/ + testlabel: while (true) { + break /*3*/ + continue /*4*/ + break tes/*5*/ + continue tes/*6*/ + } + break /*7*/ + break; /*8*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2", "7"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"label"}, + }, + }) + f.VerifyCompletions(t, []string{"3", "4", "5", "6"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"testlabel", "label"}, + }, + }) + f.VerifyCompletions(t, "8", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"label"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListWithUnresolvedModule_test.go b/internal/fourslash/tests/gen/completionListWithUnresolvedModule_test.go new file mode 100644 index 0000000000..eb5b2badb1 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListWithUnresolvedModule_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListWithUnresolvedModule(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module m { + import foo = module('_foo'); + var n: num/**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "number"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListWithoutVariableinitializer_test.go b/internal/fourslash/tests/gen/completionListWithoutVariableinitializer_test.go new file mode 100644 index 0000000000..a8b94288d9 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListWithoutVariableinitializer_test.go @@ -0,0 +1,108 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListWithoutVariableinitializer(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const a = a/*1*/; +const b = a && b/*2*/; +const c = [{ prop: [c/*3*/] }]; +const d = () => { d/*4*/ }; +const e = () => expression/*5*/ +const f = { prop() { e/*6*/ } }; +const fn = (p = /*7*/) => {} +const { g, h = /*8*/ } = { ... } +const [ g1, h1 = /*9*/ ] = [ ... ]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"a"}, + }, + }) + f.VerifyCompletions(t, []string{"2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a"}, + Excludes: []string{"b"}, + }, + }) + f.VerifyCompletions(t, []string{"3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b"}, + Excludes: []string{"c"}, + }, + }) + f.VerifyCompletions(t, []string{"4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b", "c", "d"}, + }, + }) + f.VerifyCompletions(t, []string{"5"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b", "c", "d", "e"}, + }, + }) + f.VerifyCompletions(t, []string{"6"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b", "c", "d", "e"}, + }, + }) + f.VerifyCompletions(t, []string{"7"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b", "c", "d", "e", "fn"}, + }, + }) + f.VerifyCompletions(t, []string{"8"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b", "c", "d", "e", "fn"}, + }, + }) + f.VerifyCompletions(t, []string{"9"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b", "c", "d", "e", "fn"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionList_getExportsOfModule_test.go b/internal/fourslash/tests/gen/completionList_getExportsOfModule_test.go new file mode 100644 index 0000000000..41c93599c7 --- /dev/null +++ b/internal/fourslash/tests/gen/completionList_getExportsOfModule_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionList_getExportsOfModule(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare module "x" { + declare var x: number; + export = x; +} + +let y: /**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionListsStringLiteralTypeAsIndexedAccessTypeObject_test.go b/internal/fourslash/tests/gen/completionListsStringLiteralTypeAsIndexedAccessTypeObject_test.go new file mode 100644 index 0000000000..38ce07b007 --- /dev/null +++ b/internal/fourslash/tests/gen/completionListsStringLiteralTypeAsIndexedAccessTypeObject_test.go @@ -0,0 +1,45 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionListsStringLiteralTypeAsIndexedAccessTypeObject(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `let firstCase: "a/*case_1*/"["foo"] +let secondCase: "b/*case_2*/"["bar"] +let thirdCase: "c/*case_3*/"["baz"] +let fourthCase: "en/*case_4*/"["qux"] +interface Foo { + bar: string; + qux: string; +} +let fifthCase: Foo["b/*case_5*/"] +let sixthCase: Foo["qu/*case_6*/"]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"case_1", "case_2", "case_3", "case_4"}, nil) + f.VerifyCompletions(t, "case_5", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "bar"}}, + }, + }) + f.VerifyCompletions(t, "case_6", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "qux"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionNoAutoInsertQuestionDotWithUserPreferencesOff_test.go b/internal/fourslash/tests/gen/completionNoAutoInsertQuestionDotWithUserPreferencesOff_test.go new file mode 100644 index 0000000000..e888e0e65e --- /dev/null +++ b/internal/fourslash/tests/gen/completionNoAutoInsertQuestionDotWithUserPreferencesOff_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionNoAutoInsertQuestionDotWithUserPreferencesOff(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +interface User { + address?: { + city: string; + "postal code": string; + } +}; +declare const user: User; +user.address[|./**/|]` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionOfAwaitPromise4_test.go b/internal/fourslash/tests/gen/completionOfAwaitPromise4_test.go new file mode 100644 index 0000000000..6f16ade8f6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionOfAwaitPromise4_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionOfAwaitPromise4(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo(x: Promise) { + [|x./**/|] +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"then"}, + Excludes: []string{"trim"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionOfAwaitPromise6_test.go b/internal/fourslash/tests/gen/completionOfAwaitPromise6_test.go new file mode 100644 index 0000000000..7755f9772f --- /dev/null +++ b/internal/fourslash/tests/gen/completionOfAwaitPromise6_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionOfAwaitPromise6(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `async function foo(x: Promise) { + [|x./**/|] +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"catch", "then"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionPreferredSuggestions1_test.go b/internal/fourslash/tests/gen/completionPreferredSuggestions1_test.go new file mode 100644 index 0000000000..925062835c --- /dev/null +++ b/internal/fourslash/tests/gen/completionPreferredSuggestions1_test.go @@ -0,0 +1,73 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionPreferredSuggestions1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare let v1: string & {} | "a" | "b" | "c"; +v1 = "/*1*/"; +declare let v2: number & {} | 0 | 1 | 2; +v2 = /*2*/; +declare let v3: string & Record | "a" | "b" | "c"; +v3 = "/*3*/"; +type LiteralUnion1 = T | U & {}; +type LiteralUnion2 = T | U & Record; +declare let v4: LiteralUnion1<"a" | "b" | "c", string>; +v4 = "/*4*/"; +declare let v5: LiteralUnion2<"a" | "b" | "c", string>; +v5 = "/*5*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b", "c"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"0", "1", "2"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b", "c"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) + f.VerifyCompletions(t, "5", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b", "c"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionSatisfiesKeyword_test.go b/internal/fourslash/tests/gen/completionSatisfiesKeyword_test.go new file mode 100644 index 0000000000..cfbc3f4fdc --- /dev/null +++ b/internal/fourslash/tests/gen/completionSatisfiesKeyword_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionSatisfiesKeyword(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const x = { a: 1 } /*1*/ +function foo() { + const x = { a: 1 } /*2*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "satisfies"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionTypeofExpressions_test.go b/internal/fourslash/tests/gen/completionTypeofExpressions_test.go new file mode 100644 index 0000000000..b7a8acd291 --- /dev/null +++ b/internal/fourslash/tests/gen/completionTypeofExpressions_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionTypeofExpressions(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const x = "str"; +function test(arg: typeof x./*1*/) {} +function test1(arg: typeof (x./*2*/)) {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"length"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"length"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionUsingKeyword_test.go b/internal/fourslash/tests/gen/completionUsingKeyword_test.go new file mode 100644 index 0000000000..a35f87c74f --- /dev/null +++ b/internal/fourslash/tests/gen/completionUsingKeyword_test.go @@ -0,0 +1,42 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionUsingKeyword(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function foo() { + usin/*1*/ +} +async function bar() { + await usin/*2*/ +} + +class C { + foo() { + usin/*3*/ + } + + async bar() { + await usin/*4*/ + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2", "3", "4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "using"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionWithConditionalOperatorMissingColon_test.go b/internal/fourslash/tests/gen/completionWithConditionalOperatorMissingColon_test.go new file mode 100644 index 0000000000..6be30b01f3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionWithConditionalOperatorMissingColon_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionWithConditionalOperatorMissingColon(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `1 ? fun/*1*/ +function func () {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"func"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completions03_test.go b/internal/fourslash/tests/gen/completions03_test.go new file mode 100644 index 0000000000..fa2aab6f26 --- /dev/null +++ b/internal/fourslash/tests/gen/completions03_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletions03(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = ` interface Foo { + one: any; + two: any; + three: any; + } + + let x: Foo = { + get one() { return "" }, + set two(t) {}, + /**/ + }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"three"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsAfterAsyncInObjectLiteral_test.go b/internal/fourslash/tests/gen/completionsAfterAsyncInObjectLiteral_test.go new file mode 100644 index 0000000000..d59947c52a --- /dev/null +++ b/internal/fourslash/tests/gen/completionsAfterAsyncInObjectLiteral_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsAfterAsyncInObjectLiteral(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const x: { m(): Promise } = { async /**/ };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"m"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsAfterJSDoc_test.go b/internal/fourslash/tests/gen/completionsAfterJSDoc_test.go new file mode 100644 index 0000000000..37f4a748ab --- /dev/null +++ b/internal/fourslash/tests/gen/completionsAfterJSDoc_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsAfterJSDoc(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `export interface Foo { + /** JSDoc */ + /**/foo(): void; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindKeyword), SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "readonly"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsAfterKeywordsInBlock_test.go b/internal/fourslash/tests/gen/completionsAfterKeywordsInBlock_test.go new file mode 100644 index 0000000000..78730ab567 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsAfterKeywordsInBlock_test.go @@ -0,0 +1,75 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsAfterKeywordsInBlock(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class C1 { + method(map: Map, key: string, defaultValue: string) { + try { + return map.get(key)!; + } + catch { + return default/*1*/ + } + } +} +class C2 { + method(map: Map, key: string, defaultValue: string) { + if (map.has(key)) { + return map.get(key)!; + } + else { + return default/*2*/ + } + } +} +class C3 { + method(map: Map, key: string, returnValue: string) { + try { + return map.get(key)!; + } + catch { + return return/*3*/ + } + } +} +class C4 { + method(map: Map, key: string, returnValue: string) { + if (map.has(key)) { + return map.get(key)!; + } + else { + return return/*4*/ + } + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "defaultValue"}}, + }, + }) + f.VerifyCompletions(t, []string{"3", "4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "returnValue"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsAsserts_test.go b/internal/fourslash/tests/gen/completionsAsserts_test.go new file mode 100644 index 0000000000..73fb0d5b6c --- /dev/null +++ b/internal/fourslash/tests/gen/completionsAsserts_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsAsserts(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function assert(argument1: any): asserts a/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "argument1"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsAtIncompleteObjectLiteralProperty_test.go b/internal/fourslash/tests/gen/completionsAtIncompleteObjectLiteralProperty_test.go new file mode 100644 index 0000000000..61ee30d2c1 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsAtIncompleteObjectLiteralProperty_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsAtIncompleteObjectLiteralProperty(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @noLib: true +f({ + a/**/ + xyz: ` + "`" + `` + "`" + `, +}); +declare function f(options: { abc?: number, xyz?: string }): void;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "abc?", InsertText: ptrTo("abc"), FilterText: ptrTo("abc")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsAtTypeArguments_test.go b/internal/fourslash/tests/gen/completionsAtTypeArguments_test.go new file mode 100644 index 0000000000..ca20f0f23f --- /dev/null +++ b/internal/fourslash/tests/gen/completionsAtTypeArguments_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsAtTypeArguments(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + a: string; + b: number; +} +type T1 = Pick; +interface T2 extends Pick {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsBigIntShowNoCompletions_test.go b/internal/fourslash/tests/gen/completionsBigIntShowNoCompletions_test.go new file mode 100644 index 0000000000..c0580da524 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsBigIntShowNoCompletions_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsBigIntShowNoCompletions(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number +const foo = 0n/*1*/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsClassPropertiesAfterPrivateProperty_test.go b/internal/fourslash/tests/gen/completionsClassPropertiesAfterPrivateProperty_test.go new file mode 100644 index 0000000000..9e008292b2 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsClassPropertiesAfterPrivateProperty_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsClassPropertiesAfterPrivateProperty(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface X { + bla: string; +} +class Y implements X { + private blub = ""; + /**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"bla"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsCombineOverloads_restParameter_test.go b/internal/fourslash/tests/gen/completionsCombineOverloads_restParameter_test.go new file mode 100644 index 0000000000..2c69367fe2 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsCombineOverloads_restParameter_test.go @@ -0,0 +1,42 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsCombineOverloads_restParameter(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface A { a: number } +interface B { b: number } +interface C { c: number } +declare function f(a: A): void; +declare function f(...bs: B[]): void; +declare function f(...cs: C[]): void; +f({ /*1*/ }); +f({ a: 1 }, { /*2*/ });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "b", "c"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"b", "c"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsCombineOverloads_returnType_test.go b/internal/fourslash/tests/gen/completionsCombineOverloads_returnType_test.go new file mode 100644 index 0000000000..2f9588caf6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsCombineOverloads_returnType_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsCombineOverloads_returnType(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface A { a: number } +interface B { b: number } +declare function f(n: number): A; +declare function f(s: string): B; +f()./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsCombineOverloads_test.go b/internal/fourslash/tests/gen/completionsCombineOverloads_test.go new file mode 100644 index 0000000000..3f7c8ddf54 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsCombineOverloads_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsCombineOverloads(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface A { a: number } +interface B { b: number } +declare function f(a: A): void; +declare function f(b: B): void; +f({ /**/ });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsConditionalMember_test.go b/internal/fourslash/tests/gen/completionsConditionalMember_test.go new file mode 100644 index 0000000000..7d23e2ced3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsConditionalMember_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsConditionalMember(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function f( + p: { a: T extends 'foo' ? { x: string } : { y: string } } +): void; + +f<'foo'>({ a: { /*1*/ } }); +f({ a: { /*2*/ } });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "x"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "y"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsDefaultKeywordWhenDefaultExportAvailable_test.go b/internal/fourslash/tests/gen/completionsDefaultKeywordWhenDefaultExportAvailable_test.go new file mode 100644 index 0000000000..503c29aa3d --- /dev/null +++ b/internal/fourslash/tests/gen/completionsDefaultKeywordWhenDefaultExportAvailable_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsDefaultKeywordWhenDefaultExportAvailable(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @filename: index.ts +export default function () {} +def/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindKeyword), SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "default"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsDestructuring_test.go b/internal/fourslash/tests/gen/completionsDestructuring_test.go new file mode 100644 index 0000000000..daa76b1ce5 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsDestructuring_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsDestructuring(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const points = [{ x: 1, y: 2 }]; +points.forEach(({ /*a*/ }) => { }); +const { /*b*/ } = points[0]; +for (const { /*c*/ } of points) {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x", "y"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsDiscriminatedUnion_test.go b/internal/fourslash/tests/gen/completionsDiscriminatedUnion_test.go new file mode 100644 index 0000000000..a2cf127716 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsDiscriminatedUnion_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsDiscriminatedUnion(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface A { kind: "a"; a: number; } +interface B { kind: "b"; b: number; } +const c: A | B = { kind: "a", /**/ };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsDotDotDotInObjectLiteral1_test.go b/internal/fourslash/tests/gen/completionsDotDotDotInObjectLiteral1_test.go new file mode 100644 index 0000000000..a0f7cee4e5 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsDotDotDotInObjectLiteral1_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsDotDotDotInObjectLiteral1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// https://github.com/microsoft/TypeScript/issues/57540 + +const foo = { b: 100 }; + +const bar: { + a: number; + b: number; +} = { + a: 42, + .../*1*/ +};` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo"}, + Excludes: []string{"b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsECMAPrivateMemberTriggerCharacter_test.go b/internal/fourslash/tests/gen/completionsECMAPrivateMemberTriggerCharacter_test.go new file mode 100644 index 0000000000..a7b5f9fd39 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsECMAPrivateMemberTriggerCharacter_test.go @@ -0,0 +1,42 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsECMAPrivateMemberTriggerCharacter(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @target: esnext +class K { + #value: number; + + foo() { + this.#/**/ + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#value", "foo"}, + }, + }) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#value", "foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsExternalModuleRenamedExports_test.go b/internal/fourslash/tests/gen/completionsExternalModuleRenamedExports_test.go new file mode 100644 index 0000000000..879925911e --- /dev/null +++ b/internal/fourslash/tests/gen/completionsExternalModuleRenamedExports_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsExternalModuleRenamedExports(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: other.ts +export {}; +// @Filename: index.ts +const c = 0; +export { c as yeahThisIsTotallyInScopeHuh }; +export * as alsoNotInScope from "./other"; + +/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"c"}, + Excludes: []string{"yeahThisIsTotallyInScopeHuh", "alsoNotInScope"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsForLatterTypeParametersInConstraints1_test.go b/internal/fourslash/tests/gen/completionsForLatterTypeParametersInConstraints1_test.go new file mode 100644 index 0000000000..6313171721 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsForLatterTypeParametersInConstraints1_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsForLatterTypeParametersInConstraints1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// https://github.com/microsoft/TypeScript/issues/56474 +function test(a: First, b: Second) {} +type A1 = K` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"Second"}, + Excludes: []string{"First"}, + }, + }) + f.VerifyCompletions(t, []string{"2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"L"}, + Excludes: []string{"K"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsForRecursiveGenericTypesMember_test.go b/internal/fourslash/tests/gen/completionsForRecursiveGenericTypesMember_test.go new file mode 100644 index 0000000000..64cd1ab4e4 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsForRecursiveGenericTypesMember_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsForRecursiveGenericTypesMember(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `export class TestBase> +{ + public publicMethod(p: any): void {} + private privateMethod(p: any): void {} + protected protectedMethod(p: any): void {} + public test(t: T): void + { + t./**/ + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"privateMethod", "protectedMethod", "publicMethod", "test"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsForSelfTypeParameterInConstraint1_test.go b/internal/fourslash/tests/gen/completionsForSelfTypeParameterInConstraint1_test.go new file mode 100644 index 0000000000..42af8ad7fe --- /dev/null +++ b/internal/fourslash/tests/gen/completionsForSelfTypeParameterInConstraint1_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsForSelfTypeParameterInConstraint1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type StateMachine = { + initial?: "states" extends keyof Config ? keyof Config["states"] : never; + states?: Record; +}; +declare function createMachine>( + config: Config, +): void;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"Config"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsGeneratorFunctions_test.go b/internal/fourslash/tests/gen/completionsGeneratorFunctions_test.go new file mode 100644 index 0000000000..13d0cae614 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsGeneratorFunctions_test.go @@ -0,0 +1,58 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsGeneratorFunctions(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function /*a*/ ; +function* /*b*/ ; +interface I { + abstract baseMethod(): Iterable; +} +class C implements I { + */*c*/ ; + public */*d*/ +} +const o: I = { + */*e*/ +}; +1 * /*f*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"a", "b"}, nil) + f.VerifyCompletions(t, []string{"c", "d"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"baseMethod"}, + }, + }) + f.VerifyCompletions(t, "e", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"baseMethod"}, + }, + }) + f.VerifyCompletions(t, "f", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "Number"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsGenericIndexedAccess1_test.go b/internal/fourslash/tests/gen/completionsGenericIndexedAccess1_test.go new file mode 100644 index 0000000000..916c91ca5a --- /dev/null +++ b/internal/fourslash/tests/gen/completionsGenericIndexedAccess1_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsGenericIndexedAccess1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Sample { + addBook: { name: string, year: number } +} + +export declare function testIt(method: T[keyof T]): any +testIt({ /**/ });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "name"}, &lsproto.CompletionItem{Label: "year"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsGenericIndexedAccess2_test.go b/internal/fourslash/tests/gen/completionsGenericIndexedAccess2_test.go new file mode 100644 index 0000000000..eb608d0f29 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsGenericIndexedAccess2_test.go @@ -0,0 +1,47 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsGenericIndexedAccess2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `export type GetMethodsForType = { [K in keyof T]: + T[K] extends () => any ? { name: K, group: G, } : T[K] extends (s: infer U) => any ? { name: K, group: G, payload: U } : never }[keyof T]; + + +class Sample { + count = 0; + books: { name: string, year: number }[] = [] + increment() { + this.count++ + this.count++ + } + + addBook(book: Sample["books"][0]) { + this.books.push(book) + } +} +export declare function testIt(): (input: any, method: GetMethodsForType) => any + + +const t = testIt() + +const i = t(null, { name: "addBook", group: "Sample", payload: { /**/ } })` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "name"}, &lsproto.CompletionItem{Label: "year"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsGenericIndexedAccess3_test.go b/internal/fourslash/tests/gen/completionsGenericIndexedAccess3_test.go new file mode 100644 index 0000000000..75c010e2d0 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsGenericIndexedAccess3_test.go @@ -0,0 +1,52 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsGenericIndexedAccess3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface CustomElements { + 'component-one': { + foo?: string; + }, + 'component-two': { + bar?: string; + } +} + +interface Options { + props: CustomElements[T]; +} + +declare function create(name: T, options: Options): void; + +create('component-one', { props: { /*1*/ } }); +create('component-two', { props: { /*2*/ } });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "foo"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "bar"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsGenericIndexedAccess4_test.go b/internal/fourslash/tests/gen/completionsGenericIndexedAccess4_test.go new file mode 100644 index 0000000000..12fe728578 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsGenericIndexedAccess4_test.go @@ -0,0 +1,63 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsGenericIndexedAccess4(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface CustomElements { + 'component-one': { + foo?: string; + }, + 'component-two': { + bar?: string; + } +} + +interface Options { + props: CustomElements[T]; +} + +declare function create(name: T, options: Options): void; +declare function create(name: T, options: Options): void; + +create('hello', { props: { /*1*/ } }) +create('goodbye', { props: { /*2*/ } }) +create('component-one', { props: { /*3*/ } });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "foo"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "bar"}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "foo"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsGenericIndexedAccess5_test.go b/internal/fourslash/tests/gen/completionsGenericIndexedAccess5_test.go new file mode 100644 index 0000000000..738f6e35f3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsGenericIndexedAccess5_test.go @@ -0,0 +1,46 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsGenericIndexedAccess5(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface CustomElements { + 'component-one': { + foo?: string; + }, + 'component-two': { + bar?: string; + } +} + +interface Options { + props?: {} & { x: CustomElements[(T extends string ? T : never) & string][] }['x']; +} + +declare function f(k: T, options: Options): void; + +f("component-one", { + props: [{ + /**/ + }] +})` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "foo"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsGenericIndexedAccess6_test.go b/internal/fourslash/tests/gen/completionsGenericIndexedAccess6_test.go new file mode 100644 index 0000000000..9786ed3dc3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsGenericIndexedAccess6_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsGenericIndexedAccess6(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: component.tsx +interface CustomElements { + 'component-one': { + foo?: string; + }, + 'component-two': { + bar?: string; + } +} + +type Options = { kind: T } & Required<{ x: CustomElements[(T extends string ? T : never) & string] }['x']>; + +declare function Component(props: Options): void; + +const c = ` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "foo"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsGenericUnconstrained_test.go b/internal/fourslash/tests/gen/completionsGenericUnconstrained_test.go new file mode 100644 index 0000000000..aa7de9e952 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsGenericUnconstrained_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsGenericUnconstrained(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +function f(x: T) { + return x; +} + +f({ /**/ });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "Object"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsImportDeclarationAttributesEmptyModuleSpecifier1_test.go b/internal/fourslash/tests/gen/completionsImportDeclarationAttributesEmptyModuleSpecifier1_test.go new file mode 100644 index 0000000000..c893a4f30c --- /dev/null +++ b/internal/fourslash/tests/gen/completionsImportDeclarationAttributesEmptyModuleSpecifier1_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsImportDeclarationAttributesEmptyModuleSpecifier1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +// @filename: global.d.ts +interface ImportAttributes { + type: "json"; +} +// @filename: index.ts +import * as ns from "" with { type: "/**/" };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"json"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsImportDeclarationAttributesErrorModuleSpecifier1_test.go b/internal/fourslash/tests/gen/completionsImportDeclarationAttributesErrorModuleSpecifier1_test.go new file mode 100644 index 0000000000..cab3793070 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsImportDeclarationAttributesErrorModuleSpecifier1_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsImportDeclarationAttributesErrorModuleSpecifier1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +// @filename: global.d.ts +interface ImportAttributes { + type: "json"; +} +// @filename: index.ts +import * as ns from () with { type: "/**/" };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"json"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsImportDefaultExportCrash1_test.go b/internal/fourslash/tests/gen/completionsImportDefaultExportCrash1_test.go new file mode 100644 index 0000000000..205fb4680d --- /dev/null +++ b/internal/fourslash/tests/gen/completionsImportDefaultExportCrash1_test.go @@ -0,0 +1,54 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsImportDefaultExportCrash1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @allowJs: true +// @Filename: /node_modules/dom7/index.d.ts +export interface Dom7Array { + length: number; + prop(propName: string): any; +} + +export interface Dom7 { + (): Dom7Array; + fn: any; +} + +declare const Dom7: Dom7; + +export { + Dom7 as $, +}; +// @Filename: /dom7.js +import * as methods from 'dom7'; +Object.keys(methods).forEach((methodName) => { + if (methodName === '$') return; + methods.$.fn[methodName] = methods[methodName]; +}); + +export default methods.$; +// @Filename: /swipe-back.js +import $ from './dom7.js'; +/*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "$"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsImport_notFromUnrelatedNodeModules_test.go b/internal/fourslash/tests/gen/completionsImport_notFromUnrelatedNodeModules_test.go new file mode 100644 index 0000000000..2610967e36 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsImport_notFromUnrelatedNodeModules_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsImport_notFromUnrelatedNodeModules(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: esnext +// @Filename: /unrelated/node_modules/@types/foo/index.d.ts +export function foo() {} +// @Filename: /src/b.ts +fo/**/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsImport_promoteTypeOnly2_test.go b/internal/fourslash/tests/gen/completionsImport_promoteTypeOnly2_test.go new file mode 100644 index 0000000000..716a3bb9ca --- /dev/null +++ b/internal/fourslash/tests/gen/completionsImport_promoteTypeOnly2_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsImport_promoteTypeOnly2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: es2015 +// @Filename: /exports.ts +export interface SomeInterface {} +// @Filename: /a.ts +import type { SomeInterface } from "./exports.js"; +const SomeInterface = {}; +SomeI/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "SomeInterface"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsImport_umdDefaultNoCrash2_test.go b/internal/fourslash/tests/gen/completionsImport_umdDefaultNoCrash2_test.go new file mode 100644 index 0000000000..692fd980a2 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsImport_umdDefaultNoCrash2_test.go @@ -0,0 +1,57 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsImport_umdDefaultNoCrash2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @moduleResolution: node +// @allowJs: true +// @checkJs: true +// @Filename: /node_modules/dottie/package.json +{ + "name": "dottie", + "main": "dottie.js" +} +// @Filename: /node_modules/dottie/dottie.js +(function (undefined) { + var root = this; + + var Dottie = function () {}; + + Dottie["default"] = function (object, path, value) {}; + + if (typeof module !== "undefined" && module.exports) { + exports = module.exports = Dottie; + } else { + root["Dottie"] = Dottie; + root["Dot"] = Dottie; + + if (typeof define === "function") { + define([], function () { + return Dottie; + }); + } + } +})(); +// @Filename: /src/index.js +import Dottie from 'dottie'; +/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "Dottie"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsInExport_invalid_test.go b/internal/fourslash/tests/gen/completionsInExport_invalid_test.go new file mode 100644 index 0000000000..8b9f808da3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsInExport_invalid_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsInExport_invalid(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function topLevel() {} +if (!!true) { + const blockScoped = 0; + export { /**/ }; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"topLevel", &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "type"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsInRequire_test.go b/internal/fourslash/tests/gen/completionsInRequire_test.go new file mode 100644 index 0000000000..f10d6b3295 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsInRequire_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsInRequire(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: foo.js +var foo = require("/**/" + +foo(); + +/** + * @return {void} + */ +function foo() { +} +// @Filename: package.json + { "dependencies": { "fake-module": "latest" } } +// @Filename: node_modules/fake-module/index.js +/* fake-module */` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"fake-module"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsIndexSignatureConstraint1_test.go b/internal/fourslash/tests/gen/completionsIndexSignatureConstraint1_test.go new file mode 100644 index 0000000000..55f5d2fdb3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsIndexSignatureConstraint1_test.go @@ -0,0 +1,46 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsIndexSignatureConstraint1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true + +repro #9900 + +interface Test { + a?: number; + b?: string; +} + +interface TestIndex { + [key: string]: Test; +} + +declare function testFunc(t: T): void; + +testFunc({ + test: { + /**/ + }, +});` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "a"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "b"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsInterfaceElement_test.go b/internal/fourslash/tests/gen/completionsInterfaceElement_test.go new file mode 100644 index 0000000000..a19c2f6f0c --- /dev/null +++ b/internal/fourslash/tests/gen/completionsInterfaceElement_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsInterfaceElement(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const foo = 0; +interface I { + m(): void; + fo/*i*/ +} +interface J { /*j*/ } +interface K { f; /*k*/ } +type T = { fo/*t*/ }; +type U = { /*u*/ }; +interface EndOfFile { f; /*e*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "readonly"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesEmptyModuleSpecifier1_test.go b/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesEmptyModuleSpecifier1_test.go new file mode 100644 index 0000000000..aab2f4f1f4 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesEmptyModuleSpecifier1_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsJSDocImportTagAttributesEmptyModuleSpecifier1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +// @checkJs: true +// @allowJs: true +// @filename: global.d.ts +interface ImportAttributes { + type: "json"; +} +// @filename: index.js +/** @import * as ns from "" with { type: "/**/" } */` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"json"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesErrorModuleSpecifier1_test.go b/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesErrorModuleSpecifier1_test.go new file mode 100644 index 0000000000..08ceb0bbf3 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsJSDocImportTagAttributesErrorModuleSpecifier1_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsJSDocImportTagAttributesErrorModuleSpecifier1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +// @checkJs: true +// @allowJs: true +// @filename: global.d.ts +interface ImportAttributes { + type: "json"; +} +// @filename: index.js +/** @import * as ns from () with { type: "/**/" } */` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"json"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsJSDocImportTagEmptyModuleSpecifier1_test.go b/internal/fourslash/tests/gen/completionsJSDocImportTagEmptyModuleSpecifier1_test.go new file mode 100644 index 0000000000..76fa33f976 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsJSDocImportTagEmptyModuleSpecifier1_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsJSDocImportTagEmptyModuleSpecifier1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +// @checkJs: true +// @allowJs: true +// @moduleResolution: nodenext +// @filename: node_modules/pkg/index.d.ts +export type MyUnion = string | number; +// @filename: index.js +/** @import { MyUnion } from "/**/" */` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"pkg"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsJSDocNoCrash1_test.go b/internal/fourslash/tests/gen/completionsJSDocNoCrash1_test.go new file mode 100644 index 0000000000..b902ce58a1 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsJSDocNoCrash1_test.go @@ -0,0 +1,44 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsJSDocNoCrash1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +// @checkJs: true +// @allowJs: true +// @filename: index.js +/** + * @example + + @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css); + + + + .animate-show.ng-hide-add.ng-hide-add-active, + .animate-show.ng-hide-remove.ng-hide-remove-active { + transition:all linear 0./**/5s; + } + + + */ +var ngShowDirective = ['$animate', function($animate) {}];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"url"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsJSDocNoCrash3_test.go b/internal/fourslash/tests/gen/completionsJSDocNoCrash3_test.go new file mode 100644 index 0000000000..cb5138e23f --- /dev/null +++ b/internal/fourslash/tests/gen/completionsJSDocNoCrash3_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsJSDocNoCrash3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +// @filename: index.ts +class MssqlClient { + /** + * + * @param {Object} - args + * @param {String} - args.parentTable + * @returns {Promise<{upStatement/**/, downStatement}>} + */ + async relationCreate(args) {} +} + +export default MssqlClient;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "readonly"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsJsPropertyAssignment_test.go b/internal/fourslash/tests/gen/completionsJsPropertyAssignment_test.go new file mode 100644 index 0000000000..c6d2c34854 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsJsPropertyAssignment_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsJsPropertyAssignment(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: /a.js +/** @type {{ p: "x" | "y" }} */ +const x = { p: "x" }; +x.p = "[|/**/|]";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "x"}, &lsproto.CompletionItem{Label: "y"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsJsxAttribute2_test.go b/internal/fourslash/tests/gen/completionsJsxAttribute2_test.go new file mode 100644 index 0000000000..a66fa3bfe6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsJsxAttribute2_test.go @@ -0,0 +1,70 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsJsxAttribute2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @jsx: preserve +// @Filename: /a.tsx +declare namespace JSX { + interface Element {} + interface IntrinsicElements { + div: { + /** Doc */ + foo: boolean; + bar: string; + "aria-foo": boolean; + } + } +} + +

; +
; +
; +
;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"aria-foo", "bar"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"aria-foo", "bar"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"aria-foo", "foo"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar", "foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsKeyof_test.go b/internal/fourslash/tests/gen/completionsKeyof_test.go new file mode 100644 index 0000000000..8d1ea2283b --- /dev/null +++ b/internal/fourslash/tests/gen/completionsKeyof_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsKeyof(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface A { a: number; }; +interface B { a: number; b: number; }; +function f(key: T) {} +f("[|/*f*/|]"); +function g(key: T) {} +g("[|/*g*/|]");` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "f", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}}, + }, + }) + f.VerifyCompletions(t, "g", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "a"}, &lsproto.CompletionItem{Label: "b"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsKeywordsExtends_test.go b/internal/fourslash/tests/gen/completionsKeywordsExtends_test.go new file mode 100644 index 0000000000..bc4b726ccf --- /dev/null +++ b/internal/fourslash/tests/gen/completionsKeywordsExtends_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsKeywordsExtends(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class C/*a*/ /*b*/ { } +class C e/*c*/ {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "a", nil) + f.VerifyCompletions(t, []string{"b", "c"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "extends"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType1_test.go b/internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType1_test.go new file mode 100644 index 0000000000..8cee29bb4e --- /dev/null +++ b/internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType1_test.go @@ -0,0 +1,54 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsLiteralFromInferenceWithinInferredType1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /a.tsx +declare function test(a: { + [K in keyof T]: { + b?: keyof T; + }; +}): void; + +test({ + foo: {}, + bar: { + b: "/*ts*/", + }, +}); + +test({ + foo: {}, + bar: { + b: /*ts2*/, + }, +});` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar", "foo"}, + }, + }) + f.VerifyCompletions(t, []string{"ts2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"\"foo\"", "\"bar\""}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType2_test.go b/internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType2_test.go new file mode 100644 index 0000000000..2f2057fa54 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType2_test.go @@ -0,0 +1,73 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsLiteralFromInferenceWithinInferredType2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /a.tsx +type Values = T[keyof T]; + +type GetStates = T extends { states: object } ? T["states"] : never; + +type IsNever = [T] extends [never] ? 1 : 0; + +type GetIds = IsNever extends 1 + ? Gathered + : "id" extends keyof T + ? GetIds>, Gathered | ` + "`" + `#${T["id"] & string}` + "`" + `> + : GetIds>, Gathered>; + +type StateConfig< + TStates extends Record = Record< + string, + StateConfig + >, + TIds extends string = string +> = { + id?: string; + initial?: keyof TStates & string; + states?: { + [K in keyof TStates]: StateConfig, TIds>; + }; + on?: Record; +}; + +declare function createMachine, GetIds>>( + config: T +): void; + +createMachine({ + initial: "child", + states: { + child: { + initial: "foo", + states: { + foo: { + id: "wow_deep_id", + }, + }, + }, + }, + on: { + EV: "/*ts*/", + }, +});` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#wow_deep_id", ".child"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType3_test.go b/internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType3_test.go new file mode 100644 index 0000000000..c0bf79e7da --- /dev/null +++ b/internal/fourslash/tests/gen/completionsLiteralFromInferenceWithinInferredType3_test.go @@ -0,0 +1,53 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsLiteralFromInferenceWithinInferredType3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function test(a: { + [K in keyof T]: { + b?: (keyof T)[]; + }; +}): void; + +test({ + foo: {}, + bar: { + b: ["/*ts*/"], + }, +}); + +test({ + foo: {}, + bar: { + b: [/*ts2*/], + }, +});` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar", "foo"}, + }, + }) + f.VerifyCompletions(t, []string{"ts2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"\"foo\"", "\"bar\""}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsLiteralMatchingGenericSignature_test.go b/internal/fourslash/tests/gen/completionsLiteralMatchingGenericSignature_test.go new file mode 100644 index 0000000000..35c3199418 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsLiteralMatchingGenericSignature_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsLiteralMatchingGenericSignature(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /a.tsx +declare function bar1

(p: P): void; + +bar1("/*ts*/") +` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"", "bar", "baz"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsLiteralOnPropertyValueMatchingGeneric_test.go b/internal/fourslash/tests/gen/completionsLiteralOnPropertyValueMatchingGeneric_test.go new file mode 100644 index 0000000000..81487a81ae --- /dev/null +++ b/internal/fourslash/tests/gen/completionsLiteralOnPropertyValueMatchingGeneric_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsLiteralOnPropertyValueMatchingGeneric(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /a.tsx +declare function bar1

(p: { type: P }): void; + +bar1({ type: "/*ts*/" }) +` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"", "bar", "baz"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsMergedDeclarations2_test.go b/internal/fourslash/tests/gen/completionsMergedDeclarations2_test.go new file mode 100644 index 0000000000..afdd4fa01e --- /dev/null +++ b/internal/fourslash/tests/gen/completionsMergedDeclarations2_test.go @@ -0,0 +1,46 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsMergedDeclarations2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class point { + constructor(public x: number, public y: number) { } +} +module point { + export var origin = new point(0, 0); + export function equals(p1: point, p2: point) { + return p1.x == p2.x && p1.y == p2.y; + } +} +var p1 = new point(0, 0); +var p2 = point./*1*/origin; +var b = point./*2*/equals(p1, p2);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"origin"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"equals"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsNamespaceMergedWithObject_test.go b/internal/fourslash/tests/gen/completionsNamespaceMergedWithObject_test.go new file mode 100644 index 0000000000..4414b335ce --- /dev/null +++ b/internal/fourslash/tests/gen/completionsNamespaceMergedWithObject_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsNamespaceMergedWithObject(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `namespace N { + export type T = number; +} +const N = { m() {} }; +let x: N./*type*/; +N./*value*/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "type", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"T"}, + }, + }) + f.VerifyCompletions(t, "value", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"m"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsNamespaceName_test.go b/internal/fourslash/tests/gen/completionsNamespaceName_test.go new file mode 100644 index 0000000000..26f9995209 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsNamespaceName_test.go @@ -0,0 +1,44 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsNamespaceName(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `{ namespace /*0*/ } +namespace N/*1*/ {} +namespace N.M {} +namespace N./*2*/ + +namespace N1.M/*3*/ {} +namespace N2.M {} +namespace N2.M/*4*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"0", "1"}, nil) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"M"}, + }, + }) + f.VerifyCompletions(t, "3", nil) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"M"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsNewTarget_test.go b/internal/fourslash/tests/gen/completionsNewTarget_test.go new file mode 100644 index 0000000000..9d6a365739 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsNewTarget_test.go @@ -0,0 +1,44 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsNewTarget(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class C { + constructor() { + if (C === new./*1*/) + } +} +class D { + constructor() { + if (D === new.target./*2*/) + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"target"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"target"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsNonExistentImport_test.go b/internal/fourslash/tests/gen/completionsNonExistentImport_test.go new file mode 100644 index 0000000000..1e0f86575c --- /dev/null +++ b/internal/fourslash/tests/gen/completionsNonExistentImport_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsNonExistentImport(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `import { NonExistentType } from "non-existent-module"; +let foo: /**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"NonExistentType"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsObjectLiteralMethod6_test.go b/internal/fourslash/tests/gen/completionsObjectLiteralMethod6_test.go new file mode 100644 index 0000000000..177696ca79 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsObjectLiteralMethod6_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsObjectLiteralMethod6(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +type T = { + foo: () => Promise; +} +const foo: T = { + async f/**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "foo"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsObjectLiteralModuleExports_test.go b/internal/fourslash/tests/gen/completionsObjectLiteralModuleExports_test.go new file mode 100644 index 0000000000..53ef13f728 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsObjectLiteralModuleExports_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsObjectLiteralModuleExports(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @checkJs: true +// @Filename: index.js +const almanac = 0; +module.exports = { + a/**/ +};` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"almanac"}, + Excludes: []string{"a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsObjectLiteralUnionStringMappingType_test.go b/internal/fourslash/tests/gen/completionsObjectLiteralUnionStringMappingType_test.go new file mode 100644 index 0000000000..8f354e4fe6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsObjectLiteralUnionStringMappingType_test.go @@ -0,0 +1,48 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsObjectLiteralUnionStringMappingType(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type UnionType = { + key1: string; +} | { + key2: number; +} | Uppercase; + +const obj1: UnionType = { + /*1*/ +}; + +const obj2: UnionType = { + key1: "abc", + /*2*/ +};` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "key1"}, &lsproto.CompletionItem{Label: "key2"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "key2"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsObjectLiteralUnionTemplateLiteralType_test.go b/internal/fourslash/tests/gen/completionsObjectLiteralUnionTemplateLiteralType_test.go new file mode 100644 index 0000000000..0431cc923e --- /dev/null +++ b/internal/fourslash/tests/gen/completionsObjectLiteralUnionTemplateLiteralType_test.go @@ -0,0 +1,48 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsObjectLiteralUnionTemplateLiteralType(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type UnionType = { + key1: string; +} | { + key2: number; +} | ` + "`" + `string literal ${string}` + "`" + `; + +const obj1: UnionType = { + /*1*/ +}; + +const obj2: UnionType = { + key1: "abc", + /*2*/ +};` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "key1"}, &lsproto.CompletionItem{Label: "key2"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "key2"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsObjectLiteralWithPartialConstraint_test.go b/internal/fourslash/tests/gen/completionsObjectLiteralWithPartialConstraint_test.go new file mode 100644 index 0000000000..d33a15ee2f --- /dev/null +++ b/internal/fourslash/tests/gen/completionsObjectLiteralWithPartialConstraint_test.go @@ -0,0 +1,124 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsObjectLiteralWithPartialConstraint(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface MyOptions { + hello?: boolean; + world?: boolean; +} +declare function bar(options?: Partial): void; +bar({ hello: true, /*1*/ }); + +interface Test { + keyPath?: string; + autoIncrement?: boolean; +} + +function test>(opt: T) { } + +test({ + a: { + keyPath: 'x.y', + autoIncrement: true + }, + b: { + /*2*/ + } +}); +type Colors = { + rgb: { r: number, g: number, b: number }; + hsl: { h: number, s: number, l: number } +}; + +function createColor(kind: T, values: Colors[T]) { } + +createColor('rgb', { + /*3*/ +}); + +declare function f(x: T, y: { a: U, b: V }[T]): void; + +f('a', { + /*4*/ +}); + +declare function f2(x: T): void; +f2({ + /*5*/ +}); + +type X = { a: { a }, b: { b } } + +function f4(p: { kind: T } & X[T]) { } + +f4({ + kind: "a", + /*6*/ +})` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "world"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "autoIncrement"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "keyPath"}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"b", "g", "r"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "a"}}, + }, + }) + f.VerifyCompletions(t, "5", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "x"}}, + }, + }) + f.VerifyCompletions(t, "6", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsOptionalKindModifier_test.go b/internal/fourslash/tests/gen/completionsOptionalKindModifier_test.go new file mode 100644 index 0000000000..8322329d6b --- /dev/null +++ b/internal/fourslash/tests/gen/completionsOptionalKindModifier_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsOptionalKindModifier(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface A { a?: number; method?(): number; }; +function f(x: A) { +x./*a*/; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "a", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), Label: "a?", InsertText: ptrTo("a"), FilterText: ptrTo("a")}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "method?", InsertText: ptrTo("method"), FilterText: ptrTo("method")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsOptionalMethod_test.go b/internal/fourslash/tests/gen/completionsOptionalMethod_test.go new file mode 100644 index 0000000000..c0a2593d51 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsOptionalMethod_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsOptionalMethod(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strictNullChecks: true +declare const x: { m?(): void }; +x./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"m"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsOverridingMethod14_test.go b/internal/fourslash/tests/gen/completionsOverridingMethod14_test.go new file mode 100644 index 0000000000..f9d955c187 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsOverridingMethod14_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsOverridingMethod14(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +// @strictNullChecks: true +// @newline: LF +interface IFoo { + foo?(arg: string): number; +} +class Foo implements IFoo { + /**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "foo", InsertText: ptrTo("foo(arg: string): number {\n}"), FilterText: ptrTo("foo")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsOverridingMethod17_test.go b/internal/fourslash/tests/gen/completionsOverridingMethod17_test.go new file mode 100644 index 0000000000..0220868279 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsOverridingMethod17_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsOverridingMethod17(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +// @newline: LF +interface Interface { + method(): void; +} + +export class Class implements Interface { + property = "yadda"; + + /**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "method", InsertText: ptrTo("method(): void {\n}"), FilterText: ptrTo("method")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsOverridingMethod1_test.go b/internal/fourslash/tests/gen/completionsOverridingMethod1_test.go new file mode 100644 index 0000000000..e7466ea018 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsOverridingMethod1_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsOverridingMethod1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @newline: LF +// @Filename: h.ts +// @noImplicitOverride: true +class HBase { + foo(a: string): void {} +} + +class HSub extends HBase { + f/*h*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "h", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "foo", InsertText: ptrTo("override foo(a: string): void {\n}"), FilterText: ptrTo("foo")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsOverridingMethod3_test.go b/internal/fourslash/tests/gen/completionsOverridingMethod3_test.go new file mode 100644 index 0000000000..a6b6ed9605 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsOverridingMethod3_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsOverridingMethod3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @newline: LF +// @Filename: boo.d.ts +interface Ghost { + boo(): string; +} + +declare class Poltergeist implements Ghost { + /*b*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "b", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "boo", InsertText: ptrTo("boo(): string;"), FilterText: ptrTo("boo")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsOverridingMethod4_test.go b/internal/fourslash/tests/gen/completionsOverridingMethod4_test.go new file mode 100644 index 0000000000..2645f91ac6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsOverridingMethod4_test.go @@ -0,0 +1,51 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsOverridingMethod4(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @newline: LF +// @Filename: secret.ts +class Secret { + #secret(): string { + return "secret"; + } + + private tell(): string { + return this.#secret(); + } + + protected hint(): string { + return "hint"; + } + + public refuse(): string { + return "no comments"; + } +} + +class Gossip extends Secret { + /* no telling secrets */ + /*a*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "a", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "hint", InsertText: ptrTo("protected hint(): string {\n}"), FilterText: ptrTo("hint")}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "refuse", InsertText: ptrTo("public refuse(): string {\n}"), FilterText: ptrTo("refuse")}}, + Excludes: []string{"tell", "#secret"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsOverridingMethod9_test.go b/internal/fourslash/tests/gen/completionsOverridingMethod9_test.go new file mode 100644 index 0000000000..195e68d835 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsOverridingMethod9_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsOverridingMethod9(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: a.ts +// @newline: LF +interface IFoo { + a?: number; + b?(x: number): void; +} +class Foo implements IFoo { + /**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "a", InsertText: ptrTo("a?: number;"), FilterText: ptrTo("a")}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "b", InsertText: ptrTo("b(x: number): void {\n}"), FilterText: ptrTo("b")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsOverridingMethodCrash1_test.go b/internal/fourslash/tests/gen/completionsOverridingMethodCrash1_test.go new file mode 100644 index 0000000000..3de9dd7720 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsOverridingMethodCrash1_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsOverridingMethodCrash1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @newline: LF +// @Filename: a.ts +declare class Component { + setState(stateHandler: ((oldState: T, newState: T) => void)): void; +} + +class SubComponent extends Component<{}> { + /*$*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "$", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "setState", InsertText: ptrTo("setState(stateHandler: (oldState: {}, newState: {}) => void): void {\n}"), FilterText: ptrTo("setState")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsOverridingProperties1_test.go b/internal/fourslash/tests/gen/completionsOverridingProperties1_test.go new file mode 100644 index 0000000000..24d74ca028 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsOverridingProperties1_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsOverridingProperties1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @newline: LF +// @Filename: a.ts +class Base { + protected foo: string = "bar"; +} + +class Sub extends Base { + /*a*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "a", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "foo", InsertText: ptrTo("protected foo: string;"), FilterText: ptrTo("foo")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPathsJsonModuleWithAmd_test.go b/internal/fourslash/tests/gen/completionsPathsJsonModuleWithAmd_test.go new file mode 100644 index 0000000000..6009027656 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPathsJsonModuleWithAmd_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPathsJsonModuleWithAmd(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: amd +// @resolveJsonModule: true +// @Filename: /project/test.json +not read +// @Filename: /project/index.ts +import { } from ".//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPathsJsonModuleWithoutResolveJsonModule_test.go b/internal/fourslash/tests/gen/completionsPathsJsonModuleWithoutResolveJsonModule_test.go new file mode 100644 index 0000000000..57c475b2fe --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPathsJsonModuleWithoutResolveJsonModule_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPathsJsonModuleWithoutResolveJsonModule(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @moduleResolution: node +// @Filename: /project/test.json +not read +// @Filename: /project/index.ts +import { } from ".//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPathsJsonModule_test.go b/internal/fourslash/tests/gen/completionsPathsJsonModule_test.go new file mode 100644 index 0000000000..e966d2f4a4 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPathsJsonModule_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPathsJsonModule(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @moduleResolution: node +// @resolveJsonModule: true +// @Filename: /project/node_modules/test.json +not read +// @Filename: /project/index.ts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "test.json"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPathsRelativeJsonModule_test.go b/internal/fourslash/tests/gen/completionsPathsRelativeJsonModule_test.go new file mode 100644 index 0000000000..4c7f418773 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPathsRelativeJsonModule_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPathsRelativeJsonModule(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @moduleResolution: node +// @resolveJsonModule: true +// @Filename: /project/test.json +not read +// @Filename: /project/index.ts +import { } from ".//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "test.json"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPaths_importType_test.go b/internal/fourslash/tests/gen/completionsPaths_importType_test.go new file mode 100644 index 0000000000..770927925b --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPaths_importType_test.go @@ -0,0 +1,45 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPaths_importType(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @moduleResolution: node +// @Filename: /ns.ts +file content not read +// @Filename: /node_modules/package/index.ts +file content not read +// @Filename: /usage.ts +type A = typeof import("p/*1*/"); +type B = import(".//*2*/"); +// @Filename: /user.js +/** @type {import("/*3*/")} */` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "package"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "lib"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "lib.decorators"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "lib.decorators.legacy"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "ns"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "user"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "node_modules"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPaths_kinds_test.go b/internal/fourslash/tests/gen/completionsPaths_kinds_test.go new file mode 100644 index 0000000000..81f16fbd9f --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPaths_kinds_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPaths_kinds(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /src/b.ts +not read +// @Filename: /src/dir/x.ts +not read +// @Filename: /src/a.ts +import {} from "./[|/*0*/|]"; +import {} from "./[|/*1*/|]"; +// @Filename: /tsconfig.json +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "foo/*": ["src/*"] + } + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"0", "1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "b"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "dir"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPaths_pathMapping_nonTrailingWildcard1_test.go b/internal/fourslash/tests/gen/completionsPaths_pathMapping_nonTrailingWildcard1_test.go new file mode 100644 index 0000000000..4ca4c313e1 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPaths_pathMapping_nonTrailingWildcard1_test.go @@ -0,0 +1,70 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPaths_pathMapping_nonTrailingWildcard1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /src/b.ts +export const x = 0; +// @Filename: /src/dir/x.ts +/export const x = 0; +// @Filename: /src/a.ts +import {} from "foo//*0*/"; +import {} from "foo/dir//*1*/"; // invalid +import {} from "foo/_/*2*/"; +import {} from "foo/_dir//*3*/"; +// @Filename: /tsconfig.json +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "foo/_*/suffix": ["src/*.ts"] + } + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "foo/_a/suffix"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "foo/_b/suffix"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "foo/_dir/suffix"}}, + }, + }) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "foo/_a/suffix"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "foo/_b/suffix"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "foo/_dir/suffix"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "a"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "b"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "dir"}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "x"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPaths_pathMapping_notInNestedDirectory_test.go b/internal/fourslash/tests/gen/completionsPaths_pathMapping_notInNestedDirectory_test.go new file mode 100644 index 0000000000..3456e686bb --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPaths_pathMapping_notInNestedDirectory_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPaths_pathMapping_notInNestedDirectory(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /user.ts +import {} from "something//**/"; +// @Filename: /tsconfig.json +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "mapping/*": ["whatever"], + } + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPaths_pathMapping_parentDirectory_test.go b/internal/fourslash/tests/gen/completionsPaths_pathMapping_parentDirectory_test.go new file mode 100644 index 0000000000..12da22f4dd --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPaths_pathMapping_parentDirectory_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPaths_pathMapping_parentDirectory(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /src/a.ts +import { } from "foo//**/"; +// @Filename: /oof/x.ts +export const x = 0; +// @Filename: /tsconfig.json +{ + "compilerOptions": { + "baseUrl": "src", + "paths": { + "foo/*": ["../oof/*"] + } + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "x"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPaths_pathMapping_test.go b/internal/fourslash/tests/gen/completionsPaths_pathMapping_test.go new file mode 100644 index 0000000000..d653625af2 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPaths_pathMapping_test.go @@ -0,0 +1,50 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPaths_pathMapping(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /src/b.ts +export const x = 0; +// @Filename: /src/dir/x.ts +/export const x = 0; +// @Filename: /src/a.ts +import {} from "foo//*0*/"; +import {} from "foo/dir//*1*/"; +// @Filename: /tsconfig.json +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "foo/*": ["src/*"] + } + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "a"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "b"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "dir"}}, + }, + }) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "x"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPrivateProperties_Js_test.go b/internal/fourslash/tests/gen/completionsPrivateProperties_Js_test.go new file mode 100644 index 0000000000..f2df36538f --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPrivateProperties_Js_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPrivateProperties_Js(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.d.ts +declare namespace A { + class Foo { + constructor(); + + private m1(): void; + protected m2(): void; + + m3(): void; + } +} +// @filename: b.js +let foo = new A.Foo(); +foo./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{""}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"m3"}, + Excludes: []string{"m1", "m2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPropertiesPriorities_test.go b/internal/fourslash/tests/gen/completionsPropertiesPriorities_test.go new file mode 100644 index 0000000000..b657163719 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPropertiesPriorities_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPropertiesPriorities(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +interface I { + B?: number; + a: number; + c?: string; + d: string +} +const foo = { + a: 1, + B: 2 +} +const i: I = { + ...foo, + /*a*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"a"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocationPriority)), Kind: ptrTo(lsproto.CompletionItemKindField), Label: "d"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Kind: ptrTo(lsproto.CompletionItemKindField), Label: "c?", InsertText: ptrTo("c"), FilterText: ptrTo("c")}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextMemberDeclaredBySpreadAssignment)), Kind: ptrTo(lsproto.CompletionItemKindField), Label: "a"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextMemberDeclaredBySpreadAssignment)), Kind: ptrTo(lsproto.CompletionItemKindField), Label: "B?", InsertText: ptrTo("B"), FilterText: ptrTo("B")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsPropertiesWithPromiseUnionType_test.go b/internal/fourslash/tests/gen/completionsPropertiesWithPromiseUnionType_test.go new file mode 100644 index 0000000000..afad88c0e6 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsPropertiesWithPromiseUnionType_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsPropertiesWithPromiseUnionType(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +type MyType = { + foo: string; +}; +function fakeTest(cb: () => MyType | Promise) {} +fakeTest(() => { + return { + /*a*/ + }; +});` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"a"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), Label: "foo"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsQuotedObjectLiteralUnion_test.go b/internal/fourslash/tests/gen/completionsQuotedObjectLiteralUnion_test.go new file mode 100644 index 0000000000..7e449f9293 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsQuotedObjectLiteralUnion_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsQuotedObjectLiteralUnion(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface A { + "a-prop": string; +} + +interface B { + "b-prop": string; +} + +const obj: A | B = { + "/*1*/" +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a-prop", "b-prop"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsRecommended_nonAccessibleSymbol_test.go b/internal/fourslash/tests/gen/completionsRecommended_nonAccessibleSymbol_test.go new file mode 100644 index 0000000000..12e25622f9 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsRecommended_nonAccessibleSymbol_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsRecommended_nonAccessibleSymbol(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function f() { + class C {} + return (c: C) => void; +} +f()(new /**/);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"C"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsRecommended_union_test.go b/internal/fourslash/tests/gen/completionsRecommended_union_test.go new file mode 100644 index 0000000000..1da0fc55c2 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsRecommended_union_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsRecommended_union(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strictNullChecks: true +const enum E { A = "A", B = "B" } +const enum E2 { X = "X", Y = "Y" } +const e: E | undefined = /*a*/ +const e2: E | E2 = /*b*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "a", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Preselect: ptrTo(true), Label: "E"}}, + }, + }) + f.VerifyCompletions(t, "b", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Preselect: ptrTo(true), Label: "E"}, &lsproto.CompletionItem{Label: "E2"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsRecursiveNamespace_test.go b/internal/fourslash/tests/gen/completionsRecursiveNamespace_test.go new file mode 100644 index 0000000000..321f267c99 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsRecursiveNamespace_test.go @@ -0,0 +1,20 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsRecursiveNamespace(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare namespace N { + export import M = N; +} +type T = N./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/completionsRedeclareModuleAsGlobal_test.go b/internal/fourslash/tests/gen/completionsRedeclareModuleAsGlobal_test.go new file mode 100644 index 0000000000..b854536acc --- /dev/null +++ b/internal/fourslash/tests/gen/completionsRedeclareModuleAsGlobal_test.go @@ -0,0 +1,43 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsRedeclareModuleAsGlobal(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @esModuleInterop: true, +// @target: esnext +// @Filename: /myAssert.d.ts +declare function assert(value:any, message?:string):void; +export = assert; +export as namespace assert; +// @Filename: /ambient.d.ts +import assert from './myAssert'; + +type Assert = typeof assert; + +declare global { + const assert: Assert; +} +// @Filename: /index.ts +/// +asser/**/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "assert"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsSelfDeclaring1_test.go b/internal/fourslash/tests/gen/completionsSelfDeclaring1_test.go new file mode 100644 index 0000000000..112afa2f3e --- /dev/null +++ b/internal/fourslash/tests/gen/completionsSelfDeclaring1_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsSelfDeclaring1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Test { + keyPath?: string; + autoIncrement?: boolean; +} + +function test>(opt: T) { } + +test({ + a: { + keyPath: '', + a/**/ + } +})` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "autoIncrement"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsSelfDeclaring3_test.go b/internal/fourslash/tests/gen/completionsSelfDeclaring3_test.go new file mode 100644 index 0000000000..bee0d4b6d2 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsSelfDeclaring3_test.go @@ -0,0 +1,54 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsSelfDeclaring3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function f(p: T & (T extends { hello: string } ? { goodbye: number } : {})) {} +f({ x/*x*/: 0, hello/*hello*/: "", goodbye/*goodbye*/: 0, abc/*abc*/: "" })` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "x", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) + f.VerifyCompletions(t, "hello", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) + f.VerifyCompletions(t, "goodbye", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"goodbye"}, + }, + }) + f.VerifyCompletions(t, "abc", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsStringLiteral_fromTypeConstraint_test.go b/internal/fourslash/tests/gen/completionsStringLiteral_fromTypeConstraint_test.go new file mode 100644 index 0000000000..d68badde44 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsStringLiteral_fromTypeConstraint_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsStringLiteral_fromTypeConstraint(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo { foo: string; bar: string; } +type T = Pick;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "bar"}, &lsproto.CompletionItem{Label: "foo"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsStringsWithTriggerCharacter_test.go b/internal/fourslash/tests/gen/completionsStringsWithTriggerCharacter_test.go new file mode 100644 index 0000000000..41de1dbd0d --- /dev/null +++ b/internal/fourslash/tests/gen/completionsStringsWithTriggerCharacter_test.go @@ -0,0 +1,99 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsStringsWithTriggerCharacter(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type A = "a/b" | "b/a"; +const a: A = "[|a/*1*/|]"; + +type B = "a@b" | "b@a"; +const a: B = "[|a@/*2*/|]"; + +type C = "a.b" | "b.a"; +const c: C = "[|a./*3*/|]"; + +type D = "a'b" | "b'a"; +const d: D = "[|a'/*4*/|]"; + +type E = "a` + "`" + `b" | "b` + "`" + `a"; +const e: E = "[|a` + "`" + `/*5*/|]"; + +type F = 'a"b' | 'b"a'; +const f: F = '[|a"/*6*/|]'; + +type G = "a symbol; +const s = Symbol("s"); +interface I { [s]: number }; +declare const i: I; +i[|./*i*/|]; + +namespace N { export const s2 = Symbol("s2"); } +interface J { [N.s2]: number; } +declare const j: J; +j[|./*j*/|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "i", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "s", InsertText: ptrTo("[s]")}}, + }, + }) + f.VerifyCompletions(t, "j", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "N", InsertText: ptrTo("[N]")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsTriggerCharacter_test.go b/internal/fourslash/tests/gen/completionsTriggerCharacter_test.go new file mode 100644 index 0000000000..0db5a52345 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsTriggerCharacter_test.go @@ -0,0 +1,111 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsTriggerCharacter(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @jsx: preserve +/** @/*tag*/ */ +// foo "}, + }, + }) + f.VerifyCompletions(t, "path", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"importMe"}, + }, + }) + f.VerifyCompletions(t, "divide", nil) +} diff --git a/internal/fourslash/tests/gen/completionsUnionStringLiteralProperty_test.go b/internal/fourslash/tests/gen/completionsUnionStringLiteralProperty_test.go new file mode 100644 index 0000000000..f03517f47c --- /dev/null +++ b/internal/fourslash/tests/gen/completionsUnionStringLiteralProperty_test.go @@ -0,0 +1,86 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsUnionStringLiteralProperty(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = ` type Foo = { a: 0, b: 'x' } | { a: 0, b: 'y' } | { a: 1, b: 'z' }; + const foo: Foo = { a: 0, b: '/*1*/' } + + type Bar = { a: 0, b: 'fx' } | { a: 0, b: 'fy' } | { a: 1, b: 'fz' }; + const bar: Bar = { a: 0, b: 'f/*2*/' } + + type Baz = { x: 0, y: 0, z: 'a' } | { x: 0, y: 1, z: 'b' } | { x: 1, y: 0, z: 'c' } | { x: 1, y: 1, z: 'd' }; + const baz1: Baz = { z: '/*3*/' }; + const baz2: Baz = { x: 0, z: '/*4*/' }; + const baz3: Baz = { x: 0, y: 1, z: '/*5*/' }; + const baz4: Baz = { x: 2, y: 1, z: '/*6*/' };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"x", "y"}, + Excludes: []string{"z"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"fx", "fy"}, + Excludes: []string{"fz"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b", "c", "d"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b"}, + Excludes: []string{"c", "d"}, + }, + }) + f.VerifyCompletions(t, "5", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"b"}, + Excludes: []string{"a", "c", "d"}, + }, + }) + f.VerifyCompletions(t, "6", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"b", "d"}, + Excludes: []string{"a", "c"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsUnion_test.go b/internal/fourslash/tests/gen/completionsUnion_test.go new file mode 100644 index 0000000000..5702f91af8 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsUnion_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsUnion(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { x: number; } +interface Many extends ReadonlyArray { extra: number; } +class C { private priv: number; } +const x: I | I[] | Many | C = { /**/ };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsUniqueSymbol1_test.go b/internal/fourslash/tests/gen/completionsUniqueSymbol1_test.go new file mode 100644 index 0000000000..6ac78d3d62 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsUniqueSymbol1_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsUniqueSymbol1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare const Symbol: () => symbol; +namespace M { + export const sym = Symbol(); +} +namespace N { + const sym = Symbol(); + export interface I { + [sym]: number; + [M.sym]: number; + } +} + +declare const i: N.I; +i[|./**/|];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "M", InsertText: ptrTo("[M]")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithDeprecatedTag3_test.go b/internal/fourslash/tests/gen/completionsWithDeprecatedTag3_test.go new file mode 100644 index 0000000000..53abd964bb --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithDeprecatedTag3_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithDeprecatedTag3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/** @deprecated foo */ +declare function foo(); +/** ok */ +declare function foo(x); + +foo/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFunction), SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "foo"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithGenericStringLiteral_test.go b/internal/fourslash/tests/gen/completionsWithGenericStringLiteral_test.go new file mode 100644 index 0000000000..12722b0564 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithGenericStringLiteral_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithGenericStringLiteral(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +declare function get(obj: T, key: K): T[K]; +get({ hello: 123, world: 456 }, "/**/");` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"hello", "world"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericConstructor_test.go b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericConstructor_test.go new file mode 100644 index 0000000000..0c3affba5a --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericConstructor_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithOptionalPropertiesGenericConstructor(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +interface Options { + someFunction?: () => string + anotherFunction?: () => string +} + +export class Clazz { + constructor(public a: T) {} +} + +new Clazz({ /*1*/ })` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "someFunction"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "anotherFunction"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericDeep_test.go b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericDeep_test.go new file mode 100644 index 0000000000..e5941f0f9f --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericDeep_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithOptionalPropertiesGenericDeep(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +interface DeepOptions { + another?: boolean; +} +interface MyOptions { + hello?: boolean; + world?: boolean; + deep?: DeepOptions +} +declare function bar(options?: Partial): void; +bar({ deep: {/*1*/} });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "another"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial2_test.go b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial2_test.go new file mode 100644 index 0000000000..1df22ff736 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial2_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithOptionalPropertiesGenericPartial2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +interface Foo { + a: boolean; +} +function partialFoo>(x: T, y: T) {return t} +partialFoo({ a: true, b: true }, { /*1*/ });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "a"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "b"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial3_test.go b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial3_test.go new file mode 100644 index 0000000000..d9d18e97bf --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial3_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithOptionalPropertiesGenericPartial3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +interface Foo { + a: boolean; +} +function partialFoo>(x: T, y: T extends { b?: boolean } ? T & { c: true } : T) { + return x; +} + +partialFoo({ a: true, b: true }, { /*1*/ });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "a"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "b"}, &lsproto.CompletionItem{Label: "c"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial_test.go b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial_test.go new file mode 100644 index 0000000000..e4b833e35b --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericPartial_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithOptionalPropertiesGenericPartial(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +interface Foo { + a_a: boolean; + a_b: boolean; + a_c: boolean; + b_a: boolean; +} +function partialFoo>(t: T) {return t} +partialFoo({ /*1*/ });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "a_a"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "a_b"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "a_c"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "b_a"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericValidBoolean_test.go b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericValidBoolean_test.go new file mode 100644 index 0000000000..257b8989f7 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGenericValidBoolean_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithOptionalPropertiesGenericValidBoolean(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +interface MyOptions { + hello?: boolean; + world?: boolean; +} +declare function bar(options?: Partial): void; +bar({ hello: true, /*1*/ });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "world"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGeneric_test.go b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGeneric_test.go new file mode 100644 index 0000000000..424d52d87b --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithOptionalPropertiesGeneric_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithOptionalPropertiesGeneric(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +interface MyOptions { + hello?: boolean; + world?: boolean; +} +declare function bar(options?: Partial): void; +bar({ hello, /*1*/ });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "world"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithOptionalProperties_test.go b/internal/fourslash/tests/gen/completionsWithOptionalProperties_test.go new file mode 100644 index 0000000000..a40e25c335 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithOptionalProperties_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithOptionalProperties(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +interface Options { + hello?: boolean; + world?: boolean; +} +declare function foo(options?: Options): void; +foo({ + hello: true, + /**/ +});` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "world?", InsertText: ptrTo("world"), FilterText: ptrTo("world")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithOverride1_test.go b/internal/fourslash/tests/gen/completionsWithOverride1_test.go new file mode 100644 index 0000000000..6decb1b398 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithOverride1_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithOverride1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class A { + foo () {} + bar () {} +} +class B extends A { + override /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "bar"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithOverride2_test.go b/internal/fourslash/tests/gen/completionsWithOverride2_test.go new file mode 100644 index 0000000000..0b4ede8105 --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithOverride2_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithOverride2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { + baz () {} +} +class A { + foo () {} + bar () {} +} +class B extends A implements I { + override /*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "bar"}, + Excludes: []string{"baz"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWithStringReplacementMode1_test.go b/internal/fourslash/tests/gen/completionsWithStringReplacementMode1_test.go new file mode 100644 index 0000000000..0798fb255d --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWithStringReplacementMode1_test.go @@ -0,0 +1,45 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWithStringReplacementMode1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface TFunction { + (_: 'login.title', __?: {}): string; + (_: 'login.description', __?: {}): string; + (_: 'login.sendEmailAgree', __?: {}): string; + (_: 'login.termsOfUse', __?: {}): string; + (_: 'login.privacyPolicy', __?: {}): string; + (_: 'login.sendEmailButton', __?: {}): string; + (_: 'login.emailInputPlaceholder', __?: {}): string; + (_: 'login.errorWrongEmailTitle', __?: {}): string; + (_: 'login.errorWrongEmailDescription', __?: {}): string; + (_: 'login.errorGeneralEmailTitle', __?: {}): string; + (_: 'login.errorGeneralEmailDescription', __?: {}): string; + (_: 'login.loginErrorTitle', __?: {}): string; + (_: 'login.loginErrorDescription', __?: {}): string; + (_: 'login.openEmailAppErrorTitle', __?: {}): string; + (_: 'login.openEmailAppErrorDescription', __?: {}): string; + (_: 'login.openEmailAppErrorConfirm', __?: {}): string; +} +const f: TFunction = (() => {}) as any; +f('[|login./**/|]')` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "login.title"}, &lsproto.CompletionItem{Label: "login.description"}, &lsproto.CompletionItem{Label: "login.sendEmailAgree"}, &lsproto.CompletionItem{Label: "login.termsOfUse"}, &lsproto.CompletionItem{Label: "login.privacyPolicy"}, &lsproto.CompletionItem{Label: "login.sendEmailButton"}, &lsproto.CompletionItem{Label: "login.emailInputPlaceholder"}, &lsproto.CompletionItem{Label: "login.errorWrongEmailTitle"}, &lsproto.CompletionItem{Label: "login.errorWrongEmailDescription"}, &lsproto.CompletionItem{Label: "login.errorGeneralEmailTitle"}, &lsproto.CompletionItem{Label: "login.errorGeneralEmailDescription"}, &lsproto.CompletionItem{Label: "login.loginErrorTitle"}, &lsproto.CompletionItem{Label: "login.loginErrorDescription"}, &lsproto.CompletionItem{Label: "login.openEmailAppErrorTitle"}, &lsproto.CompletionItem{Label: "login.openEmailAppErrorDescription"}, &lsproto.CompletionItem{Label: "login.openEmailAppErrorConfirm"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/completionsWrappedClass_test.go b/internal/fourslash/tests/gen/completionsWrappedClass_test.go new file mode 100644 index 0000000000..14a525a1ff --- /dev/null +++ b/internal/fourslash/tests/gen/completionsWrappedClass_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestCompletionsWrappedClass(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Client { + private close() { } + public open() { } +} +type Wrap = T & +{ + [K in Extract as ` + "`" + `${K}Wrapped` + "`" + `]: T[K]; +}; +class Service { + method() { + let service = undefined as unknown as Wrap; + const { /*a*/ } = service; + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "a", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"open", "openWrapped"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/excessivelyLargeArrayLiteralCompletions_test.go b/internal/fourslash/tests/gen/excessivelyLargeArrayLiteralCompletions_test.go new file mode 100644 index 0000000000..884df724ad --- /dev/null +++ b/internal/fourslash/tests/gen/excessivelyLargeArrayLiteralCompletions_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestExcessivelyLargeArrayLiteralCompletions(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/* + Route exported from CloudMade; + + Map data used is Copyright (c) OpenStreetMap contributors 2010 + OpenStreetMap® is open data, licensed under the + Open Data Commons Open Database License (ODbL) by + the OpenStreetMap Foundation (OSMF). + + See full license: https://www.openstreetmap.org/copyright +*/ +var route = [[51.452339,-0.26291],[51.452011,-0.26479],[51.451839,-0.26624],[51.45187,-0.26706],[51.451881,-0.26733],[51.452049,-0.26734],[51.453098,-0.26734],[51.453838,-0.26717],[51.454849,-0.267],[51.45575,-0.26704],[51.45631,-0.26723],[51.456402,-0.26729],[51.456669,-0.26745],[51.45689,-0.26755],[51.457001,-0.26758],[51.45797,-0.26776],[51.458359,-0.26786],[51.459019,-0.26783],[51.459629,-0.26785],[51.459888,-0.26809],[51.460178,-0.26845],[51.46077,-0.26841],[51.461102,-0.26838],[51.461479,-0.2685],[51.46159,-0.26848],[51.462479,-0.26776],[51.462921,-0.26766],[51.463291,-0.26754],[51.463558,-0.26736],[51.46373,-0.26728],[51.464291,-0.26676],[51.464432,-0.26675],[51.464722,-0.26671],[51.464821,-0.2657],[51.46484,-0.2655],[51.464851,-0.26504],[51.46489,-0.26456],[51.464951,-0.26397],[51.464981,-0.26357],[51.46497,-0.26344],[51.465031,-0.26294],[51.46508,-0.26224],[51.465111,-0.26179],[51.46513,-0.26157],[51.465149,-0.261],[51.465149,-0.26077],[51.465149,-0.26051],[51.465149,-0.26011],[51.46513,-0.25982],[51.46513,-0.25955],[51.46513,-0.25929],[51.465111,-0.25872],[51.46513,-0.2583],[51.46513,-0.25771],[51.465141,-0.25753],[51.46516,-0.25675],[51.46516,-0.25658],[51.46516,-0.25647],[51.465179,-0.25574],[51.465191,-0.25525],[51.465199,-0.25486],[51.46521,-0.25455],[51.46521,-0.25413],[51.46524,-0.25293],[51.465229,-0.25186],[51.465191,-0.25085],[51.46513,-0.25001],[51.46508,-0.24926],[51.465069,-0.24862],[51.465111,-0.24775],[51.465149,-0.2472],[51.465172,-0.24675],[51.46524,-0.24571],[51.465279,-0.24482],[51.465321,-0.24423],[51.465229,-0.24372],[51.465149,-0.24266],[51.465118,-0.24208],[51.465069,-0.24147],[51.464939,-0.24028],[51.464821,-0.2395],[51.46476,-0.2389],[51.464729,-0.23852],[51.464642,-0.23755],[51.464569,-0.23693],[51.464481,-0.2365],[51.464371,-0.23557],[51.464211,-0.23437],[51.46418,-0.23421],[51.464001,-0.23334],[51.463959,-0.23316],[51.463829,-0.23253],[51.463779,-0.23235],[51.463699,-0.23189],[51.463661,-0.2317],[51.463589,-0.23136],[51.463539,-0.23106],[51.463402,-0.23025],[51.463341,-0.2299],[51.463249,-0.22924],[51.463139,-0.22838],[51.46312,-0.22823],[51.463001,-0.22726],[51.462959,-0.22698],[51.462891,-0.22645],[51.462769,-0.22551],[51.462761,-0.22516],[51.462681,-0.22436],[51.46262,-0.224],[51.462521,-0.22297],[51.462421,-0.22247],[51.462181,-0.22183],[51.462009,-0.22149],[51.461731,-0.22074],[51.461399,-0.2196],[51.461361,-0.21948],[51.46122,-0.21878],[51.461109,-0.21824],[51.460979,-0.2175],[51.460789,-0.21715],[51.46069,-0.21685],[51.460522,-0.21596],[51.4604,-0.21533],[51.460361,-0.21511],[51.460251,-0.21458],[51.46022,-0.2144],[51.460159,-0.21411],[51.460121,-0.21389],[51.46011,-0.2138],[51.459961,-0.21308],[51.459942,-0.21294],[51.459702,-0.21186],[51.459702,-0.21184],[51.45948,-0.21112],[51.459259,-0.21038],[51.459011,-0.20963],[51.45892,-0.2094],[51.458809,-0.2091],[51.458759,-0.20898],[51.45858,-0.20853],[51.458328,-0.20795],[51.458179,-0.2076],[51.458141,-0.20751],[51.458099,-0.20743],[51.457981,-0.2072],[51.45771,-0.20668],[51.4575,-0.20638],[51.457321,-0.20614],[51.45718,-0.20596],[51.457088,-0.20584],[51.456921,-0.20558],[51.456829,-0.20541],[51.456772,-0.20522],[51.45676,-0.20518],[51.456749,-0.20509],[51.45673,-0.20469],[51.456718,-0.20466],[51.456699,-0.20425],[51.456692,-0.20391],[51.456692,-0.20371],[51.456661,-0.20284],[51.456661,-0.20272],[51.456661,-0.20254],[51.456669,-0.20231],[51.456692,-0.20178],[51.456699,-0.20148],[51.45673,-0.20116],[51.45676,-0.20077],[51.45686,-0.19978],[51.45697,-0.19857],[51.457001,-0.19826],[51.457039,-0.19806],[51.45705,-0.19793],[51.457142,-0.19781],[51.457211,-0.19776],[51.45742,-0.19785],[51.45763,-0.19794],[51.45776,-0.19795],[51.457829,-0.19791],[51.45789,-0.19784],[51.458,-0.19751],[51.458172,-0.19697],[51.458271,-0.19654],[51.458439,-0.19585],[51.458599,-0.19507],[51.45863,-0.1949],[51.458729,-0.19437],[51.458809,-0.19394],[51.45892,-0.19318],[51.45892,-0.1926],[51.458839,-0.19206],[51.458858,-0.19189],[51.45887,-0.1917],[51.459049,-0.19117],[51.45916,-0.19078],[51.459148,-0.19065],[51.45908,-0.19055],[51.458679,-0.19041],[51.458511,-0.19034],[51.458271,-0.19026],[51.457939,-0.19013],[51.457329,-0.1899],[51.457199,-0.18985],[51.456829,-0.18972],[51.457069,-0.18858],[51.457142,-0.18824],[51.457211,-0.18785],[51.45731,-0.18732],[51.457581,-0.1857],[51.457649,-0.18525],[51.457878,-0.18476],[51.45797,-0.18457],[51.45829,-0.18387],[51.45866,-0.18305],[51.458771,-0.18276],[51.458801,-0.18269],[51.4589,-0.18243],[51.458981,-0.18222],[51.45911,-0.1819],[51.459229,-0.1815],[51.459358,-0.18094],[51.459431,-0.18064],[51.45956,-0.18014],[51.459518,-0.18],[51.459469,-0.17984],[51.45882,-0.1796],[51.458431,-0.17945],[51.458351,-0.17935],[51.458279,-0.17924],[51.458309,-0.17861],[51.458401,-0.17714],[51.458511,-0.17525],[51.45853,-0.17515],[51.45858,-0.17493],[51.458912,-0.17401],[51.459,-0.17374],[51.459179,-0.1732],[51.45929,-0.17292],[51.459461,-0.17245],[51.459579,-0.1721],[51.459919,-0.17123],[51.460232,-0.17037],[51.4604,-0.16967],[51.46048,-0.16947],[51.460579,-0.16882],[51.460751,-0.16781],[51.460838,-0.16703],[51.460781,-0.16653],[51.460819,-0.16599],[51.460831,-0.1658],[51.460869,-0.16534],[51.46088,-0.16485],[51.460899,-0.16431],[51.460979,-0.16321],[51.460999,-0.16296],[51.461021,-0.16268],[51.461021,-0.1625],[51.46104,-0.16213],[51.46106,-0.16186],[51.461151,-0.16126],[51.46122,-0.1602],[51.4613,-0.15897],[51.461319,-0.15819],[51.461281,-0.15716],[51.4613,-0.15642],[51.460049,-0.15658],[51.45993,-0.15658],[51.459759,-0.15659],[51.45969,-0.15658],[51.458931,-0.15604],[51.458172,-0.15538],[51.457878,-0.1551],[51.45742,-0.15465],[51.456821,-0.15379],[51.455681,-0.15134],[51.455528,-0.15098],[51.45475,-0.14926],[51.453999,-0.14742],[51.45401,-0.14732],[51.454159,-0.14628],[51.453369,-0.14419],[51.452862,-0.14297],[51.452332,-0.14222],[51.451832,-0.14213],[51.45174,-0.14214],[51.451328,-0.14212],[51.451099,-0.14197],[51.451012,-0.14191],[51.450729,-0.14134],[51.450691,-0.14118],[51.450489,-0.1404],[51.449871,-0.13813],[51.449799,-0.13787],[51.449539,-0.13695],[51.449261,-0.13612],[51.44915,-0.13577],[51.448811,-0.13476],[51.448502,-0.13383],[51.448391,-0.13351],[51.44833,-0.13332],[51.44812,-0.13277],[51.447861,-0.13189],[51.447609,-0.13092],[51.447552,-0.13067],[51.44735,-0.12992],[51.44717,-0.12935],[51.447071,-0.12885],[51.446991,-0.12862],[51.446972,-0.12857],[51.44685,-0.1282],[51.445992,-0.12606],[51.44511,-0.12436],[51.44492,-0.12368],[51.44487,-0.12353],[51.444752,-0.12276],[51.444721,-0.12266],[51.444641,-0.12243],[51.44453,-0.12213],[51.444389,-0.12187],[51.44434,-0.12167],[51.444118,-0.12058],[51.444012,-0.12013],[51.44371,-0.11895],[51.443531,-0.1182],[51.443489,-0.11803],[51.443451,-0.11786],[51.443371,-0.11758],[51.4431,-0.11661],[51.44276,-0.1158],[51.44212,-0.11491],[51.441689,-0.11427],[51.44138,-0.11364],[51.441151,-0.11289],[51.441101,-0.11274],[51.441059,-0.11257],[51.440651,-0.11082],[51.440578,-0.11025],[51.440392,-0.10871],[51.441078,-0.10854],[51.441441,-0.10829],[51.44109,-0.10701],[51.44101,-0.10662],[51.440941,-0.10626],[51.440929,-0.10578],[51.440891,-0.1052],[51.440762,-0.10446],[51.44051,-0.10355],[51.440441,-0.10333],[51.440189,-0.10274],[51.43964,-0.10179],[51.439461,-0.10091],[51.439339,-0.10016],[51.43935,-0.10003],[51.439339,-0.09909],[51.4394,-0.09832],[51.439548,-0.0979],[51.43969,-0.09752],[51.43985,-0.09727],[51.440189,-0.09671],[51.44043,-0.09609],[51.44046,-0.09599],[51.44072,-0.09489],[51.440948,-0.09397],[51.441071,-0.09291],[51.441101,-0.09183],[51.441109,-0.09137],[51.441109,-0.091],[51.441101,-0.09],[51.44104,-0.0892],[51.440861,-0.08854],[51.440891,-0.08813],[51.440979,-0.08768],[51.44173,-0.08473],[51.44183,-0.08436],[51.441891,-0.08413],[51.44191,-0.08401],[51.44199,-0.08292],[51.442089,-0.08137],[51.4422,-0.08036],[51.442242,-0.08006],[51.44228,-0.07963],[51.44231,-0.07934],[51.442451,-0.07843],[51.442551,-0.07765],[51.442669,-0.07675],[51.442982,-0.07507],[51.443298,-0.07406],[51.443489,-0.07357],[51.443562,-0.07321],[51.443569,-0.0728],[51.443489,-0.07209],[51.443359,-0.07099],[51.443119,-0.0694],[51.4431,-0.06915],[51.443089,-0.06894],[51.443138,-0.06811],[51.44318,-0.06783],[51.443199,-0.06772],[51.443291,-0.06757],[51.443069,-0.06722],[51.442532,-0.06649],[51.442421,-0.06637],[51.4422,-0.06613],[51.442059,-0.06597],[51.44186,-0.06575],[51.44178,-0.06567],[51.441761,-0.06555],[51.441269,-0.06498],[51.44112,-0.06465],[51.44104,-0.06435],[51.441021,-0.06425],[51.440948,-0.06408],[51.440609,-0.06253],[51.440601,-0.0622],[51.440559,-0.06188],[51.440552,-0.06152],[51.44054,-0.0609],[51.440529,-0.06047],[51.44051,-0.06015],[51.44051,-0.05982],[51.44054,-0.05915],[51.44054,-0.05889],[51.440552,-0.0586],[51.440552,-0.0584],[51.440472,-0.05796],[51.440361,-0.05765],[51.440239,-0.05739],[51.440109,-0.05707],[51.43969,-0.05579],[51.43924,-0.05458],[51.43911,-0.05418],[51.439049,-0.054],[51.439289,-0.05379],[51.439751,-0.0538],[51.440102,-0.05379],[51.440201,-0.05371],[51.440239,-0.05359],[51.440269,-0.05332],[51.4403,-0.05295],[51.440281,-0.05266],[51.440231,-0.05243],[51.440022,-0.05139],[51.43998,-0.05115],[51.440071,-0.0507],[51.440479,-0.04968],[51.440762,-0.04884],[51.44138,-0.04734],[51.442162,-0.04733],[51.442181,-0.04733],[51.442268,-0.04725],[51.442329,-0.04588],[51.442329,-0.04563],[51.44228,-0.04412],[51.442242,-0.04251],[51.44215,-0.04132],[51.44202,-0.03995],[51.442051,-0.03951],[51.442089,-0.03879],[51.442211,-0.03746],[51.442299,-0.03678],[51.442329,-0.03654],[51.442341,-0.03618],[51.442341,-0.03586],[51.442322,-0.03489],[51.442291,-0.03441],[51.442081,-0.03347],[51.441929,-0.03274],[51.441898,-0.03239],[51.441959,-0.03208],[51.442131,-0.03124],[51.442322,-0.03081],[51.442692,-0.02992],[51.4431,-0.02868],[51.443138,-0.028],[51.443169,-0.0276],[51.44323,-0.02698],[51.443352,-0.02683],[51.443741,-0.02636],[51.443851,-0.02623],[51.443932,-0.02613],[51.444221,-0.02538],[51.44455,-0.02409],[51.444618,-0.02361],[51.444691,-0.02308],[51.44479,-0.02226],[51.444801,-0.02197],[51.444809,-0.02115],[51.44487,-0.02082],[51.444939,-0.02056],[51.445019,-0.02034],[51.445122,-0.02013],[51.445229,-0.01994],[51.445431,-0.01983],[51.445969,-0.01957],[51.446129,-0.01946],[51.446072,-0.01873],[51.44595,-0.01764],[51.4459,-0.01725],[51.445709,-0.01584],[51.445511,-0.0145],[51.445339,-0.01315],[51.445068,-0.01105],[51.445068,-0.00916],[51.445068,-0.00897],[51.445099,-0.00713],[51.44511,-0.00561],[51.445099,-0.00474],[51.44508,-0.00345],[51.445122,-0.00221],[51.44516,-0.00109],[51.445171,0.00011],[51.44519,0.00135],[51.445202,0.00247],[51.445221,0.00356],[51.445278,0.00442],[51.445301,0.00467],[51.445389,0.00518],[51.44556,0.00565],[51.44558,0.00603],[51.44556,0.00663],[51.445572,0.00772],[51.445641,0.00859],[51.445679,0.00959],[51.445721,0.01089],[51.445801,0.0115],[51.445889,0.0127],[51.446159,0.01386],[51.446381,0.01466],[51.446609,0.0156],[51.447708,0.02026],[51.44775,0.02043],[51.448189,0.02234],[51.44825,0.02255],[51.448292,0.0227],[51.448441,0.0232],[51.448669,0.02399],[51.448879,0.02476],[51.44902,0.02536],[51.449089,0.02561],[51.44978,0.02794],[51.450119,0.02896],[51.450191,0.02912],[51.450249,0.02914],[51.450279,0.02917],[51.450298,0.0292],[51.450329,0.02924],[51.450352,0.02933],[51.450359,0.02943],[51.45034,0.02953],[51.450279,0.02964],[51.45023,0.02969],[51.450161,0.0297],[51.4501,0.02967],[51.450039,0.02965],[51.44997,0.02965],[51.44978,0.02972],[51.4492,0.02993],[51.44857,0.03013],[51.448021,0.03033],[51.44772,0.03043],[51.44696,0.03077],[51.446739,0.03084],[51.446419,0.03088],[51.44614,0.0309],[51.44577,0.03095],[51.445438,0.03104],[51.445148,0.03122],[51.444939,0.03145],[51.444721,0.03171],[51.444561,0.03193],[51.444401,0.03219],[51.444241,0.0325],[51.443958,0.03315],[51.443501,0.03425],[51.4431,0.03519],[51.442791,0.03597],[51.442471,0.03678],[51.44228,0.03729],[51.442131,0.0378],[51.441811,0.03879],[51.441368,0.04027],[51.441231,0.04084],[51.44101,0.04174],[51.440479,0.04412],[51.43972,0.04768],[51.439651,0.04802],[51.4394,0.04924],[51.439369,0.04944],[51.439178,0.05038],[51.43911,0.05061],[51.438999,0.05081],[51.438789,0.05132],[51.438568,0.05182],[51.438358,0.05242],[51.438179,0.05313],[51.43795,0.05417],[51.437191,0.05753],[51.436932,0.05848],[51.436871,0.05864],[51.43679,0.05888],[51.436581,0.0594],[51.435188,0.0627],[51.434921,0.0634],[51.43483,0.06364],[51.434711,0.06398],[51.43462,0.06424],[51.434502,0.06462],[51.43433,0.06534],[51.43401,0.06693],[51.43359,0.06872],[51.433361,0.0698],[51.43288,0.07194],[51.432598,0.07332],[51.432369,0.07429],[51.43206,0.07563],[51.431351,0.07868],[51.431042,0.07999],[51.430489,0.08221],[51.430351,0.08261],[51.430119,0.08312],[51.429951,0.08344],[51.429798,0.08367],[51.429409,0.08413],[51.42889,0.08458],[51.427738,0.08559],[51.426731,0.08656],[51.4259,0.08747],[51.424511,0.08901],[51.422531,0.09173],[51.421539,0.09321],[51.420368,0.09517],[51.418839,0.09795],[51.417141,0.10123],[51.416222,0.10311],[51.415829,0.10403],[51.415371,0.10513],[51.415119,0.10581],[51.41444,0.10769],[51.414009,0.10905],[51.413521,0.11098],[51.41264,0.11505],[51.412041,0.11826],[51.41124,0.12231],[51.410992,0.12349],[51.410671,0.12522],[51.410599,0.12554],[51.41003,0.12827],[51.409771,0.12976],[51.409649,0.13078],[51.409561,0.13171],[51.409512,0.13284],[51.4095,0.13436],[51.409489,0.13994],[51.409489,0.1408],[51.4095,0.14117],[51.409489,0.1419],[51.40947,0.14288],[51.409389,0.14418],[51.40921,0.14569],[51.409069,0.14648],[51.408932,0.14716],[51.408749,0.14788],[51.40852,0.14863],[51.408131,0.14982],[51.407532,0.15119],[51.40696,0.15228],[51.40654,0.15293],[51.406269,0.15334],[51.405628,0.15413],[51.4049,0.15499],[51.404308,0.15556],[51.404129,0.15573],[51.403271,0.15645],[51.402302,0.15709],[51.401112,0.15767],[51.399971,0.15804],[51.399109,0.15828],[51.398079,0.15855],[51.397049,0.15889],[51.396179,0.15931],[51.39547,0.1598],[51.39452,0.16056],[51.393681,0.1614],[51.392921,0.16234],[51.392551,0.16289],[51.39212,0.16354],[51.391571,0.16447],[51.39085,0.166],[51.390228,0.1678],[51.38979,0.16935],[51.389469,0.17106],[51.389259,0.1728],[51.389172,0.17438],[51.38916,0.17585],[51.389221,0.17702],[51.389542,0.18034],[51.38969,0.18225],[51.38974,0.18407],[51.38974,0.18552],[51.389679,0.18714],[51.38942,0.18934],[51.389172,0.19115],[51.38876,0.19339],[51.388161,0.196],[51.38747,0.19845],[51.38702,0.19998],[51.38678,0.20088],[51.38625,0.20298],[51.385509,0.20598],[51.38522,0.20735],[51.385052,0.20821],[51.38467,0.21019],[51.38448,0.21191],[51.384418,0.21259],[51.384392,0.21318],[51.38435,0.21409],[51.3843,0.21612],[51.384171,0.22142],[51.384029,0.22337],[51.383831,0.22515],[51.38345,0.22739],[51.383411,0.22763],[51.383362,0.22786],[51.382919,0.22983],[51.382351,0.23176],[51.38184,0.23328],[51.381142,0.23508],[51.380901,0.23562],[51.38076,0.23596],[51.38039,0.23683],[51.37867,0.24056],[51.377449,0.24298],[51.37598,0.2457],[51.375271,0.24696],[51.373531,0.24988],[51.37122,0.25339],[51.3703,0.2548],[51.36866,0.25733],[51.366501,0.26056],[51.365349,0.26232],[51.364361,0.26381],[51.3634,0.26522],[51.362431,0.26644],[51.361179,0.26788],[51.360851,0.26818],[51.360149,0.26885],[51.359001,0.26981],[51.357712,0.27082],[51.355461,0.27233],[51.3531,0.27363],[51.351528,0.27437],[51.349098,0.27529],[51.347988,0.27563],[51.346981,0.27589],[51.34605,0.27605],[51.3451,0.27615],[51.344181,0.27614],[51.343079,0.27607],[51.340969,0.27571],[51.340099,0.27544],[51.33886,0.27496],[51.336941,0.27424],[51.336651,0.27417],[51.335949,0.274],[51.334801,0.27373],[51.33308,0.27351],[51.33073,0.27348],[51.329079,0.27365],[51.327808,0.27388],[51.326462,0.2743],[51.32526,0.27495],[51.323929,0.27599],[51.322701,0.27727],[51.321671,0.27865],[51.32098,0.27987],[51.32074,0.28029],[51.319931,0.28203],[51.319359,0.28364],[51.318668,0.28581],[51.318241,0.28741],[51.317829,0.28888],[51.31641,0.29444],[51.315529,0.29828],[51.315029,0.30069],[51.314289,0.30436],[51.313911,0.30597],[51.31348,0.30744],[51.312672,0.30974],[51.311611,0.31285],[51.311081,0.31464],[51.31041,0.31727],[51.309399,0.32178],[51.308849,0.32467],[51.308479,0.32698],[51.308041,0.32987],[51.307991,0.33014],[51.307961,0.33033],[51.30772,0.33232],[51.307419,0.3351],[51.30714,0.33829],[51.306919,0.34202],[51.306789,0.34573],[51.30677,0.34766],[51.30682,0.35044],[51.306919,0.35324],[51.307178,0.35651],[51.307468,0.35934],[51.30772,0.36124],[51.308189,0.36418],[51.308651,0.36814],[51.308708,0.36896],[51.30883,0.37218],[51.30891,0.3746],[51.30888,0.37754],[51.30901,0.38345],[51.309071,0.38842],[51.309261,0.39099],[51.309601,0.39395],[51.309959,0.39628],[51.31065,0.40007],[51.310909,0.40133],[51.311081,0.40247],[51.311211,0.40348],[51.311432,0.40537],[51.311531,0.4067],[51.3116,0.40831],[51.311611,0.40987],[51.311581,0.41178],[51.311569,0.41225],[51.311539,0.41272],[51.311481,0.41354],[51.311359,0.41489],[51.311192,0.41651],[51.310768,0.41924],[51.310379,0.42111],[51.310101,0.42242],[51.309231,0.42526],[51.308262,0.42798],[51.30727,0.43082],[51.306931,0.43183],[51.30674,0.43252],[51.306149,0.4349],[51.305901,0.43603],[51.305679,0.43715],[51.305038,0.44058],[51.30397,0.44616],[51.303379,0.44947],[51.303249,0.45038],[51.303162,0.45112],[51.30302,0.45268],[51.302769,0.45542],[51.302471,0.45849],[51.30238,0.45939],[51.302231,0.46031],[51.30196,0.46153],[51.30164,0.46285],[51.300961,0.4654],[51.300701,0.46637],[51.300461,0.46734],[51.300289,0.46822],[51.300121,0.46922],[51.300011,0.47011],[51.299931,0.47089],[51.299831,0.47189],[51.29977,0.47257],[51.29966,0.47387],[51.299591,0.47437],[51.299549,0.47468],[51.299541,0.47477],[51.29948,0.47513],[51.299438,0.47536],[51.299339,0.47598],[51.29911,0.47691],[51.298889,0.47756],[51.298691,0.47816],[51.298359,0.47894],[51.298241,0.47919],[51.297661,0.48044],[51.296921,0.48235],[51.296581,0.48351],[51.296398,0.48429],[51.29623,0.48525],[51.29612,0.48602],[51.29599,0.48772],[51.295959,0.49028],[51.295971,0.49123],[51.296001,0.49224],[51.29607,0.4932],[51.296188,0.4943],[51.29636,0.49533],[51.296558,0.49635],[51.29673,0.49698],[51.297211,0.49875],[51.297371,0.49922],[51.297459,0.49954],[51.297871,0.50098],[51.29808,0.50212],[51.298248,0.50355],[51.298351,0.50497],[51.298569,0.50858],[51.29879,0.51282],[51.298901,0.51441],[51.298969,0.51558],[51.29903,0.51657],[51.29908,0.51737],[51.29911,0.51794],[51.29911,0.51862],[51.299091,0.51915],[51.299,0.51987],[51.298908,0.52049],[51.298809,0.52116],[51.29863,0.52195],[51.298359,0.52297],[51.298168,0.52345],[51.297852,0.52421],[51.297489,0.52491],[51.29665,0.52623],[51.29557,0.52804],[51.29483,0.52931],[51.29427,0.53038],[51.292782,0.53339],[51.292221,0.53459],[51.291859,0.53532],[51.291599,0.53592],[51.291191,0.53707],[51.291019,0.53768],[51.290722,0.53911],[51.29047,0.54019],[51.290291,0.54093],[51.290131,0.54148],[51.28989,0.54226],[51.28923,0.544],[51.288582,0.54589],[51.288429,0.54636],[51.28828,0.54689],[51.288181,0.54746],[51.28804,0.54834],[51.287949,0.54936],[51.28791,0.55003],[51.287922,0.55088],[51.287971,0.55186],[51.288029,0.55306],[51.2882,0.55569],[51.28828,0.55696],[51.2883,0.55782],[51.288212,0.56001],[51.288101,0.56193],[51.28796,0.56383],[51.287762,0.56577],[51.287579,0.56706],[51.287361,0.56836],[51.286812,0.57094],[51.28624,0.57306],[51.285789,0.57454],[51.285332,0.57591],[51.284599,0.57786],[51.284061,0.57915],[51.283489,0.58035],[51.282799,0.58177],[51.28257,0.58224],[51.282299,0.58279],[51.280529,0.58595],[51.278931,0.58872],[51.277351,0.5914],[51.276951,0.59208],[51.275421,0.59477],[51.273571,0.59799],[51.271709,0.60145],[51.270592,0.60341],[51.270481,0.6036],[51.269989,0.60445],[51.269489,0.60531],[51.26915,0.60589],[51.268242,0.60747],[51.266701,0.60995],[51.26535,0.61188],[51.264179,0.61357],[51.263302,0.61501],[51.262489,0.6163],[51.261459,0.61795],[51.261311,0.61822],[51.261169,0.6185],[51.261051,0.61878],[51.260929,0.61903],[51.26062,0.61976],[51.260448,0.62018],[51.260201,0.6208],[51.259079,0.62382],[51.258289,0.62644],[51.25795,0.62747],[51.257641,0.62829],[51.256618,0.63055],[51.25634,0.63115],[51.256031,0.63176],[51.255371,0.63291],[51.255032,0.63346],[51.254688,0.63397],[51.252941,0.63631],[51.25243,0.63704],[51.252289,0.63724],[51.251289,0.63867],[51.250961,0.63918],[51.250599,0.63978],[51.249569,0.64159],[51.249271,0.64217],[51.24876,0.64322],[51.248112,0.64466],[51.24781,0.64535],[51.247509,0.64616],[51.247162,0.64707],[51.246861,0.64794],[51.246681,0.64849],[51.246471,0.64916],[51.246281,0.64979],[51.245949,0.65084],[51.245899,0.65104],[51.245171,0.65347],[51.244541,0.65575],[51.24361,0.65901],[51.242668,0.66237],[51.241711,0.66557],[51.241371,0.66662],[51.24102,0.66764],[51.240028,0.6704],[51.239609,0.67148],[51.23914,0.6726],[51.237942,0.67524],[51.237469,0.67616],[51.237041,0.67698],[51.236649,0.67772],[51.23645,0.6781],[51.23595,0.67909],[51.23518,0.68037],[51.234089,0.68227],[51.23365,0.68299],[51.233101,0.68384],[51.232632,0.68449],[51.232208,0.68509],[51.23159,0.68585],[51.231098,0.68638],[51.230659,0.68688],[51.229839,0.6878],[51.229019,0.6888],[51.228279,0.68988],[51.22797,0.69037],[51.227661,0.69092],[51.227211,0.6918],[51.2267,0.69285],[51.226509,0.69331],[51.226261,0.69388],[51.225819,0.69502],[51.225578,0.69575],[51.225281,0.69674],[51.22506,0.69754],[51.224869,0.69836],[51.224701,0.69918],[51.224548,0.69999],[51.224419,0.70091],[51.224339,0.70158],[51.224232,0.70277],[51.22414,0.70386],[51.22414,0.70392],[51.223942,0.70706],[51.223801,0.70842],[51.223709,0.70911],[51.223591,0.70976],[51.223358,0.71097],[51.223049,0.71225],[51.222851,0.71295],[51.22263,0.71364],[51.22224,0.71477],[51.221802,0.71586],[51.221561,0.71644],[51.221291,0.71697],[51.220409,0.71862],[51.220058,0.71922],[51.21965,0.71985],[51.21843,0.72149],[51.2178,0.72229],[51.217461,0.72274],[51.217072,0.72331],[51.21653,0.72418],[51.216202,0.72477],[51.215851,0.72538],[51.215481,0.72616],[51.215069,0.72716],[51.21442,0.72904],[51.21418,0.72975],[51.213928,0.73048],[51.21331,0.73252],[51.212719,0.7343],[51.212502,0.73491],[51.212261,0.73557],[51.21175,0.73686],[51.210781,0.73941],[51.210411,0.74033],[51.210091,0.74111],[51.208961,0.74368],[51.207371,0.7471],[51.205879,0.7505],[51.20435,0.75444],[51.20369,0.7563],[51.2029,0.75831],[51.202068,0.76009],[51.201199,0.76191],[51.199879,0.76458],[51.198879,0.76694],[51.198349,0.76836],[51.196941,0.77223],[51.195881,0.77579],[51.19482,0.77989],[51.19363,0.78381],[51.193481,0.78425],[51.192371,0.78747],[51.19109,0.79133],[51.190819,0.79238],[51.190521,0.79363],[51.190319,0.79462],[51.190182,0.79558],[51.18988,0.79784],[51.189522,0.80175],[51.189091,0.80706],[51.188862,0.8117],[51.188721,0.81612],[51.188599,0.82169],[51.18837,0.8241],[51.188251,0.82496],[51.188099,0.82587],[51.187962,0.82665],[51.187752,0.82763],[51.187569,0.82836],[51.187119,0.82975],[51.186378,0.83164],[51.185749,0.83293],[51.18531,0.83368],[51.184811,0.83448],[51.184299,0.83517],[51.183121,0.83649],[51.182381,0.83722],[51.18198,0.83761],[51.181862,0.83773],[51.179722,0.83981],[51.177509,0.84225],[51.17527,0.84496],[51.17326,0.84778],[51.171341,0.85072],[51.169498,0.85395],[51.167709,0.85684],[51.167049,0.85787],[51.166241,0.8591],[51.16478,0.86123],[51.163509,0.86324],[51.16193,0.86581],[51.1614,0.8668],[51.161079,0.86742],[51.160549,0.8685],[51.160221,0.86923],[51.15966,0.87046],[51.15884,0.87253],[51.157841,0.87482],[51.156559,0.87788],[51.15509,0.88152],[51.1548,0.88219],[51.15337,0.88568],[51.151508,0.89005],[51.15062,0.89223],[51.150249,0.89302],[51.150169,0.8932],[51.149899,0.8938],[51.149632,0.89439],[51.149109,0.89545],[51.148479,0.8966],[51.147461,0.89819],[51.146549,0.89942],[51.14473,0.90196],[51.142151,0.90519],[51.141788,0.90564],[51.140621,0.90699],[51.139591,0.90816],[51.138611,0.90931],[51.13802,0.91008],[51.137371,0.91099],[51.13644,0.91254],[51.135948,0.91346],[51.135071,0.91531],[51.13448,0.91676],[51.133438,0.91969],[51.13208,0.92321],[51.13131,0.92488],[51.13047,0.92637],[51.12999,0.92714],[51.129501,0.92789],[51.12772,0.93053],[51.127171,0.93141],[51.126259,0.93304],[51.125408,0.9346],[51.12484,0.93569],[51.123291,0.93894],[51.122822,0.93991],[51.121529,0.94233],[51.12104,0.94323],[51.119839,0.9451],[51.117802,0.94831],[51.11721,0.94936],[51.11676,0.95022],[51.116459,0.95082],[51.116219,0.95133],[51.115978,0.95189],[51.115761,0.95245],[51.11544,0.9533],[51.114738,0.95539],[51.113811,0.95882],[51.11272,0.96273],[51.111561,0.96647],[51.110279,0.97016],[51.108822,0.97406],[51.10833,0.97522],[51.107491,0.97725],[51.107121,0.97813],[51.106419,0.97979],[51.105999,0.98086],[51.105621,0.98185],[51.105209,0.98297],[51.104858,0.98403],[51.10453,0.98504],[51.10405,0.9866],[51.103519,0.98858],[51.103161,0.98998],[51.102631,0.99251],[51.10183,0.99697],[51.101261,1.00094],[51.100498,1.00727],[51.100441,1.00801],[51.100101,1.01554],[51.099789,1.02085],[51.09943,1.02433],[51.09914,1.02641],[51.098629,1.02937],[51.09795,1.03334],[51.097301,1.03712],[51.096981,1.03903],[51.096691,1.04113],[51.096191,1.04478],[51.09565,1.04961],[51.09523,1.05352],[51.095001,1.05578],[51.094818,1.05718],[51.094551,1.05899],[51.094002,1.0625],[51.093811,1.06352],[51.093479,1.06512],[51.09296,1.06772],[51.09272,1.06914],[51.092541,1.07024],[51.092381,1.07156],[51.09222,1.07294],[51.092091,1.07427],[51.091991,1.07574],[51.091911,1.07683],[51.09185,1.07825],[51.091801,1.08103],[51.09182,1.08295],[51.091881,1.08497],[51.091999,1.08669],[51.09206,1.08743],[51.092178,1.0886],[51.092339,1.09011],[51.092628,1.09246],[51.09293,1.09531],[51.093651,1.09994],[51.093788,1.10123],[51.093811,1.10192],[51.093849,1.10356],[51.0937,1.10681],[51.093472,1.10861],[51.09317,1.1104],[51.092239,1.11382],[51.091209,1.11814],[51.090988,1.12],[51.090889,1.12149],[51.090839,1.12251],[51.090839,1.12344],[51.090988,1.1267],[51.091251,1.12838],[51.091549,1.12994],[51.09219,1.13217],[51.09248,1.13289],[51.092812,1.13363],[51.093449,1.13509],[51.09383,1.13608],[51.09417,1.13718],[51.094791,1.14033],[51.09528,1.14437],[51.095539,1.14675],[51.09565,1.14905],[51.095638,1.15199],[51.0956,1.1539],[51.09557,1.15553],[51.0956,1.15691],[51.09565,1.15785],[51.095711,1.15863],[51.095791,1.15935],[51.095909,1.16004],[51.096081,1.16075],[51.096378,1.16185],[51.096771,1.16293],[51.097149,1.16373],[51.097439,1.16425],[51.09853,1.16572],[51.099621,1.16672],[51.099831,1.16689],[51.10281,1.16969],[51.104382,1.17116],[51.105709,1.17244],[51.106781,1.17389],[51.107849,1.17564],[51.108719,1.17739],[51.109619,1.17987],[51.110512,1.18248],[51.111488,1.18548],[51.112228,1.18863],[51.112499,1.19082],[51.112549,1.19196],[51.112549,1.19278],[51.112518,1.19351],[51.112469,1.19398],[51.11235,1.19533],[51.112228,1.19671],[51.112171,1.19839],[51.11219,1.19926],[51.112209,1.20014],[51.112331,1.20197],[51.112438,1.20275],[51.112541,1.20346],[51.112839,1.20577],[51.11301,1.20811],[51.113022,1.21006],[51.11293,1.2119],[51.11264,1.21474],[51.112301,1.21747],[51.111851,1.22028],[51.111382,1.22301],[51.110882,1.22546],[51.110329,1.22787],[51.10997,1.22901],[51.10955,1.23013],[51.108589,1.23208],[51.106739,1.23498],[51.105942,1.23623],[51.10466,1.23946],[51.104389,1.24029],[51.10429,1.24069],[51.104172,1.24137],[51.10397,1.24288],[51.103889,1.24393],[51.103859,1.24491],[51.10387,1.24596],[51.103958,1.24726],[51.10405,1.24807],[51.104221,1.24973],[51.104488,1.25164],[51.104809,1.25353],[51.10564,1.2573],[51.107071,1.26226],[51.107208,1.26301],[51.107529,1.26477],[51.107689,1.26757],[51.107849,1.27028],[51.108292,1.27241],[51.109692,1.27641],[51.11018,1.27878],[51.110298,1.28074],[51.110031,1.285],[51.110329,1.28792],[51.11063,1.28913],[51.111111,1.29063],[51.112011,1.29313],[51.11293,1.29586],[51.11335,1.29733],[51.113689,1.29877],[51.114029,1.30058],[51.114239,1.30197],[51.114311,1.3025],[51.11441,1.30284],[51.114471,1.30292],[51.11454,1.30295],[51.114601,1.30302],[51.114639,1.30313],[51.114651,1.30328],[51.114639,1.30338],[51.11459,1.30349],[51.114552,1.30354],[51.114559,1.30386],[51.114571,1.30415],[51.114658,1.30462],[51.114731,1.30493],[51.11491,1.30535],[51.11507,1.30566],[51.11525,1.30597],[51.115429,1.3062],[51.115829,1.30659],[51.11618,1.30687],[51.116539,1.30705],[51.11694,1.30718],[51.1171,1.3072],[51.117249,1.30716],[51.117298,1.30712],[51.11739,1.30709],[51.11747,1.30711],[51.11755,1.3072],[51.11771,1.30735],[51.117859,1.30746],[51.118038,1.30755],[51.118301,1.30769],[51.11861,1.30787],[51.118938,1.30809],[51.119362,1.30841],[51.119888,1.30906],[51.11993,1.30902],[51.11998,1.30901],[51.12001,1.30901],[51.12006,1.30904],[51.120098,1.30911],[51.120121,1.30918],[51.120121,1.30924],[51.120609,1.3098],[51.12125,1.31049],[51.122311,1.3116],[51.122829,1.31228],[51.123299,1.31321],[51.12336,1.31319],[51.12344,1.31321],[51.123489,1.31326],[51.123531,1.31334],[51.12355,1.31343],[51.12355,1.31351],[51.123531,1.3136],[51.123501,1.31366],[51.12384,1.31478],[51.123871,1.31488],[51.12392,1.31503],[51.1241,1.31553],[51.12455,1.3167],[51.125172,1.31831],[51.125408,1.31906],[51.125462,1.3194],[51.125481,1.31952],[51.1255,1.3205],[51.12537,1.3222],[51.12534,1.32278],[51.125351,1.32315],[51.12537,1.32341],[51.125389,1.32368],[51.1255,1.3245],[51.12595,1.32607],[51.126171,1.32679],[51.126251,1.32687],[51.126301,1.32687],[51.12635,1.32691],[51.126381,1.32697],[51.1264,1.32701],[51.126411,1.32709],[51.126411,1.32714],[51.12661,1.3272],[51.12674,1.32733],[51.127281,1.32823],[51.127659,1.32897],[51.12793,1.3295],[51.128151,1.33004],[51.128342,1.33049],[51.128391,1.33063],[51.128429,1.33076],[51.128479,1.331],[51.128502,1.33119],[51.128632,1.33167],[51.128719,1.33201],[51.12878,1.33245],[51.128799,1.3326],[51.12886,1.33275],[51.129009,1.33327],[51.12907,1.33347],[51.12907,1.33365],[51.12907,1.33392],[51.129421,1.33511],[51.12965,1.33549],[51.129799,1.33605],[51.12986,1.33621],[51.129921,1.33647],[51.12994,1.33681],[51.1301,1.33749],[51.130089,1.33783],[51.129978,1.33815],[51.129921,1.33843],[51.12991,1.33859],[51.12989,1.33884],[51.12989,1.33906],[51.129921,1.33965],[51.130001,1.34022],[51.130131,1.34103],[51.130161,1.34122],[51.13018,1.3414],[51.130169,1.34149],[51.13015,1.34158],[51.130112,1.34162],[51.130058,1.34167],[51.12999,1.34169],[51.129921,1.34164],[51.129879,1.34158],[51.129848,1.34154],[51.12981,1.34135],[51.12981,1.34135],[51.129761,1.34097],[51.1297,1.3406],[51.129681,1.34054],[51.129601,1.34023],[51.129601,1.3402],[51.129551,1.33999],[51.129539,1.3399],[51.12952,1.33983],[51.129509,1.33976],[51.12949,1.33967],[51.129478,1.33961],[51.129459,1.33953],[51.12944,1.33945],[51.129349,1.33897],[51.129341,1.3389],[51.129292,1.33865],[51.12928,1.33857],[51.129269,1.33852],[51.12925,1.33846],[51.1292,1.3382],[51.12899,1.33747],[51.128502,1.33599],[51.127621,1.33327],[51.127369,1.33316],[51.126629,1.33378],[51.126621,1.33374],[51.126621,1.33364],[51.12664,1.33357],[51.12669,1.33347],[51.124249,1.33631],[51.12339,1.33681],[51.122921,1.33723],[51.122219,1.33852],[51.121521,1.34088],[51.1213,1.34214],[51.120991,1.34396],[51.121029,1.34623],[51.12122,1.34811],[51.121658,1.3505],[51.122429,1.35514],[51.122669,1.35707],[51.12252,1.35925],[51.117809,1.37432],[51.113098,1.38939],[51.108391,1.40446],[51.10368,1.41953],[51.098961,1.4346],[51.09425,1.44967],[51.089539,1.46474],[51.084831,1.47981],[51.080109,1.49488],[51.068069,1.51962],[51.053921,1.56329],[51.04071,1.59852],[51.025211,1.63092],[51.001999,1.66988],[50.982979,1.702],[50.971821,1.73021],[50.965912,1.75008],[50.965778,1.7616],[50.967621,1.78272],[50.970249,1.81447],[50.9734,1.83058],[50.971569,1.84148],[50.970322,1.84528],[50.96946,1.84855],[50.968941,1.85085],[50.967468,1.851],[50.9664,1.85395],[50.965809,1.85499],[50.965721,1.85539],[50.965389,1.85658],[50.965279,1.857],[50.965061,1.85736],[50.964859,1.85768],[50.964828,1.85799],[50.964859,1.85852],[50.96513,1.86018],[50.965439,1.86224],[50.96553,1.86291],[50.965591,1.86335],[50.965679,1.86408],[50.965759,1.86463],[50.965801,1.86492],[50.96571,1.86559],[50.966,1.86722],[50.966209,1.86859],[50.9664,1.86985],[50.966579,1.87094],[50.966721,1.87124],[50.966881,1.87146],[50.967152,1.87174],[50.967251,1.87199],[50.967319,1.87213],[50.967339,1.8723],[50.967319,1.87242],[50.967258,1.87253],[50.967171,1.87264],[50.967049,1.87269],[50.966961,1.87267],[50.9669,1.87264],[50.966782,1.87256],[50.966679,1.87258],[50.966621,1.87266],[50.966579,1.87277],[50.966572,1.87295],[50.966591,1.87306],[50.966709,1.87319],[50.966831,1.87318],[50.9669,1.87312],[50.966942,1.87316],[50.967289,1.87339],[50.9678,1.87385],[50.968369,1.87442],[50.968632,1.87467],[50.968922,1.87501],[50.968971,1.87539],[50.969151,1.87581],[50.96944,1.87606],[50.969521,1.87685],[50.969688,1.87737],[50.97023,1.87846],[50.970631,1.88081],[50.971611,1.88645],[50.97216,1.88977],[50.972839,1.89413],[50.973099,1.89619],[50.973129,1.89712],[50.97298,1.89819],[50.972778,1.8989],[50.972679,1.89918],[50.972198,1.90005],[50.971581,1.90064],[50.97086,1.90113],[50.970188,1.9014],[50.969372,1.90176],[50.96859,1.90212],[50.967812,1.90248],[50.964081,1.90407],[50.961891,1.9049],[50.96096,1.9052],[50.959148,1.90522],[50.95834,1.90519],[50.95726,1.90522],[50.956211,1.90542],[50.955238,1.90564],[50.9543,1.90587],[50.95359,1.90598],[50.95314,1.90604],[50.951931,1.90612],[50.950241,1.90554],[50.948601,1.90488],[50.94746,1.90462],[50.946918,1.90463],[50.946239,1.90463],[50.94558,1.90469],[50.94376,1.90518],[50.941341,1.90606],[50.93996,1.90648],[50.938591,1.90685],[50.938332,1.90688],[50.93803,1.90684],[50.937759,1.90675],[50.93718,1.90661],[50.936871,1.90664],[50.936359,1.90679],[50.936211,1.90684],[50.935741,1.907],[50.93536,1.90711],[50.93515,1.90722],[50.93494,1.90754],[50.934849,1.90806],[50.93491,1.90848],[50.935089,1.90874],[50.935341,1.909],[50.93557,1.90922],[50.935749,1.90945],[50.935871,1.90982],[50.935982,1.91027],[50.9361,1.91173],[50.93652,1.91885],[50.936661,1.92109],[50.93705,1.9273],[50.937328,1.93228],[50.93745,1.93517],[50.937481,1.93688],[50.937592,1.94222],[50.93758,1.94278],[50.937469,1.94724],[50.937031,1.954],[50.936668,1.95871],[50.936298,1.96403],[50.936111,1.96788],[50.936081,1.96839],[50.936081,1.96851],[50.93605,1.96892],[50.935841,1.97239],[50.935669,1.97436],[50.935249,1.97886],[50.934761,1.98359],[50.93433,1.98798],[50.933788,1.99334],[50.933262,1.99872],[50.93314,1.99992],[50.93272,2.00394],[50.932549,2.00585],[50.932232,2.00935],[50.931931,2.01479],[50.931839,2.0177],[50.931839,2.02036],[50.931911,2.0256],[50.932259,2.03095],[50.932838,2.0366],[50.93351,2.04213],[50.93404,2.04668],[50.934681,2.0518],[50.934731,2.05231],[50.93486,2.05341],[50.935459,2.05849],[50.93618,2.06459],[50.936821,2.06931],[50.937,2.07046],[50.93721,2.07157],[50.938049,2.07576],[50.939331,2.08131],[50.940979,2.08698],[50.943771,2.09651],[50.944969,2.10024],[50.945171,2.10083],[50.945358,2.10132],[50.94603,2.103],[50.947449,2.10617],[50.948669,2.10898],[50.94949,2.11112],[50.95013,2.11311],[50.950569,2.11476],[50.95084,2.11595],[50.951061,2.11703],[50.951229,2.11799],[50.95134,2.11879],[50.95142,2.11946],[50.951481,2.12005],[50.951561,2.12091],[50.951611,2.12154],[50.95163,2.12226],[50.95166,2.12399],[50.95163,2.12719],[50.95166,2.12849],[50.951679,2.12922],[50.95174,2.12994],[50.951801,2.13068],[50.952049,2.13256],[50.95219,2.13337],[50.952339,2.13407],[50.95245,2.13468],[50.952751,2.13587],[50.95314,2.13722],[50.95356,2.1384],[50.955509,2.14382],[50.95594,2.14511],[50.956402,2.14664],[50.956619,2.14741],[50.957272,2.15017],[50.957581,2.15165],[50.95792,2.15362],[50.958241,2.1558],[50.958389,2.15706],[50.958488,2.15826],[50.958569,2.15916],[50.958691,2.16131],[50.958729,2.16278],[50.958759,2.16826],[50.958771,2.17093],[50.958771,2.1724],[50.958778,2.17312],[50.958771,2.17719],[50.958809,2.18107],[50.958809,2.18387],[50.958832,2.18546],[50.95887,2.18725],[50.958931,2.1886],[50.959,2.18962],[50.959042,2.19044],[50.959202,2.1941],[50.95929,2.19583],[50.959358,2.19713],[50.959431,2.19857],[50.95977,2.2044],[50.959888,2.20581],[50.959999,2.20656],[50.960129,2.20742],[50.9603,2.2083],[50.960491,2.20918],[50.96106,2.21099],[50.961369,2.21185],[50.96188,2.21307],[50.962372,2.2141],[50.963051,2.2153],[50.9636,2.21608],[50.964081,2.21676],[50.964951,2.21779],[50.966351,2.21906],[50.967548,2.21984],[50.968819,2.2204],[50.969082,2.22051],[50.96999,2.22091],[50.971722,2.22168],[50.973011,2.22223],[50.975269,2.22326],[50.977989,2.22447],[50.979801,2.22537],[50.981491,2.22651],[50.98312,2.22801],[50.98465,2.22979],[50.985142,2.23047],[50.98571,2.23135],[50.98613,2.23207],[50.987309,2.23417],[50.98785,2.23533],[50.988258,2.23622],[50.988621,2.2371],[50.988838,2.23776],[50.988979,2.23815],[50.98951,2.23991],[50.98983,2.24111],[50.990131,2.24249],[50.990311,2.24335],[50.990471,2.24433],[50.990582,2.2451],[50.990631,2.24546],[50.990749,2.24652],[50.990849,2.24767],[50.991001,2.24997],[50.991089,2.25132],[50.991219,2.25285],[50.991371,2.25542],[50.991428,2.25736],[50.99139,2.25824],[50.99131,2.25904],[50.991131,2.26062],[50.990978,2.26203],[50.990929,2.2628],[50.990929,2.26349],[50.990959,2.26412],[50.991089,2.26534],[50.991329,2.26651],[50.991539,2.26752],[50.99189,2.26896],[50.992081,2.26975],[50.992519,2.27123],[50.99271,2.27176],[50.992908,2.27231],[50.993698,2.27429],[50.993881,2.27475],[50.994141,2.27543],[50.994438,2.27647],[50.994991,2.27878],[50.9953,2.2799],[50.99596,2.28193],[50.99688,2.28418],[50.997162,2.2849],[50.997421,2.28563],[50.998192,2.2878],[50.99921,2.29085],[50.999458,2.29158],[51.000069,2.29328],[51.00098,2.29593],[51.002178,2.29964],[51.002411,2.30036],[51.002861,2.30196],[51.003071,2.3028],[51.003368,2.30435],[51.003601,2.30583],[51.004189,2.3101],[51.00425,2.31055],[51.00428,2.31072],[51.004551,2.31257],[51.00457,2.31275],[51.004662,2.3134],[51.005409,2.31722],[51.006069,2.31984],[51.00629,2.32056],[51.007221,2.32332],[51.00766,2.32452],[51.008259,2.32605],[51.008968,2.32791],[51.00951,2.32936],[51.00988,2.33063],[51.01022,2.3319],[51.010448,2.3329],[51.01078,2.33461],[51.01096,2.33604],[51.011009,2.33643],[51.011589,2.34118],[51.01228,2.34741],[51.012379,2.34865],[51.012421,2.34995],[51.012428,2.35025],[51.01247,2.35212],[51.012482,2.35917],[51.01247,2.36228],[51.01247,2.36496],[51.012508,2.36668],[51.012539,2.36733],[51.012569,2.36826],[51.01263,2.36958],[51.012718,2.37139],[51.01276,2.37266],[51.01281,2.37337],[51.012859,2.37427],[51.012989,2.37692],[51.013031,2.37775],[51.0131,2.37894],[51.013119,2.37918],[51.013168,2.37968],[51.013229,2.38015],[51.01339,2.38113],[51.01387,2.38398],[51.013981,2.38455],[51.014462,2.38727],[51.015091,2.39079],[51.01532,2.39201],[51.015518,2.39305],[51.01577,2.39428],[51.016029,2.39543],[51.016209,2.39619],[51.016369,2.39682],[51.01656,2.39753],[51.017361,2.40001],[51.01757,2.40063],[51.018608,2.40362],[51.018929,2.40452],[51.020679,2.40955],[51.02113,2.41077],[51.02158,2.41194],[51.022331,2.41373],[51.02293,2.41513],[51.02372,2.41692],[51.024632,2.41896],[51.026299,2.42273],[51.02718,2.42467],[51.028221,2.42699],[51.030571,2.43217],[51.031361,2.43401],[51.033642,2.43905],[51.035229,2.44255],[51.036591,2.44564],[51.03743,2.4476],[51.037861,2.44877],[51.03817,2.44976],[51.03846,2.45073],[51.038769,2.45191],[51.039108,2.45333],[51.039459,2.45497],[51.040298,2.45914],[51.04211,2.46828],[51.042839,2.47194],[51.043209,2.47404],[51.043419,2.47535],[51.043671,2.47711],[51.043831,2.47876],[51.04398,2.48044],[51.044079,2.4824],[51.04414,2.48386],[51.04417,2.48536],[51.04414,2.48689],[51.044071,2.48871],[51.044022,2.48969],[51.043941,2.49072],[51.043228,2.49809],[51.042229,2.50844],[51.042099,2.51063],[51.042042,2.51265],[51.04208,2.51446],[51.04216,2.51609],[51.042301,2.5175],[51.042431,2.51842],[51.042789,2.52042],[51.043201,2.52211],[51.043598,2.52368],[51.044231,2.52565],[51.04472,2.5272],[51.044941,2.52797],[51.045132,2.52855],[51.04546,2.52966],[51.04578,2.53064],[51.045891,2.53098],[51.046169,2.5318],[51.04644,2.5325],[51.046551,2.5328],[51.047539,2.53531],[51.048191,2.53675],[51.048828,2.53811],[51.051281,2.54349],[51.052811,2.54681],[51.053501,2.5486],[51.054089,2.5503],[51.054699,2.55229],[51.055302,2.55448],[51.055779,2.55651],[51.056301,2.55905],[51.056591,2.56043],[51.057049,2.56247],[51.057251,2.5634],[51.058319,2.56843],[51.058601,2.56969],[51.05888,2.57087],[51.059212,2.57214],[51.05962,2.57351],[51.060001,2.57471],[51.060371,2.57579],[51.060902,2.57714],[51.061588,2.57888],[51.062038,2.58001],[51.063679,2.58404],[51.064041,2.58492],[51.0644,2.58588],[51.064911,2.58728],[51.065319,2.58853],[51.065651,2.58961],[51.066101,2.59122],[51.066479,2.59272],[51.06683,2.59427],[51.067131,2.59571],[51.06741,2.59735],[51.06752,2.59797],[51.067711,2.59921],[51.06786,2.6003],[51.068031,2.60169],[51.068169,2.60318],[51.06831,2.60502],[51.06839,2.60678],[51.068409,2.6073],[51.068439,2.60869],[51.068439,2.6096],[51.068409,2.61156],[51.068352,2.61305],[51.068291,2.61409],[51.068241,2.61486],[51.068169,2.61588],[51.06805,2.61712],[51.067928,2.61827],[51.067799,2.61933],[51.067631,2.62045],[51.06739,2.62205],[51.067131,2.62364],[51.066879,2.62531],[51.066589,2.62707],[51.066341,2.62856],[51.06609,2.63003],[51.065769,2.63167],[51.065529,2.63282],[51.065239,2.63404],[51.064911,2.63527],[51.064499,2.63671],[51.064251,2.63747],[51.064041,2.63811],[51.063499,2.63943],[51.06292,2.64086],[51.06221,2.64252],[51.061131,2.64454],[51.06012,2.64638],[51.059299,2.64799],[51.05862,2.6494],[51.058022,2.65077],[51.057529,2.6522],[51.05703,2.65394],[51.056808,2.65493],[51.056419,2.65689],[51.05621,2.65862],[51.056099,2.65998],[51.056091,2.66042],[51.056019,2.66226],[51.056011,2.66247],[51.05621,2.66523],[51.056252,2.66562],[51.05637,2.66661],[51.056469,2.66746],[51.05687,2.67003],[51.057079,2.67121],[51.057301,2.67227],[51.057659,2.67373],[51.058041,2.67517],[51.0583,2.676],[51.058529,2.67676],[51.059441,2.67934],[51.059929,2.68044],[51.060501,2.68175],[51.061081,2.68296],[51.061581,2.68396],[51.062191,2.68504],[51.06329,2.68672],[51.066238,2.69064],[51.069191,2.6946],[51.06953,2.69505],[51.07011,2.69584],[51.071651,2.69795],[51.072418,2.69904],[51.072762,2.69952],[51.07328,2.70028],[51.073631,2.70076],[51.075062,2.70318],[51.075989,2.70478],[51.076469,2.7056],[51.07737,2.70742],[51.078041,2.70881],[51.080669,2.71368],[51.082119,2.71651],[51.08403,2.72024],[51.08596,2.72395],[51.08749,2.72654],[51.08762,2.72676],[51.088009,2.72735],[51.08828,2.72776],[51.089901,2.72983],[51.090542,2.73054],[51.092491,2.73254],[51.097069,2.73603],[51.100849,2.7394],[51.10141,2.73993],[51.102261,2.74083],[51.104359,2.74302],[51.10585,2.74498],[51.106361,2.74564],[51.10854,2.7486],[51.109261,2.74981],[51.11198,2.75436],[51.11467,2.76005],[51.114891,2.76061],[51.115601,2.7626],[51.115761,2.76306],[51.116161,2.76409],[51.116589,2.76529],[51.117771,2.76841],[51.12117,2.77827],[51.12418,2.78692],[51.124359,2.78746],[51.124859,2.78887],[51.12764,2.7969],[51.127831,2.79746],[51.12862,2.79973],[51.129101,2.80112],[51.129269,2.80159],[51.132858,2.81214],[51.133221,2.81331],[51.133461,2.8141],[51.133888,2.81561],[51.134201,2.81676],[51.134811,2.8192],[51.135349,2.82163],[51.13567,2.82325],[51.135899,2.82449],[51.136089,2.82548],[51.136349,2.82713],[51.1371,2.83239],[51.13726,2.83359],[51.137409,2.83465],[51.138371,2.8417],[51.139099,2.84658],[51.140308,2.85454],[51.141491,2.86184],[51.14164,2.86276],[51.1422,2.86733],[51.142479,2.86962],[51.14296,2.87444],[51.144299,2.8852],[51.145679,2.89336],[51.146931,2.89956],[51.147221,2.90083],[51.147518,2.90218],[51.149181,2.9089],[51.150909,2.91532],[51.15292,2.92111],[51.153099,2.92162],[51.15398,2.92417],[51.154831,2.92664],[51.157249,2.93277],[51.158779,2.9367],[51.161579,2.94386],[51.162491,2.94619],[51.163288,2.94829],[51.16412,2.95068],[51.16468,2.95227],[51.16494,2.95305],[51.165619,2.95527],[51.166962,2.96013],[51.16769,2.96342],[51.168159,2.96567],[51.16877,2.96918],[51.16906,2.97102],[51.169399,2.97327],[51.171879,2.99036],[51.17207,2.99165],[51.172211,2.99269],[51.172989,2.99807],[51.17305,2.99851],[51.17329,3.00016],[51.173649,3.00226],[51.17411,3.0044],[51.17445,3.0058],[51.174931,3.00759],[51.175331,3.00901],[51.17564,3.00987],[51.17952,3.01954],[51.179989,3.02066],[51.18058,3.02217],[51.18092,3.02299],[51.18111,3.02352],[51.181301,3.02409],[51.18166,3.02515],[51.182072,3.02648],[51.182388,3.02762],[51.18367,3.03306],[51.185581,3.04182],[51.189091,3.05743],[51.18932,3.0583],[51.18961,3.05942],[51.190521,3.06289],[51.191109,3.06485],[51.19252,3.06975],[51.19273,3.07071],[51.192909,3.07177],[51.193031,3.0727],[51.19313,3.07392],[51.193161,3.07501],[51.19313,3.07626],[51.193081,3.07739],[51.193001,3.07852],[51.19286,3.07972],[51.192612,3.08154],[51.191601,3.0869],[51.191349,3.08837],[51.189911,3.09536],[51.189129,3.0984],[51.1884,3.10066],[51.18821,3.10126],[51.186199,3.10705],[51.184799,3.11107],[51.18198,3.11918],[51.18063,3.1231],[51.177151,3.13324],[51.172661,3.14639],[51.170872,3.15257],[51.17012,3.15582],[51.168468,3.16401],[51.166939,3.17116],[51.163761,3.18813],[51.163589,3.18902],[51.163559,3.18919],[51.162868,3.19267],[51.162819,3.19292],[51.162769,3.19321],[51.16209,3.19636],[51.161621,3.19818],[51.16148,3.19868],[51.16127,3.19942],[51.160938,3.20048],[51.160412,3.20206],[51.160301,3.20234],[51.159901,3.20339],[51.159859,3.2035],[51.159431,3.20455],[51.158451,3.20644],[51.1577,3.20792],[51.15741,3.2085],[51.157162,3.209],[51.156761,3.20971],[51.155579,3.21174],[51.1549,3.21289],[51.153931,3.2146],[51.15324,3.21591],[51.15237,3.2175],[51.152191,3.21782],[51.15126,3.21969],[51.151169,3.21993],[51.15036,3.22156],[51.14901,3.22481],[51.14785,3.22818],[51.146881,3.23154],[51.146709,3.23211],[51.14645,3.23302],[51.144199,3.24088],[51.141628,3.25038],[51.141071,3.25233],[51.14082,3.25322],[51.140671,3.25373],[51.13924,3.25883],[51.136539,3.26866],[51.13134,3.28713],[51.128139,3.29863],[51.123081,3.3166],[51.12204,3.32055],[51.120621,3.32559],[51.118851,3.33186],[51.115269,3.34479],[51.112011,3.35628],[51.111431,3.35809],[51.110771,3.35983],[51.104359,3.37599],[51.1012,3.38387],[51.099739,3.38761],[51.095131,3.39893],[51.094082,3.40177],[51.09256,3.40559],[51.09137,3.40854],[51.089691,3.41275],[51.087132,3.41912],[51.085651,3.42274],[51.084728,3.42507],[51.083801,3.42739],[51.082878,3.42956],[51.081799,3.43221],[51.077339,3.4436],[51.076519,3.44591],[51.07608,3.44729],[51.075981,3.44763],[51.07539,3.44979],[51.07523,3.45041],[51.074879,3.4518],[51.074501,3.45334],[51.07251,3.46253],[51.07196,3.46512],[51.066978,3.48751],[51.06411,3.50061],[51.06105,3.51623],[51.05904,3.5268],[51.058491,3.52974],[51.05685,3.53852],[51.052608,3.55965],[51.05125,3.56586],[51.050892,3.56749],[51.050529,3.56911],[51.050449,3.56951],[51.048389,3.5789],[51.043869,3.59986],[51.03994,3.61792],[51.03949,3.61953],[51.03775,3.62573],[51.034882,3.63601],[51.03474,3.63647],[51.0336,3.64051],[51.033539,3.6407],[51.032398,3.64472],[51.031979,3.64616],[51.030102,3.65281],[51.024891,3.67076],[51.02475,3.67125],[51.023972,3.67402],[51.023472,3.67574],[51.022491,3.67923],[51.022339,3.67977],[51.021801,3.68161],[51.021339,3.68336],[51.02124,3.68376],[51.020981,3.68476],[51.020741,3.68568],[51.020451,3.68685],[51.019531,3.69031],[51.019001,3.69241],[51.018669,3.69363],[51.017109,3.70012],[51.014702,3.71009],[51.014622,3.71042],[51.014179,3.71226],[51.012611,3.71878],[51.01199,3.72128],[51.011631,3.72217],[51.011311,3.72284],[51.010921,3.72339],[51.010578,3.72382],[51.010239,3.72423],[51.009869,3.72483],[51.00975,3.72508],[51.00951,3.72588],[51.00948,3.72621],[51.009491,3.72647],[51.009541,3.72679],[51.009609,3.72702],[51.00983,3.72759],[51.01009,3.72808],[51.010429,3.72839],[51.01075,3.7285],[51.010948,3.72849],[51.01115,3.7284],[51.01136,3.72827],[51.011532,3.72811],[51.011829,3.72787],[51.012039,3.72778],[51.012211,3.72778],[51.012581,3.72798],[51.01424,3.72894],[51.014629,3.72916],[51.014919,3.72937],[51.01688,3.73074],[51.018459,3.73179],[51.020302,3.73307],[51.021832,3.73444],[51.02388,3.7366],[51.025539,3.73839],[51.026699,3.74038],[51.026909,3.74077],[51.028519,3.74369],[51.028671,3.744],[51.028851,3.74435],[51.02964,3.74592],[51.031132,3.74879],[51.03175,3.74997],[51.033428,3.75321],[51.03426,3.75482],[51.03434,3.755],[51.034649,3.75563],[51.03513,3.75661],[51.03561,3.75785],[51.035999,3.75894],[51.036079,3.75915],[51.036282,3.75982],[51.03661,3.76089],[51.037029,3.76254],[51.037769,3.76571],[51.039028,3.771],[51.040112,3.77556],[51.040489,3.77719],[51.04076,3.77847],[51.042011,3.7838],[51.043049,3.78806],[51.043869,3.79144],[51.044189,3.7928],[51.044739,3.79514],[51.044922,3.79591],[51.046181,3.80122],[51.047771,3.80846],[51.04842,3.81174],[51.051239,3.82769],[51.052109,3.8319],[51.053669,3.83831],[51.055191,3.84386],[51.061069,3.8642],[51.064442,3.87572],[51.06472,3.87678],[51.066898,3.88445],[51.06712,3.88559],[51.06768,3.88811],[51.067719,3.88837],[51.068501,3.89206],[51.06926,3.89805],[51.06974,3.90363],[51.070461,3.91495],[51.070679,3.91877],[51.07111,3.92565],[51.073029,3.95806],[51.07357,3.96646],[51.07431,3.97915],[51.075008,3.98714],[51.0751,3.98797],[51.075199,3.98883],[51.07579,3.99259],[51.07642,3.99564],[51.077061,3.99842],[51.0779,4.00133],[51.07872,4.00399],[51.079762,4.00683],[51.0811,4.01003],[51.08247,4.01287],[51.083832,4.0154],[51.084141,4.01594],[51.084549,4.01667],[51.086521,4.02014],[51.087921,4.02232],[51.08857,4.02339],[51.089588,4.02513],[51.09214,4.02944],[51.094528,4.03348],[51.095089,4.03443],[51.095211,4.03463],[51.100471,4.04349],[51.103989,4.049],[51.1068,4.05277],[51.11087,4.05734],[51.11171,4.05818],[51.112061,4.05854],[51.114491,4.06102],[51.116741,4.06331],[51.119381,4.0661],[51.120918,4.06809],[51.122429,4.07029],[51.123482,4.07216],[51.12402,4.07318],[51.124882,4.07494],[51.125778,4.07704],[51.126629,4.07964],[51.1269,4.08055],[51.127289,4.08194],[51.127541,4.08293],[51.12801,4.08511],[51.128479,4.08777],[51.128948,4.09103],[51.129021,4.09139],[51.13044,4.10455],[51.131821,4.1169],[51.132099,4.1194],[51.132549,4.12348],[51.13287,4.12635],[51.13327,4.12978],[51.133492,4.1312],[51.133839,4.13343],[51.134129,4.13519],[51.13456,4.13755],[51.13567,4.14353],[51.13641,4.14755],[51.137051,4.15104],[51.137211,4.15195],[51.13842,4.15828],[51.13921,4.16272],[51.1399,4.16663],[51.140591,4.17049],[51.141171,4.17362],[51.141891,4.17733],[51.142601,4.181],[51.142792,4.1819],[51.14307,4.18315],[51.143871,4.18615],[51.144581,4.18849],[51.145512,4.1912],[51.146679,4.19441],[51.147179,4.19574],[51.148769,4.20004],[51.149929,4.2034],[51.151112,4.20707],[51.152241,4.21068],[51.15329,4.21422],[51.154541,4.21836],[51.15575,4.22231],[51.157169,4.22699],[51.15839,4.23061],[51.159031,4.23227],[51.15947,4.23338],[51.160358,4.23531],[51.16151,4.23769],[51.16222,4.23907],[51.163422,4.24145],[51.16465,4.24383],[51.166279,4.24703],[51.166729,4.24793],[51.16856,4.25151],[51.170139,4.25456],[51.171581,4.25746],[51.172611,4.25952],[51.173389,4.26121],[51.174561,4.26389],[51.175739,4.26696],[51.176899,4.26997],[51.17799,4.27286],[51.1791,4.27582],[51.180599,4.2799],[51.181931,4.2834],[51.182461,4.28477],[51.183208,4.28673],[51.184212,4.28934],[51.18536,4.29224],[51.18586,4.29331],[51.18729,4.29642],[51.188278,4.29836],[51.18964,4.30093],[51.191269,4.30374],[51.192951,4.30655],[51.19482,4.30962],[51.19622,4.31194],[51.19809,4.3151],[51.200298,4.31877],[51.20142,4.32063],[51.201969,4.32153],[51.202431,4.32237],[51.202721,4.32293],[51.203899,4.32522],[51.204651,4.32687],[51.205391,4.32855],[51.206261,4.33073],[51.208328,4.33607],[51.208649,4.33695],[51.210098,4.34071],[51.211281,4.34388],[51.21146,4.34438],[51.211811,4.3453],[51.21233,4.34667],[51.212791,4.348],[51.213051,4.34876],[51.21312,4.34901],[51.213211,4.34932],[51.21349,4.35058],[51.21365,4.3516],[51.213749,4.35238],[51.21384,4.35324],[51.21389,4.35429],[51.213909,4.35537],[51.21386,4.35653],[51.21368,4.35807],[51.21347,4.35916],[51.213249,4.36017],[51.212978,4.36114],[51.21265,4.3621],[51.212238,4.36311],[51.211731,4.36418],[51.21101,4.36534],[51.210381,4.3662],[51.208759,4.36794],[51.208309,4.36843],[51.20274,4.37432],[51.20155,4.3756],[51.20089,4.37635],[51.2006,4.37673],[51.200272,4.37721],[51.19981,4.37797],[51.199322,4.37899],[51.199009,4.37978],[51.19873,4.38062],[51.198471,4.38164],[51.198238,4.38273],[51.19799,4.38423],[51.197701,4.38573],[51.19759,4.38626],[51.197311,4.38756],[51.19706,4.3886],[51.19685,4.38936],[51.19664,4.39006],[51.196251,4.39129],[51.195099,4.39424],[51.194302,4.39627],[51.193001,4.39983],[51.192059,4.40279],[51.191349,4.40556],[51.190941,4.40767],[51.190632,4.40985],[51.190472,4.41161],[51.19038,4.41322],[51.19035,4.41513],[51.19038,4.41674],[51.190498,4.4188],[51.190659,4.42035],[51.190891,4.42221],[51.191311,4.42416],[51.191719,4.42575],[51.192131,4.42716],[51.192619,4.42862],[51.193001,4.42966],[51.193321,4.43038],[51.193649,4.43107],[51.19397,4.43165],[51.194241,4.4321],[51.194618,4.43266],[51.194981,4.43311],[51.195259,4.43343],[51.19561,4.43381],[51.19595,4.43416],[51.196289,4.43445],[51.196659,4.43472],[51.197411,4.43528],[51.198662,4.43609],[51.201191,4.43746],[51.202412,4.43821],[51.203381,4.43891],[51.20462,4.43994],[51.206181,4.44129],[51.206921,4.44199],[51.207901,4.44294],[51.20924,4.44419],[51.210659,4.44546],[51.21167,4.44639],[51.21254,4.44721],[51.213921,4.44847],[51.214569,4.44921],[51.21471,4.4494],[51.214809,4.44956],[51.214951,4.4498],[51.215069,4.45005],[51.215179,4.45031],[51.215279,4.45061],[51.21553,4.45146],[51.215752,4.45216],[51.215969,4.45301],[51.216179,4.45406],[51.21629,4.45504],[51.21624,4.4558],[51.216091,4.45644],[51.21587,4.45707],[51.215561,4.4577],[51.21513,4.45828],[51.214211,4.45917],[51.214001,4.45936],[51.213348,4.45995],[51.212799,4.46049],[51.212372,4.46099],[51.21188,4.46168],[51.211639,4.46209],[51.211399,4.4626],[51.21117,4.46318],[51.210999,4.46376],[51.21085,4.46433],[51.21072,4.46503],[51.21064,4.46571],[51.21059,4.46636],[51.21059,4.46705],[51.21064,4.46793],[51.21069,4.46847],[51.210751,4.4691],[51.210831,4.4697],[51.210949,4.47055],[51.211071,4.47136],[51.211208,4.47228],[51.21133,4.47315],[51.211391,4.47381],[51.21143,4.47447],[51.211441,4.47509],[51.211418,4.4757],[51.211369,4.4763],[51.211288,4.47694],[51.211151,4.47781],[51.21104,4.47848],[51.210621,4.48085],[51.210522,4.48162],[51.210468,4.48231],[51.210442,4.48312],[51.210449,4.48395],[51.210522,4.485],[51.21067,4.48653],[51.2108,4.4878],[51.211021,4.49018],[51.211121,4.49141],[51.211189,4.49236],[51.211281,4.49391],[51.211311,4.49473],[51.211399,4.49656],[51.211411,4.49859],[51.21143,4.49937],[51.211521,4.50276],[51.211601,4.50624],[51.211712,4.51037],[51.211819,4.51426],[51.211979,4.51977],[51.212101,4.52414],[51.212139,4.52645],[51.212139,4.5272],[51.212139,4.52783],[51.212101,4.52956],[51.212009,4.53141],[51.211868,4.53313],[51.21167,4.53514],[51.211361,4.53743],[51.211048,4.5392],[51.210789,4.54045],[51.210499,4.54188],[51.210258,4.54291],[51.20974,4.54486],[51.20895,4.54791],[51.207958,4.55163],[51.207031,4.55523],[51.206242,4.55827],[51.205238,4.56186],[51.204288,4.56546],[51.203209,4.5695],[51.202259,4.57309],[51.201279,4.57603],[51.200741,4.57732],[51.200111,4.57852],[51.199451,4.57959],[51.198872,4.58057],[51.19838,4.58161],[51.19804,4.58262],[51.1978,4.5836],[51.197651,4.58463],[51.197559,4.58614],[51.197651,4.5877],[51.197849,4.58903],[51.198071,4.58982],[51.19841,4.59072],[51.198761,4.59151],[51.199219,4.59231],[51.19952,4.59268],[51.199821,4.59306],[51.2006,4.59405],[51.201351,4.59523],[51.202019,4.59651],[51.202499,4.5977],[51.20274,4.59835],[51.203411,4.60025],[51.2048,4.60414],[51.205589,4.60638],[51.20805,4.61359],[51.20908,4.61659],[51.209782,4.61862],[51.2118,4.62442],[51.211979,4.62497],[51.21299,4.62775],[51.21402,4.63045],[51.215729,4.63444],[51.217651,4.63834],[51.220181,4.64284],[51.22282,4.64712],[51.231232,4.66047],[51.233978,4.66484],[51.236111,4.66835],[51.237961,4.67215],[51.238979,4.67465],[51.239761,4.67689],[51.240608,4.67974],[51.241291,4.68251],[51.241741,4.68479],[51.24213,4.68706],[51.242741,4.6915],[51.243031,4.69416],[51.243351,4.69842],[51.243519,4.70165],[51.24366,4.70643],[51.243729,4.71221],[51.24371,4.71458],[51.243629,4.72741],[51.24353,4.74118],[51.243649,4.75037],[51.243801,4.7541],[51.244019,4.75768],[51.244381,4.76209],[51.24469,4.765],[51.245781,4.77292],[51.24646,4.77688],[51.24728,4.78085],[51.248569,4.7859],[51.250038,4.79077],[51.250561,4.79228],[51.252048,4.79611],[51.254349,4.80124],[51.25631,4.80483],[51.257271,4.80658],[51.259121,4.80975],[51.260399,4.81183],[51.266781,4.82263],[51.279442,4.84386],[51.282082,4.84837],[51.284592,4.85299],[51.285591,4.85501],[51.286049,4.85596],[51.287418,4.85902],[51.288658,4.862],[51.28981,4.86514],[51.290352,4.86664],[51.291531,4.87026],[51.29224,4.87277],[51.292912,4.87527],[51.29356,4.87801],[51.29409,4.88039],[51.294601,4.88287],[51.295071,4.88551],[51.29549,4.88814],[51.29586,4.89084],[51.29615,4.89339],[51.29641,4.89605],[51.296761,4.90148],[51.29689,4.90434],[51.297009,4.90816],[51.297138,4.91369],[51.29726,4.91806],[51.297291,4.91929],[51.297428,4.92479],[51.297451,4.92556],[51.29755,4.92814],[51.29763,4.93275],[51.29784,4.94177],[51.297951,4.94568],[51.298038,4.94993],[51.298092,4.95214],[51.298229,4.95715],[51.298328,4.96224],[51.298389,4.96824],[51.298351,4.97133],[51.298229,4.97483],[51.298038,4.97831],[51.297821,4.98128],[51.297489,4.98522],[51.297081,4.9888],[51.296631,4.99216],[51.295898,4.9968],[51.29517,5.00171],[51.294781,5.00454],[51.294411,5.00746],[51.294209,5.00934],[51.29406,5.01122],[51.293911,5.01361],[51.293781,5.01604],[51.29372,5.01984],[51.293751,5.02273],[51.293812,5.02471],[51.293911,5.02694],[51.294369,5.03214],[51.29475,5.03562],[51.29538,5.04046],[51.296322,5.04725],[51.296661,5.05005],[51.296989,5.05315],[51.29726,5.05621],[51.297401,5.05818],[51.297489,5.06011],[51.297539,5.0623],[51.29755,5.06443],[51.297489,5.06721],[51.29734,5.07002],[51.297009,5.07402],[51.296612,5.07796],[51.295879,5.08397],[51.29549,5.08691],[51.295132,5.09009],[51.294731,5.09394],[51.29464,5.09467],[51.294441,5.09768],[51.294319,5.10016],[51.29425,5.10457],[51.294312,5.10802],[51.294498,5.11234],[51.294731,5.11532],[51.29509,5.11857],[51.295509,5.12156],[51.29599,5.12459],[51.296761,5.12847],[51.298199,5.13422],[51.300072,5.14081],[51.300591,5.14276],[51.301399,5.1459],[51.301991,5.14842],[51.30265,5.15159],[51.303249,5.15458],[51.303871,5.15814],[51.30452,5.16165],[51.305229,5.16517],[51.30595,5.16817],[51.306999,5.17226],[51.30851,5.17732],[51.310181,5.18249],[51.31218,5.18855],[51.312382,5.1892],[51.314838,5.19669],[51.318821,5.20905],[51.32016,5.21303],[51.320591,5.21436],[51.321072,5.21581],[51.321671,5.21766],[51.322681,5.22073],[51.323341,5.22275],[51.324051,5.22488],[51.32439,5.22589],[51.325031,5.22768],[51.325691,5.2294],[51.326279,5.23089],[51.327061,5.23264],[51.327991,5.23451],[51.32906,5.23651],[51.33009,5.23831],[51.331451,5.24065],[51.337521,5.25108],[51.344028,5.26264],[51.349178,5.27182],[51.351452,5.27587],[51.352482,5.27774],[51.353378,5.27947],[51.353821,5.28036],[51.35434,5.28142],[51.35508,5.28302],[51.355801,5.28465],[51.356491,5.28625],[51.36055,5.29579],[51.360729,5.29619],[51.363239,5.30209],[51.36348,5.30268],[51.364941,5.30605],[51.365059,5.30632],[51.36898,5.31556],[51.370361,5.31878],[51.37159,5.32166],[51.374432,5.32837],[51.375191,5.33016],[51.376862,5.33405],[51.382038,5.34624],[51.38332,5.34934],[51.384441,5.35214],[51.385429,5.35471],[51.387878,5.3613],[51.388371,5.36264],[51.389221,5.36492],[51.390381,5.36807],[51.39267,5.37428],[51.393459,5.37644],[51.39439,5.379],[51.394581,5.37961],[51.394798,5.3803],[51.394989,5.38097],[51.395168,5.38164],[51.395432,5.38274],[51.39555,5.38332],[51.395679,5.38394],[51.395851,5.38488],[51.395931,5.38535],[51.396049,5.38617],[51.396118,5.38674],[51.396259,5.38787],[51.396339,5.38878],[51.39642,5.38967],[51.39653,5.39132],[51.396641,5.393],[51.39674,5.39426],[51.396851,5.39539],[51.396912,5.39591],[51.397099,5.39728],[51.397221,5.39805],[51.397369,5.39886],[51.397449,5.39924],[51.397629,5.40014],[51.39777,5.40073],[51.397919,5.40135],[51.398209,5.40239],[51.40057,5.41075],[51.400631,5.41097],[51.402519,5.41765],[51.40287,5.41891],[51.403229,5.42027],[51.403629,5.422],[51.403839,5.42325],[51.403992,5.42403],[51.404099,5.42481],[51.40416,5.4252],[51.404202,5.42569],[51.404209,5.42611],[51.404221,5.42679],[51.404221,5.42789],[51.404209,5.42864],[51.404202,5.42919],[51.40419,5.42974],[51.404209,5.4303],[51.404209,5.43096],[51.404228,5.43145],[51.404259,5.43249],[51.404289,5.43305],[51.40435,5.43362],[51.404461,5.43508],[51.40453,5.43605],[51.404621,5.43689],[51.40485,5.43825],[51.404949,5.43928],[51.405041,5.44026],[51.405121,5.44118],[51.405201,5.44248],[51.405251,5.44356],[51.405369,5.44983],[51.405399,5.45333],[51.405449,5.45596],[51.405491,5.4582],[51.405571,5.46179],[51.40559,5.46252],[51.405609,5.4658],[51.405609,5.46911],[51.405521,5.47301],[51.40551,5.47352],[51.405399,5.47652],[51.40538,5.47713],[51.40527,5.48024],[51.405239,5.48126],[51.404968,5.48955],[51.404942,5.49025],[51.404911,5.49086],[51.404839,5.49202],[51.404781,5.49246],[51.404701,5.49293],[51.40461,5.49339],[51.40453,5.49377],[51.404469,5.4942],[51.404419,5.49469],[51.404388,5.495],[51.404388,5.49536],[51.404388,5.49565],[51.40443,5.49614],[51.404449,5.49643],[51.40448,5.4969],[51.404541,5.49732],[51.404621,5.49771],[51.404709,5.49809],[51.4048,5.49852],[51.404861,5.49884],[51.4049,5.49925],[51.404919,5.49962],[51.40493,5.49999],[51.404919,5.50091],[51.404919,5.50125],[51.4049,5.50403],[51.4049,5.50435],[51.40493,5.51077],[51.40493,5.51908],[51.404911,5.53358],[51.4049,5.53708],[51.4049,5.54587],[51.404911,5.54781],[51.404961,5.54935],[51.405041,5.5509],[51.40517,5.55247],[51.405239,5.55322],[51.40538,5.55445],[51.405571,5.55591],[51.405788,5.55737],[51.40588,5.55797],[51.40617,5.55947],[51.40646,5.56091],[51.40659,5.56148],[51.40731,5.56419],[51.407681,5.56548],[51.408421,5.56768],[51.408791,5.56875],[51.408951,5.56924],[51.41061,5.57402],[51.411709,5.57722],[51.413349,5.582],[51.416458,5.5911],[51.41695,5.59265],[51.417591,5.59477],[51.417992,5.59638],[51.418369,5.59811],[51.41872,5.59991],[51.418949,5.60137],[51.419189,5.60318],[51.419449,5.60551],[51.420132,5.61227],[51.421539,5.62703],[51.421829,5.63011],[51.42268,5.63891],[51.423019,5.64245],[51.423439,5.64695],[51.423569,5.64864],[51.423649,5.6499],[51.423691,5.6508],[51.423698,5.65328],[51.423672,5.65704],[51.423641,5.6593],[51.42358,5.66349],[51.4235,5.66887],[51.423439,5.67272],[51.423409,5.676],[51.423359,5.67842],[51.423241,5.68237],[51.423222,5.68285],[51.42308,5.68647],[51.422939,5.6889],[51.422791,5.69085],[51.422359,5.69652],[51.422218,5.69818],[51.42205,5.70026],[51.421551,5.7066],[51.4212,5.7111],[51.42083,5.7156],[51.42057,5.71879],[51.420441,5.72116],[51.420319,5.723],[51.42025,5.72475],[51.420109,5.72959],[51.42012,5.73225],[51.42017,5.73484],[51.420212,5.73755],[51.420219,5.73999],[51.42017,5.74142],[51.42009,5.74328],[51.419949,5.74522],[51.419701,5.74773],[51.419529,5.74925],[51.419449,5.74987],[51.419128,5.75225],[51.418869,5.75407],[51.41861,5.75592],[51.418388,5.75762],[51.418079,5.75985],[51.41795,5.76072],[51.417461,5.76412],[51.417301,5.76526],[51.41711,5.76661],[51.41692,5.76774],[51.416599,5.76945],[51.41618,5.77184],[51.41555,5.77506],[51.415131,5.77699],[51.41449,5.7797],[51.414021,5.78159],[51.41349,5.7837],[51.412601,5.7868],[51.411781,5.78951],[51.410831,5.79252],[51.4072,5.80385],[51.407001,5.80447],[51.40556,5.80905],[51.404072,5.81369],[51.403431,5.81581],[51.402599,5.81868],[51.401981,5.82092],[51.3988,5.83371],[51.397251,5.83991],[51.396141,5.84441],[51.39502,5.8489],[51.393501,5.85508],[51.39146,5.86325],[51.39127,5.864],[51.390388,5.86731],[51.389561,5.87036],[51.387989,5.87586],[51.3848,5.88699],[51.382519,5.89479],[51.380829,5.90075],[51.380119,5.90336],[51.37936,5.90683],[51.37886,5.90941],[51.378521,5.91146],[51.378189,5.91406],[51.377979,5.9158],[51.377789,5.91788],[51.377682,5.91923],[51.377468,5.92297],[51.377441,5.92369],[51.377411,5.92498],[51.377399,5.92758],[51.377499,5.93505],[51.377659,5.94228],[51.377918,5.95907],[51.37801,5.96417],[51.378029,5.96599],[51.37801,5.96775],[51.377918,5.97046],[51.377781,5.97305],[51.377548,5.97627],[51.377331,5.98114],[51.37735,5.9839],[51.37735,5.98477],[51.37759,5.99092],[51.37812,5.99769],[51.37854,6.00253],[51.378769,6.00521],[51.378971,6.00723],[51.37949,6.01193],[51.380131,6.01689],[51.380531,6.01951],[51.381161,6.02336],[51.381538,6.02554],[51.38237,6.02959],[51.382751,6.03147],[51.383732,6.03571],[51.387409,6.05021],[51.389172,6.05713],[51.393082,6.07238],[51.393429,6.07391],[51.393791,6.0758],[51.393978,6.077],[51.394131,6.07807],[51.394249,6.07917],[51.394329,6.0803],[51.394421,6.08177],[51.394451,6.08392],[51.394199,6.09123],[51.394039,6.09627],[51.393539,6.10898],[51.393478,6.1104],[51.39336,6.11481],[51.39333,6.11742],[51.393471,6.1237],[51.393688,6.12859],[51.394279,6.13838],[51.39436,6.13939],[51.394451,6.14064],[51.394501,6.14145],[51.39518,6.15196],[51.39534,6.15451],[51.395611,6.15861],[51.395901,6.16434],[51.39592,6.16507],[51.39595,6.16609],[51.395969,6.1688],[51.395931,6.17027],[51.395851,6.17172],[51.395809,6.17254],[51.395741,6.17316],[51.39547,6.17562],[51.39521,6.17761],[51.39481,6.17986],[51.394588,6.18087],[51.39426,6.18234],[51.393848,6.18393],[51.393051,6.18666],[51.391201,6.19293],[51.389439,6.19895],[51.387581,6.20492],[51.387119,6.20635],[51.386139,6.20954],[51.384048,6.21632],[51.382431,6.22147],[51.382191,6.2223],[51.38166,6.22413],[51.381069,6.2267],[51.380482,6.23024],[51.380211,6.23265],[51.380039,6.23456],[51.379971,6.23568],[51.379929,6.23745],[51.379971,6.23919],[51.38002,6.24017],[51.380169,6.24235],[51.380199,6.24288],[51.380268,6.24355],[51.380409,6.24457],[51.38081,6.24762],[51.381229,6.24972],[51.381771,6.25191],[51.381851,6.25218],[51.3825,6.25446],[51.382992,6.25592],[51.384571,6.25981],[51.38628,6.26362],[51.38763,6.26717],[51.387741,6.26748],[51.388821,6.27117],[51.388981,6.27186],[51.389351,6.27366],[51.389759,6.27584],[51.38987,6.27655],[51.389969,6.27729],[51.390339,6.28112],[51.390339,6.28241],[51.390339,6.28301],[51.39035,6.28613],[51.390091,6.29202],[51.389912,6.29597],[51.38982,6.29785],[51.389729,6.30039],[51.389488,6.30467],[51.389172,6.31284],[51.388729,6.32214],[51.38855,6.329],[51.388599,6.33371],[51.388821,6.33742],[51.38884,6.33765],[51.38884,6.33775],[51.389149,6.34048],[51.389622,6.34365],[51.39024,6.3467],[51.390331,6.34707],[51.390652,6.34839],[51.391491,6.35144],[51.392441,6.35452],[51.393871,6.3589],[51.394058,6.35941],[51.394421,6.3605],[51.394821,6.36159],[51.39584,6.36458],[51.39621,6.36582],[51.39698,6.36793],[51.399311,6.3749],[51.400372,6.37825],[51.400539,6.37881],[51.401581,6.38237],[51.403149,6.38824],[51.403801,6.39103],[51.404282,6.39306],[51.404369,6.39346],[51.40443,6.39371],[51.40451,6.39412],[51.405708,6.40013],[51.406979,6.40767],[51.40802,6.41569],[51.40815,6.41689],[51.40823,6.41773],[51.408329,6.41866],[51.40844,6.41988],[51.408619,6.42204],[51.408718,6.42343],[51.408958,6.42648],[51.409351,6.43376],[51.410229,6.44922],[51.410912,6.46069],[51.411388,6.46954],[51.41164,6.47208],[51.411819,6.47329],[51.41193,6.47387],[51.412102,6.47472],[51.412529,6.47644],[51.41304,6.47806],[51.413429,6.47915],[51.41362,6.47958],[51.41433,6.48118],[51.416302,6.4848],[51.418781,6.48943],[51.419121,6.4901],[51.419258,6.49035],[51.419521,6.49084],[51.419819,6.49143],[51.420101,6.49197],[51.42136,6.49432],[51.423061,6.49833],[51.42363,6.49987],[51.42461,6.50291],[51.425228,6.50535],[51.426071,6.50966],[51.426102,6.50984],[51.426151,6.51011],[51.426491,6.51252],[51.426498,6.51262],[51.42659,6.51358],[51.426762,6.51535],[51.427052,6.52207],[51.427231,6.53069],[51.427238,6.53088],[51.427368,6.53329],[51.427521,6.53609],[51.42799,6.54291],[51.42828,6.54714],[51.428631,6.55212],[51.428928,6.55589],[51.429508,6.56421],[51.43005,6.56866],[51.43092,6.57325],[51.431541,6.57603],[51.432091,6.57825],[51.432789,6.58093],[51.433418,6.58378],[51.434471,6.58956],[51.435162,6.59419],[51.435532,6.59735],[51.435841,6.60087],[51.435982,6.60295],[51.436031,6.60391],[51.436089,6.60506],[51.436169,6.60728],[51.436211,6.60933],[51.43623,6.61085],[51.436218,6.61229],[51.436211,6.61338],[51.43618,6.61485],[51.436161,6.61573],[51.436119,6.61677],[51.436001,6.61847],[51.435909,6.62006],[51.43589,6.62054],[51.435791,6.62232],[51.435719,6.6238],[51.435619,6.6272],[51.435631,6.63186],[51.435719,6.63537],[51.435928,6.63872],[51.436218,6.64277],[51.43652,6.64744],[51.43663,6.64967],[51.43671,6.65219],[51.436729,6.65546],[51.43679,6.65711],[51.43697,6.66175],[51.437,6.66234],[51.437019,6.66297],[51.437279,6.67126],[51.437321,6.67279],[51.437359,6.67531],[51.43742,6.68066],[51.437401,6.68155],[51.43737,6.68277],[51.437271,6.68504],[51.437111,6.68668],[51.43681,6.6887],[51.43618,6.69207],[51.435699,6.69477],[51.435581,6.69569],[51.435509,6.69632],[51.43541,6.69751],[51.435349,6.69886],[51.435329,6.70035],[51.435379,6.70175],[51.435509,6.70337],[51.435692,6.70467],[51.436069,6.7069],[51.43811,6.71953],[51.438358,6.72115],[51.438541,6.7228],[51.438629,6.72482],[51.438511,6.72655],[51.438271,6.72848],[51.437729,6.73069],[51.436901,6.7328],[51.436451,6.73392],[51.436169,6.73462],[51.43568,6.73624],[51.435421,6.73745],[51.435291,6.73821],[51.435051,6.73985],[51.43491,6.74152],[51.43486,6.74321],[51.434849,6.74462],[51.434929,6.74645],[51.435169,6.74879],[51.435349,6.7499],[51.435471,6.75059],[51.43568,6.75184],[51.43605,6.75345],[51.436588,6.75525],[51.437061,6.75633],[51.43734,6.75687],[51.438301,6.7584],[51.439831,6.76023],[51.44173,6.76266],[51.44257,6.76421],[51.443211,6.76552],[51.443981,6.76754],[51.444592,6.7697],[51.445171,6.77222],[51.44598,6.77676],[51.44632,6.77867],[51.446621,6.78057],[51.447021,6.78296],[51.447361,6.78519],[51.44762,6.78704],[51.4478,6.78876],[51.44783,6.79036],[51.4478,6.79163],[51.447601,6.79349],[51.447311,6.79505],[51.44696,6.79636],[51.446671,6.79732],[51.44632,6.79822],[51.446072,6.79865],[51.445259,6.80026],[51.444401,6.80188],[51.44429,6.80213],[51.443951,6.80283],[51.443432,6.80394],[51.44305,6.80456],[51.44294,6.80471],[51.442791,6.80487],[51.44265,6.80495],[51.442459,6.80499],[51.442329,6.80496],[51.442181,6.80488],[51.442081,6.80479],[51.44194,6.80458],[51.44186,6.8043],[51.441811,6.8041],[51.441792,6.8038],[51.441792,6.80368],[51.441811,6.80346],[51.441879,6.80322],[51.441959,6.80295],[51.442089,6.80256],[51.442211,6.80226],[51.442429,6.80195],[51.442871,6.80134],[51.44342,6.8007],[51.444061,6.80015],[51.444431,6.79987],[51.444641,6.79971],[51.444809,6.7996],[51.44566,6.79921],[51.446529,6.799],[51.447182,6.79889],[51.447929,6.79884],[51.449249,6.79886],[51.450062,6.79895],[51.451248,6.7991],[51.45211,6.79927],[51.45311,6.79947],[51.454029,6.79984],[51.454899,6.80039],[51.45573,6.80101],[51.45639,6.80168],[51.456959,6.80235],[51.457588,6.80329],[51.458141,6.80427],[51.45866,6.80531],[51.459122,6.80651],[51.459789,6.80861],[51.460159,6.8097],[51.460659,6.81081],[51.46172,6.81251],[51.461948,6.81283],[51.462391,6.81341],[51.462681,6.81371],[51.463501,6.81453],[51.46389,6.81483],[51.464821,6.81552],[51.465771,6.8159],[51.466869,6.81625],[51.468349,6.81658],[51.470051,6.81669],[51.471851,6.8165],[51.473011,6.81621],[51.47398,6.81587],[51.474541,6.8157],[51.47541,6.81537],[51.47633,6.81497],[51.477489,6.81446],[51.478821,6.81388],[51.47916,6.81377],[51.480099,6.81351],[51.48127,6.81332],[51.48185,6.8133],[51.483139,6.81333],[51.483341,6.81342],[51.483582,6.81349],[51.484051,6.8136],[51.484409,6.8137],[51.4851,6.814],[51.4855,6.81421],[51.485771,6.8144],[51.486031,6.8146],[51.486149,6.81473],[51.48632,6.81496],[51.486488,6.81527],[51.48661,6.81557],[51.48674,6.81603],[51.486801,6.81641],[51.48682,6.81667],[51.486832,6.81699],[51.486809,6.81731],[51.486252,6.82101],[51.486198,6.82155],[51.486191,6.82224],[51.48613,6.82305],[51.486099,6.82352],[51.486069,6.82462],[51.486118,6.82628],[51.48629,6.82779],[51.48674,6.83007],[51.4874,6.83218],[51.488831,6.836],[51.489079,6.83642],[51.48975,6.83737],[51.490349,6.83822],[51.490829,6.83886],[51.49268,6.84133],[51.492962,6.84171],[51.493629,6.84264],[51.49432,6.84385],[51.4949,6.84507],[51.495281,6.84597],[51.49572,6.84735],[51.496052,6.8486],[51.496349,6.85008],[51.496571,6.85205],[51.496651,6.85463],[51.49654,6.85815],[51.496441,6.86022],[51.496342,6.86164],[51.49622,6.8647],[51.496101,6.86872],[51.496132,6.87109],[51.496342,6.88355],[51.496422,6.88532],[51.496639,6.8891],[51.496681,6.88994],[51.496769,6.89124],[51.49688,6.89292],[51.49704,6.89456],[51.49754,6.90146],[51.49781,6.91115],[51.49823,6.9167],[51.498699,6.92018],[51.499279,6.92279],[51.49995,6.9251],[51.500381,6.92628],[51.502979,6.93204],[51.503391,6.93294],[51.50415,6.93473],[51.50428,6.93505],[51.504478,6.93559],[51.50473,6.93621],[51.505058,6.93707],[51.50531,6.93774],[51.50568,6.93884],[51.505909,6.93961],[51.506149,6.94042],[51.50634,6.94113],[51.506481,6.94171],[51.50668,6.94259],[51.506882,6.94349],[51.507061,6.94441],[51.507309,6.94577],[51.507511,6.94717],[51.507629,6.94811],[51.507679,6.9483],[51.507751,6.94906],[51.507851,6.95002],[51.507919,6.95101],[51.50798,6.95199],[51.508011,6.95296],[51.508049,6.95394],[51.508049,6.95491],[51.50803,6.95637],[51.508011,6.95741],[51.507969,6.95846],[51.5079,6.95952],[51.507809,6.96061],[51.50771,6.96166],[51.50761,6.96267],[51.507511,6.96364],[51.507401,6.96457],[51.507301,6.96548],[51.50721,6.96642],[51.507099,6.96736],[51.507011,6.96826],[51.506908,6.96914],[51.506802,6.97007],[51.506618,6.97107],[51.506481,6.97167],[51.506088,6.97303],[51.50581,6.97399],[51.50378,6.97994],[51.50354,6.9808],[51.503361,6.98158],[51.50322,6.98288],[51.503109,6.98417],[51.503059,6.98502],[51.503059,6.98587],[51.503132,6.98712],[51.503201,6.98794],[51.50338,6.98916],[51.503559,6.98996],[51.50386,6.99122],[51.50407,6.99203],[51.504471,6.99341],[51.504799,6.99441],[51.505051,6.99517],[51.50531,6.99594],[51.505661,6.99694],[51.505951,6.99787],[51.50618,6.99864],[51.50639,6.99936],[51.506611,7.0001],[51.50679,7.00076],[51.50692,7.00141],[51.50713,7.00247],[51.507252,7.0032],[51.507309,7.00377],[51.507389,7.00478],[51.507469,7.00601],[51.507511,7.00706],[51.507568,7.00815],[51.507622,7.0094],[51.50771,7.01091],[51.507778,7.01189],[51.5079,7.01303],[51.50798,7.01356],[51.50808,7.01418],[51.50853,7.01628],[51.508598,7.01657],[51.50882,7.01736],[51.508911,7.01776],[51.508991,7.01802],[51.509449,7.01924],[51.509651,7.01977],[51.51001,7.02061],[51.510441,7.0216],[51.51067,7.02212],[51.510971,7.02282],[51.511318,7.02362],[51.511749,7.02466],[51.51218,7.02575],[51.512489,7.02662],[51.51302,7.02839],[51.51318,7.02901],[51.513241,7.02923],[51.513378,7.02978],[51.5135,7.03033],[51.51379,7.03182],[51.51405,7.03356],[51.514198,7.03489],[51.514351,7.03674],[51.51437,7.03743],[51.514381,7.03811],[51.5144,7.03938],[51.51442,7.04053],[51.514431,7.04131],[51.514469,7.04353],[51.514469,7.04414],[51.514488,7.04472],[51.514542,7.04728],[51.51458,7.04906],[51.514709,7.0513],[51.514931,7.05337],[51.515228,7.05491],[51.51569,7.05666],[51.51609,7.0581],[51.51664,7.05958],[51.51804,7.06284],[51.519421,7.06611],[51.51976,7.06685],[51.520069,7.0676],[51.520451,7.06844],[51.521461,7.07034],[51.522091,7.07128],[51.522469,7.07174],[51.522919,7.07226],[51.523548,7.07292],[51.523918,7.07324],[51.524281,7.07349],[51.52504,7.07395],[51.525612,7.07422],[51.526218,7.0745],[51.52739,7.07508],[51.528431,7.07578],[51.529202,7.07652],[51.529968,7.07744],[51.530621,7.07847],[51.531349,7.07998],[51.531639,7.08085],[51.53178,7.08126],[51.532188,7.08277],[51.532478,7.08456],[51.532539,7.08514],[51.532681,7.0868],[51.532902,7.08914],[51.533161,7.09096],[51.533421,7.09249],[51.533749,7.09376],[51.534119,7.09503],[51.534389,7.09584],[51.534439,7.09597],[51.534561,7.09629],[51.53529,7.09819],[51.535419,7.09858],[51.535782,7.09977],[51.536011,7.10056],[51.536228,7.10172],[51.536419,7.10277],[51.536591,7.10419],[51.53746,7.11268],[51.537781,7.11582],[51.537899,7.117],[51.53796,7.11818],[51.537991,7.11909],[51.537979,7.12019],[51.53783,7.12271],[51.53772,7.12502],[51.537651,7.12646],[51.537651,7.12701],[51.53764,7.1282],[51.53764,7.12896],[51.537651,7.12917],[51.53764,7.12952],[51.53801,7.135],[51.538422,7.1388],[51.538589,7.1399],[51.538929,7.14149],[51.53949,7.14344],[51.540791,7.14728],[51.540798,7.14734],[51.541142,7.14849],[51.541241,7.14885],[51.541569,7.15025],[51.54187,7.15221],[51.542019,7.15344],[51.54203,7.15516],[51.541931,7.15783],[51.541889,7.15901],[51.541821,7.16064],[51.541889,7.16227],[51.541931,7.16295],[51.54224,7.16765],[51.542301,7.16893],[51.542358,7.17118],[51.542389,7.17196],[51.5424,7.17221],[51.54258,7.17451],[51.54261,7.17482],[51.54285,7.17645],[51.542992,7.17739],[51.543129,7.17809],[51.543251,7.17887],[51.543362,7.17973],[51.543541,7.18114],[51.54364,7.18225],[51.54372,7.18371],[51.54377,7.18551],[51.543739,7.18735],[51.543751,7.18831],[51.543739,7.1901],[51.54377,7.19114],[51.54377,7.19203],[51.5438,7.19345],[51.5439,7.19547],[51.54401,7.197],[51.54406,7.19781],[51.544159,7.19858],[51.544319,7.19959],[51.544491,7.20032],[51.544949,7.20227],[51.545071,7.20274],[51.545212,7.20327],[51.5453,7.20364],[51.545719,7.20504],[51.547321,7.20951],[51.548038,7.2115],[51.54821,7.21198],[51.548439,7.2125],[51.549198,7.21465],[51.5495,7.21541],[51.555611,7.23041],[51.555901,7.23109],[51.55603,7.23137],[51.556141,7.23164],[51.556469,7.23245],[51.556751,7.2331],[51.557121,7.2339],[51.557549,7.23481],[51.557961,7.23604],[51.55835,7.23732],[51.558632,7.23866],[51.55888,7.24011],[51.559021,7.24148],[51.559101,7.2429],[51.559132,7.24386],[51.55899,7.24571],[51.558868,7.24714],[51.558651,7.24856],[51.5583,7.25041],[51.55806,7.25159],[51.557812,7.25266],[51.557541,7.25399],[51.55732,7.25532],[51.557159,7.25671],[51.55706,7.25809],[51.556992,7.25947],[51.557011,7.26144],[51.55706,7.26255],[51.557159,7.26354],[51.55751,7.26621],[51.557701,7.26752],[51.557861,7.26839],[51.557949,7.26905],[51.558071,7.26972],[51.55827,7.27111],[51.558392,7.27207],[51.558529,7.27356],[51.558609,7.27506],[51.55862,7.27656],[51.55859,7.27804],[51.558529,7.27895],[51.558529,7.27951],[51.558418,7.28097],[51.558361,7.28194],[51.558289,7.28291],[51.558239,7.28386],[51.558189,7.28481],[51.558159,7.28624],[51.558189,7.28766],[51.55827,7.28906],[51.558411,7.29047],[51.558571,7.29187],[51.558601,7.29208],[51.55867,7.29261],[51.55883,7.29417],[51.558949,7.29507],[51.559071,7.29598],[51.559189,7.29688],[51.559299,7.29778],[51.559422,7.29868],[51.559528,7.29958],[51.559639,7.30045],[51.559731,7.30127],[51.55983,7.30207],[51.559929,7.30283],[51.560032,7.30362],[51.56012,7.30442],[51.560211,7.3052],[51.56031,7.30583],[51.560349,7.30618],[51.560471,7.30717],[51.560551,7.30793],[51.560669,7.30902],[51.56078,7.30999],[51.56105,7.31307],[51.561241,7.3154],[51.56147,7.31788],[51.561569,7.31974],[51.561611,7.32072],[51.56171,7.32205],[51.561779,7.32318],[51.56184,7.32389],[51.562012,7.32659],[51.562149,7.33011],[51.56229,7.3331],[51.562389,7.33599],[51.562469,7.33965],[51.562519,7.34197],[51.562519,7.34284],[51.562519,7.34333],[51.562531,7.34573],[51.562469,7.3485],[51.562328,7.35043],[51.562069,7.35259],[51.562031,7.35289],[51.561779,7.35495],[51.561531,7.35659],[51.561291,7.35808],[51.561291,7.35811],[51.561199,7.35845],[51.561008,7.35929],[51.560909,7.3595],[51.56078,7.35966],[51.560692,7.35974],[51.560589,7.35978],[51.56049,7.35978],[51.560291,7.3597],[51.5602,7.3596],[51.56007,7.35931],[51.560032,7.35916],[51.560032,7.35899],[51.560059,7.35869],[51.560101,7.35858],[51.560181,7.35841],[51.560299,7.35828],[51.560379,7.35823],[51.560551,7.3582],[51.561131,7.35833],[51.561661,7.35851],[51.561779,7.35856],[51.561939,7.35859],[51.562241,7.3587],[51.562809,7.35894],[51.563351,7.35919],[51.563709,7.35935],[51.564259,7.35961],[51.564602,7.35978],[51.564892,7.35988],[51.56517,7.35999],[51.565578,7.36019],[51.566071,7.36044],[51.56638,7.3606],[51.566589,7.36071],[51.566719,7.36077],[51.56686,7.36084],[51.566952,7.36086],[51.567051,7.36085],[51.56723,7.36094],[51.567402,7.36103],[51.567589,7.36112],[51.568249,7.36145],[51.568581,7.36161],[51.568901,7.36176],[51.569561,7.36207],[51.569901,7.36223],[51.570229,7.36237],[51.571281,7.36284],[51.571812,7.36307],[51.572319,7.36329],[51.57275,7.36346],[51.573139,7.36362],[51.573471,7.36376],[51.573818,7.3639],[51.574638,7.36421],[51.575439,7.36451],[51.576359,7.36484],[51.576591,7.36492],[51.576988,7.36506],[51.5774,7.36519],[51.57777,7.36532],[51.578259,7.36548],[51.579189,7.36578],[51.579529,7.36596],[51.579689,7.36601],[51.580959,7.36641],[51.581139,7.36647],[51.582199,7.36688],[51.58263,7.36702],[51.58305,7.36722],[51.58326,7.36734],[51.583469,7.36749],[51.583649,7.36767],[51.583839,7.36786],[51.58403,7.36812],[51.58419,7.36836],[51.584339,7.36861],[51.58448,7.36891],[51.584629,7.36921],[51.58482,7.36963],[51.584969,7.36999],[51.585041,7.37021],[51.585091,7.37044],[51.585121,7.37069],[51.585152,7.37097],[51.585159,7.37122],[51.585159,7.37148],[51.585121,7.37199],[51.584991,7.37375],[51.584991,7.374],[51.584671,7.37836],[51.584621,7.37916],[51.58432,7.38337],[51.584221,7.3848],[51.584122,7.38621],[51.584019,7.38768],[51.583721,7.39179],[51.583691,7.39218],[51.583611,7.39328],[51.583569,7.39381],[51.583542,7.39437],[51.583488,7.39536],[51.58345,7.39625],[51.583389,7.39708],[51.58334,7.39788],[51.58329,7.3991],[51.583279,7.40034],[51.58329,7.40065],[51.583309,7.40171],[51.583382,7.40315],[51.583439,7.4039],[51.5835,7.40464],[51.583519,7.40483],[51.583591,7.40521],[51.583672,7.40557],[51.583721,7.40612],[51.58382,7.40704],[51.58392,7.40807],[51.58403,7.40904],[51.584202,7.41055],[51.58432,7.41158],[51.584431,7.41267],[51.584499,7.41334],[51.584549,7.41403],[51.584579,7.4145],[51.58461,7.4151],[51.584641,7.4157],[51.58466,7.41627],[51.584671,7.41685],[51.584671,7.41771],[51.584648,7.41847],[51.584629,7.41912],[51.584599,7.41974],[51.584549,7.42059],[51.584492,7.42138],[51.584431,7.42199],[51.584351,7.42266],[51.584221,7.42369],[51.58408,7.42462],[51.583832,7.42597],[51.583691,7.42671],[51.58353,7.42746],[51.58337,7.4282],[51.58321,7.42895],[51.582531,7.43192],[51.58099,7.43861],[51.577789,7.45246],[51.576969,7.45601],[51.57658,7.45769],[51.576351,7.4587],[51.57613,7.45966],[51.575909,7.46067],[51.57571,7.46165],[51.57552,7.46265],[51.575329,7.4637],[51.57518,7.46471],[51.575039,7.46575],[51.574928,7.4668],[51.574829,7.46786],[51.57476,7.46891],[51.574718,7.47],[51.574692,7.47104],[51.57468,7.47212],[51.574699,7.47319],[51.574749,7.47434],[51.57481,7.47533],[51.57489,7.4764],[51.57494,7.47691],[51.574989,7.47742],[51.575119,7.47844],[51.57523,7.47924],[51.57539,7.48021],[51.57555,7.48119],[51.57576,7.48235],[51.57608,7.48387],[51.576271,7.48479],[51.576309,7.485],[51.576771,7.48709],[51.577591,7.49089],[51.578011,7.49299],[51.578152,7.49385],[51.57827,7.4947],[51.5784,7.49571],[51.57851,7.49673],[51.57859,7.49762],[51.578651,7.49843],[51.578701,7.49912],[51.578739,7.4999],[51.578751,7.50038],[51.57877,7.50084],[51.578781,7.50189],[51.578781,7.50282],[51.578758,7.50375],[51.578739,7.5045],[51.578701,7.5054],[51.57869,7.50576],[51.578621,7.50705],[51.57859,7.50803],[51.578571,7.50862],[51.578529,7.50941],[51.578499,7.51038],[51.57848,7.5108],[51.57843,7.51217],[51.578381,7.51321],[51.578339,7.51423],[51.5783,7.51529],[51.578281,7.51577],[51.578259,7.51615],[51.578209,7.51752],[51.578171,7.51851],[51.578129,7.5196],[51.578091,7.5207],[51.578091,7.5218],[51.57811,7.52288],[51.578152,7.52394],[51.578201,7.52478],[51.57827,7.52559],[51.578331,7.52628],[51.578369,7.5266],[51.57843,7.52711],[51.578499,7.52769],[51.57864,7.52868],[51.57877,7.5294],[51.578899,7.53008],[51.578991,7.53053],[51.579079,7.53098],[51.579281,7.53187],[51.579441,7.53249],[51.579609,7.53312],[51.57983,7.53392],[51.58007,7.53472],[51.58046,7.53605],[51.580769,7.53709],[51.58123,7.53863],[51.581451,7.53938],[51.581871,7.54081],[51.582241,7.54203],[51.583309,7.54564],[51.58363,7.54673],[51.584259,7.54883],[51.584648,7.55012],[51.584831,7.55076],[51.585011,7.5514],[51.585159,7.55197],[51.585289,7.55252],[51.585411,7.55302],[51.585529,7.55354],[51.585651,7.55411],[51.58577,7.55468],[51.585869,7.55518],[51.58596,7.55569],[51.58606,7.5563],[51.586159,7.55691],[51.5863,7.55789],[51.586411,7.55872],[51.586491,7.55944],[51.586571,7.56016],[51.586861,7.56301],[51.58717,7.56606],[51.587811,7.57225],[51.588902,7.58372],[51.58952,7.5933],[51.59026,7.6039],[51.590408,7.60583],[51.590462,7.60636],[51.590549,7.60696],[51.59111,7.61037],[51.59132,7.61134],[51.591709,7.61331],[51.59182,7.614],[51.592159,7.61592],[51.592571,7.61796],[51.592892,7.61959],[51.59317,7.62098],[51.593712,7.62371],[51.594002,7.62533],[51.594719,7.62911],[51.59486,7.62982],[51.59499,7.63051],[51.597221,7.64195],[51.59819,7.64671],[51.598789,7.6504],[51.59893,7.65125],[51.599091,7.65217],[51.599911,7.65679],[51.60001,7.65743],[51.60043,7.65993],[51.600689,7.66178],[51.600769,7.66243],[51.60088,7.66422],[51.60091,7.66476],[51.60096,7.66599],[51.600948,7.66965],[51.60091,7.67532],[51.600891,7.67944],[51.600899,7.68501],[51.600891,7.6879],[51.60088,7.69047],[51.600891,7.69413],[51.600861,7.69814],[51.600868,7.70294],[51.600868,7.70605],[51.600941,7.70745],[51.60104,7.7089],[51.601219,7.71043],[51.601521,7.71234],[51.601768,7.71369],[51.60215,7.71536],[51.602661,7.71758],[51.603401,7.72063],[51.605679,7.73041],[51.606239,7.73281],[51.60643,7.73365],[51.607349,7.73746],[51.607731,7.73907],[51.60902,7.74463],[51.609558,7.74701],[51.609879,7.74839],[51.610779,7.75216],[51.61095,7.75295],[51.61179,7.75657],[51.612148,7.75829],[51.61359,7.7652],[51.613682,7.76564],[51.614151,7.76791],[51.6143,7.76865],[51.615742,7.77577],[51.616322,7.77862],[51.617611,7.78492],[51.618111,7.78763],[51.618752,7.79107],[51.619671,7.79649],[51.62072,7.8026],[51.621819,7.80895],[51.62244,7.81259],[51.623089,7.81769],[51.623421,7.82074],[51.6236,7.82378],[51.624069,7.83272],[51.624149,7.83382],[51.624611,7.84164],[51.624901,7.8468],[51.62495,7.84767],[51.625149,7.85185],[51.625198,7.85266],[51.625301,7.85381],[51.62553,7.85567],[51.625759,7.8571],[51.62603,7.85854],[51.626621,7.86089],[51.626999,7.86221],[51.627499,7.8637],[51.628529,7.86656],[51.63028,7.87145],[51.632408,7.87746],[51.63369,7.88111],[51.634609,7.88375],[51.635479,7.88627],[51.636829,7.89005],[51.638069,7.89329],[51.63982,7.89801],[51.643669,7.90798],[51.64444,7.90994],[51.64513,7.91146],[51.645748,7.91261],[51.646309,7.91357],[51.647079,7.91479],[51.64782,7.91587],[51.649281,7.91756],[51.650162,7.9185],[51.652962,7.92068],[51.65921,7.92535],[51.66478,7.92948],[51.666481,7.93092],[51.667461,7.93197],[51.668388,7.93306],[51.669121,7.93402],[51.669701,7.93487],[51.670361,7.93596],[51.67128,7.93766],[51.67181,7.9387],[51.672089,7.93925],[51.675251,7.94549],[51.675961,7.9468],[51.676571,7.94784],[51.677509,7.94919],[51.67844,7.9504],[51.679081,7.95118],[51.68021,7.95252],[51.681889,7.95451],[51.68465,7.9577],[51.68486,7.95795],[51.688831,7.96253],[51.68943,7.96323],[51.691681,7.96587],[51.694801,7.96948],[51.694969,7.96969],[51.696449,7.97137],[51.698071,7.97327],[51.699009,7.97433],[51.69981,7.97509],[51.700691,7.97584],[51.70166,7.97653],[51.70285,7.97724],[51.703911,7.97781],[51.704929,7.97819],[51.706108,7.97849],[51.70723,7.97867],[51.709469,7.97887],[51.712429,7.97905],[51.72028,7.97964],[51.72121,7.97971],[51.721931,7.9798],[51.722488,7.97991],[51.723068,7.98007],[51.724079,7.98043],[51.725029,7.98082],[51.725941,7.98132],[51.72683,7.98186],[51.730968,7.98433],[51.735161,7.98683],[51.73597,7.98732],[51.757,7.99996],[51.75713,8.00004],[51.761951,8.00292],[51.76778,8.00644],[51.76865,8.00706],[51.769272,8.00759],[51.769791,8.00808],[51.77037,8.00867],[51.771149,8.00953],[51.771778,8.01032],[51.772381,8.01117],[51.772739,8.01171],[51.773022,8.01213],[51.77364,8.01325],[51.774139,8.01421],[51.7747,8.01539],[51.77486,8.01581],[51.775139,8.01646],[51.775558,8.01758],[51.77586,8.01844],[51.77607,8.01915],[51.776249,8.01978],[51.776482,8.0207],[51.777779,8.02621],[51.779148,8.03231],[51.77919,8.0325],[51.77935,8.03314],[51.78109,8.04068],[51.78199,8.04458],[51.782379,8.04621],[51.782761,8.04768],[51.783119,8.0489],[51.78363,8.0505],[51.785709,8.05654],[51.7859,8.05711],[51.788849,8.0656],[51.790531,8.07057],[51.790661,8.07092],[51.79266,8.07673],[51.79438,8.08179],[51.796059,8.08666],[51.79829,8.09329],[51.798752,8.09476],[51.7994,8.09704],[51.800251,8.10029],[51.801769,8.10654],[51.802818,8.11106],[51.803341,8.11329],[51.803589,8.11438],[51.804901,8.12144],[51.806179,8.12817],[51.806469,8.1297],[51.806881,8.13148],[51.807301,8.133],[51.807522,8.13369],[51.80777,8.13451],[51.8083,8.13594],[51.80957,8.13884],[51.81089,8.14193],[51.81139,8.1432],[51.81179,8.14429],[51.812328,8.14601],[51.812851,8.14795],[51.813831,8.15192],[51.815701,8.15951],[51.819611,8.17346],[51.821659,8.18062],[51.823521,8.1873],[51.824162,8.1898],[51.824612,8.19176],[51.825001,8.19363],[51.825298,8.19525],[51.825661,8.19734],[51.826599,8.20373],[51.828011,8.21375],[51.828949,8.22073],[51.8321,8.2427],[51.833431,8.25189],[51.834709,8.26084],[51.83506,8.26298],[51.835461,8.26496],[51.836048,8.26736],[51.837231,8.27094],[51.840221,8.27917],[51.842819,8.28644],[51.843109,8.28733],[51.843418,8.28839],[51.844082,8.29078],[51.84436,8.29183],[51.8452,8.29493],[51.84552,8.29616],[51.84684,8.30111],[51.847271,8.30268],[51.848518,8.30731],[51.849789,8.31204],[51.850498,8.31436],[51.85062,8.31468],[51.851238,8.31633],[51.851891,8.31787],[51.853531,8.32144],[51.854641,8.32379],[51.855209,8.32498],[51.85619,8.32714],[51.857101,8.32945],[51.857349,8.33024],[51.857601,8.33111],[51.85788,8.33211],[51.85804,8.33269],[51.858318,8.33384],[51.85857,8.33501],[51.85894,8.33723],[51.859798,8.34333],[51.860321,8.34674],[51.860401,8.34727],[51.861069,8.35194],[51.86124,8.35297],[51.86142,8.35408],[51.861752,8.35569],[51.862141,8.35716],[51.862942,8.36004],[51.86388,8.36343],[51.86396,8.36376],[51.864109,8.36425],[51.865002,8.36734],[51.866741,8.37381],[51.867729,8.37732],[51.868149,8.37884],[51.868641,8.38072],[51.869041,8.38247],[51.86937,8.38443],[51.869659,8.38654],[51.871109,8.39815],[51.871651,8.40257],[51.871948,8.40499],[51.872162,8.40643],[51.872631,8.40925],[51.872952,8.41071],[51.873329,8.41213],[51.873749,8.4135],[51.874168,8.41477],[51.874729,8.41609],[51.875431,8.41777],[51.879452,8.42606],[51.88131,8.4298],[51.88176,8.43074],[51.88216,8.43158],[51.882431,8.43212],[51.88261,8.43246],[51.883171,8.43365],[51.88406,8.43552],[51.88525,8.438],[51.886379,8.44002],[51.887032,8.44107],[51.888119,8.4428],[51.889061,8.44421],[51.889858,8.44547],[51.890759,8.44697],[51.891472,8.44826],[51.89222,8.44966],[51.892891,8.45104],[51.893501,8.45238],[51.894169,8.45389],[51.894829,8.45555],[51.89537,8.45697],[51.895889,8.45831],[51.896221,8.45935],[51.896488,8.46014],[51.89698,8.4617],[51.897369,8.46326],[51.897789,8.46489],[51.89819,8.46655],[51.89856,8.46816],[51.898918,8.47006],[51.899799,8.47499],[51.900379,8.47826],[51.901348,8.48375],[51.90192,8.48683],[51.902241,8.48842],[51.903591,8.49471],[51.903889,8.49611],[51.903938,8.49633],[51.90406,8.49683],[51.90443,8.49858],[51.90485,8.50032],[51.90535,8.50198],[51.905899,8.50358],[51.90662,8.50537],[51.907452,8.50714],[51.90823,8.50857],[51.909039,8.50989],[51.909969,8.5112],[51.911041,8.51252],[51.912109,8.5137],[51.913021,8.51467],[51.91333,8.51497],[51.91526,8.51712],[51.916302,8.51825],[51.91737,8.51944],[51.918381,8.5205],[51.91951,8.52178],[51.92281,8.52542],[51.924339,8.52709],[51.92609,8.52888],[51.926949,8.5297],[51.927811,8.53037],[51.92894,8.53128],[51.92989,8.53191],[51.931068,8.53263],[51.93187,8.53305],[51.93512,8.53467],[51.935982,8.53512],[51.93679,8.53563],[51.937489,8.53612],[51.93824,8.5367],[51.93858,8.53698],[51.93906,8.53741],[51.939301,8.53765],[51.939751,8.53815],[51.940151,8.5386],[51.940842,8.53947],[51.941341,8.54009],[51.942139,8.54127],[51.94286,8.54242],[51.94323,8.54305],[51.943459,8.5435],[51.943748,8.54411],[51.944279,8.54521],[51.944771,8.54638],[51.945148,8.54732],[51.945351,8.54789],[51.94632,8.55056],[51.94648,8.55101],[51.946869,8.55216],[51.94733,8.55343],[51.94743,8.55374],[51.950321,8.56168],[51.95089,8.56321],[51.951962,8.56566],[51.95256,8.56682],[51.953461,8.56841],[51.954559,8.57018],[51.954639,8.5703],[51.955059,8.57101],[51.95639,8.57315],[51.957119,8.57434],[51.95779,8.57562],[51.958481,8.57689],[51.959141,8.57828],[51.959751,8.57966],[51.960361,8.58111],[51.96093,8.58259],[51.961929,8.58578],[51.962639,8.58817],[51.964272,8.59382],[51.96476,8.59554],[51.965649,8.59864],[51.966709,8.60208],[51.96719,8.60341],[51.967461,8.60407],[51.969151,8.60787],[51.970402,8.61055],[51.970772,8.6113],[51.971081,8.61183],[51.97139,8.61236],[51.971828,8.6129],[51.972309,8.61345],[51.97282,8.61393],[51.973431,8.61437],[51.973961,8.61469],[51.974499,8.61493],[51.975441,8.61518],[51.97644,8.61538],[51.977409,8.61549],[51.978371,8.61561],[51.979061,8.6157],[51.979389,8.61575],[51.980129,8.61587],[51.980331,8.61591],[51.98135,8.61604],[51.982288,8.61597],[51.98317,8.61576],[51.9841,8.61553],[51.984982,8.6153],[51.985439,8.6152],[51.985882,8.61516],[51.98682,8.6152],[51.98735,8.61529],[51.987831,8.61541],[51.988739,8.61577],[51.9897,8.61619],[51.98988,8.61626],[51.99004,8.61632],[51.9907,8.6166],[51.99086,8.61666],[51.99165,8.61701],[51.992439,8.61736],[51.992611,8.61745],[51.993599,8.61787],[51.994911,8.61845],[51.995369,8.61865],[51.9958,8.61883],[51.997459,8.61953],[51.997799,8.61967],[51.99855,8.61999],[51.999088,8.62024],[51.999481,8.6204],[51.999889,8.62059],[52.00095,8.62121],[52.00148,8.62154],[52.002121,8.62197],[52.002831,8.62255],[52.003342,8.623],[52.003979,8.62353],[52.004601,8.62405],[52.005199,8.62456],[52.00592,8.62518],[52.006649,8.62579],[52.006809,8.62593],[52.007721,8.62671],[52.00893,8.62773],[52.010181,8.62879],[52.011429,8.62977],[52.012291,8.63042],[52.01255,8.63061],[52.013939,8.63147],[52.014462,8.63181],[52.0159,8.63256],[52.01722,8.63319],[52.01857,8.63373],[52.019871,8.63422],[52.021141,8.63468],[52.02203,8.63501],[52.022339,8.63513],[52.023869,8.63568],[52.024651,8.63597],[52.024811,8.63603],[52.025478,8.63629],[52.027969,8.6372],[52.02935,8.63771],[52.030788,8.63828],[52.031471,8.63861],[52.032108,8.63895],[52.032879,8.63944],[52.032982,8.63951],[52.03352,8.63991],[52.034409,8.64064],[52.03516,8.64128],[52.035961,8.64212],[52.036591,8.64282],[52.037182,8.64357],[52.03833,8.64516],[52.039349,8.64674],[52.04047,8.64829],[52.041012,8.64892],[52.041649,8.64968],[52.042881,8.6509],[52.04414,8.65191],[52.04549,8.65281],[52.04697,8.65372],[52.047981,8.65432],[52.048161,8.65444],[52.04858,8.65471],[52.050201,8.65569],[52.052029,8.65683],[52.053902,8.65782],[52.055759,8.65866],[52.056389,8.65888],[52.05896,8.65966],[52.06068,8.66016],[52.063389,8.66092],[52.0644,8.66127],[52.06546,8.66172],[52.06646,8.66223],[52.06741,8.66276],[52.06839,8.6634],[52.06934,8.66409],[52.070309,8.66492],[52.07122,8.66574],[52.072128,8.66665],[52.073071,8.66769],[52.073898,8.6687],[52.074791,8.66986],[52.075588,8.67106],[52.076389,8.67232],[52.07716,8.67369],[52.077351,8.67404],[52.077431,8.67419],[52.077881,8.67505],[52.07856,8.67651],[52.07914,8.67787],[52.079689,8.67926],[52.080231,8.68064],[52.080742,8.68195],[52.081032,8.68267],[52.081261,8.68324],[52.081749,8.68446],[52.082199,8.68568],[52.08271,8.68697],[52.083191,8.68823],[52.083801,8.68973],[52.084461,8.69108],[52.085018,8.69204],[52.08551,8.69285],[52.085701,8.69313],[52.086071,8.69366],[52.086941,8.69476],[52.087109,8.69495],[52.088348,8.69625],[52.08963,8.69755],[52.08987,8.69779],[52.091042,8.69914],[52.091331,8.69947],[52.091862,8.70014],[52.092861,8.70151],[52.093109,8.70187],[52.093811,8.70295],[52.094212,8.70363],[52.094769,8.70458],[52.095451,8.70579],[52.09568,8.70625],[52.09721,8.70946],[52.097439,8.70994],[52.099529,8.71434],[52.101131,8.71777],[52.101261,8.71805],[52.101479,8.71853],[52.102081,8.7198],[52.102921,8.72151],[52.103481,8.72259],[52.10397,8.72343],[52.104481,8.72428],[52.104969,8.72507],[52.105549,8.72595],[52.108551,8.73051],[52.10973,8.73234],[52.110168,8.73303],[52.110771,8.7339],[52.111389,8.73469],[52.111851,8.73522],[52.112289,8.73566],[52.11285,8.73615],[52.11338,8.73657],[52.11377,8.73683],[52.114021,8.73698],[52.11462,8.73728],[52.115231,8.73755],[52.115681,8.73768],[52.116249,8.73781],[52.116859,8.73788],[52.117432,8.7379],[52.118141,8.73783],[52.118759,8.7377],[52.119438,8.73752],[52.120628,8.73726],[52.124889,8.73636],[52.12582,8.73621],[52.126659,8.73614],[52.127281,8.73615],[52.12785,8.73619],[52.128529,8.73633],[52.12936,8.73659],[52.129959,8.73687],[52.130539,8.73717],[52.131649,8.73792],[52.132839,8.739],[52.133789,8.74002],[52.13435,8.74077],[52.13456,8.74107],[52.135368,8.74246],[52.135929,8.74357],[52.136349,8.74463],[52.136742,8.74578],[52.137001,8.74657],[52.13744,8.74827],[52.137718,8.74973],[52.138359,8.75359],[52.13842,8.75398],[52.13879,8.75656],[52.13903,8.75876],[52.139229,8.76081],[52.139389,8.76305],[52.139408,8.76347],[52.13969,8.76717],[52.139919,8.76944],[52.140049,8.77036],[52.14016,8.77109],[52.14027,8.77176],[52.140659,8.77359],[52.1409,8.77464],[52.141029,8.77515],[52.1413,8.77632],[52.14188,8.77859],[52.141918,8.77874],[52.142818,8.7822],[52.143681,8.78554],[52.14452,8.78879],[52.14492,8.79018],[52.145649,8.79237],[52.146839,8.79541],[52.147991,8.7985],[52.148628,8.80016],[52.149361,8.80197],[52.14946,8.80217],[52.149792,8.80289],[52.150139,8.80355],[52.150181,8.80361],[52.150688,8.8044],[52.151588,8.80559],[52.152279,8.80629],[52.15361,8.80748],[52.155849,8.80938],[52.157341,8.81068],[52.15818,8.81133],[52.158909,8.81174],[52.159672,8.81207],[52.160351,8.81231],[52.164749,8.8136],[52.164989,8.81368],[52.16539,8.81381],[52.168892,8.8148],[52.170528,8.81523],[52.171021,8.81539],[52.17152,8.81563],[52.172192,8.816],[52.173,8.81661],[52.178951,8.82136],[52.179169,8.82156],[52.181911,8.82381],[52.18261,8.82431],[52.183281,8.82466],[52.18404,8.82497],[52.184589,8.82513],[52.18552,8.82528],[52.18766,8.82536],[52.18837,8.82545],[52.18885,8.8255],[52.189201,8.82555],[52.189449,8.82561],[52.190498,8.82589],[52.191158,8.82615],[52.191971,8.82656],[52.192581,8.8269],[52.193588,8.82747],[52.195042,8.82846],[52.195419,8.82872],[52.198071,8.83052],[52.198551,8.83085],[52.19976,8.83166],[52.200359,8.83217],[52.201069,8.83284],[52.20174,8.83362],[52.202339,8.83453],[52.202961,8.83556],[52.203571,8.83691],[52.204048,8.83833],[52.20438,8.83961],[52.204609,8.8406],[52.20483,8.84169],[52.20512,8.84355],[52.205269,8.84427],[52.20536,8.84474],[52.205509,8.84547],[52.205669,8.84615],[52.205929,8.84722],[52.20607,8.84783],[52.206478,8.84943],[52.206982,8.85093],[52.2075,8.8524],[52.208408,8.85498],[52.208771,8.85602],[52.209572,8.85826],[52.209862,8.85908],[52.21014,8.85993],[52.210258,8.86032],[52.210461,8.86108],[52.210659,8.86194],[52.210812,8.86277],[52.21093,8.86365],[52.210999,8.8642],[52.211048,8.86475],[52.211102,8.86559],[52.211151,8.86791],[52.21125,8.87073],[52.21125,8.87193],[52.211231,8.87273],[52.211189,8.87377],[52.211128,8.87522],[52.210911,8.88039],[52.210892,8.88137],[52.210911,8.88202],[52.21101,8.88493],[52.211239,8.89031],[52.211189,8.89171],[52.211079,8.89306],[52.210781,8.89507],[52.210609,8.8961],[52.210159,8.89882],[52.209759,8.90154],[52.209518,8.90427],[52.209461,8.90684],[52.209499,8.91353],[52.209549,8.91769],[52.209549,8.9181],[52.20956,8.92176],[52.20961,8.92312],[52.209671,8.92455],[52.209728,8.92545],[52.20982,8.92636],[52.209881,8.92682],[52.210041,8.92827],[52.210369,8.93009],[52.21067,8.93149],[52.2113,8.93413],[52.211449,8.93478],[52.211849,8.93633],[52.212269,8.9384],[52.212502,8.9396],[52.212711,8.94083],[52.212879,8.94212],[52.213051,8.94348],[52.21323,8.94536],[52.213539,8.94827],[52.21368,8.94928],[52.213951,8.9507],[52.214329,8.95231],[52.214691,8.95385],[52.21526,8.95603],[52.215549,8.95712],[52.21579,8.95823],[52.216141,8.96002],[52.21645,8.96171],[52.21664,8.96307],[52.21677,8.96447],[52.216881,8.96608],[52.21693,8.96771],[52.21693,8.96872],[52.21693,8.96993],[52.216831,8.97907],[52.216808,8.98151],[52.216759,8.9851],[52.21674,8.98697],[52.216728,8.98927],[52.21674,8.98993],[52.216789,8.99054],[52.21682,8.9912],[52.2169,8.99186],[52.21706,8.99292],[52.21714,8.99333],[52.217258,8.994],[52.2174,8.99456],[52.2178,8.99593],[52.21825,8.9975],[52.218712,8.99906],[52.218948,9.00004],[52.21912,9.00089],[52.219189,9.00138],[52.219311,9.00233],[52.21941,9.00328],[52.219521,9.00466],[52.219589,9.00562],[52.219669,9.00663],[52.21978,9.00785],[52.219929,9.00907],[52.2201,9.01008],[52.220291,9.01108],[52.220409,9.01157],[52.220791,9.01314],[52.221321,9.01521],[52.22142,9.01562],[52.221661,9.01673],[52.22184,9.01791],[52.22197,9.01901],[52.22205,9.02011],[52.222061,9.02136],[52.222,9.02263],[52.221901,9.02388],[52.221291,9.03157],[52.221218,9.0324],[52.22113,9.03318],[52.22102,9.03388],[52.220772,9.03518],[52.220249,9.03779],[52.220051,9.03881],[52.218788,9.04554],[52.218609,9.04663],[52.218441,9.04758],[52.218288,9.04868],[52.21817,9.04986],[52.218128,9.05084],[52.218151,9.0517],[52.218262,9.05309],[52.218342,9.05377],[52.218441,9.05453],[52.218689,9.056],[52.218891,9.05675],[52.2192,9.05781],[52.219662,9.05924],[52.22028,9.06112],[52.220879,9.06312],[52.221062,9.0639],[52.22123,9.0648],[52.221329,9.06549],[52.221409,9.06617],[52.221458,9.0669],[52.2215,9.06774],[52.2215,9.06863],[52.22147,9.06938],[52.221409,9.07029],[52.221149,9.07354],[52.22068,9.07999],[52.22049,9.08252],[52.220291,9.08523],[52.2202,9.08661],[52.22015,9.08735],[52.220131,9.08799],[52.2201,9.08931],[52.220139,9.09049],[52.220242,9.09183],[52.22039,9.09328],[52.22102,9.09803],[52.221352,9.10071],[52.221519,9.10211],[52.221649,9.10343],[52.221699,9.10437],[52.22171,9.10532],[52.221729,9.10629],[52.221691,9.1071],[52.221649,9.10781],[52.22155,9.10848],[52.221439,9.10903],[52.22131,9.10977],[52.22086,9.11192],[52.220482,9.11371],[52.22023,9.11495],[52.22002,9.11628],[52.21994,9.11706],[52.219879,9.11793],[52.21983,9.11944],[52.21991,9.12097],[52.219971,9.12181],[52.22007,9.12263],[52.22028,9.12413],[52.22049,9.12557],[52.220619,9.12718],[52.22065,9.12849],[52.220619,9.12928],[52.220581,9.13004],[52.22047,9.13138],[52.220119,9.13498],[52.21981,9.13805],[52.21973,9.13917],[52.219669,9.14079],[52.219551,9.14517],[52.219551,9.1457],[52.219479,9.14736],[52.219379,9.14908],[52.21817,9.15879],[52.218029,9.15981],[52.21785,9.16074],[52.217449,9.16232],[52.21669,9.16492],[52.216209,9.16663],[52.216,9.16779],[52.215839,9.16909],[52.215771,9.17014],[52.215752,9.17206],[52.215698,9.17478],[52.21563,9.17699],[52.215611,9.17739],[52.21545,9.18024],[52.215431,9.18139],[52.215511,9.18293],[52.215641,9.18409],[52.215759,9.1848],[52.2159,9.18562],[52.216171,9.18673],[52.216579,9.1883],[52.217991,9.19375],[52.218449,9.19555],[52.219471,9.19907],[52.21983,9.20038],[52.220951,9.20474],[52.221272,9.20601],[52.22147,9.20691],[52.221619,9.20768],[52.221802,9.20891],[52.221901,9.20997],[52.221958,9.21096],[52.22197,9.21188],[52.22187,9.21513],[52.22184,9.21685],[52.221901,9.21811],[52.22197,9.21912],[52.222031,9.21982],[52.222252,9.22108],[52.222549,9.22248],[52.222809,9.22344],[52.223091,9.22428],[52.223412,9.22504],[52.223789,9.2259],[52.224602,9.22741],[52.225891,9.22959],[52.22863,9.23392],[52.228882,9.23433],[52.23019,9.23661],[52.230541,9.23736],[52.230862,9.23816],[52.231152,9.23898],[52.231621,9.24076],[52.232052,9.24308],[52.232349,9.2454],[52.232571,9.24712],[52.23275,9.24839],[52.232841,9.24905],[52.23315,9.25142],[52.233521,9.25422],[52.233898,9.2571],[52.234241,9.25995],[52.234612,9.26276],[52.234951,9.26555],[52.235222,9.26732],[52.23531,9.26785],[52.235649,9.26968],[52.236031,9.27126],[52.236721,9.27361],[52.237251,9.27518],[52.23777,9.2765],[52.23822,9.27756],[52.23859,9.27833],[52.239071,9.27929],[52.23954,9.2801],[52.240299,9.28136],[52.241081,9.2825],[52.24173,9.2833],[52.24263,9.28436],[52.24453,9.28641],[52.24649,9.28847],[52.247452,9.28956],[52.24828,9.29058],[52.248501,9.29089],[52.249249,9.29197],[52.249989,9.29312],[52.250622,9.29429],[52.25116,9.2954],[52.254822,9.30336],[52.256031,9.30584],[52.256618,9.30694],[52.257198,9.3079],[52.25774,9.30869],[52.258369,9.30952],[52.259209,9.31058],[52.26017,9.31164],[52.261101,9.31259],[52.26149,9.31296],[52.26339,9.31468],[52.26498,9.31612],[52.26535,9.31651],[52.26646,9.31788],[52.267059,9.31869],[52.267681,9.31962],[52.268299,9.32062],[52.268822,9.32155],[52.269459,9.32285],[52.273449,9.33127],[52.274132,9.33276],[52.274872,9.3343],[52.275391,9.33547],[52.278141,9.34138],[52.278709,9.34251],[52.279369,9.34372],[52.280022,9.34479],[52.28017,9.34507],[52.28112,9.34654],[52.28614,9.3543],[52.287659,9.35666],[52.288509,9.35787],[52.289421,9.35901],[52.289719,9.35935],[52.291088,9.36072],[52.292488,9.36198],[52.292671,9.36213],[52.302601,9.37094],[52.319118,9.38574],[52.321159,9.38775],[52.322319,9.38908],[52.32336,9.39044],[52.324322,9.39183],[52.325069,9.39299],[52.32523,9.39327],[52.325859,9.39436],[52.326618,9.39575],[52.327579,9.39764],[52.328411,9.39929],[52.32859,9.39964],[52.329109,9.4006],[52.329769,9.40172],[52.330891,9.40352],[52.332241,9.40555],[52.333649,9.4077],[52.333889,9.40806],[52.33432,9.40873],[52.335529,9.41062],[52.335838,9.41112],[52.336159,9.41163],[52.337959,9.41435],[52.338539,9.41519],[52.339409,9.41632],[52.340111,9.41712],[52.34082,9.41784],[52.34166,9.4186],[52.342659,9.41942],[52.343609,9.42004],[52.344292,9.42046],[52.347092,9.42214],[52.34774,9.42256],[52.348728,9.4233],[52.349461,9.42388],[52.350231,9.42454],[52.351101,9.42534],[52.353039,9.42715],[52.357361,9.43114],[52.35881,9.43264],[52.359692,9.43366],[52.367809,9.44407],[52.369389,9.4463],[52.37072,9.44836],[52.370861,9.44859],[52.37278,9.45184],[52.37532,9.45624],[52.377548,9.4601],[52.38052,9.46524],[52.38113,9.46629],[52.381649,9.46712],[52.382561,9.46848],[52.383499,9.4698],[52.388901,9.4772],[52.39045,9.47932],[52.396099,9.48702],[52.39711,9.48859],[52.398029,9.49015],[52.401131,9.49559],[52.406521,9.50506],[52.407982,9.50763],[52.409161,9.50972],[52.410191,9.51151],[52.41164,9.51406],[52.413311,9.51703],[52.41428,9.51884],[52.415138,9.52054],[52.41576,9.52185],[52.416382,9.52326],[52.416969,9.52472],[52.417488,9.52615],[52.41803,9.52775],[52.41877,9.53015],[52.419331,9.53233],[52.419689,9.53391],[52.419991,9.53553],[52.420319,9.53729],[52.42057,9.53902],[52.42078,9.54093],[52.420971,9.54285],[52.421131,9.54533],[52.42131,9.54945],[52.421459,9.55652],[52.421551,9.55856],[52.42165,9.56019],[52.421909,9.56349],[52.422329,9.56859],[52.42276,9.57334],[52.42281,9.57401],[52.423309,9.58008],[52.423458,9.58243],[52.423489,9.58307],[52.423561,9.58555],[52.423592,9.5876],[52.42358,9.58984],[52.423519,9.59303],[52.423229,9.59739],[52.421131,9.61986],[52.42091,9.62265],[52.420811,9.62446],[52.420792,9.62634],[52.420811,9.62772],[52.420872,9.6294],[52.421051,9.63173],[52.421242,9.63346],[52.421619,9.63605],[52.422058,9.6385],[52.424,9.64852],[52.42527,9.6551],[52.42683,9.66314],[52.427429,9.66629],[52.4282,9.67028],[52.428421,9.67169],[52.428612,9.67311],[52.428921,9.67626],[52.429321,9.68156],[52.429611,9.68496],[52.430241,9.69297],[52.430389,9.69674],[52.43042,9.69946],[52.430401,9.70035],[52.430248,9.70318],[52.43,9.70612],[52.42923,9.71208],[52.429001,9.71376],[52.42823,9.72024],[52.427898,9.72294],[52.427872,9.72335],[52.427551,9.72654],[52.427441,9.72852],[52.427441,9.72884],[52.427391,9.73166],[52.427391,9.73378],[52.42738,9.74271],[52.42725,9.74974],[52.427189,9.75209],[52.427189,9.75226],[52.427071,9.75852],[52.427059,9.75878],[52.426979,9.76416],[52.426979,9.76718],[52.42709,9.7718],[52.427219,9.77332],[52.427471,9.77608],[52.42757,9.77697],[52.42802,9.78012],[52.42849,9.78298],[52.42894,9.78534],[52.4296,9.78852],[52.43013,9.7913],[52.430309,9.79236],[52.43084,9.79586],[52.431061,9.79878],[52.43108,9.80093],[52.43108,9.80136],[52.431061,9.80156],[52.431011,9.80331],[52.430851,9.80506],[52.43058,9.80699],[52.429859,9.81081],[52.42926,9.81314],[52.427879,9.81772],[52.42767,9.81826],[52.427589,9.81848],[52.42622,9.82272],[52.42561,9.82427],[52.425179,9.8253],[52.4244,9.82718],[52.42313,9.82991],[52.421791,9.83242],[52.421059,9.83371],[52.420341,9.83493],[52.419991,9.83549],[52.41695,9.84032],[52.41547,9.84266],[52.414028,9.84502],[52.41272,9.84724],[52.412521,9.84753],[52.412201,9.84809],[52.411758,9.84889],[52.410969,9.85049],[52.40963,9.8534],[52.40897,9.85474],[52.4067,9.85982],[52.406231,9.8608],[52.404419,9.8647],[52.402882,9.86814],[52.4021,9.87012],[52.40136,9.87221],[52.40065,9.87454],[52.40015,9.87635],[52.399601,9.87873],[52.39933,9.88],[52.399101,9.8813],[52.398849,9.88279],[52.39864,9.88436],[52.398048,9.88966],[52.39793,9.89076],[52.397449,9.89538],[52.39716,9.89822],[52.396938,9.90041],[52.39613,9.90822],[52.39547,9.91468],[52.39489,9.91989],[52.394291,9.92539],[52.392899,9.93625],[52.392502,9.93943],[52.391991,9.94348],[52.391129,9.95032],[52.390652,9.95501],[52.390388,9.95814],[52.389771,9.96834],[52.38966,9.97063],[52.38961,9.97158],[52.389488,9.97431],[52.38945,9.97521],[52.389271,9.97919],[52.389179,9.98179],[52.388851,9.98807],[52.388741,9.98972],[52.38866,9.99068],[52.38855,9.99183],[52.388371,9.99334],[52.38826,9.9942],[52.388031,9.99557],[52.38776,9.99715],[52.387428,9.99872],[52.38665,10.00213],[52.386589,10.00236],[52.384411,10.01166],[52.384232,10.01243],[52.383591,10.01513],[52.38287,10.01818],[52.38216,10.02108],[52.381931,10.02194],[52.380798,10.02608],[52.37854,10.03394],[52.37793,10.03613],[52.375851,10.0434],[52.36834,10.06986],[52.367668,10.07246],[52.367241,10.07433],[52.366859,10.07654],[52.366489,10.079],[52.366112,10.08264],[52.364349,10.10102],[52.363918,10.10537],[52.363731,10.10793],[52.363621,10.11056],[52.363522,10.11825],[52.363491,10.12034],[52.363461,10.12095],[52.3634,10.12439],[52.36322,10.12821],[52.362869,10.13312],[52.362389,10.13806],[52.361851,10.14326],[52.361752,10.14428],[52.36092,10.15225],[52.36026,10.15861],[52.3587,10.17429],[52.358459,10.17639],[52.35775,10.18056],[52.357601,10.18136],[52.35696,10.18402],[52.356331,10.18616],[52.355492,10.18883],[52.35437,10.19165],[52.34618,10.20908],[52.342449,10.21785],[52.341831,10.21931],[52.340672,10.22211],[52.340179,10.22335],[52.33963,10.2249],[52.339489,10.22534],[52.33881,10.22759],[52.33831,10.2295],[52.337898,10.23125],[52.33733,10.23424],[52.336891,10.23742],[52.336781,10.23822],[52.33654,10.24093],[52.336449,10.2429],[52.336418,10.24385],[52.336399,10.24622],[52.33654,10.25446],[52.33659,10.25766],[52.336559,10.2601],[52.33646,10.2636],[52.336189,10.26843],[52.335072,10.28774],[52.334919,10.29107],[52.334919,10.29154],[52.335011,10.29579],[52.33514,10.29783],[52.33543,10.30059],[52.33551,10.30138],[52.338169,10.32413],[52.339352,10.33431],[52.339642,10.33706],[52.339771,10.33882],[52.339809,10.33951],[52.339931,10.3423],[52.339939,10.34619],[52.339771,10.35151],[52.339378,10.36378],[52.339321,10.36578],[52.339298,10.36685],[52.339039,10.3733],[52.33876,10.37846],[52.338699,10.37918],[52.33749,10.39397],[52.33744,10.39459],[52.337231,10.39709],[52.337078,10.39883],[52.33704,10.39933],[52.33699,10.39991],[52.336658,10.40373],[52.336601,10.40446],[52.335541,10.41656],[52.33511,10.41984],[52.33482,10.42191],[52.33448,10.42399],[52.33408,10.42626],[52.333401,10.43028],[52.331501,10.44129],[52.330391,10.44793],[52.32967,10.4525],[52.32896,10.45634],[52.326759,10.46555],[52.32547,10.47095],[52.324322,10.4756],[52.321678,10.48679],[52.320992,10.48957],[52.320641,10.49099],[52.316238,10.50933],[52.315941,10.51061],[52.314949,10.51487],[52.314602,10.51663],[52.314301,10.51826],[52.31406,10.51997],[52.313622,10.52316],[52.31337,10.52554],[52.313339,10.5259],[52.313229,10.52723],[52.31316,10.52956],[52.313171,10.53276],[52.31321,10.53498],[52.313221,10.53566],[52.313061,10.55503],[52.313049,10.55618],[52.31303,10.55924],[52.31303,10.56007],[52.313,10.56157],[52.312969,10.5638],[52.31292,10.56636],[52.312801,10.57008],[52.312691,10.57225],[52.31237,10.57724],[52.312019,10.58152],[52.310211,10.60278],[52.310032,10.60504],[52.309978,10.60568],[52.309872,10.60751],[52.30978,10.60984],[52.3097,10.61282],[52.309689,10.61409],[52.3097,10.61489],[52.309761,10.61923],[52.309769,10.62277],[52.309761,10.62736],[52.30975,10.62812],[52.30975,10.62927],[52.3097,10.63306],[52.309689,10.63377],[52.309689,10.63433],[52.309471,10.65566],[52.30938,10.66094],[52.308651,10.68318],[52.308578,10.6847],[52.308189,10.6965],[52.30817,10.69703],[52.30814,10.6977],[52.307961,10.70307],[52.307949,10.70368],[52.307869,10.70846],[52.30788,10.7108],[52.307961,10.71448],[52.307968,10.71477],[52.30806,10.71921],[52.30817,10.7233],[52.3083,10.72591],[52.308521,10.72918],[52.309261,10.736],[52.31052,10.74826],[52.31287,10.76876],[52.313519,10.77534],[52.313702,10.77924],[52.313702,10.7817],[52.313629,10.78393],[52.312489,10.79746],[52.312439,10.79808],[52.312309,10.79964],[52.311661,10.80753],[52.31155,10.80886],[52.311489,10.80955],[52.311218,10.81283],[52.310982,10.81575],[52.310928,10.81642],[52.310619,10.82023],[52.310299,10.82408],[52.31007,10.82577],[52.309681,10.82813],[52.30938,10.82972],[52.308922,10.83178],[52.308781,10.8324],[52.308571,10.83322],[52.307831,10.83578],[52.30703,10.83832],[52.306911,10.83871],[52.30648,10.84012],[52.30463,10.84596],[52.29977,10.86152],[52.299469,10.8625],[52.29797,10.86634],[52.29623,10.87042],[52.29607,10.8708],[52.290569,10.88392],[52.290298,10.88454],[52.289761,10.88581],[52.287991,10.89006],[52.286442,10.89384],[52.28561,10.89616],[52.284981,10.89818],[52.28405,10.90174],[52.283741,10.90314],[52.283581,10.90391],[52.283199,10.90601],[52.283039,10.90711],[52.282848,10.90841],[52.2827,10.9098],[52.28249,10.91186],[52.282211,10.91447],[52.28194,10.91689],[52.281818,10.91823],[52.281689,10.91955],[52.281521,10.92115],[52.281342,10.92276],[52.281239,10.92347],[52.281101,10.92451],[52.280941,10.92543],[52.28067,10.92687],[52.280579,10.92729],[52.280411,10.92808],[52.280281,10.92867],[52.27998,10.92985],[52.279621,10.93119],[52.278999,10.93321],[52.278809,10.93376],[52.27845,10.93479],[52.27808,10.93571],[52.277599,10.93683],[52.274021,10.94491],[52.272881,10.94751],[52.272579,10.94815],[52.272388,10.94866],[52.271629,10.95055],[52.271149,10.95184],[52.270691,10.9532],[52.270409,10.95412],[52.269989,10.9559],[52.269711,10.95711],[52.269402,10.95878],[52.269051,10.96101],[52.26873,10.96379],[52.268589,10.96511],[52.268459,10.96648],[52.26825,10.96781],[52.268051,10.96897],[52.267792,10.97028],[52.26746,10.97173],[52.267109,10.97311],[52.266541,10.97495],[52.2659,10.97686],[52.26535,10.97857],[52.264729,10.98044],[52.264431,10.98125],[52.264069,10.98226],[52.263611,10.98342],[52.26334,10.98406],[52.26302,10.9848],[52.26265,10.98559],[52.262428,10.98599],[52.261951,10.98683],[52.261559,10.98751],[52.260738,10.98882],[52.26009,10.98974],[52.25935,10.99068],[52.258259,10.99194],[52.258091,10.99214],[52.25774,10.99256],[52.25737,10.99298],[52.256519,10.99397],[52.25563,10.99497],[52.254391,10.99625],[52.25322,10.99741],[52.25264,10.99793],[52.25235,10.99823],[52.251209,10.99934],[52.250229,11.00027],[52.250031,11.00046],[52.24955,11.00092],[52.247181,11.0032],[52.246609,11.00382],[52.246151,11.00434],[52.245621,11.00498],[52.24514,11.0056],[52.244751,11.00613],[52.244381,11.00663],[52.24419,11.0069],[52.243999,11.00721],[52.24379,11.00755],[52.24321,11.00858],[52.242661,11.00965],[52.242088,11.01079],[52.241951,11.01111],[52.24165,11.01174],[52.240669,11.01376],[52.24049,11.01413],[52.24007,11.01488],[52.239738,11.01546],[52.23951,11.01586],[52.239281,11.01623],[52.238449,11.01743],[52.237862,11.01826],[52.237492,11.01872],[52.23708,11.01926],[52.236061,11.02047],[52.235901,11.02068],[52.235519,11.02112],[52.23484,11.02197],[52.23436,11.02264],[52.233879,11.0233],[52.232819,11.02502],[52.23238,11.02578],[52.232151,11.02621],[52.2318,11.02692],[52.231319,11.02796],[52.23064,11.02948],[52.22974,11.03148],[52.226608,11.03863],[52.224251,11.04442],[52.222542,11.04881],[52.22213,11.04988],[52.221722,11.0509],[52.21994,11.05556],[52.219559,11.05661],[52.219021,11.05819],[52.218639,11.05949],[52.218262,11.06097],[52.217609,11.06406],[52.217312,11.06595],[52.21701,11.06904],[52.216759,11.07434],[52.216389,11.08081],[52.21616,11.08396],[52.21582,11.08679],[52.215549,11.08848],[52.215321,11.08966],[52.215,11.091],[52.21471,11.09206],[52.21439,11.09308],[52.214119,11.09393],[52.213581,11.09541],[52.213032,11.097],[52.212528,11.09842],[52.2122,11.09948],[52.211971,11.10029],[52.211639,11.10148],[52.21032,11.10647],[52.209942,11.10794],[52.209572,11.10945],[52.209259,11.11086],[52.209019,11.11196],[52.208809,11.11301],[52.20853,11.11437],[52.20821,11.11676],[52.208031,11.11851],[52.20726,11.1314],[52.207218,11.13201],[52.20718,11.1333],[52.20715,11.13446],[52.207142,11.13474],[52.207142,11.13663],[52.20723,11.13807],[52.207298,11.1391],[52.208012,11.14741],[52.20826,11.1505],[52.208382,11.15266],[52.208431,11.15428],[52.208389,11.15683],[52.20826,11.15952],[52.20808,11.16168],[52.207748,11.16434],[52.207439,11.16667],[52.207272,11.16756],[52.204609,11.17897],[52.204288,11.18041],[52.20369,11.18307],[52.20295,11.18697],[52.202518,11.19054],[52.202309,11.19309],[52.201889,11.20136],[52.201839,11.20206],[52.200691,11.22617],[52.200531,11.23064],[52.20031,11.23465],[52.20018,11.23625],[52.19997,11.23853],[52.199551,11.24218],[52.199379,11.24359],[52.198601,11.24932],[52.198441,11.2506],[52.196831,11.26289],[52.196758,11.26343],[52.19664,11.26425],[52.19611,11.2682],[52.195919,11.26956],[52.195831,11.27021],[52.192509,11.29526],[52.192451,11.29572],[52.191921,11.2998],[52.191681,11.30193],[52.191631,11.30242],[52.19038,11.31644],[52.188,11.34272],[52.18729,11.35063],[52.18716,11.35227],[52.187069,11.35391],[52.187012,11.35556],[52.186981,11.35735],[52.186951,11.35924],[52.186958,11.36334],[52.187,11.36713],[52.18713,11.38555],[52.18718,11.38968],[52.18718,11.38998],[52.187191,11.39058],[52.187191,11.39091],[52.18721,11.39275],[52.18779,11.41141],[52.187809,11.41185],[52.187962,11.41739],[52.18808,11.42094],[52.188099,11.42154],[52.18819,11.425],[52.18829,11.42803],[52.188339,11.43127],[52.18832,11.43313],[52.18821,11.43495],[52.188049,11.43668],[52.187771,11.43853],[52.18734,11.44089],[52.186981,11.44246],[52.186001,11.44599],[52.185928,11.44622],[52.185829,11.44653],[52.183041,11.45638],[52.181412,11.46197],[52.17691,11.47781],[52.176159,11.4802],[52.175781,11.48138],[52.175251,11.48278],[52.174389,11.48491],[52.173431,11.48724],[52.17202,11.49069],[52.168011,11.50037],[52.16666,11.50414],[52.166458,11.50475],[52.16629,11.50537],[52.16589,11.50676],[52.165611,11.50802],[52.165359,11.50931],[52.165161,11.51038],[52.16502,11.51134],[52.164791,11.51371],[52.1647,11.51587],[52.16468,11.5163],[52.16465,11.51743],[52.164669,11.5184],[52.164742,11.51996],[52.16489,11.52163],[52.165058,11.52326],[52.165119,11.52365],[52.165421,11.52569],[52.166439,11.53267],[52.166611,11.53392],[52.167339,11.53867],[52.167439,11.53937],[52.169441,11.55281],[52.16991,11.55575],[52.170231,11.55711],[52.170559,11.55839],[52.171291,11.56133],[52.17382,11.57087],[52.175751,11.57812],[52.178219,11.58746],[52.182308,11.603],[52.183929,11.60919],[52.185032,11.61315],[52.185822,11.61628],[52.186619,11.61919],[52.187531,11.62238],[52.188011,11.62375],[52.18858,11.62524],[52.18866,11.62546],[52.18959,11.62733],[52.190868,11.62959],[52.192478,11.63237],[52.199959,11.6454],[52.200359,11.64613],[52.20084,11.64695],[52.201038,11.64729],[52.20842,11.66016],[52.208679,11.66065],[52.209332,11.66179],[52.21109,11.66484],[52.21154,11.66565],[52.211788,11.66607],[52.213799,11.66959],[52.215851,11.67339],[52.216461,11.67478],[52.217049,11.67633],[52.217369,11.67731],[52.217579,11.67796],[52.217838,11.67877],[52.218311,11.68052],[52.21854,11.68151],[52.21909,11.6844],[52.219452,11.68751],[52.219749,11.69092],[52.220051,11.69427],[52.221161,11.70682],[52.22168,11.71211],[52.222061,11.71632],[52.223511,11.73166],[52.223629,11.73272],[52.223759,11.73362],[52.225361,11.74258],[52.22699,11.75169],[52.22805,11.75741],[52.228409,11.75924],[52.228741,11.76117],[52.229019,11.76374],[52.229149,11.76571],[52.229179,11.76778],[52.22897,11.77192],[52.227791,11.7904],[52.22768,11.79214],[52.2276,11.79329],[52.227291,11.79804],[52.226688,11.80733],[52.22665,11.80793],[52.226009,11.81791],[52.225689,11.82334],[52.225529,11.82563],[52.22541,11.82819],[52.22543,11.83002],[52.225471,11.83125],[52.225559,11.83267],[52.225651,11.83379],[52.227291,11.84773],[52.232201,11.88916],[52.23251,11.89181],[52.232639,11.89276],[52.232731,11.89358],[52.233051,11.89658],[52.23336,11.89995],[52.233601,11.90274],[52.233768,11.90531],[52.233879,11.90798],[52.234348,11.92429],[52.234779,11.94053],[52.235249,11.95714],[52.235409,11.96376],[52.2356,11.97119],[52.235748,11.97729],[52.23579,11.97894],[52.235771,11.98051],[52.235699,11.98249],[52.235432,11.98812],[52.235081,11.99699],[52.234341,12.01401],[52.233761,12.02773],[52.233421,12.03474],[52.233101,12.04213],[52.232632,12.05301],[52.232609,12.0542],[52.23262,12.05541],[52.23267,12.05675],[52.232841,12.0587],[52.23296,12.06002],[52.233101,12.06113],[52.233459,12.06384],[52.233681,12.06548],[52.233768,12.0661],[52.24308,12.13948],[52.2439,12.14593],[52.249649,12.19065],[52.252121,12.21038],[52.25235,12.21264],[52.252441,12.2143],[52.252491,12.21691],[52.252319,12.2199],[52.249069,12.25665],[52.248631,12.26174],[52.24828,12.2661],[52.24699,12.28226],[52.24678,12.28543],[52.246658,12.2885],[52.24675,12.29159],[52.246891,12.29349],[52.247169,12.29568],[52.24765,12.29831],[52.24847,12.30145],[52.248791,12.30246],[52.249241,12.30368],[52.2495,12.30437],[52.249821,12.30523],[52.253349,12.31351],[52.253639,12.31419],[52.26292,12.33628],[52.263882,12.33891],[52.264481,12.34107],[52.26495,12.34305],[52.265339,12.34523],[52.267719,12.36252],[52.277241,12.4319],[52.27755,12.43401],[52.278061,12.43658],[52.278561,12.43851],[52.279259,12.4407],[52.2799,12.44244],[52.280529,12.44386],[52.281189,12.44522],[52.281849,12.4464],[52.28727,12.45523],[52.289341,12.45825],[52.290829,12.46031],[52.292488,12.46235],[52.295609,12.46595],[52.299759,12.47067],[52.304459,12.47609],[52.30703,12.47905],[52.30975,12.48217],[52.312519,12.48525],[52.314991,12.48782],[52.318409,12.49088],[52.323139,12.49511],[52.326832,12.49837],[52.33028,12.50148],[52.333721,12.50458],[52.335201,12.50586],[52.335838,12.50645],[52.336571,12.50723],[52.337528,12.5084],[52.33836,12.50953],[52.339062,12.51066],[52.340118,12.51264],[52.340401,12.51326],[52.340809,12.51413],[52.341591,12.51603],[52.342892,12.51968],[52.344269,12.52359],[52.347919,12.53389],[52.348782,12.53666],[52.349419,12.53922],[52.349751,12.54055],[52.349819,12.5409],[52.350552,12.54517],[52.35088,12.54797],[52.351059,12.55027],[52.351181,12.55295],[52.351189,12.55519],[52.351158,12.55847],[52.35107,12.56422],[52.350922,12.57661],[52.350681,12.59304],[52.350632,12.59599],[52.35059,12.59717],[52.350498,12.5986],[52.35041,12.59981],[52.350182,12.60171],[52.349911,12.60367],[52.349659,12.60507],[52.34938,12.60644],[52.348999,12.60803],[52.348122,12.61133],[52.344818,12.62296],[52.34457,12.62384],[52.344391,12.62446],[52.34346,12.62779],[52.342911,12.62973],[52.34272,12.63038],[52.33942,12.64209],[52.339191,12.64297],[52.338009,12.64715],[52.33754,12.64889],[52.33662,12.65224],[52.33625,12.6537],[52.335899,12.65536],[52.33567,12.65673],[52.335419,12.65854],[52.3353,12.65974],[52.335209,12.66093],[52.335152,12.66218],[52.335121,12.66309],[52.335129,12.66403],[52.335171,12.6655],[52.33527,12.66721],[52.335411,12.66883],[52.336739,12.68137],[52.336811,12.68207],[52.33744,12.68802],[52.337521,12.68873],[52.338161,12.69472],[52.33852,12.6982],[52.338631,12.69936],[52.338799,12.70087],[52.339081,12.70356],[52.339729,12.70973],[52.339951,12.71174],[52.340092,12.71322],[52.34016,12.7143],[52.34021,12.71555],[52.340221,12.71697],[52.340179,12.71834],[52.340111,12.71968],[52.34005,12.72069],[52.34,12.72143],[52.339859,12.72375],[52.33979,12.72533],[52.339771,12.72611],[52.339729,12.72804],[52.339642,12.73175],[52.339588,12.73409],[52.339611,12.73499],[52.339661,12.73628],[52.339729,12.73744],[52.340691,12.75166],[52.341099,12.7577],[52.341141,12.75848],[52.341209,12.75966],[52.34127,12.76134],[52.341259,12.76291],[52.341171,12.76464],[52.341049,12.76608],[52.340149,12.7758],[52.339111,12.78689],[52.338871,12.78991],[52.338409,12.79716],[52.338299,12.79892],[52.338009,12.80411],[52.33791,12.80584],[52.33783,12.80681],[52.337711,12.80768],[52.337509,12.80871],[52.33728,12.8097],[52.33696,12.8107],[52.33646,12.81194],[52.336109,12.81268],[52.33569,12.81338],[52.33519,12.81405],[52.33503,12.81426],[52.334839,12.81447],[52.334141,12.81513],[52.333599,12.81561],[52.332981,12.81612],[52.332359,12.81673],[52.331921,12.81723],[52.331402,12.81794],[52.330929,12.81869],[52.330479,12.81961],[52.33017,12.8204],[52.32988,12.82124],[52.328949,12.82439],[52.327759,12.82837],[52.324871,12.83843],[52.322739,12.84587],[52.320759,12.85271],[52.320202,12.85459],[52.319859,12.85564],[52.31958,12.85649],[52.31926,12.85738],[52.318802,12.85852],[52.318409,12.85941],[52.317501,12.8613],[52.31609,12.86413],[52.313278,12.86984],[52.31123,12.874],[52.31044,12.87558],[52.310322,12.87582],[52.309509,12.87753],[52.306961,12.8826],[52.305679,12.88513],[52.298168,12.90026],[52.297329,12.90199],[52.29649,12.90364],[52.295471,12.90573],[52.292488,12.9117],[52.291592,12.91353],[52.291409,12.91394],[52.291069,12.91483],[52.29092,12.9154],[52.290779,12.91593],[52.29063,12.91674],[52.29052,12.91769],[52.290482,12.91831],[52.290451,12.91879],[52.290451,12.91924],[52.290482,12.91992],[52.290581,12.92099],[52.290749,12.92183],[52.29097,12.92274],[52.291271,12.92371],[52.291809,12.92508],[52.29211,12.92599],[52.292511,12.92743],[52.292961,12.92949],[52.298199,12.95228],[52.299309,12.95707],[52.301849,12.96836],[52.30249,12.97116],[52.302849,12.97277],[52.30302,12.97345],[52.303169,12.9741],[52.303341,12.97503],[52.303471,12.97595],[52.303539,12.97658],[52.3036,12.97733],[52.303638,12.97817],[52.303379,13.00804],[52.303349,13.00964],[52.303322,13.01115],[52.303261,13.01224],[52.303169,13.01321],[52.30304,13.01414],[52.302879,13.01503],[52.30267,13.01593],[52.30154,13.01991],[52.30014,13.02485],[52.299999,13.02532],[52.299839,13.02589],[52.29945,13.0273],[52.299179,13.02828],[52.298981,13.029],[52.298851,13.02948],[52.298691,13.03007],[52.298599,13.03051],[52.298489,13.031],[52.298409,13.0315],[52.298351,13.03191],[52.298302,13.03235],[52.29826,13.03275],[52.298229,13.03316],[52.298222,13.03357],[52.29821,13.03402],[52.29821,13.03448],[52.29821,13.03477],[52.298229,13.03535],[52.298248,13.03579],[52.298309,13.03639],[52.29837,13.03689],[52.29847,13.0375],[52.29858,13.03805],[52.298691,13.0386],[52.298889,13.0393],[52.299019,13.03977],[52.29924,13.04038],[52.30006,13.04263],[52.300331,13.04338],[52.30048,13.04386],[52.300621,13.04441],[52.300739,13.04491],[52.300819,13.04535],[52.300911,13.04586],[52.30098,13.04634],[52.301041,13.04686],[52.30109,13.04735],[52.301121,13.04784],[52.30114,13.04834],[52.30114,13.04896],[52.300999,13.05311],[52.300701,13.06163],[52.300671,13.06223],[52.300499,13.06709],[52.300159,13.07772],[52.30011,13.07952],[52.300049,13.08123],[52.30003,13.08219],[52.30006,13.08293],[52.300091,13.08362],[52.300129,13.08421],[52.300179,13.08472],[52.300228,13.0852],[52.300331,13.08582],[52.300541,13.08696],[52.30196,13.09434],[52.302139,13.09526],[52.302261,13.09585],[52.302559,13.09734],[52.30267,13.09799],[52.30275,13.09857],[52.30283,13.09933],[52.30286,13.09979],[52.302898,13.10039],[52.302921,13.10091],[52.302929,13.10139],[52.302921,13.10196],[52.302879,13.10399],[52.302631,13.11285],[52.30257,13.11635],[52.30254,13.11712],[52.302391,13.12387],[52.302311,13.12553],[52.301029,13.14169],[52.300968,13.14249],[52.30085,13.14398],[52.300831,13.14447],[52.300812,13.14488],[52.300812,13.14539],[52.3008,13.14592],[52.30085,13.15346],[52.300819,13.15558],[52.3008,13.15612],[52.300781,13.15662],[52.300739,13.15714],[52.300209,13.16418],[52.299351,13.17524],[52.298931,13.18064],[52.29892,13.18097],[52.298908,13.18142],[52.298908,13.1821],[52.29892,13.18257],[52.298931,13.18301],[52.298962,13.18349],[52.299,13.18391],[52.299042,13.18431],[52.299091,13.18475],[52.299149,13.18519],[52.299221,13.18569],[52.299301,13.18608],[52.29937,13.18646],[52.299431,13.18678],[52.299561,13.18732],[52.30003,13.18925],[52.30019,13.18995],[52.30151,13.1953],[52.301579,13.19566],[52.30167,13.19612],[52.301731,13.19652],[52.3018,13.19693],[52.301849,13.1973],[52.301899,13.19773],[52.301929,13.19806],[52.30196,13.19841],[52.301979,13.19887],[52.30201,13.19935],[52.302021,13.19977],[52.302021,13.20011],[52.30201,13.20053],[52.30201,13.20089],[52.301998,13.20135],[52.301891,13.20437],[52.301739,13.20819],[52.30159,13.21251],[52.30143,13.21658],[52.301399,13.21761],[52.30101,13.22814],[52.300629,13.23876],[52.300362,13.24577],[52.300339,13.24618],[52.300331,13.24667],[52.30032,13.24713],[52.30032,13.24761],[52.30032,13.24802],[52.300331,13.24849],[52.30035,13.24896],[52.300369,13.24944],[52.300419,13.24996],[52.300461,13.25048],[52.300529,13.25102],[52.300598,13.25154],[52.300701,13.25207],[52.300812,13.25259],[52.300919,13.25312],[52.301041,13.2536],[52.30117,13.25409],[52.301331,13.25467],[52.302052,13.25682],[52.303631,13.26149],[52.306171,13.26909],[52.306549,13.27018],[52.307129,13.27192],[52.307289,13.27238],[52.30743,13.27285],[52.307571,13.27335],[52.307701,13.27383],[52.307819,13.2743],[52.307941,13.27481],[52.308048,13.27532],[52.30814,13.27581],[52.308239,13.27632],[52.308319,13.2768],[52.308392,13.27732],[52.308449,13.27784],[52.30851,13.27835],[52.308559,13.27889],[52.30859,13.27942],[52.308601,13.27994],[52.308609,13.28048],[52.30862,13.281],[52.308601,13.28153],[52.308571,13.28206],[52.308552,13.28255],[52.308498,13.28311],[52.30801,13.28764],[52.30764,13.2907],[52.307468,13.2923],[52.30743,13.29283],[52.307388,13.29332],[52.307369,13.29385],[52.30735,13.29491],[52.307259,13.2995],[52.307259,13.29988],[52.30722,13.30167],[52.307178,13.30244],[52.306789,13.30749],[52.30616,13.31553],[52.30563,13.32229],[52.305561,13.32336],[52.305519,13.32442],[52.3055,13.32547],[52.3055,13.32656],[52.305531,13.3276],[52.30558,13.32869],[52.30566,13.32976],[52.305771,13.33087],[52.305901,13.33203],[52.305969,13.33278],[52.306438,13.33712],[52.30653,13.33803],[52.307461,13.3466],[52.307571,13.34768],[52.307659,13.34873],[52.307709,13.34979],[52.307739,13.35073],[52.307751,13.35086],[52.307758,13.35191],[52.30769,13.36154],[52.30769,13.36237],[52.30761,13.37333],[52.30759,13.37434],[52.307549,13.37523],[52.307499,13.37612],[52.30743,13.37713],[52.306961,13.38394],[52.3069,13.38485],[52.306709,13.38766],[52.306549,13.38997],[52.30653,13.39038],[52.306259,13.39469],[52.30616,13.39737],[52.30603,13.40509],[52.305882,13.4151],[52.305882,13.41575],[52.305851,13.41721],[52.30584,13.41831],[52.305801,13.42242],[52.305828,13.42609],[52.305851,13.42757],[52.305931,13.43275],[52.30603,13.43915],[52.30608,13.44054],[52.306141,13.44131],[52.30616,13.4416],[52.306229,13.44238],[52.30629,13.4429],[52.306641,13.44551],[52.306839,13.4466],[52.307899,13.45187],[52.308128,13.45298],[52.30838,13.45421],[52.308769,13.45611],[52.30912,13.45786],[52.309681,13.46055],[52.309719,13.46078],[52.310341,13.4639],[52.310459,13.4645],[52.311951,13.47177],[52.312611,13.47496],[52.312679,13.47535],[52.314789,13.48567],[52.315231,13.48783],[52.316971,13.49645],[52.317291,13.49799],[52.317951,13.50123],[52.3186,13.50442],[52.31881,13.50564],[52.318932,13.50642],[52.319031,13.50718],[52.319141,13.50822],[52.31921,13.50916],[52.31926,13.51001],[52.319302,13.51074],[52.319309,13.51155],[52.319321,13.51231],[52.319309,13.51293],[52.31929,13.51368],[52.319229,13.51505],[52.318851,13.52142],[52.318569,13.52585],[52.318359,13.52936],[52.31831,13.53107],[52.318279,13.53268],[52.31834,13.53601],[52.318371,13.53704],[52.318588,13.54471],[52.318771,13.55087],[52.31889,13.55457],[52.31889,13.55478],[52.318951,13.55658],[52.31897,13.55785],[52.319111,13.56125],[52.319141,13.56241],[52.319351,13.56982],[52.319481,13.57375],[52.319611,13.57905],[52.319679,13.58139],[52.319679,13.58179],[52.319672,13.58228],[52.319649,13.58274],[52.31963,13.58324],[52.319592,13.58371],[52.31953,13.58429],[52.319469,13.58477],[52.319401,13.5853],[52.319302,13.58579],[52.319199,13.5863],[52.319111,13.58674],[52.318981,13.58716],[52.318878,13.58758],[52.318771,13.588],[52.3186,13.58854],[52.318409,13.58908],[52.314541,13.59834],[52.313011,13.60187],[52.312778,13.60244],[52.31237,13.60355],[52.312092,13.60442],[52.311699,13.60583],[52.311562,13.60662],[52.31144,13.60741],[52.31134,13.60828],[52.311218,13.60965],[52.311131,13.61102],[52.310959,13.61394],[52.310749,13.61685],[52.310581,13.61942],[52.31041,13.62219],[52.310219,13.62503],[52.310089,13.62699],[52.31007,13.6275],[52.31007,13.62845],[52.31007,13.62939],[52.310169,13.63121],[52.310249,13.63253],[52.31028,13.63349],[52.310299,13.63427],[52.31039,13.63698],[52.31065,13.64389],[52.310699,13.64603],[52.310829,13.64817],[52.31089,13.64904],[52.311039,13.65133],[52.311359,13.65437],[52.311451,13.65497],[52.311939,13.65849],[52.312649,13.66256],[52.312679,13.6627],[52.312778,13.66331],[52.31284,13.66363],[52.313709,13.66821],[52.31422,13.67078],[52.316711,13.68074],[52.318481,13.68853],[52.32093,13.69869],[52.323811,13.71061],[52.324039,13.71157],[52.324181,13.71243],[52.324329,13.71357],[52.324421,13.7144],[52.324478,13.71538],[52.324501,13.7164],[52.32439,13.72013],[52.32423,13.72539],[52.324211,13.72651],[52.324032,13.73115],[52.323959,13.73364],[52.323719,13.73806],[52.323471,13.74205],[52.32333,13.74668],[52.32317,13.75164],[52.323151,13.75306],[52.323158,13.7541],[52.3232,13.75505],[52.323231,13.75592],[52.323261,13.7567],[52.32328,13.75751],[52.32328,13.75826],[52.323261,13.75934],[52.323231,13.76009],[52.32309,13.76171],[52.323009,13.76277],[52.32291,13.76362],[52.322769,13.76464],[52.322479,13.76632],[52.321991,13.76899],[52.321259,13.77266],[52.320969,13.7741],[52.319851,13.77939],[52.31921,13.78262],[52.318939,13.78396],[52.318501,13.78613],[52.317551,13.79078],[52.317509,13.79102],[52.317341,13.79181],[52.317108,13.7929],[52.31657,13.79519],[52.315449,13.79977],[52.315079,13.80129],[52.313332,13.80844],[52.31131,13.81651],[52.310841,13.81912],[52.310638,13.82042],[52.31049,13.8217],[52.310379,13.82292],[52.310299,13.8241],[52.310242,13.82523],[52.310211,13.82659],[52.310211,13.82763],[52.31028,13.82919],[52.31039,13.83102],[52.310612,13.83456],[52.310829,13.83808],[52.311031,13.84117],[52.312199,13.85973],[52.312481,13.86492],[52.31292,13.8716],[52.313129,13.87394],[52.3134,13.87599],[52.31377,13.87848],[52.315659,13.8905],[52.316002,13.89283],[52.316109,13.89382],[52.316139,13.89395],[52.316231,13.89513],[52.316341,13.89711],[52.31636,13.89782],[52.316368,13.89843],[52.316368,13.89941],[52.316368,13.89974],[52.316319,13.9008],[52.316299,13.90126],[52.31628,13.90146],[52.316231,13.90217],[52.3162,13.90265],[52.31612,13.9035],[52.316051,13.90423],[52.315929,13.90506],[52.315769,13.90622],[52.31554,13.90753],[52.315449,13.90808],[52.31525,13.90935],[52.314678,13.91243],[52.313839,13.91717],[52.313591,13.91856],[52.313251,13.9206],[52.313,13.92272],[52.312859,13.92457],[52.312672,13.92828],[52.312469,13.93198],[52.31221,13.93685],[52.31189,13.94362],[52.311821,13.94501],[52.311699,13.94711],[52.3116,13.94925],[52.311531,13.95186],[52.311501,13.95388],[52.31152,13.95569],[52.31155,13.95647],[52.31155,13.95723],[52.31155,13.95759],[52.3116,13.95848],[52.311649,13.95939],[52.31171,13.96051],[52.31189,13.9633],[52.311958,13.96403],[52.312031,13.96476],[52.312111,13.96553],[52.312309,13.9676],[52.312679,13.97042],[52.313519,13.97695],[52.31419,13.98221],[52.315079,13.98901],[52.31559,13.99114],[52.316631,13.99535],[52.320641,14.01003],[52.321388,14.01278],[52.32254,14.01699],[52.327091,14.03302],[52.327888,14.03549],[52.32877,14.03817],[52.329361,14.03994],[52.329639,14.04085],[52.329868,14.04185],[52.330509,14.0449],[52.331181,14.04833],[52.332371,14.05431],[52.333389,14.0594],[52.33419,14.0635],[52.334278,14.06416],[52.334389,14.06499],[52.33445,14.06608],[52.33448,14.06779],[52.334492,14.06882],[52.334499,14.06961],[52.33453,14.0718],[52.33461,14.07611],[52.334621,14.07673],[52.334629,14.07948],[52.334641,14.0799],[52.33469,14.08319],[52.334709,14.08396],[52.33493,14.09404],[52.335129,14.10164],[52.335171,14.10379],[52.3353,14.10977],[52.33532,14.11047],[52.335442,14.1153],[52.335579,14.12059],[52.335781,14.12908],[52.335941,14.13594],[52.336109,14.14278],[52.336159,14.14419],[52.336269,14.14563],[52.336399,14.14698],[52.33659,14.14847],[52.336849,14.15005],[52.33704,14.15106],[52.337559,14.15323],[52.33905,14.15899],[52.33989,14.16224],[52.340832,14.16591],[52.342758,14.17332],[52.343319,14.17564],[52.343731,14.17809],[52.34388,14.18072],[52.343811,14.18341],[52.34338,14.18688],[52.342838,14.18988],[52.341709,14.19427],[52.340618,14.19713],[52.338531,14.20352],[52.337429,14.20914],[52.337021,14.2144],[52.336578,14.22596],[52.335991,14.24164],[52.33585,14.24464],[52.335499,14.24766],[52.334919,14.2509],[52.334171,14.25369],[52.333778,14.25489],[52.333649,14.25527],[52.332611,14.25821],[52.330059,14.2653],[52.328659,14.26944],[52.328289,14.27081],[52.32753,14.27394],[52.327179,14.27573],[52.326401,14.27954],[52.325371,14.28448],[52.324718,14.2877],[52.324291,14.29105],[52.32399,14.29796],[52.323471,14.31189],[52.32296,14.32586],[52.322208,14.34336],[52.322159,14.3474],[52.322029,14.35058],[52.321739,14.359],[52.321239,14.37253],[52.32095,14.37974],[52.320938,14.38024],[52.320881,14.38183],[52.32056,14.39143],[52.32029,14.39804],[52.32019,14.40253],[52.320221,14.41164],[52.32032,14.42128],[52.3204,14.43098],[52.320591,14.44889],[52.32069,14.45717],[52.320679,14.46126],[52.320641,14.46375],[52.320591,14.46598],[52.32053,14.46934],[52.320431,14.47422],[52.320419,14.475],[52.320358,14.47841],[52.32019,14.48646],[52.320011,14.49741],[52.31992,14.50324],[52.319832,14.50629],[52.319721,14.50929],[52.319519,14.51284],[52.319302,14.51651],[52.319069,14.51992],[52.318989,14.5207],[52.31889,14.52167],[52.318729,14.52265],[52.318451,14.52381],[52.318111,14.52488],[52.317699,14.52601],[52.316898,14.52836],[52.316601,14.52915],[52.316311,14.52992],[52.31617,14.53036],[52.315948,14.53115],[52.315681,14.53209],[52.315552,14.53266],[52.315231,14.53412],[52.314899,14.53588],[52.31472,14.53705],[52.314548,14.53846],[52.314442,14.53961],[52.31435,14.54102],[52.314289,14.54354],[52.31432,14.54571],[52.314381,14.54728],[52.314388,14.54786],[52.31451,14.55143],[52.314579,14.55382],[52.31461,14.55563],[52.314621,14.55709],[52.31459,14.56008],[52.314548,14.56303],[52.314499,14.56659],[52.314579,14.56822],[52.314789,14.57063],[52.314919,14.57244],[52.315189,14.57603],[52.31538,14.57823],[52.31575,14.582],[52.316051,14.5845],[52.316212,14.58597],[52.316299,14.58661],[52.316368,14.58724],[52.316441,14.58844],[52.316521,14.58954],[52.316681,14.59023],[52.316879,14.59181],[52.31699,14.59264],[52.31889,14.59981],[52.320629,14.60601],[52.322411,14.61267],[52.323078,14.6152],[52.32394,14.61827],[52.32452,14.62057],[52.324692,14.62123],[52.325001,14.62245],[52.325611,14.62534],[52.32589,14.6274],[52.326092,14.6291],[52.326199,14.63064],[52.326248,14.63312],[52.32616,14.63536],[52.325989,14.63746],[52.325851,14.63898],[52.325691,14.64077],[52.325489,14.64297],[52.325272,14.64536],[52.324631,14.65187],[52.324131,14.65751],[52.323959,14.66148],[52.32394,14.66456],[52.324268,14.66852],[52.324959,14.67386],[52.325951,14.68193],[52.32679,14.68798],[52.32782,14.69577],[52.328308,14.69948],[52.3284,14.69984],[52.3288,14.70276],[52.32935,14.70716],[52.329762,14.71018],[52.33012,14.71311],[52.33057,14.71611],[52.330719,14.71743],[52.33099,14.71987],[52.331348,14.72298],[52.331509,14.72419],[52.332329,14.73033],[52.33297,14.7351],[52.333672,14.73998],[52.334278,14.74597],[52.334839,14.74961],[52.335121,14.75285],[52.33532,14.75599],[52.335251,14.76015],[52.335251,14.76259],[52.335251,14.76802],[52.335281,14.77738],[52.335312,14.78783],[52.335312,14.79524],[52.335312,14.8001],[52.335121,14.80287],[52.33474,14.80595],[52.334,14.80992],[52.3326,14.81719],[52.331188,14.82469],[52.33181,14.82495],[52.332211,14.82512],[52.336479,14.82671],[52.33667,14.82695],[52.3367,14.82708],[52.336899,14.82746],[52.337959,14.83174],[52.33971,14.84149],[52.339722,14.8423],[52.339249,14.84258],[52.337952,14.84265],[52.33688,14.84286],[52.33585,14.8435],[52.334579,14.84484],[52.332611,14.84689],[52.33099,14.84875],[52.329708,14.84906],[52.329891,14.85048],[52.32983,14.85069],[52.329731,14.85084],[52.329269,14.85094],[52.32988,14.85503],[52.331451,14.8649],[52.332531,14.87174],[52.333229,14.87593],[52.333488,14.87793],[52.333511,14.87955],[52.333382,14.88108],[52.33308,14.8827],[52.33213,14.88645],[52.329849,14.89468],[52.327461,14.90341],[52.32626,14.90796],[52.325859,14.90951],[52.324551,14.91448],[52.323891,14.91709],[52.32333,14.92519],[52.322842,14.93262],[52.32272,14.93431],[52.32272,14.93545],[52.322701,14.93746],[52.322601,14.94129],[52.322571,14.94231],[52.322529,14.94388],[52.322491,14.94485],[52.3223,14.94668],[52.322048,14.94901],[52.322102,14.95146],[52.32214,14.95324],[52.323261,14.96119],[52.323551,14.96432],[52.32428,14.96949],[52.324532,14.97133],[52.325459,14.97816],[52.325851,14.98161],[52.326069,14.98478],[52.326172,14.9859],[52.326431,14.99044],[52.32671,14.9952],[52.327068,15.00165],[52.327141,15.00297],[52.32748,15.00926],[52.327492,15.01057],[52.3274,15.01196],[52.327202,15.0133],[52.326889,15.01427],[52.32626,15.01541],[52.326038,15.01612],[52.325581,15.01866],[52.325211,15.01991],[52.323639,15.02362],[52.321442,15.02881],[52.319618,15.03303],[52.31826,15.03632],[52.317959,15.03744],[52.317749,15.03856],[52.317539,15.03964],[52.317451,15.04015],[52.317299,15.04102],[52.3172,15.04158],[52.31712,15.04197],[52.31575,15.05026],[52.314671,15.05675],[52.31459,15.05757],[52.314362,15.0613],[52.314308,15.06239],[52.314129,15.06768],[52.314129,15.06804],[52.314018,15.07221],[52.314011,15.07287],[52.314011,15.07321],[52.31406,15.07634],[52.31406,15.07645],[52.31403,15.07699],[52.313969,15.07741],[52.313759,15.07815],[52.31358,15.07869],[52.313381,15.07915],[52.313061,15.07986],[52.31271,15.08079],[52.312401,15.08214],[52.312351,15.08315],[52.312359,15.0838],[52.3125,15.0857],[52.312778,15.08879],[52.313099,15.09145],[52.313129,15.09244],[52.313122,15.09307],[52.312889,15.09459],[52.312592,15.09667],[52.31163,15.10237],[52.311291,15.10456],[52.311131,15.10562],[52.3102,15.11167],[52.309429,15.1158],[52.309212,15.11783],[52.307449,15.12917],[52.305851,15.13853],[52.305531,15.14046],[52.305679,15.1434],[52.30682,15.15571],[52.307621,15.16481],[52.30814,15.16976],[52.308449,15.17354],[52.308491,15.17476],[52.30835,15.17634],[52.307598,15.18076],[52.30743,15.18192],[52.30706,15.18441],[52.306221,15.19006],[52.305679,15.19367],[52.305141,15.19727],[52.304531,15.20115],[52.304321,15.20249],[52.30415,15.20363],[52.304161,15.20518],[52.304138,15.2125],[52.304081,15.21744],[52.30415,15.22173],[52.304062,15.22459],[52.30323,15.22903],[52.302021,15.23598],[52.300991,15.24142],[52.300159,15.24576],[52.299431,15.24963],[52.299141,15.25119],[52.298908,15.25245],[52.298779,15.25318],[52.297981,15.25758],[52.296871,15.26387],[52.296539,15.26546],[52.296162,15.26735],[52.29599,15.26859],[52.296009,15.27042],[52.296291,15.27157],[52.296638,15.27262],[52.297279,15.27445],[52.29789,15.27607],[52.29921,15.27976],[52.299759,15.28133],[52.300079,15.28318],[52.300201,15.28427],[52.300282,15.28585],[52.30032,15.28881],[52.30032,15.29367],[52.300098,15.30026],[52.29995,15.30136],[52.29969,15.30273],[52.29908,15.30553],[52.296902,15.31165],[52.29541,15.31585],[52.293541,15.32154],[52.29134,15.32788],[52.290749,15.32981],[52.290359,15.33222],[52.290199,15.33807],[52.28923,15.34195],[52.286598,15.34702],[52.282909,15.35303],[52.28138,15.35526],[52.28064,15.35622],[52.279541,15.35927],[52.278992,15.36026],[52.278389,15.36093],[52.277431,15.36179],[52.276669,15.36254],[52.276081,15.36362],[52.274551,15.36875],[52.272739,15.37466],[52.2714,15.37907],[52.270931,15.38053],[52.270679,15.38137],[52.269402,15.38597],[52.268921,15.38743],[52.26889,15.38753],[52.268349,15.38872],[52.267929,15.38954],[52.266949,15.39075],[52.265129,15.39281],[52.263699,15.39487],[52.262249,15.39781],[52.26144,15.39949],[52.260139,15.4022],[52.258701,15.40485],[52.257919,15.40721],[52.257301,15.41013],[52.257069,15.41427],[52.25671,15.41949],[52.256142,15.42734],[52.255051,15.44218],[52.254669,15.44881],[52.253799,15.45979],[52.253811,15.46035],[52.253769,15.4612],[52.25412,15.46642],[52.254219,15.46799],[52.254169,15.469],[52.254028,15.47212],[52.25436,15.47424],[52.254292,15.47588],[52.25423,15.47617],[52.253578,15.47933],[52.25301,15.48252],[52.25317,15.4857],[52.253681,15.488],[52.255531,15.49359],[52.256592,15.49689],[52.25745,15.49939],[52.258282,15.50201],[52.25943,15.50561],[52.259819,15.50713],[52.260269,15.51073],[52.26046,15.51246],[52.26078,15.51575],[52.26115,15.5193],[52.261292,15.52025],[52.261452,15.52155],[52.262089,15.5273],[52.262291,15.52977],[52.262249,15.53163],[52.26223,15.53312],[52.26202,15.5332],[52.261929,15.53345],[52.261971,15.53376],[52.26215,15.53395],[52.261848,15.5347],[52.260761,15.53751],[52.260719,15.53759],[52.260151,15.53888],[52.256161,15.5487],[52.255932,15.54923],[52.255569,15.5501],[52.252998,15.55644],[52.252178,15.55843],[52.251789,15.56074],[52.2519,15.56195],[52.25211,15.56461],[52.253609,15.57056],[52.2556,15.57819],[52.256821,15.58265],[52.256802,15.5835],[52.257481,15.5857],[52.25787,15.58713],[52.25988,15.59026],[52.26302,15.5945],[52.266281,15.5992],[52.268742,15.60275],[52.271172,15.6061],[52.272129,15.60787],[52.272579,15.60917],[52.273281,15.61221],[52.274811,15.61984],[52.275711,15.62407],[52.277569,15.63269],[52.278252,15.63792],[52.27877,15.64118],[52.279442,15.64462],[52.280972,15.64746],[52.283218,15.64905],[52.285912,15.65071],[52.287239,15.65119],[52.289459,15.6513],[52.293442,15.6511],[52.295109,15.65142],[52.297279,15.65219],[52.299271,15.65359],[52.30196,15.65767],[52.303341,15.65965],[52.305401,15.66148],[52.308849,15.66356],[52.31028,15.66424],[52.311329,15.66496],[52.312618,15.66619],[52.31633,15.66969],[52.31855,15.67166],[52.319462,15.67272],[52.320271,15.67374],[52.320709,15.67491],[52.321201,15.67633],[52.32132,15.67753],[52.321419,15.67846],[52.321331,15.68024],[52.32106,15.68229],[52.32103,15.68387],[52.321301,15.68584],[52.321831,15.68795],[52.322472,15.69054],[52.322781,15.69181],[52.32394,15.69626],[52.3269,15.70543],[52.32933,15.71288],[52.33041,15.71597],[52.33242,15.72132],[52.332859,15.72245],[52.332901,15.72256],[52.332939,15.72267],[52.333858,15.72466],[52.33744,15.73182],[52.33881,15.73474],[52.33939,15.73652],[52.339828,15.73898],[52.341141,15.74844],[52.341801,15.75126],[52.342041,15.75225],[52.342319,15.75323],[52.342739,15.75468],[52.34322,15.75633],[52.34446,15.76096],[52.344971,15.76281],[52.345161,15.7647],[52.34523,15.76731],[52.344761,15.77811],[52.344379,15.78276],[52.34428,15.78559],[52.344429,15.78784],[52.344711,15.78962],[52.3451,15.79201],[52.345829,15.7957],[52.346882,15.7995],[52.347641,15.8022],[52.3503,15.81156],[52.3531,15.82158],[52.353291,15.82229],[52.353619,15.82347],[52.356079,15.83324],[52.35796,15.84103],[52.358109,15.84228],[52.35828,15.84537],[52.358429,15.84972],[52.35873,15.85273],[52.358829,15.85334],[52.358891,15.85361],[52.359669,15.85557],[52.36055,15.85676],[52.36179,15.85789],[52.36377,15.8595],[52.36541,15.86088],[52.366211,15.86172],[52.36718,15.86298],[52.36763,15.86378],[52.36797,15.86447],[52.368431,15.86563],[52.368519,15.86592],[52.36887,15.86689],[52.370312,15.87259],[52.37077,15.87381],[52.37096,15.87428],[52.37191,15.87661],[52.372532,15.87872],[52.372829,15.88037],[52.37294,15.88168],[52.372929,15.88325],[52.372398,15.88678],[52.37236,15.88699],[52.371841,15.89046],[52.371609,15.89246],[52.371269,15.89542],[52.371078,15.89704],[52.371719,15.903],[52.37233,15.9084],[52.372551,15.90929],[52.373058,15.91025],[52.373959,15.91201],[52.37439,15.9134],[52.37508,15.91632],[52.375851,15.91963],[52.376381,15.92256],[52.377209,15.92803],[52.37722,15.92961],[52.376469,15.93341],[52.37648,15.93775],[52.3764,15.93848],[52.375511,15.94449],[52.375252,15.94754],[52.375278,15.94982],[52.375629,15.95385],[52.375751,15.95709],[52.375839,15.95888],[52.375851,15.9591],[52.375912,15.96079],[52.37608,15.96312],[52.37645,15.96516],[52.377838,15.97023],[52.379761,15.97643],[52.379902,15.97828],[52.37991,15.97955],[52.379452,15.98388],[52.380009,15.99173],[52.380421,15.99552],[52.380459,15.99832],[52.38055,16.001459],[52.380169,16.00466],[52.379589,16.007641],[52.378349,16.01523],[52.376911,16.02301],[52.376369,16.02775],[52.376301,16.02907],[52.376301,16.03022],[52.376331,16.032221],[52.376431,16.035379],[52.376789,16.04607],[52.377239,16.057249],[52.377392,16.06572],[52.377522,16.07852],[52.37772,16.09374],[52.37756,16.09358],[52.377369,16.093679],[52.377289,16.09392],[52.3773,16.09408],[52.375912,16.09433],[52.374691,16.094549],[52.3713,16.09503],[52.37112,16.09507],[52.366039,16.096029],[52.36264,16.096661],[52.36253,16.097219],[52.362289,16.09865],[52.36216,16.099291],[52.361931,16.099661],[52.36129,16.09997],[52.360569,16.100269],[52.360031,16.10107],[52.359779,16.102039],[52.359699,16.10269],[52.3596,16.103861],[52.359631,16.104851],[52.36039,16.10857],[52.36195,16.117229],[52.362999,16.123461],[52.36385,16.130489],[52.364521,16.136801],[52.365608,16.147249],[52.367062,16.161501],[52.367298,16.16527],[52.36742,16.168301],[52.367451,16.172119],[52.367611,16.185591],[52.36763,16.187149],[52.367821,16.19273],[52.368038,16.19655],[52.368622,16.20146],[52.36945,16.20701],[52.372471,16.222179],[52.375481,16.238211],[52.375839,16.24123],[52.376221,16.244749],[52.376629,16.249599],[52.37714,16.26313],[52.37738,16.270679],[52.377781,16.279659],[52.37822,16.288481],[52.379379,16.309139],[52.380039,16.32155],[52.38118,16.34289],[52.381981,16.356291],[52.38266,16.36916],[52.38324,16.37723],[52.383869,16.383631],[52.38559,16.396589],[52.38728,16.408449],[52.388142,16.41563],[52.388851,16.42271],[52.389351,16.428341],[52.38969,16.434139],[52.39006,16.44529],[52.390018,16.448879],[52.389881,16.453251],[52.389729,16.45645],[52.3895,16.459141],[52.38924,16.46138],[52.388569,16.46607],[52.387341,16.47382],[52.38707,16.47554],[52.386841,16.477989],[52.386749,16.479481],[52.3867,16.48031],[52.386551,16.483351],[52.386478,16.486731],[52.38657,16.491039],[52.386761,16.494961],[52.387081,16.49999],[52.387459,16.50783],[52.387501,16.511551],[52.387451,16.514919],[52.387249,16.520399],[52.3867,16.52607],[52.38604,16.531031],[52.385269,16.5352],[52.384708,16.53763],[52.383999,16.540649],[52.38084,16.55183],[52.37812,16.56093],[52.3773,16.563681],[52.376591,16.56605],[52.373539,16.575661],[52.370152,16.584909],[52.3647,16.59923],[52.360741,16.60952],[52.357101,16.61961],[52.35582,16.62454],[52.355042,16.628139],[52.353432,16.638],[52.35215,16.64694],[52.350979,16.654249],[52.35059,16.656679],[52.349979,16.660419],[52.349369,16.664169],[52.34903,16.66687],[52.348579,16.67141],[52.348389,16.67975],[52.34893,16.691719],[52.349468,16.70499],[52.349819,16.713869],[52.349899,16.715731],[52.35001,16.718731],[52.350319,16.726601],[52.350422,16.729759],[52.350491,16.73181],[52.350491,16.73185],[52.350491,16.731979],[52.350491,16.736811],[52.350491,16.74202],[52.350479,16.75079],[52.350521,16.761419],[52.350479,16.77059],[52.35043,16.778931],[52.35046,16.795071],[52.35033,16.81012],[52.3503,16.826269],[52.350319,16.83869],[52.35041,16.841261],[52.350609,16.84532],[52.350651,16.846121],[52.35088,16.849079],[52.35112,16.85165],[52.35257,16.863581],[52.354179,16.876539],[52.3545,16.879709],[52.354691,16.88483],[52.354698,16.88644],[52.354641,16.888269],[52.354519,16.89225],[52.354389,16.89537],[52.354179,16.897949],[52.35379,16.901699],[52.353741,16.90243],[52.353352,16.90744],[52.35313,16.91028],[52.35281,16.914261],[52.352631,16.916651],[52.352428,16.91897],[52.3521,16.923109],[52.350979,16.937201],[52.349918,16.94964],[52.3494,16.956039],[52.348999,16.961029],[52.348652,16.9655],[52.348,16.973419],[52.347019,16.98617],[52.346531,16.99177],[52.345741,17.0009],[52.345322,17.004881],[52.345009,17.007601],[52.344269,17.01376],[52.34333,17.0207],[52.342529,17.0254],[52.34095,17.034031],[52.337791,17.049919],[52.334721,17.0646],[52.331821,17.078711],[52.329639,17.087839],[52.32906,17.090099],[52.32856,17.09207],[52.327869,17.094801],[52.326542,17.099489],[52.324188,17.107441],[52.32201,17.114479],[52.318722,17.12499],[52.31752,17.12882],[52.31514,17.136431],[52.312561,17.144501],[52.311531,17.1478],[52.311031,17.14967],[52.310692,17.150949],[52.310612,17.1513],[52.310101,17.15361],[52.309872,17.15439],[52.309158,17.157721],[52.308281,17.163059],[52.307789,17.166821],[52.307411,17.170919],[52.307159,17.17539],[52.307072,17.179951],[52.307159,17.18524],[52.30761,17.190941],[52.307919,17.19392],[52.30904,17.201851],[52.309639,17.20735],[52.310059,17.212879],[52.310219,17.223009],[52.310131,17.24172],[52.310131,17.25379],[52.310059,17.265499],[52.310009,17.2722],[52.31004,17.278469],[52.310001,17.296169],[52.309929,17.305731],[52.309929,17.32172],[52.309841,17.34235],[52.309818,17.35442],[52.30991,17.357189],[52.310108,17.362419],[52.311218,17.376181],[52.311531,17.37855],[52.312019,17.38233],[52.312881,17.38825],[52.314861,17.399639],[52.317001,17.41197],[52.317711,17.417191],[52.318211,17.421301],[52.318691,17.42766],[52.31892,17.4317],[52.319038,17.436029],[52.31905,17.440769],[52.318821,17.454201],[52.31863,17.468769],[52.318409,17.48267],[52.31818,17.49605],[52.317921,17.50906],[52.317699,17.51322],[52.316971,17.521919],[52.316311,17.526711],[52.31567,17.530861],[52.315208,17.53367],[52.31498,17.53483],[52.314461,17.53759],[52.31406,17.539631],[52.313801,17.540899],[52.31295,17.54521],[52.312279,17.548889],[52.31216,17.549549],[52.311619,17.55254],[52.31144,17.553499],[52.310799,17.55788],[52.31052,17.56024],[52.3102,17.563971],[52.30999,17.56748],[52.30975,17.57126],[52.30954,17.574511],[52.30933,17.57836],[52.309101,17.58201],[52.30883,17.58531],[52.308441,17.588831],[52.307899,17.592569],[52.30722,17.596371],[52.306309,17.600479],[52.305389,17.6045],[52.304482,17.60854],[52.303532,17.612631],[52.302601,17.61665],[52.301689,17.620621],[52.300812,17.624559],[52.299938,17.628269],[52.299042,17.63216],[52.298119,17.6362],[52.297241,17.639971],[52.29636,17.64382],[52.295509,17.64756],[52.294621,17.65148],[52.293709,17.65538],[52.29277,17.659121],[52.29174,17.662821],[52.290619,17.666571],[52.289539,17.66995],[52.288361,17.673321],[52.287079,17.67683],[52.285419,17.68096],[52.284302,17.683741],[52.282619,17.687811],[52.281368,17.690929],[52.279861,17.694639],[52.27853,17.697969],[52.27705,17.70166],[52.275711,17.70507],[52.274361,17.70862],[52.272991,17.712521],[52.271801,17.716221],[52.270828,17.719391],[52.26992,17.72262],[52.269112,17.72566],[52.268009,17.73033],[52.267029,17.73484],[52.266171,17.739389],[52.26545,17.74361],[52.264851,17.74773],[52.264339,17.75156],[52.26395,17.755159],[52.263531,17.75952],[52.2631,17.764071],[52.262661,17.76853],[52.262291,17.77253],[52.261848,17.776291],[52.261261,17.780161],[52.260521,17.78458],[52.259731,17.78904],[52.25893,17.7936],[52.258129,17.79822],[52.25724,17.80298],[52.256351,17.80759],[52.25547,17.81222],[52.254551,17.81682],[52.25354,17.82229],[52.25312,17.824261],[52.252941,17.82514],[52.25259,17.82683],[52.252419,17.827629],[52.251381,17.83252],[52.2509,17.83478],[52.249779,17.83993],[52.248749,17.84458],[52.247639,17.84947],[52.246498,17.85438],[52.245319,17.8594],[52.24419,17.86404],[52.24305,17.868641],[52.24176,17.8738],[52.240639,17.87789],[52.239029,17.88295],[52.23682,17.889059],[52.235039,17.894119],[52.23349,17.898911],[52.23222,17.903549],[52.23119,17.90774],[52.23016,17.91255],[52.229259,17.91707],[52.228359,17.921789],[52.22744,17.92672],[52.226559,17.931179],[52.225601,17.935749],[52.224491,17.940611],[52.223751,17.943661],[52.22287,17.946989],[52.222279,17.949011],[52.221851,17.95014],[52.221439,17.951441],[52.221069,17.953329],[52.22031,17.956221],[52.218899,17.96109],[52.2174,17.966471],[52.216011,17.97163],[52.21492,17.97599],[52.21381,17.980471],[52.212631,17.98546],[52.21167,17.98987],[52.210781,17.99387],[52.20961,17.99971],[52.20866,18.004471],[52.20779,18.008881],[52.206749,18.013941],[52.20602,18.017241],[52.205151,18.02088],[52.204651,18.02261],[52.204361,18.023609],[52.203629,18.026171],[52.20158,18.032551],[52.199871,18.03726],[52.198181,18.04203],[52.196732,18.046591],[52.19548,18.051359],[52.19442,18.056259],[52.19352,18.06118],[52.19257,18.06632],[52.19146,18.07118],[52.190239,18.075649],[52.18866,18.080429],[52.187099,18.085381],[52.18586,18.09009],[52.1847,18.094481],[52.183529,18.099291],[52.182571,18.10388],[52.181751,18.108379],[52.180939,18.11359],[52.180149,18.11895],[52.17931,18.124451],[52.178391,18.12904],[52.177391,18.133511],[52.176289,18.13798],[52.175289,18.142071],[52.174252,18.146379],[52.173119,18.15097],[52.172169,18.15522],[52.171021,18.160151],[52.17004,18.164909],[52.169079,18.1696],[52.168129,18.17441],[52.16724,18.179291],[52.166359,18.18424],[52.165501,18.18927],[52.164799,18.193991],[52.164261,18.19729],[52.163601,18.201611],[52.163479,18.202221],[52.163288,18.203501],[52.162941,18.205879],[52.162628,18.20842],[52.162441,18.210489],[52.162209,18.212669],[52.162029,18.21505],[52.161758,18.218439],[52.161381,18.223881],[52.161018,18.229349],[52.160629,18.234871],[52.160221,18.24069],[52.15979,18.24567],[52.15921,18.250759],[52.158298,18.256281],[52.157089,18.26198],[52.15686,18.262859],[52.156521,18.264111],[52.156021,18.26605],[52.155621,18.26754],[52.155529,18.267851],[52.153629,18.273861],[52.151821,18.279779],[52.151131,18.28227],[52.150261,18.28594],[52.149189,18.29163],[52.14827,18.299],[52.147739,18.303749],[52.147419,18.307131],[52.146671,18.31233],[52.145721,18.31716],[52.14344,18.32645],[52.1422,18.33209],[52.141201,18.3377],[52.14061,18.342541],[52.140171,18.348499],[52.14003,18.353571],[52.140141,18.359501],[52.140388,18.36388],[52.14098,18.369869],[52.141541,18.37516],[52.141998,18.381081],[52.142281,18.386061],[52.142429,18.390619],[52.142551,18.39543],[52.142719,18.40027],[52.14312,18.40498],[52.143608,18.409361],[52.144421,18.414459],[52.145329,18.419029],[52.1464,18.42411],[52.14727,18.42831],[52.148239,18.432989],[52.14922,18.437771],[52.15012,18.4422],[52.150902,18.446541],[52.151581,18.450729],[52.1521,18.4548],[52.152512,18.46007],[52.152641,18.46566],[52.152561,18.470949],[52.152241,18.476339],[52.15163,18.48201],[52.150822,18.487101],[52.149769,18.492439],[52.148651,18.497259],[52.147419,18.502279],[52.1464,18.50639],[52.145149,18.511869],[52.144218,18.516371],[52.14336,18.521139],[52.142601,18.526649],[52.14204,18.531811],[52.14164,18.5376],[52.141411,18.54336],[52.141399,18.54904],[52.141472,18.55442],[52.141609,18.55991],[52.141731,18.565041],[52.141842,18.569691],[52.141979,18.57476],[52.142101,18.57938],[52.14212,18.584629],[52.14204,18.589439],[52.141811,18.594589],[52.141441,18.59964],[52.141029,18.603769],[52.140869,18.60504],[52.140541,18.607731],[52.140091,18.610941],[52.140011,18.61146],[52.139519,18.614491],[52.138969,18.617519],[52.13818,18.62149],[52.13723,18.62561],[52.135731,18.631559],[52.135681,18.63175],[52.134151,18.63732],[52.13364,18.63928],[52.13271,18.64283],[52.13187,18.6465],[52.13039,18.654449],[52.129341,18.660379],[52.128231,18.66544],[52.127201,18.669399],[52.12553,18.674879],[52.123859,18.680531],[52.12262,18.685539],[52.121559,18.691231],[52.121071,18.694349],[52.120071,18.702909],[52.1194,18.708441],[52.118649,18.71439],[52.118198,18.71767],[52.1171,18.723419],[52.116119,18.727289],[52.115021,18.731091],[52.114159,18.733749],[52.112358,18.73856],[52.110241,18.74337],[52.10701,18.74958],[52.104431,18.75449],[52.102268,18.75923],[52.1003,18.76413],[52.09827,18.769489],[52.096371,18.7742],[52.09589,18.775391],[52.094379,18.77862],[52.093109,18.781071],[52.091259,18.78434],[52.089241,18.7875],[52.08601,18.791849],[52.082939,18.79541],[52.080631,18.79825],[52.077099,18.80315],[52.07399,18.80831],[52.072338,18.811621],[52.071739,18.81282],[52.070518,18.81525],[52.0704,18.8155],[52.068199,18.82025],[52.06596,18.82456],[52.063099,18.82938],[52.0588,18.835791],[52.055489,18.840611],[52.052441,18.845091],[52.049061,18.850071],[52.045551,18.85527],[52.042881,18.859631],[52.04081,18.8634],[52.03949,18.8661],[52.038158,18.86907],[52.03714,18.8715],[52.035439,18.8759],[52.034222,18.879629],[52.033932,18.880529],[52.0327,18.88485],[52.031189,18.89113],[52.029381,18.899929],[52.02813,18.906179],[52.026958,18.911909],[52.025688,18.916809],[52.024479,18.92082],[52.02261,18.926399],[52.019821,18.93458],[52.017609,18.941151],[52.015862,18.94672],[52.014771,18.950951],[52.013149,18.95867],[52.011902,18.96446],[52.01046,18.969851],[52.008881,18.974689],[52.006538,18.98114],[52.00449,18.987221],[52.003071,18.991859],[52.001549,18.997669],[52.00045,19.002541],[51.999458,19.00773],[51.998039,19.01741],[51.99765,19.02055],[51.997459,19.02207],[51.99728,19.02351],[51.996399,19.0298],[51.995399,19.035801],[51.995022,19.03763],[51.994659,19.039221],[51.994148,19.04134],[51.99337,19.04438],[51.992531,19.047159],[51.991379,19.050579],[51.989731,19.054779],[51.98848,19.05761],[51.987129,19.0604],[51.985611,19.06324],[51.984531,19.06517],[51.97858,19.075291],[51.975769,19.08061],[51.973869,19.08461],[51.971889,19.08955],[51.970181,19.0944],[51.96793,19.10198],[51.966339,19.10762],[51.964859,19.112471],[51.96376,19.11552],[51.96101,19.12225],[51.95937,19.12607],[51.957458,19.13121],[51.95565,19.137289],[51.954498,19.142019],[51.952572,19.151661],[51.951248,19.15736],[51.94973,19.162621],[51.946812,19.171141],[51.94466,19.177509],[51.94305,19.183149],[51.941799,19.188761],[51.94101,19.193199],[51.940472,19.19698],[51.939911,19.20273],[51.93969,19.20854],[51.93964,19.214411],[51.93972,19.222719],[51.93969,19.22901],[51.93951,19.23262],[51.939289,19.235571],[51.93895,19.239189],[51.938301,19.244301],[51.937191,19.25193],[51.93644,19.25717],[51.935619,19.262699],[51.935001,19.266729],[51.934132,19.271299],[51.932522,19.278561],[51.931179,19.284679],[51.930161,19.289539],[51.92918,19.29582],[51.928619,19.301411],[51.928188,19.309851],[51.92783,19.31459],[51.927368,19.31875],[51.92696,19.321699],[51.92617,19.32612],[51.925098,19.33124],[51.924011,19.336901],[51.92337,19.34087],[51.922699,19.345881],[51.922249,19.349649],[51.922031,19.351789],[51.922001,19.35211],[51.921799,19.354139],[51.9217,19.35556],[51.921539,19.35808],[51.921391,19.360901],[51.921329,19.36195],[51.9212,19.36455],[51.921082,19.37055],[51.921101,19.375401],[51.921139,19.383471],[51.921082,19.38681],[51.920979,19.390619],[51.92075,19.393961],[51.920269,19.39966],[51.91922,19.40678],[51.918449,19.4112],[51.917461,19.41625],[51.91684,19.41865],[51.916069,19.42169],[51.912361,19.432541],[51.910278,19.43788],[51.90992,19.438749],[51.909222,19.44047],[51.90802,19.44343],[51.905972,19.44853],[51.90398,19.45363],[51.902161,19.45896],[51.901321,19.46212],[51.90086,19.464001],[51.900398,19.46608],[51.899971,19.46797],[51.89933,19.4711],[51.898151,19.47998],[51.89793,19.483231],[51.897812,19.48616],[51.89777,19.49305],[51.898151,19.51585],[51.898129,19.516371],[51.898041,19.5182],[51.897861,19.522011],[51.896622,19.536489],[51.889702,19.57382],[51.888969,19.57979],[51.88868,19.58357],[51.888618,19.585079],[51.888519,19.58819],[51.88858,19.591181],[51.888599,19.591881],[51.888729,19.594959],[51.888889,19.598301],[51.889099,19.601311],[51.88942,19.60549],[51.889549,19.60721],[51.88998,19.612881],[51.890079,19.614189],[51.890732,19.623899],[51.89077,19.62446],[51.891209,19.626949],[51.891251,19.627399],[51.891319,19.627939],[51.891418,19.62862],[51.891602,19.62936],[51.89183,19.630011],[51.89201,19.63035],[51.892159,19.63055],[51.892429,19.63093],[51.892792,19.63135],[51.893051,19.631559],[51.893471,19.6318],[51.89389,19.631929],[51.894218,19.631941],[51.894482,19.63191],[51.894711,19.63187],[51.894878,19.631781],[51.895161,19.631651],[51.89534,19.631531],[51.89547,19.631451],[51.895649,19.6313],[51.896198,19.630911],[51.89645,19.63073],[51.896679,19.63059],[51.896992,19.630381],[51.89743,19.630079],[51.898602,19.629339],[51.899212,19.628929],[51.900139,19.628349],[51.901081,19.62775],[51.90221,19.627171],[51.904461,19.62602],[51.90659,19.625019],[51.90855,19.624161],[51.910789,19.62328],[51.911888,19.62302],[51.912621,19.62285],[51.912819,19.62285],[51.913059,19.623051],[51.914322,19.625601],[51.914452,19.62591],[51.914661,19.626341],[51.9161,19.628691],[51.925201,19.644131],[51.925949,19.64506],[51.92897,19.647631],[51.93063,19.64908],[51.931019,19.649509],[51.931149,19.6497],[51.932259,19.652],[51.932751,19.65308],[51.943272,19.676041],[51.94331,19.676121],[51.94688,19.68264],[51.949989,19.68832],[51.95681,19.700911],[51.958549,19.704069],[51.9589,19.70484],[51.959049,19.705549],[51.95969,19.71069],[51.960819,19.723619],[51.96109,19.726681],[51.961231,19.728161],[51.961239,19.728291],[51.961361,19.7293],[51.961571,19.7299],[51.961811,19.7304],[51.962719,19.731529],[51.96312,19.732019],[51.963539,19.73242],[51.964809,19.733271],[51.965191,19.733509],[51.965439,19.73369],[51.965641,19.7339],[51.96574,19.73403],[51.9664,19.735121],[51.970589,19.742229],[51.973179,19.74663],[51.979118,19.75663],[51.993279,19.7805],[51.99371,19.781219],[52.001862,19.79495],[52.002369,19.79583],[52.0056,19.80126],[52.005829,19.8018],[52.006008,19.802219],[52.006229,19.802891],[52.006248,19.802971],[52.006939,19.8053],[52.00761,19.8076],[52.008629,19.811211],[52.008709,19.811489],[52.008808,19.811819],[52.0089,19.812111],[52.00927,19.81325],[52.009628,19.81402],[52.01593,19.82633],[52.023281,19.84086],[52.02507,19.84432],[52.026192,19.846519],[52.039162,19.87204],[52.039261,19.87224],[52.040749,19.87517],[52.041199,19.87606],[52.041538,19.87673],[52.042561,19.878771],[52.042839,19.87924],[52.044312,19.88221],[52.048222,19.88994],[52.04845,19.890381],[52.048969,19.89139],[52.04916,19.891769],[52.049259,19.89193],[52.04937,19.89213],[52.049419,19.892179],[52.04969,19.89249],[52.050049,19.892771],[52.050961,19.893471],[52.05225,19.89448],[52.05455,19.89625],[52.05455,19.896259],[52.059502,19.900061],[52.060539,19.90085],[52.06316,19.90287],[52.068199,19.90674],[52.068508,19.906981],[52.069099,19.907419],[52.07645,19.91301],[52.076649,19.91317],[52.0769,19.91337],[52.076969,19.913429],[52.077579,19.9139],[52.07782,19.91408],[52.07843,19.91453],[52.079029,19.91498],[52.080231,19.915899],[52.08263,19.917749],[52.083,19.91802],[52.08308,19.918079],[52.084671,19.919279],[52.08535,19.9198],[52.085579,19.919941],[52.085819,19.920059],[52.08609,19.920179],[52.086391,19.92024],[52.086731,19.920271],[52.087021,19.920231],[52.087231,19.920231],[52.087421,19.920259],[52.087471,19.920349],[52.087521,19.920389],[52.087582,19.920401],[52.08765,19.92037],[52.087688,19.920309],[52.08773,19.920231],[52.08786,19.92013],[52.088089,19.920059],[52.088181,19.92005],[52.09103,19.91968],[52.091709,19.91959],[52.092682,19.91946],[52.094219,19.919241],[52.095741,19.919029],[52.096741,19.9189],[52.09774,19.91877],[52.09972,19.918501],[52.10078,19.91835],[52.101028,19.91835],[52.101631,19.918409],[52.10215,19.91857],[52.1026,19.918779],[52.10284,19.91894],[52.103149,19.919161],[52.103401,19.91938],[52.103729,19.919701],[52.10397,19.919991],[52.104198,19.92029],[52.10445,19.920679],[52.104691,19.921129],[52.104961,19.92174],[52.105209,19.92234],[52.105961,19.924509],[52.106411,19.92577],[52.107052,19.92757],[52.107109,19.927719],[52.107231,19.928011],[52.107349,19.928221],[52.10754,19.928579],[52.107731,19.92885],[52.107929,19.929119],[52.108089,19.929279],[52.108452,19.929609],[52.10873,19.929819],[52.109039,19.929991],[52.109371,19.93012],[52.109699,19.930189],[52.111229,19.93025],[52.111641,19.930269],[52.11277,19.930321],[52.112801,19.930321],[52.114609,19.930401],[52.116451,19.93051],[52.116501,19.930519],[52.117069,19.93054],[52.11721,19.930559],[52.117699,19.930639],[52.117962,19.93071],[52.118198,19.93082],[52.118259,19.930849],[52.118629,19.931061],[52.1189,19.93124],[52.119511,19.93181],[52.119598,19.93195],[52.11964,19.93211],[52.119652,19.93228],[52.11964,19.932501],[52.11948,19.93355],[52.1194,19.934561],[52.11937,19.934799],[52.119209,19.9359],[52.11879,19.938721],[52.11866,19.939581],[52.118591,19.94043],[52.118462,19.943199],[52.11832,19.94618],[52.118279,19.947439],[52.118191,19.94982],[52.118069,19.952339],[52.118,19.95396],[52.117882,19.95689],[52.11755,19.96439],[52.117512,19.965401],[52.117512,19.96545],[52.117512,19.9655],[52.117458,19.966459],[52.11742,19.967331],[52.117371,19.968451],[52.117241,19.971201],[52.11721,19.97176],[52.11705,19.974291],[52.11705,19.974951],[52.117062,19.97537],[52.117069,19.97596],[52.11718,19.976419],[52.118179,19.980631],[52.12101,19.99221],[52.12315,20.00086],[52.124432,20.006109],[52.125622,20.010969],[52.125771,20.0116],[52.128719,20.02354],[52.13121,20.03376],[52.137619,20.05954],[52.137859,20.06052],[52.140442,20.07085],[52.14724,20.097931],[52.14912,20.105459],[52.150661,20.111549],[52.151909,20.11652],[52.15295,20.120399],[52.153191,20.12104],[52.153542,20.121799],[52.154518,20.12351],[52.155048,20.12418],[52.15556,20.12472],[52.156071,20.125191],[52.163651,20.130739],[52.16431,20.131229],[52.169559,20.13509],[52.17205,20.136921],[52.18475,20.14629],[52.185478,20.146959],[52.18557,20.147079],[52.186081,20.147791],[52.190811,20.155861],[52.195271,20.163349],[52.199051,20.169781],[52.20237,20.17544],[52.203159,20.176781],[52.21146,20.19092],[52.215248,20.197371],[52.217178,20.20079],[52.2178,20.20186],[52.218819,20.203791],[52.21891,20.204121],[52.218868,20.20435],[52.218529,20.2052],[52.21241,20.216709],[52.21188,20.21773],[52.211472,20.218559],[52.211281,20.21888],[52.210812,20.2201],[52.210548,20.22089],[52.210312,20.221519],[52.20911,20.22497],[52.20903,20.22521],[52.207981,20.228109],[52.206749,20.23156],[52.20615,20.23431],[52.206039,20.235769],[52.20602,20.237249],[52.206169,20.23875],[52.206409,20.240061],[52.20697,20.2428],[52.207569,20.24559],[52.207909,20.246861],[52.20834,20.248211],[52.20892,20.249411],[52.209549,20.250441],[52.20974,20.250799],[52.209721,20.250919],[52.20974,20.25104],[52.209789,20.251129],[52.209862,20.251181],[52.20993,20.251181],[52.209969,20.25116],[52.21006,20.2512],[52.210258,20.25141],[52.210758,20.251921],[52.210999,20.252069],[52.212631,20.253281],[52.214298,20.254391],[52.223068,20.26042],[52.22393,20.26133],[52.224411,20.26195],[52.224731,20.26248],[52.225361,20.2637],[52.22538,20.263929],[52.225479,20.264299],[52.225689,20.26482],[52.226009,20.265989],[52.226021,20.26605],[52.226261,20.267429],[52.226398,20.267891],[52.226471,20.26993],[52.226421,20.270821],[52.225651,20.27956],[52.22266,20.312559],[52.220852,20.33256],[52.220421,20.33741],[52.220032,20.34166],[52.219318,20.349609],[52.218319,20.36063],[52.217331,20.371441],[52.21656,20.37977],[52.215939,20.38644],[52.21373,20.41028],[52.2132,20.416161],[52.21209,20.42832],[52.211891,20.430229],[52.2117,20.432301],[52.209419,20.45714],[52.208721,20.46471],[52.206589,20.488091],[52.205059,20.50466],[52.20435,20.512369],[52.204269,20.51329],[52.202881,20.52837],[52.201641,20.54178],[52.201469,20.54582],[52.20039,20.571939],[52.199059,20.60359],[52.19899,20.60586],[52.19899,20.605989],[52.198978,20.60627],[52.198841,20.60903],[52.198799,20.610081],[52.198711,20.612419],[52.198582,20.61577],[52.198528,20.616989],[52.198528,20.61718],[52.198502,20.6178],[52.199001,20.61994],[52.19936,20.62149],[52.19968,20.62286],[52.199902,20.62373],[52.199982,20.62405],[52.200249,20.62512],[52.20163,20.6308],[52.20644,20.650591],[52.207199,20.653879],[52.207699,20.656031],[52.207859,20.656719],[52.208321,20.659109],[52.208889,20.66353],[52.208988,20.66445],[52.21006,20.673531],[52.2113,20.68404],[52.21133,20.684271],[52.211842,20.688919],[52.212139,20.691401],[52.21273,20.69622],[52.212811,20.701071],[52.2118,20.74048],[52.21143,20.75633],[52.211239,20.7649],[52.211151,20.76845],[52.211121,20.769911],[52.21088,20.778219],[52.210678,20.78578],[52.210579,20.788231],[52.21056,20.788971],[52.21051,20.791401],[52.210468,20.793091],[52.210419,20.794769],[52.210381,20.79623],[52.210331,20.797279],[52.210232,20.801121],[52.21014,20.804319],[52.210041,20.80776],[52.209999,20.809271],[52.209999,20.80971],[52.21003,20.81019],[52.210091,20.81061],[52.210178,20.81123],[52.211182,20.817699],[52.21244,20.82584],[52.212551,20.826891],[52.2131,20.83094],[52.213821,20.835529],[52.214272,20.83843],[52.214321,20.838869],[52.214359,20.839069],[52.214451,20.83972],[52.214741,20.841749],[52.21489,20.843809],[52.21524,20.84981],[52.215832,20.859699],[52.215839,20.85993],[52.2159,20.861],[52.215961,20.861971],[52.216,20.8626],[52.216141,20.86487],[52.216148,20.86503],[52.21632,20.86783],[52.216351,20.86927],[52.21637,20.871429],[52.216381,20.873899],[52.216389,20.874929],[52.216381,20.877769],[52.216381,20.880011],[52.21637,20.88043],[52.216381,20.885969],[52.216389,20.8887],[52.216381,20.89061],[52.216358,20.89253],[52.21637,20.89607],[52.216389,20.896629],[52.216431,20.89715],[52.21648,20.89769],[52.216572,20.89847],[52.21677,20.90044],[52.216808,20.90089],[52.216869,20.90147],[52.21693,20.90193],[52.217159,20.904011],[52.217209,20.90428],[52.217579,20.906019],[52.218021,20.90799],[52.218342,20.90933],[52.218399,20.90958],[52.218559,20.910271],[52.219501,20.914419],[52.219879,20.91584],[52.219921,20.91605],[52.219971,20.91625],[52.220039,20.91663],[52.220539,20.91868],[52.221008,20.92062],[52.221161,20.921289],[52.22171,20.92355],[52.221939,20.92453],[52.22208,20.925131],[52.2225,20.926991],[52.222778,20.9282],[52.22319,20.929831],[52.22324,20.930031],[52.223289,20.93021],[52.223671,20.93152],[52.223881,20.93219],[52.224041,20.932739],[52.224998,20.93623],[52.22514,20.93675],[52.225189,20.93696],[52.22562,20.93853],[52.225719,20.939369],[52.225761,20.939659],[52.225788,20.940701],[52.225868,20.941589],[52.22588,20.94166],[52.225929,20.94198],[52.226311,20.94463],[52.226921,20.948071],[52.22739,20.951281],[52.227451,20.95166],[52.227482,20.95199],[52.227638,20.95425],[52.22773,20.95582],[52.22773,20.956141],[52.227692,20.956659],[52.227692,20.95694],[52.227539,20.95694],[52.226009,20.95731],[52.225349,20.957581],[52.2243,20.957781],[52.22422,20.957821],[52.22353,20.957991],[52.22324,20.95809],[52.22245,20.95833],[52.222252,20.95842],[52.222012,20.95859],[52.22086,20.95952],[52.220581,20.95965],[52.22002,20.95978],[52.21814,20.959909],[52.217659,20.95998],[52.216461,20.9606],[52.216331,20.96073],[52.21619,20.96109],[52.216179,20.961399],[52.216221,20.96166],[52.216572,20.962601],[52.21703,20.963711],[52.21759,20.96524],[52.219391,20.970369],[52.219479,20.97084],[52.219479,20.971251],[52.219471,20.971371],[52.21946,20.97147],[52.218948,20.972969],[52.218861,20.973249],[52.21875,20.973551],[52.217621,20.976971],[52.217541,20.977221],[52.217461,20.977461],[52.2164,20.980619],[52.216301,20.980909],[52.21624,20.98107],[52.216228,20.9811],[52.216179,20.981239],[52.21611,20.981449],[52.216042,20.981649],[52.215981,20.981911],[52.215961,20.982149],[52.215969,20.98246],[52.215981,20.982679],[52.216042,20.983801],[52.216061,20.9842],[52.216091,20.98497],[52.216221,20.987],[52.216228,20.98728],[52.216221,20.987591],[52.216209,20.98782],[52.21619,20.98806],[52.216179,20.98838],[52.216179,20.98884],[52.216259,20.989929],[52.21627,20.990259],[52.21632,20.99095],[52.216511,20.99444],[52.216801,20.999901],[52.21682,21.000429],[52.217121,21.004539],[52.21719,21.00563],[52.21727,21.00716],[52.217281,21.00845],[52.217209,21.01022],[52.217159,21.01169],[52.216999,21.01438],[52.216999,21.0149],[52.21703,21.015421],[52.217079,21.01594],[52.217171,21.01647],[52.217449,21.0177],[52.21759,21.01844],[52.21767,21.018801],[52.217861,21.019581],[52.21793,21.01984],[52.218399,21.021761],[52.219059,21.024469],[52.219372,21.02578],[52.219742,21.027309],[52.21994,21.0282],[52.220669,21.03112],[52.221458,21.034109],[52.222229,21.037251],[52.22266,21.03857],[52.223,21.03944],[52.223148,21.039841],[52.223301,21.040211],[52.223511,21.040739],[52.223701,21.04143],[52.223789,21.04184],[52.22403,21.0431],[52.22443,21.045059],[52.225712,21.05121],[52.22612,21.053249],[52.226509,21.055201],[52.22686,21.056789],[52.2271,21.057699],[52.228149,21.061621],[52.228378,21.06255],[52.228901,21.06455],[52.229111,21.065319],[52.229401,21.0665],[52.229889,21.06831],[52.23035,21.07052],[52.230652,21.07151],[52.230831,21.07196],[52.23233,21.074381],[52.233021,21.07556],[52.235081,21.078911],[52.235271,21.079479],[52.235401,21.0802],[52.23547,21.080629],[52.235531,21.081091],[52.235661,21.08217],[52.235889,21.08399],[52.236061,21.08552],[52.236099,21.08663],[52.236099,21.08683],[52.236038,21.087641],[52.235958,21.088421],[52.235771,21.089439],[52.2351,21.093491],[52.234951,21.09482],[52.234871,21.095501],[52.23468,21.097151],[52.234661,21.09741],[52.234631,21.097679],[52.23444,21.099489],[52.23436,21.10021],[52.2342,21.101629],[52.233971,21.10355],[52.23386,21.10463],[52.233768,21.10532],[52.233459,21.10816],[52.233349,21.109051],[52.233059,21.111691],[52.232899,21.113239],[52.232861,21.11352],[52.232681,21.115021],[52.232571,21.116529],[52.232521,21.118191],[52.232521,21.11837],[52.23251,21.118799],[52.232571,21.12027],[52.23259,21.121389],[52.232601,21.12254],[52.23262,21.12421],[52.232639,21.125429],[52.232639,21.126711],[52.232658,21.12788],[52.232651,21.12854],[52.232639,21.129089],[52.232559,21.12974],[52.23243,21.130461],[52.23225,21.131069],[52.23201,21.13171],[52.231602,21.13269],[52.230782,21.134729],[52.23003,21.136499],[52.22971,21.137251],[52.22934,21.138109],[52.22908,21.138691],[52.228691,21.13958],[52.2286,21.139799],[52.228352,21.140369],[52.228039,21.14101],[52.22784,21.14147],[52.227188,21.142929],[52.226871,21.143669],[52.226669,21.14419],[52.226551,21.144661],[52.22644,21.145149],[52.226372,21.14566],[52.226341,21.146231],[52.22628,21.148359],[52.22628,21.14887],[52.226231,21.14978],[52.226181,21.15131],[52.226158,21.152491],[52.22612,21.15346],[52.226101,21.153851],[52.226059,21.15535],[52.225922,21.158939],[52.225891,21.15937],[52.225819,21.161421],[52.225689,21.165609],[52.22551,21.17029],[52.225189,21.17864],[52.224819,21.18928],[52.224529,21.196859],[52.224491,21.198009],[52.22427,21.20554],[52.224072,21.21101],[52.223911,21.21578],[52.223782,21.219891],[52.22369,21.22279],[52.223679,21.22303],[52.223671,21.223289],[52.223629,21.22451],[52.223469,21.229271],[52.223381,21.230721],[52.223301,21.23295],[52.223259,21.23402],[52.22324,21.235041],[52.223179,21.23679],[52.22316,21.237249],[52.223049,21.23951],[52.22303,21.240021],[52.22295,21.243151],[52.222832,21.24703],[52.22274,21.24946],[52.22271,21.24983],[52.222691,21.249929],[52.222679,21.25062],[52.222511,21.255859],[52.222351,21.26104],[52.222309,21.26218],[52.22221,21.26466],[52.222179,21.26539],[52.222149,21.266211],[52.22208,21.267851],[52.22205,21.26918],[52.222038,21.26963],[52.222031,21.26977],[52.222,21.27087],[52.221771,21.277281],[52.2215,21.284731],[52.221481,21.28517],[52.221371,21.287571],[52.221321,21.288719],[52.22113,21.2906],[52.220459,21.293631],[52.219471,21.298019],[52.218601,21.301941],[52.21851,21.302389],[52.21767,21.306379],[52.216961,21.30962],[52.216648,21.311029],[52.215851,21.314739],[52.215611,21.315929],[52.215149,21.3183],[52.213772,21.32457],[52.21249,21.33049],[52.21233,21.331261],[52.211109,21.337],[52.210251,21.34096],[52.209511,21.34437],[52.207809,21.35216],[52.206211,21.35932],[52.20467,21.366529],[52.203072,21.374001],[52.202629,21.377239],[52.202209,21.380011],[52.202202,21.380091],[52.201889,21.38555],[52.201691,21.389219],[52.201439,21.3937],[52.201118,21.401541],[52.200611,21.410839],[52.200291,21.41663],[52.200119,21.42065],[52.199989,21.42417],[52.19978,21.427259],[52.199459,21.43342],[52.19923,21.43766],[52.199169,21.439381],[52.1992,21.44058],[52.1992,21.44236],[52.19923,21.443769],[52.199299,21.446381],[52.199429,21.44973],[52.199451,21.450439],[52.19952,21.452971],[52.19965,21.45809],[52.199871,21.46624],[52.20023,21.475121],[52.20052,21.484421],[52.20063,21.48831],[52.200581,21.490219],[52.200359,21.492001],[52.19994,21.49367],[52.198551,21.49864],[52.19664,21.505899],[52.194981,21.51228],[52.193371,21.51828],[52.192188,21.522989],[52.19175,21.52454],[52.190979,21.527349],[52.190819,21.527321],[52.190689,21.52746],[52.19062,21.527731],[52.19067,21.527941],[52.1908,21.528099],[52.190659,21.52861],[52.190048,21.530781],[52.18895,21.534809],[52.188709,21.53578],[52.188171,21.537849],[52.187778,21.539431],[52.18734,21.540939],[52.187061,21.54196],[52.18692,21.54249],[52.186329,21.544649],[52.18631,21.54475],[52.185612,21.54744],[52.185341,21.54867],[52.18454,21.55163],[52.184219,21.55286],[52.18388,21.55415],[52.183281,21.556311],[52.182911,21.55773],[52.182652,21.55871],[52.18248,21.55938],[52.181751,21.56234],[52.181149,21.564791],[52.18074,21.566441],[52.180698,21.56658],[52.180592,21.566999],[52.18029,21.568159],[52.179909,21.5697],[52.179588,21.571011],[52.179539,21.571159],[52.179329,21.57198],[52.179031,21.57312],[52.17873,21.574301],[52.178398,21.575541],[52.178059,21.57678],[52.178082,21.577339],[52.178169,21.580919],[52.178242,21.58276],[52.178291,21.58411],[52.178299,21.58423],[52.178421,21.589001],[52.178619,21.59437],[52.178791,21.59881],[52.17915,21.609301],[52.17923,21.611561],[52.179581,21.62187],[52.17976,21.626841],[52.18013,21.629681],[52.180229,21.630461],[52.182049,21.644159],[52.183769,21.64847],[52.184509,21.65386],[52.188019,21.68083],[52.192032,21.710409],[52.192532,21.723101],[52.195358,21.743959],[52.20295,21.80003],[52.203152,21.80052],[52.20396,21.802349],[52.206169,21.80718],[52.206692,21.808411],[52.208061,21.81164],[52.208801,21.813181],[52.209278,21.81419],[52.209461,21.81456],[52.210251,21.816771],[52.2104,21.81769],[52.210442,21.820499],[52.210419,21.82181],[52.210251,21.832239],[52.209831,21.861191],[52.209389,21.886351],[52.20929,21.89757],[52.208271,21.907749],[52.20443,21.94763],[52.203869,21.953699],[52.20055,21.98842],[52.197842,22.01725],[52.196651,22.0296],[52.196602,22.0301],[52.195881,22.03702],[52.19558,22.04031],[52.195709,22.042641],[52.197639,22.05447],[52.197762,22.055639],[52.197701,22.05674],[52.197571,22.057659],[52.196949,22.06188],[52.196949,22.061899],[52.19656,22.06428],[52.195641,22.069839],[52.19046,22.100559],[52.18803,22.11499],[52.187031,22.12093],[52.186642,22.123289],[52.184971,22.13299],[52.183868,22.140181],[52.18354,22.14233],[52.18045,22.16251],[52.18042,22.16272],[52.179218,22.170521],[52.178082,22.17807],[52.177551,22.18157],[52.17654,22.188499],[52.176029,22.191971],[52.175301,22.19693],[52.1745,22.202379],[52.173512,22.20912],[52.173241,22.21105],[52.172321,22.217211],[52.172031,22.21862],[52.171841,22.219561],[52.171371,22.221001],[52.171101,22.221569],[52.1707,22.2222],[52.170269,22.222759],[52.169971,22.223061],[52.169651,22.22337],[52.168919,22.223761],[52.16806,22.22397],[52.157452,22.223801],[52.149818,22.223669],[52.149181,22.223841],[52.148411,22.22414],[52.14703,22.225031],[52.145828,22.22603],[52.145191,22.226721],[52.14463,22.22753],[52.14407,22.228821],[52.143768,22.22994],[52.143559,22.23114],[52.143471,22.232981],[52.14365,22.236931],[52.14365,22.24024],[52.14352,22.242979],[52.143341,22.245081],[52.1427,22.24972],[52.14188,22.254181],[52.14146,22.256161],[52.141121,22.25769],[52.1409,22.25869],[52.14072,22.259331],[52.140381,22.26058],[52.13974,22.26259],[52.138321,22.266199],[52.137569,22.26819],[52.137032,22.26984],[52.136089,22.273109],[52.13562,22.275169],[52.13472,22.28014],[52.1339,22.284821],[52.133598,22.28676],[52.132912,22.29147],[52.13261,22.29401],[52.132191,22.29804],[52.131882,22.302031],[52.13163,22.307911],[52.13158,22.309839],[52.13158,22.315981],[52.131672,22.318979],[52.131882,22.323021],[52.132011,22.325979],[52.132011,22.327101],[52.131931,22.328251],[52.131882,22.328659],[52.131802,22.329201],[52.131672,22.32984],[52.131241,22.331301],[52.130268,22.33366],[52.1297,22.335079],[52.128479,22.338051],[52.1273,22.34091],[52.12524,22.34581],[52.124432,22.34767],[52.122318,22.35253],[52.122181,22.352859],[52.120171,22.35787],[52.11734,22.364731],[52.114368,22.371731],[52.112019,22.377439],[52.108501,22.385799],[52.105831,22.3922],[52.103809,22.39706],[52.102531,22.400141],[52.09618,22.415409],[52.0909,22.42794],[52.090092,22.43022],[52.08979,22.432711],[52.089741,22.43593],[52.089531,22.43782],[52.08934,22.4384],[52.08786,22.44297],[52.086208,22.45097],[52.08498,22.457041],[52.08387,22.46246],[52.083172,22.466141],[52.08202,22.476231],[52.081631,22.479191],[52.08065,22.482149],[52.0779,22.48863],[52.076649,22.49193],[52.074421,22.5],[52.072891,22.505619],[52.071678,22.51009],[52.06942,22.51827],[52.069012,22.51996],[52.06884,22.5236],[52.068878,22.526569],[52.068501,22.5291],[52.066872,22.534929],[52.06464,22.5427],[52.06356,22.54652],[52.063011,22.550079],[52.062531,22.55407],[52.061378,22.563471],[52.059921,22.57184],[52.059441,22.574579],[52.057259,22.58708],[52.057041,22.589569],[52.056999,22.591801],[52.057301,22.59729],[52.057678,22.608959],[52.05785,22.614059],[52.057991,22.618019],[52.058109,22.622311],[52.05743,22.62789],[52.055672,22.63789],[52.053139,22.652349],[52.050991,22.664709],[52.050049,22.67042],[52.049622,22.67214],[52.048592,22.67454],[52.045151,22.68055],[52.039101,22.691231],[52.03442,22.699511],[52.029881,22.707371],[52.02383,22.71763],[52.019051,22.72547],[52.015331,22.73226],[52.007431,22.74612],[52.0047,22.75083],[52.00449,22.75119],[52.004169,22.75172],[52.003368,22.753139],[52.002972,22.75382],[52.00243,22.75474],[52.001228,22.756901],[52.00069,22.75861],[52.000469,22.759689],[52.000408,22.76021],[52.000332,22.76083],[52.000301,22.763399],[52.00029,22.764009],[52.00029,22.76417],[52.00029,22.76475],[52.000259,22.766911],[52.000271,22.767811],[52.00029,22.7693],[52.000271,22.77309],[52.000092,22.78389],[51.999699,22.81146],[51.999771,22.813219],[51.999809,22.813709],[51.999969,22.814501],[52.000389,22.815821],[52.001049,22.817221],[52.002491,22.819941],[52.019131,22.850771],[52.02018,22.85272],[52.026829,22.86499],[52.027561,22.86714],[52.027748,22.86878],[52.02803,22.87328],[52.02816,22.876579],[52.028591,22.880751],[52.034531,22.91885],[52.036671,22.9328],[52.038502,22.94478],[52.038651,22.94701],[52.03661,22.99505],[52.034679,23.03936],[52.034382,23.04616],[52.033852,23.060539],[52.033821,23.06105],[52.033779,23.061331],[52.033741,23.06406],[52.033779,23.06502],[52.033932,23.066481],[52.03397,23.06702],[52.034039,23.06745],[52.03413,23.068199],[52.034382,23.069441],[52.034851,23.07103],[52.035332,23.072411],[52.035728,23.073481],[52.035858,23.07374],[52.035912,23.07374],[52.037621,23.077749],[52.038502,23.07987],[52.042339,23.08906],[52.045219,23.09586],[52.047531,23.10133],[52.049171,23.10528],[52.049759,23.107201],[52.05061,23.10993],[52.05101,23.11146],[52.05143,23.1134],[52.051769,23.115351],[52.052139,23.118019],[52.05233,23.120081],[52.052441,23.12163],[52.05254,23.1243],[52.05249,23.126431],[52.05241,23.128111],[52.05225,23.13044],[52.052052,23.132139],[52.051689,23.134399],[52.05138,23.136129],[52.051079,23.137541],[52.05014,23.14085],[52.049431,23.14304],[52.046921,23.149401],[52.046329,23.150881],[52.046249,23.151091],[52.041649,23.16205],[52.04108,23.16349],[52.040989,23.163771],[52.040878,23.16407],[52.040722,23.16494],[52.040668,23.165991],[52.040699,23.166901],[52.040852,23.16884],[52.04092,23.17067],[52.040909,23.170799],[52.040352,23.17984],[52.040001,23.184799],[52.039848,23.18705],[52.03894,23.19945],[52.038151,23.211281],[52.037041,23.226919],[52.036201,23.23984],[52.035629,23.247259],[52.035198,23.254669],[52.034111,23.268709],[52.034019,23.270809],[52.0341,23.278021],[52.034279,23.285179],[52.03437,23.289591],[52.034679,23.30765],[52.03487,23.319969],[52.03503,23.33103],[52.035431,23.352261],[52.035568,23.36269],[52.035751,23.37554],[52.036121,23.39966],[52.03648,23.423731],[52.03669,23.44198],[52.037102,23.471069],[52.056198,23.47821],[52.057281,23.479031],[52.062019,23.48612],[52.06966,23.497549],[52.07505,23.50531],[52.074341,23.506451],[52.074478,23.507071],[52.075321,23.508471],[52.076199,23.51207],[52.077019,23.517269],[52.078541,23.523121],[52.079208,23.52372],[52.080021,23.527479],[52.080372,23.52845],[52.080971,23.52993],[52.08247,23.531771],[52.097488,23.550831],[52.100391,23.55324],[52.115749,23.565399],[52.116249,23.565861],[52.116879,23.566429],[52.119869,23.56897],[52.12009,23.569189],[52.121159,23.570431],[52.1236,23.573311],[52.123859,23.57374],[52.124371,23.57469],[52.124889,23.57572],[52.125641,23.577629],[52.12632,23.580099],[52.128811,23.59057],[52.135269,23.61853],[52.136452,23.62384],[52.137909,23.62999],[52.139091,23.63512],[52.140079,23.63932],[52.143768,23.6551],[52.148842,23.67742],[52.150139,23.68292],[52.15052,23.68453],[52.15115,23.687281],[52.151402,23.68865],[52.151531,23.68964],[52.151569,23.69029],[52.151539,23.6905],[52.151482,23.69071],[52.151371,23.69096],[52.151291,23.69117],[52.151199,23.691401],[52.15115,23.69166],[52.15118,23.69203],[52.15126,23.69227],[52.151371,23.69243],[52.15147,23.69253],[52.151539,23.69256],[52.151619,23.692869],[52.151661,23.69306],[52.151661,23.693319],[52.151409,23.69803],[52.15023,23.716619],[52.149399,23.72999],[52.149052,23.73517],[52.148842,23.736971],[52.148689,23.73807],[52.14843,23.739651],[52.147911,23.741989],[52.14674,23.74641],[52.145618,23.750441],[52.14502,23.75275],[52.143379,23.758739],[52.140732,23.768591],[52.13792,23.778919],[52.134338,23.792219],[52.133091,23.796761],[52.13205,23.80051],[52.131889,23.80109],[52.131039,23.803761],[52.13002,23.807489],[52.12822,23.81422],[52.127369,23.81785],[52.125999,23.823071],[52.125622,23.824289],[52.125111,23.82625],[52.124451,23.82873],[52.123501,23.83223],[52.122688,23.83518],[52.119701,23.846319],[52.119282,23.84778],[52.11903,23.84841],[52.118832,23.848749],[52.11869,23.84897],[52.118542,23.84914],[52.117519,23.849951],[52.115879,23.85117],[52.1157,23.85137],[52.11554,23.85165],[52.115459,23.85203],[52.11549,23.852341],[52.11557,23.852631],[52.115791,23.85289],[52.116161,23.85309],[52.11647,23.85318],[52.116699,23.85335],[52.116909,23.853609],[52.11705,23.85391],[52.117249,23.85433],[52.117489,23.85548],[52.118221,23.859249],[52.119019,23.863449],[52.120411,23.870689],[52.122372,23.880699],[52.123039,23.88419],[52.12328,23.88542],[52.123749,23.887831],[52.124321,23.89076],[52.124779,23.893221],[52.125229,23.895611],[52.125561,23.897301],[52.126678,23.902849],[52.127029,23.904711],[52.128262,23.91103],[52.129269,23.91626],[52.132622,23.933611],[52.13448,23.94289],[52.136089,23.951241],[52.136509,23.953409],[52.142052,23.98245],[52.146332,24.00466],[52.150719,24.02721],[52.15287,24.038589],[52.153019,24.03994],[52.153469,24.04154],[52.156288,24.056391],[52.156681,24.058439],[52.161079,24.08123],[52.162399,24.089331],[52.174301,24.15033],[52.17466,24.152189],[52.174889,24.153469],[52.175442,24.15617],[52.18956,24.230101],[52.196079,24.264339],[52.199089,24.28031],[52.19923,24.281],[52.19944,24.282619],[52.199551,24.28367],[52.199581,24.284281],[52.199612,24.284599],[52.19965,24.28643],[52.199619,24.288059],[52.19957,24.28903],[52.199471,24.290131],[52.19928,24.291771],[52.199009,24.293159],[52.198792,24.29434],[52.198509,24.29549],[52.197891,24.297371],[52.197289,24.29891],[52.196892,24.29986],[52.196411,24.300791],[52.195591,24.302271],[52.188881,24.313999],[52.183769,24.323021],[52.183262,24.324051],[52.182659,24.32563],[52.181591,24.328341],[52.181141,24.32947],[52.179619,24.33334],[52.178951,24.33515],[52.178391,24.337999],[52.178268,24.339239],[52.17823,24.340731],[52.17831,24.34374],[52.179089,24.34906],[52.183552,24.378071],[52.183861,24.38007],[52.18441,24.38382],[52.18655,24.39747],[52.186989,24.399099],[52.187328,24.400299],[52.187931,24.40176],[52.18853,24.40288],[52.189732,24.40468],[52.20063,24.41729],[52.20261,24.4191],[52.204411,24.42038],[52.206039,24.42116],[52.211021,24.422621],[52.212681,24.42293],[52.214001,24.42318],[52.215591,24.42333],[52.217979,24.423161],[52.2192,24.42297],[52.22105,24.422831],[52.222321,24.42293],[52.22385,24.423321],[52.225868,24.42404],[52.228271,24.425619],[52.230419,24.427509],[52.231529,24.428801],[52.232738,24.430429],[52.233681,24.43189],[52.235142,24.434719],[52.23634,24.437719],[52.241661,24.452061],[52.242008,24.453091],[52.253422,24.4839],[52.26458,24.51351],[52.268871,24.525961],[52.269901,24.529051],[52.271702,24.53377],[52.28355,24.560369],[52.285519,24.564409],[52.287491,24.567841],[52.292042,24.574789],[52.306461,24.59617],[52.30748,24.59763],[52.30904,24.599939],[52.319759,24.616079],[52.32431,24.622601],[52.330669,24.632299],[52.33255,24.635481],[52.335209,24.64028],[52.337109,24.64397],[52.342079,24.654699],[52.343632,24.65839],[52.345772,24.66363],[52.349812,24.673929],[52.350559,24.676041],[52.35154,24.67881],[52.353062,24.68375],[52.354408,24.688789],[52.357021,24.69972],[52.35873,24.707319],[52.362679,24.72423],[52.363628,24.72757],[52.364658,24.730659],[52.367229,24.736759],[52.368778,24.739759],[52.373501,24.74791],[52.38131,24.761391],[52.383621,24.765249],[52.388451,24.773621],[52.38855,24.77379],[52.39101,24.77809],[52.393539,24.78227],[52.3965,24.78685],[52.41954,24.822229],[52.422569,24.827021],[52.424461,24.830351],[52.426479,24.834499],[52.427849,24.83754],[52.429131,24.840481],[52.430511,24.84441],[52.4314,24.8477],[52.441212,24.883829],[52.44294,24.88942],[52.443958,24.89241],[52.445389,24.896049],[52.44688,24.89949],[52.448021,24.90184],[52.449162,24.904119],[52.451,24.907551],[52.453011,24.910851],[52.455921,24.9151],[52.461411,24.922119],[52.467789,24.93049],[52.470421,24.934071],[52.473919,24.93903],[52.476212,24.942381],[52.479328,24.947491],[52.482948,24.95442],[52.48391,24.956329],[52.48698,24.96279],[52.48798,24.964991],[52.48925,24.967751],[52.490189,24.96986],[52.492401,24.97484],[52.492649,24.975401],[52.49403,24.978621],[52.49469,24.980169],[52.496922,24.98489],[52.498718,24.988501],[52.519588,25.0278],[52.520592,25.02973],[52.521301,25.031099],[52.52507,25.03837],[52.527649,25.04274],[52.52961,25.0455],[52.53075,25.046949],[52.53273,25.04933],[52.534431,25.051411],[52.5364,25.053301],[52.539749,25.056129],[52.541809,25.05759],[52.545658,25.059971],[52.547218,25.06094],[52.54744,25.061069],[52.549191,25.062229],[52.55151,25.064199],[52.551819,25.064489],[52.553219,25.06583],[52.553829,25.066351],[52.555779,25.068609],[52.558262,25.0716],[52.560169,25.07407],[52.561642,25.076389],[52.563782,25.07999],[52.56601,25.084459],[52.567131,25.08695],[52.568508,25.090639],[52.572731,25.10277],[52.57513,25.109541],[52.57803,25.11776],[52.579449,25.12146],[52.580349,25.1236],[52.582748,25.128571],[52.585499,25.1339],[52.587391,25.13707],[52.603531,25.16132],[52.60696,25.16728],[52.619831,25.19175],[52.62933,25.20981],[52.638729,25.2279],[52.642921,25.235781],[52.646118,25.24214],[52.648548,25.247339],[52.650021,25.250879],[52.65147,25.254431],[52.655708,25.26573],[52.657131,25.26956],[52.663799,25.28743],[52.670471,25.305389],[52.67519,25.317829],[52.676392,25.32058],[52.677589,25.323071],[52.678539,25.324949],[52.685322,25.33684],[52.686031,25.338091],[52.686932,25.33967],[52.690979,25.34693],[52.694809,25.35368],[52.696079,25.356079],[52.69733,25.35858],[52.698761,25.36157],[52.6996,25.363581],[52.701019,25.366541],[52.701279,25.3671],[52.705292,25.375839],[52.7066,25.37879],[52.70787,25.38176],[52.708672,25.383801],[52.709251,25.385441],[52.709419,25.38592],[52.709709,25.38682],[52.710079,25.388],[52.711231,25.392071],[52.716991,25.4137],[52.7183,25.418739],[52.720131,25.42551],[52.721111,25.428499],[52.739941,25.479],[52.741951,25.48362],[52.744061,25.487761],[52.746841,25.49316],[52.751289,25.501659],[52.755569,25.509899],[52.759911,25.518129],[52.764179,25.526369],[52.766369,25.530569],[52.768459,25.534611],[52.771091,25.53908],[52.77211,25.540621],[52.774021,25.54327],[52.775429,25.545059],[52.776859,25.546721],[52.779099,25.549101],[52.782619,25.552271],[52.783932,25.5534],[52.792992,25.56155],[52.80965,25.57682],[52.814861,25.581841],[52.819981,25.586889],[52.82056,25.58742],[52.823421,25.59034],[52.82497,25.59215],[52.82642,25.59403],[52.827709,25.59584],[52.829689,25.59893],[52.831699,25.6026],[52.848228,25.63558],[52.84856,25.636141],[52.851398,25.64073],[52.85294,25.64296],[52.854359,25.64463],[52.85601,25.64657],[52.856602,25.647209],[52.85952,25.65036],[52.862049,25.652399],[52.86385,25.65369],[52.87775,25.66201],[52.87981,25.66321],[52.909302,25.680429],[52.915451,25.684071],[52.91869,25.686131],[52.92049,25.68742],[52.922901,25.68939],[52.924961,25.69128],[52.942982,25.70956],[52.96899,25.73591],[52.97192,25.73875],[52.972931,25.73988],[52.974899,25.741449],[52.977322,25.743719],[52.979759,25.74596],[52.99173,25.756599],[52.995258,25.760201],[53.016541,25.78355],[53.019798,25.787149],[53.022121,25.7899],[53.023918,25.792471],[53.025719,25.795219],[53.027699,25.798651],[53.0289,25.80097],[53.03817,25.820801],[53.04126,25.827749],[53.04269,25.8312],[53.046341,25.83993],[53.048012,25.843889],[53.050179,25.84898],[53.05201,25.85334],[53.052311,25.85404],[53.05312,25.85597],[53.053879,25.857531],[53.05418,25.85813],[53.05508,25.85981],[53.055511,25.86055],[53.055969,25.861361],[53.057049,25.86311],[53.05798,25.8645],[53.058998,25.865959],[53.062111,25.870159],[53.065109,25.8743],[53.066399,25.87586],[53.067471,25.877171],[53.068508,25.878229],[53.07008,25.87978],[53.071529,25.88101],[53.072281,25.88184],[53.073898,25.88307],[53.075279,25.88385],[53.077129,25.88483],[53.079182,25.88578],[53.080479,25.8862],[53.083389,25.88695],[53.085979,25.8874],[53.087601,25.88747],[53.089241,25.8874],[53.09404,25.886721],[53.0961,25.886629],[53.096451,25.886629],[53.09988,25.88706],[53.102112,25.887569],[53.103748,25.88818],[53.105808,25.88912],[53.108028,25.89032],[53.112411,25.89315],[53.115761,25.895639],[53.119362,25.898821],[53.121681,25.90131],[53.123829,25.903879],[53.126228,25.907141],[53.132069,25.916241],[53.13332,25.918301],[53.13414,25.91993],[53.134918,25.92161],[53.135571,25.92318],[53.1362,25.92485],[53.13686,25.926741],[53.137531,25.92907],[53.13768,25.929621],[53.138199,25.93149],[53.143181,25.94968],[53.14468,25.955219],[53.145969,25.959669],[53.147171,25.96319],[53.148121,25.96542],[53.149151,25.967569],[53.150089,25.96937],[53.151649,25.971849],[53.15337,25.974279],[53.155159,25.97641],[53.157219,25.97847],[53.15992,25.981119],[53.1605,25.98172],[53.161949,25.983271],[53.162571,25.983999],[53.163448,25.985069],[53.16431,25.986231],[53.164928,25.98716],[53.165539,25.988171],[53.166439,25.989811],[53.167469,25.99184],[53.168159,25.993349],[53.169361,25.996111],[53.170769,25.99935],[53.172871,26.004181],[53.17337,26.005409],[53.17395,26.006849],[53.17477,26.00901],[53.175369,26.010719],[53.176022,26.012739],[53.177299,26.01713],[53.178398,26.020969],[53.17889,26.022751],[53.17992,26.02721],[53.18042,26.03027],[53.180641,26.031981],[53.180962,26.03536],[53.18111,26.03808],[53.18124,26.04175],[53.181339,26.044069],[53.181412,26.045179],[53.181511,26.04649],[53.181641,26.047819],[53.181862,26.049601],[53.182152,26.0516],[53.18261,26.05405],[53.183041,26.056061],[53.183689,26.05863],[53.184799,26.06218],[53.185841,26.06506],[53.186329,26.06621],[53.18679,26.067221],[53.18766,26.06904],[53.190399,26.073931],[53.191769,26.076349],[53.19278,26.078159],[53.193851,26.08016],[53.194691,26.08189],[53.195339,26.08326],[53.199032,26.09133],[53.202541,26.098961],[53.205929,26.106091],[53.20739,26.10952],[53.208809,26.113569],[53.2094,26.115471],[53.210152,26.118019],[53.21088,26.120831],[53.211411,26.12294],[53.214512,26.135269],[53.21537,26.138359],[53.216911,26.14283],[53.218201,26.146351],[53.220181,26.150721],[53.221458,26.15321],[53.222752,26.155701],[53.225071,26.159559],[53.231251,26.16943],[53.233479,26.17347],[53.235538,26.177759],[53.238289,26.184879],[53.25219,26.22514],[53.252789,26.2272],[53.254162,26.231581],[53.256481,26.24033],[53.265919,26.283159],[53.266911,26.28706],[53.26712,26.28784],[53.267841,26.290371],[53.268761,26.293369],[53.26973,26.29624],[53.270748,26.29887],[53.271671,26.301069],[53.27219,26.302299],[53.284641,26.32745],[53.286011,26.33037],[53.287338,26.33342],[53.289612,26.33955],[53.298111,26.368389],[53.2994,26.37191],[53.300369,26.374399],[53.301029,26.37586],[53.303261,26.380489],[53.304722,26.38315],[53.306862,26.386669],[53.32317,26.41036],[53.327122,26.41663],[53.333561,26.42787],[53.34557,26.44907],[53.353561,26.46315],[53.36377,26.481091],[53.38026,26.5079],[53.382992,26.512329],[53.384769,26.51553],[53.385658,26.51713],[53.388828,26.52306],[53.403172,26.549919],[53.410461,26.5634],[53.41235,26.56649],[53.413979,26.56889],[53.416801,26.57254],[53.419128,26.575069],[53.421341,26.57732],[53.42445,26.57979],[53.444881,26.594299],[53.445061,26.594469],[53.448471,26.597139],[53.450371,26.598591],[53.454659,26.60228],[53.47768,26.625601],[53.478031,26.62594],[53.478981,26.626881],[53.485222,26.633181],[53.488049,26.63652],[53.489861,26.63876],[53.492352,26.642191],[53.494888,26.646099],[53.508911,26.67008],[53.509418,26.67103],[53.511311,26.674629],[53.512939,26.678129],[53.514229,26.68124],[53.515598,26.68502],[53.51675,26.68894],[53.52256,26.710939],[53.525829,26.724689],[53.52702,26.72982],[53.528221,26.73597],[53.52869,26.738371],[53.529221,26.74115],[53.529961,26.745029],[53.530151,26.745899],[53.532902,26.76289],[53.533401,26.76598],[53.535519,26.779091],[53.536121,26.78458],[53.536461,26.789391],[53.53664,26.79497],[53.53664,26.7978],[53.536251,26.805441],[53.53595,26.80879],[53.535339,26.813669],[53.534401,26.819],[53.534229,26.819771],[53.530708,26.83737],[53.530209,26.83996],[53.52985,26.8426],[53.52951,26.84527],[53.529251,26.849039],[53.529171,26.852131],[53.529289,26.856291],[53.529591,26.86054],[53.530048,26.86355],[53.530369,26.86561],[53.53059,26.86692],[53.531738,26.872299],[53.536381,26.8929],[53.538391,26.90213],[53.543839,26.9268],[53.551048,26.95891],[53.551739,26.961479],[53.552341,26.963369],[53.55397,26.96689],[53.556889,26.9729],[53.569759,26.99976],[53.584961,27.03109],[53.588219,27.037609],[53.58942,27.03907],[53.590111,27.039761],[53.59095,27.040529],[53.592159,27.04105],[53.595341,27.04215],[53.595509,27.04221],[53.598179,27.043249],[53.60865,27.047779],[53.61459,27.050211],[53.619888,27.05237],[53.625561,27.05632],[53.642429,27.06823],[53.649181,27.073],[53.650631,27.074301],[53.651821,27.07575],[53.652611,27.076799],[53.654018,27.0788],[53.655418,27.08147],[53.656712,27.08456],[53.65757,27.087391],[53.65834,27.090401],[53.659031,27.095289],[53.659199,27.097521],[53.65937,27.11211],[53.659458,27.11709],[53.65971,27.12756],[53.660141,27.132629],[53.661091,27.137951],[53.661598,27.14044],[53.663151,27.14567],[53.666531,27.155149],[53.674389,27.17734],[53.675251,27.1798],[53.675869,27.182501],[53.676491,27.18531],[53.67712,27.189251],[53.677551,27.19454],[53.67757,27.19717],[53.677399,27.20146],[53.676708,27.20841],[53.676109,27.216311],[53.675758,27.223089],[53.675591,27.230471],[53.675758,27.243179],[53.676022,27.247549],[53.676449,27.25416],[53.676971,27.26008],[53.678001,27.267981],[53.679451,27.277531],[53.685551,27.31776],[53.686409,27.32394],[53.688721,27.340521],[53.691151,27.358589],[53.691441,27.36087],[53.694908,27.38806],[53.697571,27.409691],[53.698601,27.415951],[53.699711,27.42239],[53.701248,27.42951],[53.702412,27.434111],[53.703892,27.439819],[53.709179,27.45775],[53.709728,27.459539],[53.710258,27.461411],[53.723,27.503969],[53.723629,27.506109],[53.72496,27.51058],[53.72691,27.517099],[53.727348,27.51852],[53.72789,27.520281],[53.729149,27.52442],[53.729729,27.526529],[53.730129,27.528099],[53.73082,27.53133],[53.731548,27.534981],[53.73214,27.53829],[53.732651,27.54188],[53.733139,27.54612],[53.734119,27.55578],[53.736309,27.57708],[53.73687,27.58239],[53.737789,27.5914],[53.738548,27.59878],[53.739639,27.609711],[53.740021,27.61257],[53.740139,27.613449],[53.740749,27.61706],[53.741371,27.620041],[53.742371,27.62392],[53.743832,27.628731],[53.745338,27.632971],[53.746071,27.634689],[53.746868,27.6364],[53.747452,27.637609],[53.748058,27.63879],[53.749298,27.641029],[53.751671,27.64571],[53.752972,27.64875],[53.754261,27.65201],[53.75613,27.657351],[53.75626,27.657721],[53.756908,27.659731],[53.757381,27.6609],[53.7579,27.66235],[53.75832,27.663469],[53.759029,27.665319],[53.759819,27.66711],[53.7607,27.669029],[53.76162,27.67108],[53.762192,27.67214],[53.762901,27.673441],[53.78426,27.712919],[53.786491,27.71736],[53.78846,27.721979],[53.790089,27.726471],[53.79097,27.72916],[53.791382,27.73045],[53.79229,27.733801],[53.793221,27.73777],[53.793499,27.73922],[53.793591,27.739651],[53.793678,27.740191],[53.797211,27.759199],[53.797871,27.76277],[53.79966,27.77269],[53.799881,27.773951],[53.80064,27.778521],[53.802368,27.786659],[53.803139,27.78932],[53.804249,27.793011],[53.80431,27.79318],[53.804878,27.794809],[53.805222,27.795771],[53.80621,27.798479],[53.807301,27.801189],[53.807899,27.80257],[53.80859,27.80405],[53.809689,27.806351],[53.811291,27.80949],[53.813919,27.81415],[53.814121,27.81451],[53.81707,27.81988],[53.81773,27.82114],[53.825401,27.835051],[53.829479,27.842819],[53.833488,27.85062],[53.84153,27.866261],[53.84193,27.86705],[53.843239,27.86961],[53.843891,27.87084],[53.84454,27.872101],[53.845829,27.87459],[53.848412,27.879601],[53.849861,27.882389],[53.85133,27.885229],[53.854252,27.89086],[53.8601,27.902121],[53.861439,27.90472],[53.861599,27.90501],[53.861832,27.90547],[53.863529,27.90876],[53.867081,27.915569],[53.868511,27.91836],[53.86998,27.92103],[53.871288,27.923189],[53.87262,27.925261],[53.874321,27.92758],[53.87606,27.929779],[53.87867,27.93269],[53.878841,27.93284],[53.879501,27.933479],[53.88142,27.93531],[53.88348,27.936951],[53.885021,27.938061],[53.88905,27.94046],[53.891708,27.941771],[53.900379,27.94578],[53.90905,27.949909],[53.92561,27.957621],[53.929649,27.95952],[53.93251,27.960819],[53.935322,27.962351],[53.9361,27.96287],[53.93803,27.96422],[53.939861,27.96578],[53.943039,27.96896],[53.945961,27.972651],[53.946449,27.9734],[53.948139,27.976049],[53.948669,27.97698],[53.949188,27.97789],[53.949478,27.978399],[53.951279,27.98192],[53.952648,27.98527],[53.954319,27.98984],[53.955662,27.99394],[53.963131,28.020201],[53.967251,28.03454],[53.97094,28.047319],[53.973339,28.05479],[53.979519,28.07144],[53.98209,28.078051],[53.98476,28.08552],[53.986301,28.09041],[53.9869,28.09239],[53.98888,28.09968],[53.989651,28.103109],[53.992908,28.116159],[53.995659,28.12775],[53.99601,28.129181],[53.997028,28.13341],[53.998138,28.137791],[54.000198,28.144911],[54.001411,28.148689],[54.003471,28.154779],[54.005531,28.16062],[54.007931,28.167139],[54.009392,28.17161],[54.01128,28.17779],[54.011459,28.178431],[54.012642,28.18281],[54.013149,28.18469],[54.01342,28.18568],[54.014881,28.19212],[54.015739,28.19615],[54.01757,28.206301],[54.01849,28.21307],[54.019348,28.22019],[54.020149,28.22949],[54.020199,28.23004],[54.02026,28.230841],[54.025688,28.30113],[54.02647,28.30962],[54.026981,28.313141],[54.02906,28.32885],[54.03334,28.357349],[54.033852,28.36507],[54.035309,28.373911],[54.035309,28.374081],[54.037109,28.38241],[54.039768,28.39279],[54.041309,28.398251],[54.045609,28.413481],[54.04776,28.420601],[54.049469,28.425579],[54.050381,28.427641],[54.052132,28.431589],[54.054089,28.435329],[54.058441,28.443689],[54.062519,28.4515],[54.06673,28.458969],[54.068951,28.46274],[54.07069,28.465349],[54.07119,28.466089],[54.075909,28.47262],[54.08123,28.47879],[54.083618,28.481319],[54.090328,28.488411],[54.119419,28.518909],[54.120449,28.519991],[54.123631,28.523769],[54.132729,28.535789],[54.137619,28.54188],[54.141651,28.546431],[54.14526,28.550119],[54.148689,28.553471],[54.153591,28.55793],[54.157619,28.56119],[54.166599,28.56822],[54.172371,28.572741],[54.174809,28.574551],[54.177021,28.576191],[54.179588,28.5781],[54.183971,28.581619],[54.18663,28.58419],[54.194271,28.59235],[54.194778,28.592859],[54.207661,28.60651],[54.209042,28.60816],[54.211609,28.611231],[54.213921,28.614321],[54.217701,28.61964],[54.225941,28.632429],[54.237782,28.650801],[54.239159,28.652691],[54.242161,28.65612],[54.245602,28.65913],[54.24791,28.660931],[54.250912,28.662531],[54.251759,28.662979],[54.257092,28.665819],[54.258808,28.666759],[54.25959,28.66728],[54.260441,28.668051],[54.261471,28.669081],[54.262852,28.670799],[54.264141,28.672859],[54.265079,28.67457],[54.266201,28.677059],[54.266911,28.679251],[54.267231,28.680241],[54.268341,28.685101],[54.269032,28.688141],[54.26947,28.691031],[54.269539,28.691481],[54.269588,28.691971],[54.270061,28.69663],[54.270061,28.7071],[54.270111,28.708799],[54.27026,28.710541],[54.270401,28.711769],[54.270569,28.712681],[54.270908,28.71414],[54.271351,28.715691],[54.27232,28.718201],[54.272541,28.718781],[54.282761,28.738779],[54.28997,28.752939],[54.291,28.755939],[54.291599,28.758169],[54.291859,28.761259],[54.291931,28.763109],[54.29155,28.77039],[54.29108,28.780661],[54.29015,28.800529],[54.289959,28.804581],[54.289879,28.806379],[54.289688,28.810459],[54.289631,28.811729],[54.28904,28.8241],[54.288971,28.826241],[54.288971,28.82822],[54.289219,28.83215],[54.290699,28.85079],[54.291061,28.86319],[54.291309,28.87359],[54.29155,28.876591],[54.292801,28.884689],[54.295979,28.904261],[54.297779,28.916269],[54.29821,28.919451],[54.29855,28.923229],[54.300251,28.947069],[54.30027,28.948721],[54.300468,28.950411],[54.301041,28.95756],[54.301842,28.969],[54.301991,28.97043],[54.30262,28.97678],[54.30302,28.979361],[54.30756,29.00271],[54.308418,29.007339],[54.30928,29.01326],[54.31057,29.022791],[54.3116,29.029831],[54.31271,29.036091],[54.31366,29.04081],[54.31572,29.04871],[54.318378,29.056259],[54.331249,29.092911],[54.334259,29.099689],[54.3358,29.10261],[54.336319,29.10347],[54.339409,29.10836],[54.345329,29.11635],[54.347988,29.120119],[54.349541,29.12261],[54.35194,29.127251],[54.35434,29.13282],[54.355801,29.1366],[54.362148,29.155661],[54.362839,29.15814],[54.364391,29.16415],[54.364811,29.166031],[54.36499,29.167061],[54.36573,29.171209],[54.366531,29.17643],[54.370911,29.20389],[54.371681,29.209299],[54.3722,29.21393],[54.37244,29.217501],[54.372532,29.220209],[54.37252,29.22753],[54.371471,29.281111],[54.371391,29.285179],[54.371319,29.28879],[54.37125,29.291611],[54.37133,29.29336],[54.371422,29.295219],[54.37159,29.297819],[54.371891,29.300289],[54.37254,29.304399],[54.37331,29.30826],[54.374168,29.3111],[54.374729,29.312901],[54.375938,29.316811],[54.377258,29.321051],[54.377522,29.32234],[54.378811,29.3274],[54.379921,29.332979],[54.380428,29.336161],[54.380871,29.338989],[54.384121,29.36319],[54.38438,29.36491],[54.385578,29.37075],[54.39082,29.39521],[54.395538,29.417101],[54.396999,29.42594],[54.397598,29.42997],[54.400002,29.45031],[54.400139,29.4513],[54.401031,29.457689],[54.401981,29.46336],[54.403011,29.46817],[54.406269,29.48439],[54.40765,29.49065],[54.408932,29.49555],[54.409962,29.49881],[54.412708,29.506189],[54.419231,29.52121],[54.419899,29.523069],[54.421791,29.52866],[54.42292,29.532749],[54.424809,29.541121],[54.4291,29.5606],[54.430389,29.56739],[54.431252,29.57262],[54.43219,29.579491],[54.433311,29.588181],[54.433491,29.589689],[54.434528,29.596939],[54.435322,29.60264],[54.435619,29.60507],[54.436909,29.61408],[54.43708,29.615191],[54.437241,29.616381],[54.437531,29.618191],[54.438141,29.621481],[54.43848,29.623091],[54.43895,29.62516],[54.439571,29.627609],[54.439899,29.62882],[54.4403,29.63028],[54.44136,29.63376],[54.442451,29.63719],[54.444641,29.644039],[54.447151,29.652069],[54.447788,29.654169],[54.448349,29.655951],[54.449291,29.65892],[54.450218,29.66189],[54.451248,29.665831],[54.456188,29.687019],[54.45718,29.69128],[54.457722,29.693911],[54.458038,29.695749],[54.458679,29.69985],[54.45927,29.704639],[54.459541,29.70756],[54.460072,29.71306],[54.460258,29.715099],[54.461971,29.735531],[54.462318,29.738621],[54.46262,29.74155],[54.463428,29.746429],[54.46386,29.74917],[54.464981,29.754169],[54.46627,29.759899],[54.474419,29.79578],[54.47678,29.806629],[54.477001,29.807631],[54.477772,29.81303],[54.478512,29.819361],[54.479141,29.824711],[54.479389,29.829189],[54.479401,29.832861],[54.479401,29.835779],[54.479221,29.838869],[54.47897,29.84136],[54.478539,29.84436],[54.4776,29.84943],[54.476601,29.85458],[54.47485,29.86367],[54.474331,29.86685],[54.47393,29.870871],[54.47348,29.876631],[54.473301,29.882641],[54.473301,29.88702],[54.473549,29.892269],[54.473911,29.89637],[54.474331,29.90015],[54.475101,29.905821],[54.47588,29.911261],[54.476009,29.91217],[54.476131,29.912979],[54.477509,29.921949],[54.481918,29.952721],[54.482849,29.95892],[54.484451,29.969681],[54.485748,29.978769],[54.491371,30.01828],[54.492378,30.02508],[54.492661,30.02648],[54.493229,30.02866],[54.4939,30.03088],[54.498699,30.047119],[54.49884,30.047621],[54.49926,30.049259],[54.499592,30.051069],[54.49976,30.052429],[54.500011,30.055189],[54.500301,30.060289],[54.501331,30.07649],[54.501949,30.08609],[54.50198,30.087179],[54.502239,30.089689],[54.502361,30.090799],[54.50425,30.10475],[54.504608,30.107281],[54.506271,30.11908],[54.50687,30.12211],[54.50737,30.12393],[54.507919,30.125839],[54.508739,30.128019],[54.51511,30.1404],[54.518089,30.14632],[54.52309,30.15601],[54.538921,30.187611],[54.542049,30.193951],[54.542679,30.195641],[54.543171,30.19755],[54.543339,30.19824],[54.543598,30.19936],[54.546089,30.2173],[54.54718,30.225519],[54.547581,30.228439],[54.547989,30.23138],[54.548382,30.23432],[54.549858,30.244499],[54.553299,30.269739],[54.553471,30.27051],[54.55373,30.271799],[54.554161,30.273689],[54.55484,30.27557],[54.555531,30.277031],[54.56171,30.28862],[54.56274,30.29068],[54.563511,30.29283],[54.564201,30.29463],[54.570549,30.314199],[54.57132,30.31609],[54.572262,30.31806],[54.575699,30.32493],[54.576469,30.32621],[54.577251,30.32733],[54.590641,30.34347],[54.5914,30.344391],[54.59483,30.34856],[54.599911,30.35471],[54.600761,30.355829],[54.60162,30.357109],[54.602482,30.35874],[54.603939,30.36286],[54.6096,30.379601],[54.618641,30.405649],[54.619301,30.407579],[54.619732,30.40913],[54.620029,30.41082],[54.620369,30.41293],[54.62162,30.424231],[54.62302,30.435459],[54.623508,30.438999],[54.623852,30.44174],[54.624538,30.446289],[54.62994,30.48938],[54.632351,30.508261],[54.635349,30.53229],[54.638962,30.56225],[54.641529,30.583191],[54.642479,30.591089],[54.64325,30.59547],[54.652691,30.63521],[54.656288,30.650311],[54.65913,30.66264],[54.669769,30.70816],[54.672771,30.720779],[54.675861,30.738199],[54.683159,30.780769],[54.683159,30.78112],[54.68359,30.785839],[54.685989,30.830641],[54.686119,30.8328],[54.68737,30.854071],[54.689079,30.883511],[54.689362,30.889811],[54.68943,30.891411],[54.689861,30.926941],[54.68993,30.93252],[54.690369,30.968229],[54.690708,30.981791],[54.690842,30.992599],[54.69091,30.99811],[54.690929,30.999861],[54.69099,31.000401],[54.69099,31.000641],[54.690948,31.00079],[54.690971,31.001591],[54.691109,31.014879],[54.69112,31.0201],[54.689701,31.05283],[54.689949,31.06406],[54.69099,31.07468],[54.70348,31.20154],[54.709801,31.244169],[54.710098,31.24548],[54.72105,31.283421],[54.722359,31.28828],[54.72567,31.30747],[54.729439,31.33021],[54.730431,31.336189],[54.735111,31.35618],[54.738861,31.372881],[54.742531,31.41223],[54.744179,31.42782],[54.749039,31.478109],[54.74955,31.48155],[54.751961,31.488119],[54.771992,31.53681],[54.786671,31.57107],[54.791,31.578859],[54.792702,31.58213],[54.794479,31.58531],[54.795181,31.58655],[54.79652,31.589029],[54.802349,31.599859],[54.80621,31.60693],[54.80685,31.60828],[54.807449,31.610001],[54.80798,31.612209],[54.810699,31.62418],[54.81295,31.63438],[54.81358,31.63641],[54.814232,31.63796],[54.81496,31.639339],[54.815788,31.640591],[54.83802,31.663321],[54.841209,31.666731],[54.842098,31.66818],[54.842949,31.67001],[54.843651,31.6724],[54.84396,31.67371],[54.844181,31.675091],[54.844349,31.677031],[54.84444,31.679331],[54.84465,31.68441],[54.846569,31.740999],[54.849239,31.8048],[54.850559,31.838461],[54.850788,31.844669],[54.851139,31.852501],[54.851139,31.854111],[54.8512,31.85553],[54.851311,31.857031],[54.85144,31.85841],[54.85149,31.85882],[54.851688,31.860241],[54.852032,31.861959],[54.859341,31.893641],[54.859699,31.89522],[54.860031,31.896851],[54.860298,31.89867],[54.860409,31.900021],[54.860729,31.907431],[54.863209,31.965019],[54.863461,31.97064],[54.86396,31.97884],[54.864151,31.98205],[54.865582,32.003571],[54.865761,32.00528],[54.86586,32.00592],[54.86607,32.007],[54.86644,32.00843],[54.870831,32.024979],[54.87233,32.030609],[54.878571,32.05394],[54.882,32.067009],[54.882839,32.070171],[54.883598,32.073101],[54.883839,32.074139],[54.88406,32.075291],[54.884701,32.07951],[54.88501,32.081261],[54.889851,32.10043],[54.89156,32.105839],[54.893639,32.111629],[54.894569,32.113979],[54.895279,32.115372],[54.896961,32.11755],[54.89856,32.11887],[54.908989,32.124649],[54.91114,32.12619],[54.912048,32.127312],[54.914181,32.130299],[54.92564,32.14669],[54.92709,32.14933],[54.93465,32.165771],[54.941029,32.179642],[54.942371,32.18211],[54.951599,32.195801],[54.955898,32.20388],[54.957008,32.205929],[54.984772,32.2495],[55.009338,32.288151],[55.014061,32.29557],[55.01635,32.299301],[55.017502,32.302029],[55.02364,32.323231],[55.028831,32.340839],[55.029331,32.342609],[55.029751,32.344479],[55.02998,32.34597],[55.030151,32.347591],[55.032341,32.372421],[55.033009,32.38018],[55.033112,32.381931],[55.033699,32.402451],[55.03381,32.404652],[55.033901,32.405529],[55.034019,32.4063],[55.03429,32.407921],[55.055199,32.499489],[55.055729,32.501888],[55.056099,32.504452],[55.056629,32.51738],[55.05714,32.530281],[55.05822,32.55682],[55.059029,32.576729],[55.059422,32.586262],[55.059818,32.595951],[55.059959,32.597309],[55.060169,32.598701],[55.060711,32.601089],[55.066109,32.62178],[55.072861,32.647812],[55.073879,32.65197],[55.076351,32.664532],[55.077229,32.66922],[55.078171,32.674419],[55.07835,32.676239],[55.078659,32.678799],[55.078911,32.681412],[55.079029,32.684189],[55.079021,32.687019],[55.07896,32.69241],[55.07901,32.69603],[55.07906,32.696899],[55.079109,32.697769],[55.07943,32.70303],[55.079578,32.70578],[55.07967,32.708408],[55.07967,32.7094],[55.079659,32.710388],[55.079651,32.712261],[55.079632,32.716011],[55.079201,32.743149],[55.079231,32.7444],[55.079319,32.745689],[55.080929,32.757801],[55.081959,32.764309],[55.085812,32.792412],[55.09552,32.86187],[55.100609,32.89822],[55.101082,32.90139],[55.103889,32.921909],[55.105289,32.931881],[55.107571,32.952911],[55.11404,33.01384],[55.11478,33.020802],[55.116661,33.038502],[55.118839,33.05909],[55.11903,33.06097],[55.120232,33.07328],[55.12038,33.074821],[55.122749,33.097221],[55.12476,33.11731],[55.127258,33.141972],[55.12812,33.150501],[55.128658,33.155849],[55.12941,33.164082],[55.129551,33.167191],[55.130001,33.171902],[55.130329,33.174858],[55.13203,33.194359],[55.132179,33.19561],[55.132408,33.196869],[55.13242,33.196911],[55.133831,33.202961],[55.134621,33.206329],[55.13612,33.212269],[55.136971,33.21603],[55.138378,33.226891],[55.13974,33.23716],[55.140041,33.239479],[55.140072,33.239712],[55.140381,33.242279],[55.141708,33.25333],[55.142391,33.260139],[55.142422,33.26049],[55.14365,33.273491],[55.14463,33.283451],[55.144981,33.286999],[55.145432,33.290569],[55.145931,33.294651],[55.1493,33.320049],[55.15123,33.334499],[55.152111,33.340832],[55.15263,33.344742],[55.15284,33.346119],[55.15303,33.347069],[55.153801,33.350552],[55.157761,33.367619],[55.162682,33.38887],[55.16927,33.417389],[55.174042,33.43829],[55.17432,33.439339],[55.177589,33.450409],[55.178169,33.452431],[55.178768,33.454479],[55.17944,33.456749],[55.181782,33.46479],[55.182529,33.467381],[55.18285,33.468639],[55.183102,33.469921],[55.183289,33.471249],[55.183418,33.472778],[55.18343,33.474361],[55.183338,33.481991],[55.183201,33.492451],[55.182751,33.514259],[55.18269,33.517471],[55.182621,33.521042],[55.18235,33.535782],[55.181499,33.586811],[55.181259,33.603691],[55.181171,33.605801],[55.18055,33.617359],[55.180248,33.624809],[55.179798,33.634941],[55.179279,33.646099],[55.17955,33.6507],[55.180851,33.665352],[55.181721,33.67519],[55.185951,33.722252],[55.186932,33.733372],[55.188869,33.755901],[55.19022,33.769772],[55.19437,33.816299],[55.197609,33.853371],[55.198872,33.86784],[55.19912,33.874069],[55.199169,33.87693],[55.199551,33.897419],[55.19949,33.902531],[55.19912,33.9081],[55.197571,33.918049],[55.19138,33.95414],[55.190868,33.95586],[55.190411,33.975052],[55.18998,33.992599],[55.18977,34.000889],[55.189209,34.021259],[55.188301,34.037731],[55.18737,34.057541],[55.187382,34.059479],[55.187531,34.061371],[55.203011,34.140369],[55.20351,34.14296],[55.203991,34.144909],[55.20462,34.14682],[55.20575,34.149281],[55.205898,34.14962],[55.210041,34.158669],[55.2104,34.159451],[55.21236,34.171219],[55.220131,34.21777],[55.22076,34.222012],[55.22147,34.232059],[55.221619,34.234131],[55.22179,34.235569],[55.22208,34.237122],[55.222641,34.239288],[55.227921,34.257561],[55.228619,34.259899],[55.231991,34.271622],[55.24136,34.306641],[55.241661,34.307739],[55.24202,34.309109],[55.242371,34.310398],[55.243389,34.314209],[55.2435,34.314339],[55.245979,34.323818],[55.249329,34.336559],[55.249599,34.337589],[55.260361,34.372532],[55.261391,34.375931],[55.2654,34.389042],[55.266911,34.393532],[55.269669,34.401371],[55.288132,34.453289],[55.294189,34.472851],[55.315491,34.531731],[55.32428,34.562809],[55.356602,34.639191],[55.362381,34.65646],[55.36401,34.661339],[55.366451,34.668381],[55.370159,34.677132],[55.37426,34.68692],[55.383419,34.70425],[55.389469,34.713871],[55.41082,34.76725],[55.418419,34.78442],[55.425541,34.80146],[55.433361,34.82016],[55.43346,34.8204],[55.446468,34.851879],[55.448391,34.856579],[55.45153,34.864239],[55.470219,34.909729],[55.487339,34.948181],[55.49308,34.976509],[55.496552,35.007629],[55.496891,35.010681],[55.497028,35.011959],[55.49752,35.01646],[55.49955,35.036381],[55.499592,35.036758],[55.503189,35.101479],[55.505718,35.117962],[55.505718,35.120701],[55.503521,35.144611],[55.499298,35.190571],[55.499981,35.215981],[55.49902,35.240929],[55.498859,35.24894],[55.491619,35.31348],[55.491409,35.35181],[55.491329,35.367901],[55.491421,35.397419],[55.49123,35.400509],[55.487518,35.416309],[55.48074,35.444111],[55.48024,35.446171],[55.474239,35.491421],[55.471531,35.511909],[55.470581,35.519581],[55.47044,35.52206],[55.470119,35.529282],[55.468689,35.557758],[55.466881,35.593349],[55.46558,35.618931],[55.464211,35.645908],[55.46402,35.649601],[55.462921,35.676449],[55.461948,35.701061],[55.465279,35.759811],[55.46529,35.761002],[55.465351,35.769691],[55.465382,35.77354],[55.464821,35.826988],[55.464802,35.828949],[55.464779,35.83086],[55.464771,35.8321],[55.464691,35.839359],[55.4646,35.847698],[55.46542,35.903252],[55.46558,35.913269],[55.465382,35.917561],[55.46402,35.94331],[55.45993,36.022961],[55.459179,36.03561],[55.457581,36.060638],[55.457581,36.06271],[55.457821,36.064789],[55.458118,36.066799],[55.458641,36.068619],[55.474209,36.110161],[55.474339,36.11058],[55.49065,36.16309],[55.494148,36.174358],[55.50119,36.207119],[55.50909,36.243801],[55.51041,36.24992],[55.510818,36.251862],[55.51379,36.26569],[55.522362,36.31168],[55.525181,36.326809],[55.525589,36.32901],[55.531239,36.359341],[55.535961,36.384621],[55.536018,36.384899],[55.536072,36.385201],[55.536709,36.388729],[55.538609,36.39875],[55.53883,36.39996],[55.539341,36.40274],[55.53973,36.404888],[55.540291,36.407959],[55.54216,36.417648],[55.54895,36.455029],[55.551121,36.483101],[55.55114,36.483269],[55.551151,36.483429],[55.55167,36.490059],[55.55621,36.54797],[55.556221,36.548161],[55.55801,36.571011],[55.55822,36.573589],[55.55896,36.582569],[55.564362,36.632759],[55.565071,36.639389],[55.56826,36.669849],[55.571011,36.695881],[55.571018,36.69603],[55.571079,36.69664],[55.571091,36.696739],[55.572319,36.708599],[55.572392,36.70932],[55.572491,36.710251],[55.573101,36.716228],[55.573471,36.719952],[55.575031,36.73521],[55.575729,36.74213],[55.576229,36.747021],[55.57666,36.751289],[55.578522,36.76976],[55.57893,36.773891],[55.581409,36.798882],[55.584068,36.824989],[55.587349,36.85857],[55.58794,36.864269],[55.588421,36.869068],[55.58881,36.872978],[55.589039,36.875259],[55.59066,36.891609],[55.591808,36.90316],[55.594059,36.925831],[55.595589,36.93972],[55.595779,36.941292],[55.59602,36.94323],[55.596539,36.94767],[55.59848,36.964432],[55.598991,36.96875],[55.60051,36.981628],[55.60228,36.996632],[55.602638,36.99966],[55.603119,37.004261],[55.603149,37.004681],[55.603199,37.0051],[55.603249,37.005459],[55.60331,37.005859],[55.603821,37.01012],[55.604,37.011539],[55.604519,37.015621],[55.60535,37.02277],[55.605911,37.02747],[55.609039,37.05463],[55.60976,37.061089],[55.610279,37.06546],[55.610531,37.06673],[55.611149,37.069778],[55.61121,37.070091],[55.612518,37.076752],[55.61248,37.077709],[55.613091,37.081009],[55.613289,37.081989],[55.61565,37.093441],[55.616119,37.09626],[55.616531,37.09869],[55.616909,37.101959],[55.62027,37.126701],[55.62133,37.13377],[55.622608,37.142799],[55.62299,37.14724],[55.623268,37.151451],[55.623901,37.161259],[55.624741,37.174],[55.625259,37.181801],[55.625439,37.184681],[55.62553,37.185589],[55.625839,37.188622],[55.626049,37.191921],[55.62619,37.19376],[55.626339,37.195271],[55.62648,37.196281],[55.626652,37.197441],[55.626869,37.198662],[55.627129,37.19978],[55.627392,37.200779],[55.627831,37.202209],[55.628361,37.203701],[55.628811,37.20483],[55.629269,37.205891],[55.629539,37.20652],[55.631119,37.209999],[55.63187,37.211639],[55.632359,37.212799],[55.633801,37.216019],[55.634998,37.21875],[55.635479,37.219841],[55.635929,37.22084],[55.636299,37.22168],[55.637501,37.2244],[55.63868,37.227039],[55.639858,37.229698],[55.64106,37.23241],[55.642269,37.23513],[55.64267,37.236141],[55.643509,37.238441],[55.64431,37.240719],[55.645939,37.245239],[55.646641,37.247131],[55.64769,37.250061],[55.648029,37.251019],[55.648281,37.251839],[55.648548,37.252762],[55.648689,37.253342],[55.649071,37.255032],[55.649429,37.25684],[55.650082,37.260521],[55.65052,37.262779],[55.651131,37.266102],[55.651451,37.26786],[55.652248,37.272171],[55.65284,37.275341],[55.653412,37.278389],[55.654259,37.28299],[55.655399,37.28931],[55.655602,37.29039],[55.655788,37.291409],[55.656269,37.293739],[55.656448,37.29435],[55.656658,37.295059],[55.657089,37.29631],[55.657379,37.296982],[55.657879,37.298019],[55.658489,37.299019],[55.65905,37.29977],[55.659611,37.300468],[55.66087,37.301861],[55.66206,37.303169],[55.662281,37.30341],[55.663811,37.30505],[55.664719,37.306],[55.665619,37.307011],[55.666908,37.308472],[55.66782,37.309441],[55.66853,37.310169],[55.669109,37.31081],[55.66951,37.311241],[55.670639,37.3125],[55.671421,37.31332],[55.67263,37.31464],[55.672989,37.315029],[55.67794,37.320431],[55.67857,37.321129],[55.679428,37.322071],[55.67984,37.322559],[55.680038,37.3228],[55.680191,37.322941],[55.683571,37.326599],[55.683819,37.32687],[55.685791,37.328991],[55.690022,37.333519],[55.693169,37.336971],[55.694759,37.338631],[55.69556,37.339531],[55.69595,37.34],[55.696331,37.340481],[55.696732,37.341011],[55.697109,37.341579],[55.697842,37.3428],[55.698311,37.34359],[55.698471,37.343861],[55.698639,37.344151],[55.698738,37.34433],[55.69949,37.34568],[55.69978,37.34621],[55.700371,37.34729],[55.701241,37.348869],[55.702839,37.351891],[55.703732,37.35355],[55.703949,37.353958],[55.704472,37.354939],[55.705002,37.3559],[55.705441,37.356682],[55.706081,37.357891],[55.706638,37.358891],[55.70705,37.35965],[55.70755,37.360569],[55.707878,37.36121],[55.708172,37.361801],[55.708382,37.36227],[55.70882,37.363319],[55.70911,37.36401],[55.709499,37.36504],[55.709728,37.36573],[55.70998,37.366482],[55.710281,37.367481],[55.710541,37.368431],[55.710812,37.36953],[55.71104,37.37059],[55.711269,37.3717],[55.711849,37.375118],[55.71209,37.376629],[55.71262,37.38015],[55.71286,37.381729],[55.712818,37.382339],[55.712799,37.382561],[55.712742,37.382771],[55.71244,37.38372],[55.712261,37.384258],[55.71199,37.38509],[55.711929,37.385281],[55.71167,37.386082],[55.71138,37.386688],[55.710949,37.387459],[55.710098,37.38821],[55.70993,37.388371],[55.709641,37.38863],[55.70837,37.39016],[55.707981,37.390572],[55.70681,37.392139],[55.70639,37.392712],[55.705299,37.394119],[55.704361,37.395302],[55.70406,37.39571],[55.702068,37.398418],[55.701469,37.399239],[55.700809,37.40015],[55.700291,37.400841],[55.699841,37.401459],[55.699261,37.40226],[55.698799,37.402901],[55.69754,37.404541],[55.693779,37.40976],[55.69265,37.41103],[55.692039,37.411659],[55.691422,37.412251],[55.690071,37.41328],[55.689751,37.413502],[55.689011,37.413952],[55.688309,37.41433],[55.687618,37.41465],[55.686611,37.41502],[55.686401,37.4151],[55.685848,37.41526],[55.685699,37.415272],[55.685081,37.415489],[55.684391,37.415779],[55.684059,37.415932],[55.683659,37.41613],[55.683281,37.41634],[55.68285,37.416599],[55.68243,37.41687],[55.68206,37.41713],[55.680611,37.418221],[55.67614,37.421558],[55.670879,37.425499],[55.669231,37.426739],[55.668152,37.427551],[55.66732,37.428162],[55.666191,37.429008],[55.66576,37.42934],[55.664509,37.430271],[55.664131,37.43058],[55.663528,37.431091],[55.66267,37.43187],[55.661491,37.432999],[55.66053,37.433929],[55.66013,37.434341],[55.659729,37.43478],[55.659309,37.435249],[55.659088,37.43549],[55.658169,37.436569],[55.656479,37.438549],[55.65451,37.440849],[55.65411,37.441319],[55.653751,37.44178],[55.652359,37.4436],[55.652111,37.44389],[55.65086,37.445358],[55.645191,37.451988],[55.643459,37.454021],[55.641281,37.45657],[55.639191,37.459019],[55.6385,37.459839],[55.637131,37.461441],[55.6366,37.462059],[55.635941,37.462818],[55.632431,37.466919],[55.631828,37.467621],[55.63158,37.467899],[55.630939,37.468651],[55.628601,37.471371],[55.627361,37.47282],[55.625629,37.474838],[55.620949,37.48032],[55.617222,37.48468],[55.6157,37.48645],[55.614529,37.48782],[55.61364,37.48885],[55.613361,37.489182],[55.611931,37.490841],[55.611519,37.491322],[55.610699,37.492279],[55.609539,37.493629],[55.608521,37.49482],[55.607571,37.49593],[55.60601,37.497749],[55.6035,37.500671],[55.60091,37.503681],[55.600288,37.504429],[55.599682,37.505211],[55.599121,37.505989],[55.59874,37.506592],[55.598339,37.507221],[55.59782,37.508129],[55.59745,37.508789],[55.597092,37.50948],[55.596691,37.510311],[55.596321,37.51115],[55.59586,37.512249],[55.595428,37.513359],[55.595081,37.51437],[55.594688,37.515591],[55.594349,37.516731],[55.59404,37.517948],[55.593811,37.518921],[55.592319,37.525131],[55.591541,37.528412],[55.59132,37.529339],[55.590912,37.53101],[55.59005,37.534599],[55.587421,37.545601],[55.587139,37.54678],[55.586491,37.549469],[55.584969,37.55584],[55.58287,37.564602],[55.582199,37.567421],[55.581779,37.56916],[55.580719,37.57357],[55.580261,37.57552],[55.579342,37.579361],[55.577278,37.58794],[55.577141,37.588551],[55.577,37.58918],[55.57687,37.589771],[55.576759,37.590408],[55.576641,37.591091],[55.576439,37.59227],[55.57634,37.592911],[55.576241,37.593521],[55.57616,37.594131],[55.576092,37.594742],[55.576019,37.59539],[55.57597,37.596008],[55.575932,37.59655],[55.57589,37.597099],[55.575809,37.598301],[55.575741,37.599659],[55.575611,37.601822],[55.575329,37.606709],[55.575241,37.608158],[55.574982,37.612598],[55.574921,37.613659],[55.574581,37.61935],[55.574409,37.62228],[55.573818,37.632408],[55.573681,37.63475],[55.573589,37.636292],[55.573471,37.638309],[55.57336,37.640308],[55.57325,37.64204],[55.57304,37.645771],[55.572929,37.647671],[55.57283,37.6492],[55.572639,37.652538],[55.572609,37.653061],[55.57254,37.654121],[55.572491,37.655071],[55.571991,37.6633],[55.57196,37.66394],[55.57193,37.664619],[55.571892,37.665298],[55.571869,37.665932],[55.571838,37.666599],[55.571831,37.667271],[55.571819,37.66795],[55.571819,37.66864],[55.571831,37.669312],[55.571861,37.669998],[55.57188,37.67067],[55.571918,37.671349],[55.571972,37.67202],[55.572029,37.672691],[55.57209,37.673359],[55.57217,37.67403],[55.57225,37.674702],[55.57233,37.675362],[55.572418,37.67601],[55.572529,37.67667],[55.57275,37.677952],[55.572861,37.678589],[55.573002,37.679241],[55.573139,37.679871],[55.573299,37.680489],[55.57346,37.68108],[55.573608,37.68166],[55.57375,37.68219],[55.573929,37.682758],[55.5741,37.683331],[55.57428,37.683868],[55.574459,37.68441],[55.574631,37.684891],[55.575432,37.687099],[55.575649,37.687721],[55.576092,37.688889],[55.577709,37.69323],[55.579571,37.698189],[55.581402,37.703121],[55.581951,37.704578],[55.582272,37.705448],[55.582729,37.70668],[55.584511,37.711472],[55.585201,37.71331],[55.585819,37.714989],[55.586071,37.715672],[55.58654,37.716949],[55.587009,37.71822],[55.58749,37.719452],[55.587688,37.719952],[55.588299,37.72142],[55.588951,37.723],[55.589619,37.724548],[55.59016,37.725842],[55.591499,37.729031],[55.591949,37.73011],[55.593449,37.733688],[55.59478,37.736851],[55.594959,37.737309],[55.5952,37.737869],[55.595829,37.739429],[55.599812,37.748901],[55.600319,37.750092],[55.600761,37.751122],[55.601151,37.752041],[55.60165,37.753132],[55.602089,37.75404],[55.602669,37.755161],[55.603168,37.756088],[55.6063,37.761768],[55.60696,37.762981],[55.612579,37.77314],[55.616131,37.779572],[55.616459,37.78017],[55.616638,37.780491],[55.617081,37.7813],[55.617619,37.78228],[55.618858,37.784519],[55.619438,37.785568],[55.619869,37.786461],[55.620838,37.788631],[55.621399,37.789799],[55.621929,37.790821],[55.622391,37.791649],[55.624439,37.795361],[55.62495,37.796268],[55.625351,37.796909],[55.62574,37.797508],[55.626129,37.7981],[55.62619,37.798199],[55.626411,37.79847],[55.62669,37.798851],[55.62711,37.79945],[55.627621,37.800201],[55.62772,37.800331],[55.63179,37.806599],[55.638611,37.817032],[55.63908,37.817719],[55.640419,37.819771],[55.640659,37.820141],[55.643909,37.825119],[55.645351,37.827309],[55.647419,37.83049],[55.648521,37.83213],[55.648972,37.832802],[55.649021,37.83287],[55.649658,37.833721],[55.650372,37.834641],[55.65123,37.835602],[55.65181,37.83617],[55.652519,37.8368],[55.653511,37.837551],[55.654282,37.838051],[55.65493,37.838428],[55.655941,37.83894],[55.656559,37.839191],[55.657131,37.83939],[55.65794,37.839581],[55.65889,37.839771],[55.65974,37.839859],[55.660549,37.839901],[55.661308,37.839901],[55.662201,37.839809],[55.662971,37.839668],[55.663738,37.83947],[55.664799,37.839111],[55.670181,37.837132],[55.679001,37.83392],[55.682739,37.832371],[55.68362,37.832031],[55.68544,37.83136],[55.687061,37.830761],[55.6875,37.830589],[55.687778,37.830502],[55.68898,37.83012],[55.690079,37.829849],[55.691051,37.829689],[55.692001,37.829571],[55.692879,37.829521],[55.693741,37.829529],[55.694759,37.82959],[55.69569,37.829708],[55.696659,37.82988],[55.697041,37.82999],[55.697418,37.83009],[55.697479,37.830109],[55.69804,37.830269],[55.698479,37.830421],[55.69883,37.83054],[55.69899,37.830608],[55.6996,37.830849],[55.70039,37.831211],[55.701149,37.831589],[55.704849,37.833591],[55.705349,37.833851],[55.707619,37.83506],[55.708229,37.835381],[55.709419,37.83601],[55.709961,37.8363],[55.71011,37.83638],[55.712391,37.837589],[55.71328,37.838032],[55.71402,37.838322],[55.714729,37.838558],[55.715511,37.838741],[55.71656,37.838909],[55.72023,37.839359],[55.72298,37.839691],[55.728729,37.840382],[55.731949,37.840771],[55.732861,37.84087],[55.734409,37.841068],[55.736671,37.841351],[55.74012,37.841801],[55.740929,37.841881],[55.74213,37.84201],[55.74361,37.842098],[55.745289,37.842159],[55.747231,37.842251],[55.748741,37.8423],[55.74939,37.842319],[55.749931,37.842361],[55.75071,37.842419],[55.752129,37.84251],[55.753551,37.84259],[55.75523,37.84272],[55.755501,37.842739],[55.757359,37.84288],[55.757561,37.84288],[55.757641,37.84288],[55.758911,37.842892],[55.759331,37.842899],[55.760319,37.84296],[55.760971,37.842991],[55.762878,37.843102],[55.76572,37.843239],[55.766689,37.843288],[55.76738,37.843319],[55.767891,37.843349],[55.768021,37.843361],[55.768501,37.843391],[55.770119,37.843491],[55.770489,37.843491],[55.77145,37.843491],[55.772919,37.843342],[55.774342,37.843208],[55.77499,37.84338],[55.775249,37.843491],[55.775452,37.843689],[55.776039,37.844742],[55.77623,37.844978],[55.77705,37.845612],[55.777222,37.845779],[55.777351,37.84594],[55.777531,37.846272],[55.777889,37.847328],[55.778801,37.85104],[55.779202,37.852638],[55.779339,37.853279],[55.779732,37.85498],[55.782631,37.867538],[55.782661,37.867661],[55.783169,37.869801],[55.783279,37.870251],[55.78421,37.874069],[55.784538,37.875488],[55.78471,37.87619],[55.784889,37.876949],[55.78561,37.880032],[55.786098,37.882141],[55.78651,37.883801],[55.786739,37.884609],[55.78746,37.88699],[55.788448,37.890148],[55.78949,37.893379],[55.789871,37.894581],[55.790169,37.89555],[55.790199,37.895641],[55.791199,37.8988],[55.792561,37.903049],[55.793041,37.904652],[55.793282,37.905579],[55.793419,37.906479],[55.793461,37.90691],[55.793468,37.907089],[55.79348,37.907341],[55.793499,37.907871],[55.793499,37.908539],[55.79351,37.916191],[55.793522,37.91724],[55.79353,37.918259],[55.793549,37.921631],[55.79361,37.92384],[55.793732,37.927231],[55.793892,37.931759],[55.79398,37.934212],[55.793991,37.934639],[55.794022,37.935371],[55.794041,37.936089],[55.794109,37.937531],[55.794331,37.942131],[55.794441,37.944149],[55.794559,37.946301],[55.794571,37.946381],[55.794628,37.947529],[55.794731,37.948898],[55.794922,37.950771],[55.79525,37.95372],[55.795479,37.955669],[55.795589,37.95673],[55.795792,37.958351],[55.79586,37.9589],[55.79657,37.965309],[55.79681,37.96735],[55.796989,37.96891],[55.79707,37.969711],[55.797421,37.972721],[55.798012,37.97784],[55.798828,37.984989],[55.798981,37.98632],[55.799068,37.987122],[55.799309,37.989269],[55.799389,37.989929],[55.79995,37.99477],[55.800179,37.996861],[55.800678,38.001228],[55.80167,38.009972],[55.802582,38.017769],[55.802711,38.018841],[55.80275,38.019249],[55.804459,38.034031],[55.804798,38.036968],[55.805111,38.03968],[55.806099,38.048382],[55.80703,38.056568],[55.807659,38.062111],[55.807812,38.0634],[55.80801,38.065159],[55.808071,38.065659],[55.8083,38.067612],[55.808739,38.071411],[55.80938,38.07703],[55.809841,38.081131],[55.809959,38.082241],[55.81068,38.088501],[55.810719,38.08881],[55.81139,38.094582],[55.812359,38.10323],[55.81303,38.1092],[55.813881,38.116638],[55.81868,38.15852],[55.819,38.161419],[55.820221,38.172131],[55.820431,38.17411],[55.82132,38.181702],[55.821442,38.182949],[55.821461,38.183102],[55.821499,38.18354],[55.82225,38.190128],[55.822361,38.191101],[55.823551,38.20171],[55.824329,38.208481],[55.824909,38.213718],[55.8251,38.215611],[55.825329,38.218121],[55.82571,38.223591],[55.82608,38.228828],[55.826542,38.23563],[55.826778,38.239231],[55.827629,38.25211],[55.82795,38.25732],[55.828331,38.263401],[55.828781,38.2701],[55.829109,38.275379],[55.829342,38.280701],[55.829639,38.28738],[55.829659,38.287949],[55.82967,38.288231],[55.830051,38.29707],[55.830502,38.30489],[55.83194,38.33017],[55.83239,38.338009],[55.83342,38.35574],[55.833599,38.358952],[55.83403,38.366322],[55.834381,38.372669],[55.834702,38.377949],[55.83482,38.380878],[55.834839,38.382549],[55.83477,38.383881],[55.834599,38.385471],[55.833721,38.390701],[55.832951,38.395111],[55.832809,38.395908],[55.831779,38.401699],[55.8312,38.40456],[55.83094,38.405682],[55.830631,38.406898],[55.82999,38.408829],[55.82972,38.409592],[55.829151,38.41106],[55.828331,38.412979],[55.826809,38.416618],[55.826031,38.418549],[55.825748,38.419392],[55.825581,38.419949],[55.825089,38.42218],[55.824982,38.42305],[55.824871,38.42392],[55.82478,38.425251],[55.82473,38.426109],[55.82473,38.427311],[55.82476,38.428051],[55.824749,38.428509],[55.82481,38.429169],[55.824989,38.430969],[55.825199,38.432529],[55.825371,38.433399],[55.825699,38.434738],[55.826401,38.43708],[55.828979,38.44458],[55.83062,38.449169],[55.83115,38.45071],[55.832279,38.453861],[55.832829,38.455311],[55.833351,38.456581],[55.835171,38.46122],[55.83836,38.47044],[55.83844,38.47068],[55.839958,38.474972],[55.84132,38.47831],[55.842251,38.480808],[55.843899,38.484718],[55.849442,38.496941],[55.850368,38.499081],[55.851299,38.501099],[55.852501,38.50391],[55.853249,38.505562],[55.853828,38.507092],[55.854752,38.510052],[55.855492,38.5131],[55.85606,38.516289],[55.856522,38.519611],[55.85675,38.522591],[55.85672,38.52573],[55.8564,38.533169],[55.855999,38.541279],[55.85569,38.548031],[55.855461,38.55389],[55.855381,38.556011],[55.85527,38.558819],[55.855179,38.56089],[55.855011,38.565231],[55.854752,38.572048],[55.854591,38.575989],[55.854359,38.580959],[55.854198,38.58392],[55.853821,38.590309],[55.85355,38.594608],[55.853199,38.600342],[55.852901,38.605492],[55.852631,38.609772],[55.852612,38.610142],[55.85257,38.611061],[55.852402,38.613701],[55.85223,38.6166],[55.8522,38.617729],[55.85215,38.62241],[55.8521,38.625439],[55.852089,38.627972],[55.85202,38.63319],[55.851978,38.6376],[55.851929,38.641621],[55.851929,38.641899],[55.851871,38.646179],[55.85181,38.651909],[55.851761,38.656639],[55.851719,38.657131],[55.851452,38.658691],[55.850929,38.660412],[55.849529,38.664989],[55.848789,38.667549],[55.84853,38.668701],[55.84827,38.670448],[55.848209,38.671341],[55.848202,38.672771],[55.848221,38.674671],[55.84837,38.681469],[55.848541,38.689041],[55.848701,38.69688],[55.848831,38.70393],[55.84893,38.708691],[55.849152,38.718632],[55.849251,38.72348],[55.849361,38.728699],[55.849468,38.73336],[55.849529,38.736099],[55.849739,38.747841],[55.84996,38.75782],[55.85006,38.762772],[55.850109,38.76535],[55.85014,38.766449],[55.85014,38.76672],[55.850151,38.767639],[55.850201,38.77037],[55.850281,38.774529],[55.850449,38.782619],[55.85054,38.787449],[55.850739,38.797169],[55.85083,38.801781],[55.850929,38.806992],[55.851028,38.811989],[55.851151,38.817791],[55.851349,38.826908],[55.851452,38.83194],[55.851559,38.836769],[55.851669,38.84137],[55.85183,38.850101],[55.851959,38.854939],[55.852131,38.85675],[55.85244,38.859402],[55.852741,38.861851],[55.85297,38.86401],[55.853298,38.86705],[55.853371,38.86755],[55.853649,38.86882],[55.853851,38.869652],[55.854881,38.8736],[55.855572,38.876369],[55.856621,38.880428],[55.857498,38.883888],[55.857632,38.884441],[55.857899,38.885509],[55.858608,38.888271],[55.858761,38.888851],[55.859509,38.89172],[55.859638,38.892189],[55.86071,38.89637],[55.861301,38.898579],[55.86179,38.900471],[55.862309,38.90255],[55.866249,38.917938],[55.867081,38.921101],[55.869419,38.930328],[55.872372,38.945221],[55.873741,38.952301],[55.875,38.958649],[55.876041,38.962421],[55.876839,38.965401],[55.877029,38.96616],[55.878761,38.97385],[55.880711,38.982849],[55.88147,38.986351],[55.883362,38.9953],[55.88361,38.99654],[55.884048,38.998951],[55.884491,39.00079],[55.885399,39.004181],[55.886238,39.007469],[55.88715,39.010571],[55.88763,39.0121],[55.88805,39.013111],[55.896252,39.043819],[55.897362,39.047932],[55.897861,39.049789],[55.898151,39.051102],[55.898708,39.054008],[55.899109,39.05714],[55.899559,39.061008],[55.899792,39.063019],[55.899811,39.0634],[55.89986,39.063911],[55.899899,39.064449],[55.900002,39.065868],[55.900299,39.071079],[55.900551,39.0737],[55.90118,39.077179],[55.901691,39.079651],[55.901829,39.080311],[55.90213,39.081772],[55.905811,39.098789],[55.90694,39.10458],[55.91214,39.137428],[55.913052,39.14325],[55.913601,39.14687],[55.914108,39.150108],[55.91431,39.151501],[55.914421,39.152279],[55.914471,39.152599],[55.914822,39.154758],[55.915722,39.160469],[55.917042,39.168201],[55.9174,39.171108],[55.917789,39.17503],[55.918152,39.178669],[55.918442,39.181862],[55.91853,39.18288],[55.918919,39.186878],[55.919079,39.188759],[55.91988,39.199379],[55.920479,39.208561],[55.921219,39.21978],[55.921299,39.220951],[55.921619,39.22559],[55.92292,39.244621],[55.923351,39.250851],[55.926182,39.29248],[55.92696,39.3041],[55.927559,39.313049],[55.927952,39.318871],[55.928181,39.322529],[55.92836,39.325321],[55.92836,39.325371],[55.928421,39.326351],[55.928478,39.327202],[55.931431,39.37112],[55.93227,39.38385],[55.932812,39.391972],[55.933029,39.39529],[55.933151,39.397049],[55.934731,39.42107],[55.93491,39.423988],[55.936069,39.441189],[55.93721,39.45771],[55.93779,39.467388],[55.938061,39.46907],[55.93853,39.471161],[55.93972,39.475498],[55.941811,39.483219],[55.943611,39.499222],[55.943939,39.502159],[55.944931,39.511028],[55.94593,39.519939],[55.945969,39.520309],[55.952301,39.577099],[55.953369,39.586811],[55.955349,39.60461],[55.955799,39.60836],[55.956348,39.613419],[55.957291,39.622089],[55.957088,39.626629],[55.95681,39.632778],[55.95673,39.634609],[55.956711,39.635139],[55.956791,39.638279],[55.957359,39.64682],[55.958721,39.66798],[55.960369,39.69347],[55.960659,39.697731],[55.96085,39.700539],[55.96191,39.716789],[55.9622,39.72086],[55.96225,39.721691],[55.964409,39.75536],[55.964851,39.762169],[55.96489,39.762718],[55.96524,39.768108],[55.965439,39.774719],[55.965809,39.777882],[55.96764,39.784889],[55.98246,39.840961],[56.000141,39.908619],[56.000488,39.909969],[56.001431,39.913559],[56.001511,39.91383],[56.001701,39.91441],[56.002071,39.915791],[56.002529,39.917],[56.005741,39.92347],[56.007729,39.92849],[56.008629,39.931511],[56.008701,39.931782],[56.010071,39.936958],[56.011211,39.941299],[56.012619,39.94664],[56.013988,39.95166],[56.014,39.951679],[56.014729,39.95438],[56.017101,39.963089],[56.019081,39.970409],[56.019932,39.973541],[56.020969,39.97736],[56.021751,39.98024],[56.022251,39.982071],[56.022449,39.9828],[56.024139,39.989029],[56.024891,39.991821],[56.029888,40.01022],[56.033798,40.024639],[56.034512,40.027241],[56.036812,40.035728],[56.04406,40.06221],[56.04781,40.075932],[56.048531,40.07859],[56.050949,40.087429],[56.051281,40.08868],[56.05249,40.093159],[56.05315,40.095581],[56.060669,40.123489],[56.060928,40.1245],[56.06554,40.141541],[56.072929,40.169151],[56.073399,40.170849],[56.073719,40.172039],[56.076439,40.182251],[56.076839,40.1838],[56.0769,40.184021],[56.077229,40.185268],[56.078369,40.1894],[56.0798,40.195129],[56.08007,40.196331],[56.080158,40.196941],[56.080238,40.197891],[56.08025,40.19841],[56.080231,40.199059],[56.080151,40.19973],[56.080009,40.200539],[56.078861,40.20388],[56.078739,40.20433],[56.077461,40.207958],[56.075371,40.213879],[56.07259,40.221809],[56.07198,40.224579],[56.071739,40.22599],[56.071541,40.22797],[56.07151,40.231892],[56.071579,40.239571],[56.071621,40.242199],[56.071671,40.247181],[56.07172,40.251339],[56.071819,40.25576],[56.071899,40.264408],[56.072021,40.275421],[56.07201,40.277401],[56.071911,40.279362],[56.071751,40.281521],[56.071301,40.284851],[56.070419,40.289349],[56.070091,40.29105],[56.066311,40.311272],[56.065369,40.317341],[56.06509,40.320469],[56.064861,40.32436],[56.064812,40.32885],[56.06509,40.357712],[56.065109,40.36055],[56.064899,40.362999],[56.064381,40.365318],[56.063999,40.36647],[56.06348,40.368031],[56.062969,40.36956],[56.060211,40.37785],[56.058392,40.385189],[56.05584,40.401508],[56.05529,40.40506],[56.05397,40.413551],[56.053379,40.41769],[56.053059,40.422169],[56.053268,40.426491],[56.053631,40.429062],[56.054138,40.431789],[56.054539,40.433529],[56.055012,40.435131],[56.056149,40.438919],[56.057251,40.442509],[56.059212,40.448811],[56.059971,40.450859],[56.060799,40.45266],[56.061741,40.45451],[56.062462,40.455631],[56.063801,40.4575],[56.064159,40.457951],[56.06485,40.45874],[56.068939,40.462528],[56.07304,40.466202],[56.075062,40.468109],[56.076439,40.469688],[56.078892,40.473],[56.080009,40.47448],[56.080471,40.47506],[56.081928,40.476929],[56.082432,40.4776],[56.083141,40.478611],[56.0839,40.47998],[56.08466,40.481571],[56.085461,40.483891],[56.08606,40.486351],[56.089851,40.509869],[56.090389,40.513908],[56.092449,40.530998],[56.094212,40.545502],[56.095581,40.557201],[56.096889,40.568321],[56.097149,40.570969],[56.097328,40.57296],[56.09763,40.57518],[56.09798,40.577381],[56.098412,40.580799],[56.098591,40.58226],[56.099152,40.587151],[56.099369,40.589512],[56.099529,40.591148],[56.099812,40.593361],[56.100121,40.59547],[56.10041,40.597481],[56.102051,40.611118],[56.103661,40.624569],[56.103882,40.62677],[56.10405,40.629089],[56.10413,40.633461],[56.104019,40.641369],[56.103821,40.64497],[56.103828,40.648499],[56.10384,40.65242],[56.10363,40.661339],[56.103519,40.66444],[56.103489,40.667622],[56.103519,40.67067],[56.10334,40.683609],[56.103329,40.68642],[56.102959,40.711189],[56.102249,40.763199],[56.102329,40.76741],[56.102589,40.771111],[56.102612,40.771339],[56.102779,40.773022],[56.102951,40.774342],[56.103111,40.7756],[56.104851,40.787209],[56.10527,40.79002],[56.108238,40.809799],[56.111141,40.828381],[56.11182,40.83308],[56.112591,40.83646],[56.113392,40.839539],[56.114681,40.843609],[56.11602,40.84687],[56.118992,40.85318],[56.129902,40.876259],[56.13113,40.879059],[56.132191,40.881241],[56.132561,40.881989],[56.13348,40.88377],[56.134041,40.884899],[56.134701,40.88633],[56.137161,40.891621],[56.138111,40.893848],[56.139389,40.89642],[56.14061,40.898788],[56.146461,40.911152],[56.14753,40.91304],[56.14859,40.914761],[56.149818,40.91655],[56.151058,40.918201],[56.154869,40.922371],[56.158642,40.926521],[56.16753,40.93631],[56.173779,40.94326],[56.175091,40.94445],[56.176392,40.945431],[56.177738,40.946201],[56.1791,40.946781],[56.19043,40.950539],[56.190891,40.950729],[56.192089,40.95116],[56.192841,40.951611],[56.193321,40.95216],[56.193722,40.952839],[56.193989,40.95359],[56.19418,40.954418],[56.194321,40.955502],[56.19463,40.9617],[56.194931,40.968739],[56.195351,40.9744],[56.196018,40.986382],[56.196251,40.99144],[56.196758,41.00251],[56.197819,41.02309],[56.20219,41.11478],[56.20306,41.133041],[56.20385,41.149139],[56.2043,41.158642],[56.204361,41.15974],[56.206051,41.196301],[56.206631,41.206532],[56.207371,41.222488],[56.20882,41.251839],[56.211048,41.30019],[56.211201,41.303452],[56.212311,41.326351],[56.212448,41.33046],[56.216839,41.43071],[56.21756,41.447971],[56.218842,41.474659],[56.223141,41.56255],[56.225788,41.630322],[56.226082,41.63707],[56.226181,41.639389],[56.227459,41.669319],[56.22855,41.694981],[56.228828,41.701469],[56.228859,41.702179],[56.229172,41.709389],[56.230148,41.732349],[56.230259,41.73505],[56.230331,41.736679],[56.232471,41.786751],[56.232738,41.794498],[56.23291,41.79882],[56.23296,41.79998],[56.23317,41.805161],[56.233189,41.805889],[56.233589,41.817379],[56.234089,41.838871],[56.234402,41.85252],[56.23465,41.866039],[56.2351,41.8848],[56.23513,41.885979],[56.235168,41.887909],[56.2355,41.903431],[56.235889,41.921749],[56.236118,41.931831],[56.23632,41.94083],[56.23634,41.941792],[56.236351,41.94276],[56.23637,41.94421],[56.236561,41.952782],[56.23658,41.954411],[56.236591,41.95488],[56.236629,41.956581],[56.236629,41.956711],[56.236881,41.966068],[56.236931,41.97105],[56.236969,41.973549],[56.237,41.974812],[56.237041,41.976479],[56.237049,41.97715],[56.237061,41.97784],[56.23724,41.98439],[56.237301,41.98632],[56.23732,41.98719],[56.23737,41.98933],[56.237419,41.992352],[56.23745,41.993832],[56.237461,41.994499],[56.237541,41.99876],[56.237549,41.99931],[56.237621,42.00243],[56.237652,42.004131],[56.237789,42.009571],[56.23793,42.017139],[56.237999,42.02042],[56.238091,42.02457],[56.238201,42.02961],[56.238239,42.030991],[56.238331,42.034069],[56.238392,42.036381],[56.238419,42.037552],[56.238468,42.039661],[56.23851,42.041389],[56.238541,42.042309],[56.238659,42.047852],[56.238789,42.053452],[56.238899,42.058681],[56.238918,42.059441],[56.238991,42.062641],[56.239029,42.06456],[56.239059,42.066071],[56.239079,42.066719],[56.23912,42.068748],[56.23912,42.069061],[56.239128,42.069359],[56.239159,42.070831],[56.239262,42.075661],[56.239281,42.0765],[56.239319,42.07877],[56.23938,42.081821],[56.239422,42.083851],[56.23946,42.086319],[56.239498,42.088009],[56.239571,42.090832],[56.239658,42.09568],[56.2397,42.097988],[56.239719,42.099369],[56.239738,42.101269],[56.23975,42.101719],[56.239712,42.102219],[56.2397,42.102371],[56.239609,42.10305],[56.239429,42.10384],[56.239231,42.104568],[56.23909,42.105],[56.238941,42.105389],[56.238762,42.10577],[56.238419,42.106441],[56.238049,42.10704],[56.23793,42.10722],[56.23737,42.10807],[56.236279,42.109791],[56.235409,42.11121],[56.234341,42.112789],[56.23365,42.113869],[56.232689,42.115391],[56.231682,42.117001],[56.230629,42.11869],[56.22974,42.120159],[56.22879,42.121719],[56.22765,42.12347],[56.226768,42.124859],[56.22617,42.125839],[56.225601,42.126751],[56.225189,42.127468],[56.224949,42.127869],[56.224731,42.12825],[56.224499,42.128681],[56.22414,42.129459],[56.223801,42.130241],[56.22337,42.131451],[56.222969,42.132702],[56.222679,42.13369],[56.22237,42.13488],[56.222351,42.134972],[56.222271,42.13533],[56.222191,42.13578],[56.221951,42.136971],[56.221802,42.137798],[56.22171,42.138329],[56.22163,42.13887],[56.221539,42.139568],[56.22147,42.140251],[56.221359,42.141621],[56.22126,42.14344],[56.22121,42.144508],[56.221111,42.1465],[56.221081,42.147301],[56.221039,42.147991],[56.220989,42.149342],[56.220951,42.150242],[56.22086,42.151829],[56.220829,42.152328],[56.22076,42.153728],[56.220661,42.156261],[56.22057,42.158321],[56.220482,42.16037],[56.22044,42.16106],[56.220379,42.162239],[56.220242,42.1651],[56.220131,42.167999],[56.22007,42.169552],[56.220032,42.17033],[56.21991,42.172489],[56.219849,42.17411],[56.21983,42.17485],[56.219749,42.17614],[56.219639,42.17831],[56.219559,42.180012],[56.219509,42.181019],[56.21946,42.182041],[56.219452,42.182171],[56.219391,42.183201],[56.219341,42.18401],[56.219269,42.185101],[56.219189,42.18644],[56.219109,42.187599],[56.218929,42.190868],[56.218849,42.192341],[56.218769,42.193939],[56.218719,42.19487],[56.218681,42.195591],[56.218639,42.196548],[56.218578,42.19772],[56.218491,42.199581],[56.21841,42.201229],[56.21833,42.202839],[56.218288,42.203579],[56.218239,42.204659],[56.218159,42.206322],[56.218151,42.206532],[56.218102,42.207401],[56.218021,42.209061],[56.217918,42.211029],[56.21785,42.212399],[56.217781,42.213848],[56.217659,42.216492],[56.217541,42.218849],[56.217419,42.221321],[56.21735,42.222679],[56.217281,42.22393],[56.217239,42.22472],[56.21714,42.226871],[56.217079,42.228149],[56.21703,42.229679],[56.216999,42.230999],[56.216961,42.2323],[56.216888,42.233879],[56.216831,42.235279],[56.216728,42.237122],[56.21664,42.238911],[56.21656,42.24078],[56.216412,42.243759],[56.216209,42.245811],[56.215931,42.247929],[56.215611,42.24984],[56.215359,42.251202],[56.215031,42.25272],[56.21471,42.254009],[56.214241,42.255501],[56.213951,42.25647],[56.21389,42.25666],[56.2136,42.25761],[56.213039,42.259548],[56.212559,42.261139],[56.211979,42.263111],[56.21138,42.26503],[56.210609,42.267651],[56.209949,42.269829],[56.209171,42.272491],[56.208221,42.275631],[56.207611,42.277748],[56.20694,42.27998],[56.206249,42.282349],[56.205791,42.283871],[56.205238,42.28566],[56.20525,42.28627],[56.20401,42.290192],[56.203461,42.2924],[56.20311,42.31216],[56.202709,42.350479],[56.202141,42.353569],[56.20055,42.358742],[56.19643,42.370819],[56.192322,42.383091],[56.187889,42.39357],[56.180851,42.4077],[56.174171,42.41687],[56.173489,42.41782],[56.17289,42.41898],[56.172581,42.42009],[56.172379,42.421188],[56.170639,42.432362],[56.169659,42.43837],[56.16935,42.441959],[56.165829,42.482651],[56.164501,42.491241],[56.159721,42.51355],[56.15876,42.520081],[56.159119,42.531361],[56.15947,42.544979],[56.160858,42.594921],[56.161251,42.60453],[56.16552,42.619999],[56.172901,42.646759],[56.173481,42.649509],[56.178452,42.65913],[56.191662,42.686031],[56.19186,42.686432],[56.193371,42.689461],[56.196049,42.695148],[56.196758,42.698891],[56.197948,42.70261],[56.218712,42.76685],[56.220501,42.772598],[56.221661,42.77668],[56.223629,42.782749],[56.224579,42.78558],[56.226028,42.789421],[56.226971,42.792339],[56.22842,42.79681],[56.229061,42.798882],[56.23,42.802238],[56.230999,42.805901],[56.24231,42.84774],[56.242371,42.84795],[56.249691,42.874859],[56.256721,42.90099],[56.260399,42.91436],[56.26405,42.927792],[56.27478,42.967529],[56.275219,42.969231],[56.27552,42.970509],[56.275791,42.971901],[56.275982,42.973129],[56.27615,42.97443],[56.27631,42.976299],[56.276451,42.978531],[56.276951,42.98867],[56.277401,42.998749],[56.278488,43.02235],[56.280121,43.058609],[56.2817,43.09417],[56.28487,43.16291],[56.285,43.165661],[56.28511,43.16753],[56.286179,43.19146],[56.28981,43.27335],[56.293308,43.355141],[56.293659,43.3633],[56.298222,43.473461],[56.298351,43.476559],[56.298439,43.478661],[56.30085,43.538639],[56.300961,43.541592],[56.301022,43.542969],[56.30117,43.54668],[56.301609,43.557201],[56.301689,43.559189],[56.301788,43.56168],[56.302059,43.56789],[56.302711,43.58334],[56.30302,43.590809],[56.303028,43.59116],[56.303051,43.591572],[56.303471,43.601101],[56.304211,43.618938],[56.304508,43.625919],[56.304779,43.63308],[56.30534,43.648609],[56.305931,43.66502],[56.3064,43.678478],[56.306499,43.681099],[56.306599,43.684059],[56.30685,43.690491],[56.306889,43.691631],[56.30698,43.693989],[56.307541,43.709881],[56.308159,43.726921],[56.308701,43.742699],[56.308842,43.746109],[56.308861,43.74688],[56.309269,43.759121],[56.309689,43.770309],[56.309891,43.77544],[56.31036,43.788029],[56.31041,43.78923],[56.31052,43.79203],[56.31076,43.798061],[56.310822,43.799671],[56.310879,43.800941],[56.31118,43.808899],[56.311352,43.81353],[56.311588,43.819901],[56.31181,43.825691],[56.311871,43.826111],[56.311878,43.82626],[56.311951,43.828098],[56.312481,43.84042],[56.312481,43.84058],[56.3125,43.84108],[56.312569,43.84277],[56.312729,43.846748],[56.312771,43.847858],[56.312908,43.851131],[56.313179,43.858212],[56.313381,43.86322],[56.313339,43.86388],[56.31329,43.864182],[56.31319,43.864399],[56.31303,43.864601],[56.312889,43.864811],[56.312809,43.86499],[56.312752,43.865238],[56.312729,43.86554],[56.31271,43.865829],[56.312649,43.866119],[56.312569,43.866451],[56.312401,43.86694],[56.31234,43.867142],[56.31226,43.867359],[56.312019,43.868],[56.31189,43.868252],[56.311749,43.868431],[56.311569,43.86861],[56.311371,43.868721],[56.31123,43.86879],[56.311039,43.868851],[56.310219,43.869301],[56.309959,43.869438],[56.308971,43.86998],[56.30854,43.870209],[56.307701,43.87067],[56.30727,43.870861],[56.306358,43.871262],[56.30381,43.872391],[56.30378,43.87241],[56.302429,43.873341],[56.301121,43.874241],[56.300819,43.874489],[56.300529,43.874741],[56.30027,43.87495],[56.299419,43.875721],[56.298512,43.876701],[56.296959,43.878609],[56.29636,43.87933],[56.296249,43.879471],[56.295639,43.880219],[56.292381,43.884319],[56.29105,43.88586],[56.290588,43.886318],[56.290161,43.886688],[56.289589,43.887131],[56.288311,43.88802],[56.285702,43.889679],[56.28524,43.890011],[56.284592,43.890591],[56.284111,43.89122],[56.283798,43.891769],[56.283489,43.89238],[56.283249,43.89304],[56.282909,43.894009],[56.28241,43.895481],[56.28233,43.895679],[56.282242,43.895889],[56.282108,43.896191],[56.281689,43.896961],[56.281368,43.897442],[56.280849,43.898109],[56.279018,43.900459],[56.277939,43.90184],[56.275742,43.904671],[56.275139,43.905418],[56.273869,43.907001],[56.271389,43.910061],[56.27079,43.910809],[56.27037,43.91135],[56.26947,43.912491],[56.268799,43.913399],[56.267921,43.914761],[56.26685,43.916649],[56.265621,43.918991],[56.26532,43.919529],[56.265091,43.919971],[56.26498,43.92017],[56.264561,43.92083],[56.26289,43.923988],[56.259861,43.9296],[56.258461,43.93219],[56.257511,43.93396],[56.25581,43.937119],[56.255291,43.93811],[56.25526,43.93816],[56.254051,43.940411],[56.253658,43.94112],[56.25359,43.94136],[56.247311,43.952999],[56.24699,43.953442],[56.246658,43.954079],[56.246319,43.954781],[56.2458,43.956051],[56.245468,43.956982],[56.245251,43.957668],[56.244961,43.95874],[56.244759,43.959629],[56.244659,43.96011],[56.24461,43.960312],[56.244431,43.96151],[56.244259,43.9632],[56.24329,43.969559],[56.242779,43.972801],[56.242569,43.974159],[56.241779,43.979431],[56.24115,43.98365],[56.240299,43.989269],[56.240002,43.991211],[56.239479,43.994652],[56.239391,43.995251],[56.239059,43.997501],[56.238861,43.998791],[56.23848,44.001282],[56.237991,44.00481],[56.237598,44.007809],[56.236511,44.016102],[56.23597,44.020561],[56.235611,44.023499],[56.23531,44.025822],[56.235142,44.027859],[56.234989,44.029701],[56.234871,44.031559],[56.234852,44.033421],[56.234821,44.035389],[56.234798,44.037701],[56.234859,44.039421],[56.23494,44.041561],[56.234959,44.042831],[56.23494,44.04459],[56.234901,44.046188],[56.234798,44.04805],[56.234711,44.04911],[56.234631,44.050011],[56.234371,44.052341],[56.234089,44.054321],[56.23373,44.056801],[56.233471,44.058552],[56.233158,44.060539],[56.232841,44.062511],[56.232368,44.064899],[56.23204,44.066311],[56.231579,44.067959],[56.230968,44.06966],[56.230179,44.071381],[56.22961,44.07238],[56.229092,44.07309],[56.228531,44.073719],[56.22784,44.074341],[56.227322,44.07473],[56.22718,44.074841],[56.226452,44.07531],[56.225849,44.07563],[56.225422,44.07584],[56.224709,44.076099],[56.224461,44.07616],[56.224079,44.076279],[56.222832,44.076618],[56.222149,44.076801],[56.221401,44.077],[56.221279,44.07703],[56.221031,44.077099],[56.219299,44.077549],[56.218559,44.077789],[56.218239,44.0779],[56.21714,44.078289],[56.216202,44.07869],[56.214901,44.07935],[56.213631,44.080139],[56.212791,44.080719],[56.2122,44.0812],[56.21196,44.081409],[56.210991,44.08226],[56.209549,44.084049],[56.208542,44.085522],[56.20752,44.087189],[56.206581,44.088951],[56.20557,44.091019],[56.204281,44.093899],[56.202381,44.098438],[56.200378,44.103588],[56.1991,44.10717],[56.19838,44.109509],[56.197811,44.111912],[56.197239,44.11475],[56.196892,44.116421],[56.19648,44.11845],[56.1959,44.120911],[56.195431,44.122639],[56.19519,44.12355],[56.194889,44.124451],[56.194031,44.126621],[56.19368,44.127392],[56.192139,44.130371],[56.184631,44.1441],[56.18375,44.145748],[56.183289,44.14687],[56.18206,44.149559],[56.181019,44.151909],[56.18055,44.152851],[56.180149,44.153339],[56.179749,44.153751],[56.179279,44.154121],[56.178768,44.15432],[56.17852,44.1544],[56.17807,44.154442],[56.17754,44.154362],[56.1758,44.153782],[56.17519,44.15361],[56.174358,44.1534],[56.172741,44.153111],[56.171921,44.153011],[56.170971,44.153091],[56.1702,44.153309],[56.169479,44.15358],[56.167912,44.154518],[56.167179,44.154819],[56.166439,44.155022],[56.165722,44.15506],[56.164558,44.154861],[56.162151,44.154259],[56.16098,44.154011],[56.16011,44.153992],[56.15934,44.154072],[56.159271,44.154091],[56.158569,44.154289],[56.157799,44.154652],[56.15654,44.155418],[56.154202,44.156952],[56.152458,44.158081],[56.152191,44.15826],[56.151131,44.158859],[56.150391,44.15918],[56.149712,44.15934],[56.148991,44.159351],[56.14843,44.159248],[56.147739,44.159031],[56.146961,44.15876],[56.14455,44.15778],[56.142811,44.157021],[56.14106,44.156429],[56.139969,44.156181],[56.13829,44.15604],[56.13681,44.15617],[56.13583,44.156361],[56.134491,44.156769],[56.132931,44.157539],[56.131821,44.158249],[56.130699,44.159069],[56.128441,44.161259],[56.12693,44.162819],[56.126362,44.163399],[56.12606,44.163509],[56.12534,44.163601],[56.125229,44.163601],[56.12508,44.163631],[56.124931,44.163719],[56.12479,44.163849],[56.12468,44.16404],[56.124569,44.164322],[56.124561,44.164581],[56.12447,44.165009],[56.124352,44.16531],[56.124161,44.165581],[56.11639,44.172829],[56.114761,44.175751],[56.114281,44.18227],[56.113708,44.20322],[56.118099,44.20797],[56.120731,44.212132],[56.122238,44.217312],[56.123001,44.221142],[56.124619,44.233261],[56.124748,44.236141],[56.124519,44.23875],[56.123379,44.245941],[56.123192,44.248219],[56.123291,44.25174],[56.123562,44.253281],[56.123821,44.254478],[56.124229,44.25581],[56.124779,44.257179],[56.125118,44.257881],[56.125809,44.259491],[56.126011,44.260029],[56.126171,44.260712],[56.126259,44.261318],[56.126282,44.26189],[56.12627,44.26244],[56.12616,44.263191],[56.125919,44.264118],[56.125099,44.265911],[56.124939,44.2663],[56.124069,44.267879],[56.123779,44.26833],[56.12331,44.26902],[56.122421,44.270199],[56.12162,44.271191],[56.119259,44.273941],[56.118172,44.275181],[56.116798,44.276749],[56.116131,44.277519],[56.116051,44.277611],[56.110699,44.283699],[56.110271,44.284191],[56.109791,44.284729],[56.109711,44.28484],[56.10701,44.287941],[56.106419,44.288818],[56.105862,44.289761],[56.105419,44.290649],[56.105,44.29166],[56.10062,44.3041],[56.100159,44.305382],[56.099739,44.306492],[56.099602,44.306808],[56.099461,44.307152],[56.099281,44.307499],[56.09911,44.3078],[56.09856,44.308731],[56.098141,44.309391],[56.097229,44.31078],[56.096748,44.311501],[56.096439,44.311989],[56.096069,44.312691],[56.095699,44.313511],[56.09544,44.314381],[56.095169,44.315392],[56.09502,44.316132],[56.094589,44.31863],[56.094391,44.319469],[56.094189,44.32019],[56.093269,44.323238],[56.092361,44.326302],[56.092079,44.327221],[56.091511,44.32906],[56.09087,44.33099],[56.089882,44.33382],[56.08746,44.34079],[56.085609,44.346218],[56.08498,44.348091],[56.078499,44.367161],[56.07822,44.367901],[56.0779,44.368568],[56.077641,44.369019],[56.077221,44.369598],[56.076939,44.36993],[56.07653,44.370312],[56.076092,44.37064],[56.075611,44.37093],[56.07449,44.37151],[56.072449,44.37249],[56.07077,44.37331],[56.070179,44.3736],[56.06971,44.373821],[56.06889,44.374222],[56.06757,44.374809],[56.06712,44.37505],[56.066761,44.375278],[56.06636,44.37561],[56.066021,44.375938],[56.06572,44.376289],[56.065331,44.376808],[56.06496,44.37743],[56.064522,44.378269],[56.06411,44.37928],[56.06295,44.382271],[56.061211,44.386551],[56.06065,44.38792],[56.060341,44.388691],[56.059681,44.390308],[56.058399,44.393452],[56.05621,44.3988],[56.048389,44.418091],[56.046501,44.422661],[56.046261,44.423382],[56.04607,44.42403],[56.045879,44.42485],[56.0457,44.425869],[56.045631,44.426609],[56.045601,44.427601],[56.04567,44.43103],[56.045658,44.43306],[56.045601,44.433769],[56.045422,44.43491],[56.045189,44.43594],[56.044868,44.43692],[56.04438,44.438099],[56.043289,44.44075],[56.042999,44.441589],[56.042721,44.442501],[56.042519,44.443401],[56.04229,44.444969],[56.04158,44.452389],[56.040192,44.46664],[56.03883,44.480659],[56.038719,44.481689],[56.03862,44.48259],[56.038479,44.483471],[56.0383,44.48428],[56.03804,44.485199],[56.032162,44.502251],[56.031761,44.503448],[56.03149,44.50462],[56.031231,44.505871],[56.031078,44.50705],[56.030899,44.510342],[56.029461,44.545521],[56.028801,44.55407],[56.028011,44.56155],[56.02747,44.568169],[56.027908,44.584888],[56.027229,44.601978],[56.027962,44.60656],[56.02803,44.60738],[56.028179,44.608879],[56.027988,44.613171],[56.02737,44.620541],[56.026791,44.622929],[56.025871,44.624432],[56.025089,44.624889],[56.023769,44.625179],[56.01659,44.625172],[56.015221,44.62529],[56.014061,44.625511],[56.01297,44.625832],[56.011951,44.626362],[56.007408,44.628609],[56.006721,44.629009],[56.0061,44.62944],[56.005871,44.629589],[56.005348,44.630001],[56.004879,44.63052],[56.004238,44.631302],[56.003769,44.631981],[56.002949,44.633129],[56.001518,44.635151],[55.99966,44.63776],[55.998241,44.63979],[55.99741,44.640949],[55.99712,44.641411],[55.996738,44.642159],[55.996521,44.642689],[55.996262,44.643299],[55.996029,44.64399],[55.99559,44.645599],[55.995281,44.647511],[55.995129,44.649059],[55.994919,44.652161],[55.994518,44.658161],[55.99395,44.666309],[55.993889,44.667858],[55.9939,44.66943],[55.998219,44.71011],[55.998539,44.712761],[55.998741,44.713772],[55.999039,44.71479],[55.99942,44.715759],[56,44.71698],[56.00106,44.719109],[56.00182,44.720669],[56.002209,44.721561],[56.00251,44.722279],[56.002708,44.7229],[56.002911,44.72369],[56.003139,44.72504],[56.00322,44.72617],[56.003151,44.72768],[56.002838,44.730659],[56.00259,44.734131],[56.001751,44.74255],[56.00153,44.744381],[56.00132,44.74527],[56.00106,44.745949],[56.00074,44.74662],[55.999279,44.748779],[55.992989,44.757961],[55.990791,44.761318],[55.99033,44.762321],[55.990009,44.76318],[55.989819,44.764069],[55.989719,44.76498],[55.9897,44.765968],[55.99073,44.773331],[55.992962,44.788288],[55.997372,44.81881],[55.997601,44.820049],[55.99781,44.82066],[55.999069,44.823261],[56.004459,44.834709],[56.005829,44.837769],[56.006161,44.83881],[56.006748,44.841309],[56.011189,44.860889],[56.011292,44.861591],[56.011341,44.862282],[56.011372,44.863121],[56.011292,44.86404],[56.01112,44.864929],[56.01088,44.865551],[56.009129,44.869228],[56.008862,44.870022],[56.008659,44.87093],[56.008221,44.873871],[56.005791,44.88974],[56.005718,44.890362],[56.005669,44.890942],[56.005661,44.891472],[56.00568,44.89201],[56.005779,44.89299],[56.007172,44.900478],[56.010979,44.920929],[56.011169,44.922211],[56.011269,44.923309],[56.01128,44.924629],[56.011219,44.925812],[56.01107,44.92696],[56.01088,44.928028],[56.01038,44.92984],[56.009178,44.934361],[56.00882,44.936081],[56.00861,44.93779],[56.008499,44.939602],[56.00845,44.941158],[56.008499,44.94244],[56.008629,44.943741],[56.016418,44.996269],[56.016571,44.997238],[56.016651,44.998199],[56.016651,44.999229],[56.016579,45.000408],[56.01646,45.001598],[56.015572,45.008961],[56.014961,45.014542],[56.01482,45.015701],[56.01453,45.018242],[56.013649,45.026249],[56.013618,45.02721],[56.013519,45.03426],[56.013458,45.039619],[56.0135,45.04118],[56.013618,45.042728],[56.013851,45.044189],[56.01667,45.059238],[56.016972,45.061581],[56.017262,45.06358],[56.017792,45.06654],[56.01825,45.068859],[56.01857,45.069988],[56.019001,45.071701],[56.019669,45.07513],[56.021061,45.082458],[56.021461,45.084579],[56.022079,45.087971],[56.022369,45.089191],[56.023079,45.09153],[56.032928,45.121109],[56.033489,45.122829],[56.03371,45.1236],[56.03389,45.12447],[56.033981,45.125229],[56.034012,45.125919],[56.033951,45.140442],[56.033981,45.141682],[56.03405,45.142712],[56.034149,45.143501],[56.034302,45.14452],[56.03447,45.14547],[56.036381,45.15469],[56.037941,45.162331],[56.03825,45.163601],[56.038639,45.164841],[56.04472,45.18079],[56.0452,45.182331],[56.045761,45.18428],[56.046219,45.18568],[56.05463,45.209648],[56.055241,45.21146],[56.056541,45.215519],[56.05685,45.216721],[56.05695,45.21751],[56.056931,45.218281],[56.056839,45.219101],[56.055882,45.224049],[56.055679,45.224819],[56.05537,45.225571],[56.055038,45.226059],[56.054619,45.226501],[56.052269,45.22813],[56.05188,45.228588],[56.051609,45.228958],[56.051338,45.229519],[56.051128,45.230221],[56.050152,45.234531],[56.050018,45.235241],[56.04998,45.235939],[56.049992,45.236629],[56.050049,45.237339],[56.050549,45.241348],[56.050812,45.24242],[56.05117,45.243542],[56.054352,45.252941],[56.054729,45.254261],[56.057491,45.26442],[56.057732,45.265572],[56.057899,45.266819],[56.06147,45.302731],[56.06155,45.30365],[56.061569,45.3046],[56.06155,45.305679],[56.059879,45.333832],[56.059811,45.334759],[56.05975,45.335331],[56.05962,45.335831],[56.059311,45.336651],[56.05505,45.3456],[56.054668,45.346481],[56.054428,45.347198],[56.054138,45.348209],[56.053459,45.350941],[56.048328,45.371361],[56.045738,45.383511],[56.045441,45.385231],[56.045231,45.386841],[56.045151,45.388439],[56.045139,45.390099],[56.045349,45.412231],[56.04546,45.416229],[56.045818,45.427399],[56.04599,45.433071],[56.046089,45.43544],[56.046261,45.43782],[56.048069,45.462238],[56.048229,45.464199],[56.048649,45.4678],[56.04969,45.476719],[56.049881,45.478939],[56.050049,45.481541],[56.05159,45.50951],[56.05167,45.511181],[56.051689,45.512569],[56.051651,45.513699],[56.051338,45.521839],[56.051022,45.52972],[56.05093,45.531212],[56.050331,45.5387],[56.050159,45.542641],[56.04998,45.547421],[56.049931,45.549541],[56.049801,45.556591],[56.04974,45.558392],[56.049622,45.559582],[56.04945,45.560902],[56.042751,45.60685],[56.042622,45.608101],[56.042542,45.609371],[56.0425,45.610531],[56.042519,45.611721],[56.043781,45.639339],[56.043911,45.642521],[56.043968,45.64629],[56.043991,45.648689],[56.044109,45.65126],[56.044941,45.669449],[56.046001,45.69286],[56.047169,45.718689],[56.047298,45.721008],[56.047428,45.72295],[56.04747,45.723801],[56.047531,45.72514],[56.047611,45.72768],[56.047642,45.729301],[56.047729,45.73056],[56.047878,45.732529],[56.0481,45.73505],[56.049339,45.76276],[56.05212,45.825199],[56.052471,45.833271],[56.052521,45.834949],[56.052521,45.83625],[56.052479,45.837379],[56.052319,45.83881],[56.05183,45.8419],[56.05162,45.843281],[56.051498,45.844559],[56.05138,45.84687],[56.05125,45.8498],[56.051159,45.851379],[56.050831,45.854912],[56.050701,45.856312],[56.049992,45.862358],[56.049831,45.864239],[56.049709,45.86623],[56.049679,45.86813],[56.049728,45.876091],[56.049679,45.88908],[56.04977,45.914181],[56.04974,45.917419],[56.049679,45.918701],[56.049541,45.919899],[56.04932,45.921299],[56.049019,45.9226],[56.04644,45.932362],[56.043549,45.943329],[56.040409,45.955261],[56.038261,45.96336],[56.03299,45.983471],[56.031689,45.988319],[56.03056,45.99202],[56.029942,45.994209],[56.029259,45.997021],[56.02877,45.999298],[56.02837,46.0009],[56.027851,46.002811],[56.027481,46.00399],[56.027149,46.005001],[56.024632,46.011688],[56.0242,46.01265],[56.023731,46.01347],[56.023338,46.013981],[56.022781,46.014511],[56.013191,46.021309],[56.01276,46.021709],[56.01244,46.02203],[56.012001,46.022621],[56.010399,46.025391],[56.000919,46.041672],[56.000729,46.042179],[56.000549,46.042931],[56.0005,46.043468],[56.000519,46.044189],[56.001808,46.052929],[56.00206,46.05484],[56.002281,46.057281],[56.002369,46.059891],[56.002361,46.062141],[56.0023,46.06382],[56.00206,46.06641],[56.001732,46.06881],[56.00156,46.07061],[56.001492,46.071232],[56.001389,46.07185],[56.001308,46.072269],[56.001221,46.072941],[56.00119,46.07328],[56.00116,46.07373],[56.001141,46.073952],[56.001122,46.074341],[56.001099,46.074928],[56.001091,46.075539],[56.00108,46.076149],[56.001049,46.076752],[56.00053,46.083248],[55.999199,46.09798],[55.99498,46.14637],[55.994808,46.148331],[55.99472,46.149422],[55.994701,46.149609],[55.99176,46.183311],[55.991692,46.18539],[55.991638,46.186008],[55.991428,46.188259],[55.991402,46.19009],[55.991539,46.191662],[55.991871,46.193192],[55.99226,46.19455],[55.99284,46.195869],[55.993382,46.196812],[55.99437,46.198441],[55.995071,46.199669],[55.999889,46.20805],[56.00531,46.217491],[56.023251,46.24873],[56.02623,46.251999],[56.0299,46.251999],[56.03352,46.251999],[56.035919,46.251999],[56.037731,46.254398],[56.038311,46.25835],[56.039459,46.27895],[56.041672,46.29525],[56.046558,46.307789],[56.048191,46.31345],[56.048672,46.31723],[56.04723,46.332329],[56.04541,46.343491],[56.041759,46.352589],[56.041859,46.360661],[56.043789,46.388691],[56.043659,46.392811],[56.043491,46.39859],[56.043449,46.401878],[56.043591,46.405979],[56.04475,46.41238],[56.046619,46.41885],[56.053459,46.44117],[56.05431,46.446171],[56.054729,46.451389],[56.054611,46.45636],[56.05423,46.461418],[56.05331,46.47226],[56.053188,46.473629],[56.053181,46.474159],[56.053089,46.481258],[56.052898,46.485489],[56.052528,46.489059],[56.052441,46.49054],[56.05159,46.49752],[56.0509,46.50153],[56.049671,46.506149],[56.04829,46.509941],[56.046009,46.515419],[56.04472,46.51873],[56.044022,46.521999],[56.043678,46.529739],[56.04335,46.53318],[56.042351,46.53688],[56.035011,46.55698],[56.033741,46.56041],[56.032841,46.563221],[56.032211,46.565639],[56.031391,46.57016],[56.029469,46.585281],[56.028889,46.595551],[56.028278,46.6063],[56.027569,46.619801],[56.027309,46.626148],[56.027309,46.627911],[56.027512,46.629749],[56.027939,46.632141],[56.02964,46.639069],[56.031391,46.645939],[56.033852,46.656311],[56.034889,46.660709],[56.035099,46.66254],[56.036781,46.69265],[56.037251,46.697632],[56.0387,46.703979],[56.0387,46.707932],[56.037731,46.721489],[56.039558,46.728699],[56.042339,46.737801],[56.04314,46.746071],[56.04319,46.748631],[56.042961,46.750309],[56.041538,46.754669],[56.040661,46.758701],[56.040581,46.759079],[56.040421,46.759769],[56.03957,46.765049],[56.03772,46.77631],[56.036991,46.780369],[56.0368,46.78244],[56.036869,46.786209],[56.0392,46.803761],[56.039871,46.80917],[56.039822,46.810558],[56.038109,46.81823],[56.036789,46.824089],[56.036869,46.82579],[56.03714,46.826839],[56.038311,46.831009],[56.03957,46.835312],[56.041149,46.839378],[56.04311,46.844231],[56.043839,46.846352],[56.04438,46.848721],[56.045879,46.855339],[56.04665,46.8587],[56.047611,46.86174],[56.047932,46.86235],[56.049171,46.864792],[56.050739,46.868031],[56.05175,46.870609],[56.055851,46.88237],[56.05761,46.887409],[56.062759,46.901951],[56.064739,46.907742],[56.065029,46.90863],[56.06554,46.910461],[56.066238,46.912868],[56.066681,46.91515],[56.067039,46.91732],[56.067291,46.920391],[56.067451,46.923191],[56.067589,46.927719],[56.067719,46.931561],[56.068031,46.935589],[56.068279,46.938339],[56.068352,46.942348],[56.068211,46.946701],[56.068069,46.948849],[56.067928,46.951],[56.067291,46.957489],[56.06702,46.962231],[56.06741,46.966591],[56.070992,46.979061],[56.072788,46.985001],[56.07473,46.98983],[56.076599,46.994331],[56.078522,46.998268],[56.08009,46.9995],[56.08173,47.000271],[56.086712,47.000271],[56.09016,47.000099],[56.093441,47.00481],[56.09473,47.007542],[56.095901,47.010571],[56.097309,47.017738],[56.098011,47.021351],[56.099701,47.029541],[56.100319,47.031738],[56.10128,47.034081],[56.103828,47.039719],[56.105461,47.043171],[56.105839,47.043861],[56.106319,47.045059],[56.10738,47.05011],[56.107681,47.0527],[56.1077,47.055019],[56.107552,47.0574],[56.10709,47.06049],[56.1063,47.063309],[56.105301,47.065731],[56.101891,47.073051],[56.09856,47.08017],[56.097729,47.08242],[56.096951,47.085232],[56.095699,47.090679],[56.095421,47.092789],[56.095249,47.096661],[56.095261,47.102612],[56.095139,47.104542],[56.09481,47.107121],[56.094398,47.109299],[56.09375,47.11121],[56.093029,47.11285],[56.091702,47.11507],[56.091091,47.116089],[56.091,47.116241],[56.089619,47.118511],[56.085571,47.125172],[56.08503,47.125961],[56.084919,47.12611],[56.084301,47.126968],[56.082741,47.12915],[56.082001,47.130772],[56.081478,47.132332],[56.08107,47.13361],[56.08086,47.134651],[56.080711,47.135799],[56.080631,47.136902],[56.08065,47.137569],[56.0807,47.13879],[56.080799,47.140129],[56.080929,47.142139],[56.081001,47.145439],[56.080872,47.14772],[56.08075,47.149818],[56.079498,47.161301],[56.07925,47.163631],[56.07827,47.1726],[56.07814,47.17382],[56.07724,47.18169],[56.07579,47.192719],[56.07357,47.20916],[56.073471,47.20993],[56.073029,47.213341],[56.07275,47.215809],[56.072189,47.223049],[56.071972,47.22517],[56.071758,47.226429],[56.071571,47.227032],[56.071289,47.227921],[56.070801,47.228939],[56.070629,47.229309],[56.069908,47.23064],[56.068779,47.23275],[56.067348,47.235401],[56.06498,47.239841],[56.064011,47.242249],[56.063122,47.244579],[56.062851,47.245441],[56.062271,47.247372],[56.06118,47.251011],[56.056301,47.26749],[56.054482,47.273621],[56.053581,47.27618],[56.05265,47.278511],[56.05154,47.280701],[56.050781,47.282139],[56.05019,47.283138],[56.04969,47.283932],[56.048931,47.285118],[56.048679,47.285511],[56.04755,47.287201],[56.047009,47.287998],[56.04649,47.288818],[56.045841,47.289921],[56.044739,47.291401],[56.04414,47.291889],[56.042969,47.292278],[56.04179,47.292721],[56.039879,47.29364],[56.038231,47.294399],[56.037552,47.294621],[56.037109,47.294861],[56.03508,47.29686],[56.034489,47.29744],[56.03326,47.298691],[56.031361,47.300598],[56.030918,47.30106],[56.028469,47.303589],[56.027229,47.30484],[56.026321,47.305721],[56.025711,47.306198],[56.025188,47.306469],[56.023659,47.306641],[56.022579,47.306549],[56.02203,47.306499],[56.020481,47.306591],[56.019878,47.306801],[56.015999,47.308731],[56.01519,47.30917],[56.014252,47.309811],[56.01292,47.311291],[56.012001,47.31255],[56.006481,47.320141],[56.001209,47.327278],[55.999889,47.329128],[55.99604,47.335972],[55.995331,47.337238],[55.993549,47.340099],[55.991451,47.342548],[55.98999,47.34383],[55.988159,47.345169],[55.986809,47.346241],[55.981941,47.349789],[55.980881,47.35088],[55.979839,47.352501],[55.97887,47.3545],[55.977589,47.357769],[55.976109,47.361542],[55.975159,47.363609],[55.974258,47.36512],[55.973839,47.365681],[55.973351,47.36636],[55.972488,47.367199],[55.971161,47.368111],[55.967972,47.369289],[55.955429,47.373619],[55.954979,47.373798],[55.953979,47.37418],[55.952679,47.374729],[55.94875,47.376019],[55.946899,47.376781],[55.945938,47.377571],[55.943161,47.380451],[55.940948,47.38271],[55.939751,47.384411],[55.936741,47.389381],[55.935101,47.391281],[55.933262,47.392971],[55.93121,47.394451],[55.929211,47.395889],[55.927551,47.39724],[55.926399,47.398449],[55.9226,47.403091],[55.921741,47.404148],[55.920528,47.405579],[55.918819,47.40807],[55.91716,47.41069],[55.916698,47.411671],[55.916309,47.412498],[55.914101,47.418381],[55.913441,47.41946],[55.912418,47.420738],[55.908581,47.424839],[55.90633,47.426651],[55.901878,47.42955],[55.901161,47.430031],[55.895618,47.433651],[55.894421,47.434689],[55.892799,47.43697],[55.88855,47.443161],[55.888069,47.443851],[55.887871,47.44413],[55.88583,47.446899],[55.883289,47.45002],[55.88179,47.4515],[55.880421,47.452499],[55.879139,47.45322],[55.875099,47.455521],[55.873589,47.456379],[55.87035,47.45821],[55.867191,47.460121],[55.865879,47.460709],[55.864021,47.461391],[55.862419,47.46183],[55.86158,47.462151],[55.861351,47.462231],[55.859638,47.46286],[55.859451,47.462879],[55.859299,47.46291],[55.859112,47.462898],[55.85899,47.46286],[55.858898,47.46283],[55.858799,47.46283],[55.858669,47.462811],[55.858521,47.46286],[55.858379,47.462978],[55.85828,47.463181],[55.858189,47.463459],[55.85804,47.463772],[55.857811,47.46413],[55.856998,47.46505],[55.856281,47.466],[55.855221,47.467789],[55.854542,47.46933],[55.853779,47.471619],[55.853168,47.474701],[55.852329,47.47958],[55.851681,47.483719],[55.851299,47.48711],[55.851219,47.49049],[55.85128,47.498058],[55.851151,47.502029],[55.845791,47.519192],[55.838692,47.54253],[55.83746,47.545639],[55.83424,47.549709],[55.822781,47.554779],[55.822071,47.555401],[55.8214,47.55621],[55.82056,47.557529],[55.819908,47.55875],[55.819012,47.560822],[55.815189,47.571041],[55.81255,47.578011],[55.812,47.579971],[55.81171,47.581741],[55.81152,47.583],[55.811409,47.584469],[55.811451,47.59251],[55.811501,47.600479],[55.81134,47.603279],[55.81094,47.605721],[55.809799,47.61113],[55.809341,47.612709],[55.808788,47.614182],[55.807251,47.617229],[55.805641,47.62014],[55.804741,47.622139],[55.804001,47.624081],[55.796421,47.655689],[55.790298,47.67799],[55.790199,47.687599],[55.78907,47.721489],[55.788929,47.727829],[55.788792,47.732651],[55.788681,47.737221],[55.788841,47.739471],[55.788872,47.739948],[55.789661,47.75219],[55.791161,47.77618],[55.79425,47.819092],[55.796959,47.839352],[55.798401,47.845871],[55.799179,47.85342],[55.803902,47.910759],[55.809399,47.984749],[55.811138,48.006031],[55.809589,48.024609],[55.808731,48.035042],[55.808239,48.037788],[55.805061,48.045681],[55.796379,48.063881],[55.795891,48.068169],[55.79628,48.075378],[55.796959,48.099411],[55.797729,48.12001],[55.79744,48.122929],[55.79174,48.140961],[55.79081,48.14307],[55.787991,48.147861],[55.786129,48.151039],[55.785351,48.153011],[55.784908,48.154751],[55.784889,48.157612],[55.783482,48.167641],[55.783218,48.17033],[55.782959,48.17271],[55.78307,48.175579],[55.783562,48.181591],[55.7841,48.18906],[55.78397,48.1908],[55.7836,48.191669],[55.78286,48.19384],[55.78233,48.19453],[55.781609,48.194939],[55.77676,48.197281],[55.775921,48.197571],[55.774609,48.197338],[55.769562,48.195862],[55.767288,48.19524],[55.767208,48.195221],[55.766178,48.195019],[55.764969,48.195171],[55.763771,48.195541],[55.762272,48.19659],[55.76128,48.197472],[55.75486,48.20602],[55.754292,48.206829],[55.753349,48.20816],[55.751961,48.21014],[55.750992,48.212811],[55.748829,48.221031],[55.74847,48.222401],[55.74749,48.226292],[55.746792,48.228279],[55.745819,48.230492],[55.740162,48.241928],[55.736431,48.249859],[55.735241,48.252369],[55.734249,48.255829],[55.734001,48.25742],[55.73391,48.258011],[55.733479,48.260769],[55.733292,48.263561],[55.73196,48.28344],[55.729641,48.31657],[55.728531,48.33514],[55.726929,48.358971],[55.726551,48.365829],[55.727131,48.378361],[55.727901,48.391411],[55.728291,48.399479],[55.726261,48.420422],[55.72374,48.442909],[55.723259,48.449261],[55.72435,48.473381],[55.724442,48.475319],[55.724609,48.479351],[55.724628,48.479721],[55.724689,48.481239],[55.72472,48.481918],[55.724812,48.4837],[55.725609,48.501598],[55.726059,48.513119],[55.725769,48.521702],[55.723808,48.537479],[55.72298,48.544708],[55.722809,48.546188],[55.722778,48.546421],[55.722511,48.548721],[55.72242,48.549431],[55.72216,48.551521],[55.720852,48.56385],[55.71925,48.587608],[55.718788,48.594051],[55.71841,48.600231],[55.718651,48.60326],[55.71933,48.60606],[55.720329,48.608978],[55.721291,48.6115],[55.721859,48.61425],[55.722092,48.617691],[55.721741,48.621189],[55.720551,48.624641],[55.71751,48.632191],[55.71529,48.637199],[55.71262,48.64547],[55.710941,48.65123],[55.709511,48.659721],[55.709011,48.666119],[55.709049,48.672401],[55.70961,48.679729],[55.713921,48.70715],[55.71434,48.709961],[55.717049,48.726921],[55.720501,48.741638],[55.7239,48.750832],[55.726299,48.75732],[55.72715,48.759762],[55.73185,48.77322],[55.736031,48.781219],[55.73642,48.781841],[55.737579,48.783642],[55.738392,48.784809],[55.739342,48.786091],[55.740749,48.788021],[55.745781,48.794651],[55.75082,48.8013],[55.751629,48.80241],[55.752258,48.80331],[55.7528,48.804081],[55.756809,48.809929],[55.75943,48.813789],[55.76038,48.815289],[55.761608,48.817402],[55.76215,48.818352],[55.76366,48.821548],[55.76429,48.822929],[55.767189,48.830311],[55.767399,48.830799],[55.76833,48.832699],[55.769058,48.833981],[55.769821,48.835091],[55.770969,48.836609],[55.77169,48.837471],[55.77243,48.838051],[55.773232,48.838661],[55.774052,48.839119],[55.775669,48.839828],[55.776451,48.840069],[55.77763,48.84024],[55.77924,48.840401],[55.780281,48.84042],[55.78125,48.840401],[55.78252,48.84037],[55.79047,48.840889],[55.79126,48.840981],[55.79628,48.84124],[55.810371,48.842041],[55.81245,48.842159],[55.81451,48.842449],[55.817261,48.843128],[55.81889,48.843719],[55.82074,48.84462],[55.82346,48.8461],[55.824162,48.846531],[55.825279,48.84721],[55.826191,48.847801],[55.82811,48.848751],[55.82967,48.849312],[55.831299,48.849709],[55.842369,48.85191],[55.85397,48.854259],[55.857552,48.854969],[55.858131,48.855091],[55.858681,48.855209],[55.86179,48.85582],[55.862728,48.85601],[55.86491,48.85643],[55.866829,48.856758],[55.867088,48.856812],[55.86832,48.857052],[55.87402,48.85825],[55.874458,48.858341],[55.875801,48.85862],[55.87849,48.859192],[55.879089,48.859379],[55.879398,48.859482],[55.88028,48.859791],[55.881779,48.86042],[55.88269,48.86084],[55.883381,48.86121],[55.883549,48.861309],[55.884319,48.861851],[55.885052,48.86253],[55.885811,48.863361],[55.886429,48.86414],[55.886959,48.86504],[55.887611,48.866402],[55.889069,48.86982],[55.894341,48.882118],[55.89912,48.893269],[55.899479,48.89418],[55.899811,48.895111],[55.899948,48.895519],[55.900108,48.896061],[55.900341,48.896919],[55.900639,48.898281],[55.900841,48.899288],[55.90115,48.901321],[55.901241,48.90221],[55.90131,48.903439],[55.901371,48.908951],[55.901489,48.934219],[55.901569,48.94532],[55.901619,48.94698],[55.901718,48.94865],[55.901871,48.950539],[55.90263,48.958179],[55.903069,48.962841],[55.9035,48.96714],[55.903839,48.96991],[55.904228,48.972649],[55.904598,48.975201],[55.904678,48.975761],[55.904968,48.977859],[55.905239,48.98037],[55.905411,48.98254],[55.90551,48.984798],[55.90564,48.996738],[55.905651,48.997532],[55.905701,49.000679],[55.905739,49.002041],[55.905849,49.004139],[55.90646,49.01107],[55.90659,49.01252],[55.906952,49.016472],[55.907299,49.021412],[55.907688,49.028358],[55.90789,49.031841],[55.908131,49.03532],[55.909142,49.048611],[55.91011,49.061829],[55.91058,49.0681],[55.91304,49.10125],[55.913399,49.105782],[55.91375,49.108921],[55.914108,49.111359],[55.915451,49.11953],[55.917259,49.13028],[55.917542,49.13213],[55.917751,49.13401],[55.917919,49.136051],[55.918011,49.138062],[55.918079,49.140659],[55.918079,49.140942],[55.918079,49.141891],[55.91806,49.14267],[55.918011,49.143711],[55.91785,49.14669],[55.91774,49.14798],[55.917671,49.148739],[55.91758,49.149448],[55.9175,49.15007],[55.91737,49.150928],[55.917122,49.15247],[55.91684,49.153858],[55.916649,49.1548],[55.916538,49.155289],[55.916382,49.15575],[55.91571,49.157372],[55.91449,49.15987],[55.914261,49.160358],[55.913288,49.162361],[55.913029,49.16288],[55.91275,49.163441],[55.911339,49.166302],[55.909439,49.17012],[55.90852,49.171951],[55.907379,49.17429],[55.90675,49.175739],[55.9063,49.177059],[55.906059,49.177879],[55.903801,49.187191],[55.90324,49.189468],[55.902882,49.19091],[55.90094,49.197899],[55.899979,49.20108],[55.897701,49.208038],[55.89743,49.20879],[55.896938,49.210251],[55.896599,49.211151],[55.896229,49.212002],[55.895828,49.212769],[55.895222,49.21386],[55.891121,49.220089],[55.88998,49.22205],[55.889542,49.22287],[55.88913,49.223881],[55.887421,49.229141],[55.887131,49.230061],[55.88678,49.231129],[55.885368,49.235481],[55.883381,49.241539],[55.88155,49.247051],[55.880661,49.249741],[55.880192,49.25145],[55.879341,49.255569],[55.87923,49.256111],[55.879009,49.257191],[55.87899,49.25724],[55.878139,49.261341],[55.877831,49.262829],[55.875278,49.275089],[55.874748,49.277889],[55.874599,49.279041],[55.87447,49.280949],[55.874432,49.281898],[55.874409,49.282921],[55.874451,49.286308],[55.874409,49.287281],[55.874321,49.288139],[55.874249,49.288631],[55.874149,49.289082],[55.873909,49.28989],[55.87376,49.290329],[55.873589,49.290722],[55.87318,49.291531],[55.872768,49.292179],[55.868851,49.297501],[55.864491,49.303478],[55.864029,49.304119],[55.863571,49.304741],[55.8629,49.305691],[55.862179,49.306919],[55.8615,49.30843],[55.861099,49.30941],[55.86034,49.311329],[55.856941,49.320042],[55.855289,49.3242],[55.85498,49.32497],[55.854019,49.327141],[55.852772,49.329521],[55.8521,49.330669],[55.85125,49.33194],[55.849388,49.334419],[55.84597,49.33873],[55.845089,49.339859],[55.842171,49.343578],[55.841888,49.343948],[55.839329,49.347221],[55.83844,49.348289],[55.837448,49.349178],[55.83709,49.349449],[55.83672,49.34967],[55.835918,49.350029],[55.835232,49.350281],[55.8344,49.350449],[55.833851,49.350479],[55.833279,49.35046],[55.827381,49.349319],[55.82436,49.348759],[55.820412,49.347988],[55.817551,49.347408],[55.814449,49.34679],[55.80788,49.345421],[55.806519,49.34499],[55.805069,49.34449],[55.80228,49.34269],[55.801941,49.342461],[55.801262,49.341991],[55.800152,49.34124],[55.79987,49.34111],[55.79977,49.341061],[55.798828,49.34063],[55.79855,49.34053],[55.797771,49.340229],[55.796341,49.33971],[55.795601,49.339581],[55.79493,49.33939],[55.794128,49.339191],[55.79306,49.338909],[55.790668,49.338329],[55.78896,49.338009],[55.787819,49.337959],[55.786671,49.338039],[55.7854,49.33828],[55.784168,49.338711],[55.7826,49.339481],[55.781071,49.340549],[55.77916,49.342152],[55.777271,49.34399],[55.775661,49.345612],[55.770809,49.350368],[55.768848,49.352299],[55.766171,49.354881],[55.764488,49.356651],[55.76366,49.35759],[55.762871,49.35865],[55.761959,49.360008],[55.761108,49.361549],[55.760429,49.363079],[55.75985,49.36475],[55.759171,49.367229],[55.75901,49.367901],[55.75864,49.369801],[55.758389,49.371201],[55.75779,49.375252],[55.757118,49.379761],[55.756821,49.38129],[55.7565,49.382751],[55.7561,49.384159],[55.755611,49.38562],[55.755081,49.386921],[55.75423,49.388512],[55.75375,49.389259],[55.753201,49.38998],[55.75185,49.391521],[55.750408,49.392879],[55.74662,49.396191],[55.74567,49.396999],[55.74464,49.397919],[55.742962,49.399429],[55.73914,49.402771],[55.737881,49.4039],[55.736629,49.405258],[55.735451,49.406811],[55.734341,49.40852],[55.733452,49.410141],[55.732689,49.41172],[55.731949,49.41349],[55.73106,49.416012],[55.72821,49.42469],[55.72747,49.426868],[55.72681,49.429169],[55.726109,49.432178],[55.72559,49.435211],[55.723309,49.454868],[55.721859,49.467388],[55.721828,49.468811],[55.721088,49.475471],[55.72084,49.47847],[55.72049,49.48299],[55.720322,49.48457],[55.71999,49.486889],[55.719212,49.491779],[55.71891,49.494171],[55.717731,49.504021],[55.715759,49.51825],[55.715542,49.520241],[55.715351,49.522381],[55.71505,49.526329],[55.714691,49.529739],[55.714272,49.53249],[55.713779,49.535],[55.712921,49.539001],[55.71228,49.543491],[55.711769,49.546242],[55.711349,49.548149],[55.710831,49.550201],[55.710312,49.55209],[55.70977,49.553822],[55.709358,49.55508],[55.708321,49.557899],[55.707878,49.559269],[55.70607,49.565182],[55.704769,49.56871],[55.703491,49.57159],[55.70248,49.57373],[55.700901,49.577671],[55.698959,49.58271],[55.698479,49.58408],[55.698391,49.584381],[55.697769,49.58646],[55.697399,49.588139],[55.697121,49.589901],[55.696781,49.593609],[55.69672,49.596779],[55.696941,49.60041],[55.69894,49.620121],[55.699268,49.623772],[55.699329,49.626282],[55.699429,49.63052],[55.699188,49.635651],[55.699131,49.636211],[55.698631,49.6409],[55.697899,49.645988],[55.697361,49.6493],[55.696671,49.652451],[55.695919,49.655079],[55.694691,49.658611],[55.6931,49.662861],[55.692421,49.66433],[55.686729,49.673569],[55.68568,49.675289],[55.682789,49.680199],[55.681389,49.682941],[55.680019,49.68642],[55.677219,49.69487],[55.676929,49.695751],[55.67514,49.701241],[55.674641,49.702789],[55.673882,49.70512],[55.67276,49.708469],[55.671028,49.713631],[55.670712,49.714882],[55.670368,49.716511],[55.670109,49.718151],[55.66991,49.719311],[55.669762,49.721729],[55.669689,49.725491],[55.66991,49.728981],[55.670898,49.735821],[55.67218,49.744549],[55.676151,49.77142],[55.677071,49.778099],[55.677879,49.78434],[55.679729,49.806068],[55.680698,49.81786],[55.68087,49.821381],[55.680851,49.824558],[55.680698,49.82822],[55.680328,49.832458],[55.67968,49.837151],[55.678848,49.840969],[55.67778,49.84499],[55.675209,49.852699],[55.669899,49.868599],[55.66441,49.884682],[55.662361,49.890949],[55.661579,49.89394],[55.661129,49.896309],[55.66074,49.898891],[55.6605,49.901852],[55.66032,49.90493],[55.66037,49.908569],[55.66069,49.91169],[55.6618,49.924728],[55.661781,49.929359],[55.661308,49.934101],[55.66082,49.93692],[55.660252,49.939541],[55.65942,49.942471],[55.652618,49.964859],[55.650421,49.9725],[55.650299,49.972931],[55.646881,49.98391],[55.64555,49.98941],[55.644489,49.996422],[55.644161,50.000069],[55.644138,50.000751],[55.644032,50.004379],[55.644161,50.009281],[55.64423,50.010761],[55.645821,50.02383],[55.649719,50.05447],[55.653332,50.083469],[55.65374,50.08638],[55.654129,50.088669],[55.654652,50.091179],[55.655239,50.093651],[55.656609,50.098728],[55.657021,50.100281],[55.65707,50.100449],[55.661041,50.11528],[55.663261,50.123562],[55.664349,50.12772],[55.665371,50.13192],[55.668301,50.14389],[55.669769,50.149879],[55.670509,50.15292],[55.67086,50.15456],[55.67112,50.15593],[55.67136,50.157249],[55.671612,50.159081],[55.672039,50.162979],[55.672371,50.166901],[55.67392,50.186131],[55.6749,50.19799],[55.67572,50.20845],[55.67588,50.20982],[55.676208,50.212551],[55.676651,50.215321],[55.676979,50.217072],[55.67733,50.218658],[55.678268,50.22224],[55.681259,50.23251],[55.684158,50.24255],[55.687481,50.253929],[55.690571,50.264641],[55.691029,50.266361],[55.691422,50.268101],[55.691738,50.269581],[55.692032,50.271111],[55.692532,50.274361],[55.696041,50.307381],[55.696362,50.31065],[55.696678,50.313869],[55.69672,50.31422],[55.697319,50.32008],[55.697498,50.322521],[55.697578,50.324661],[55.697609,50.32692],[55.697601,50.328941],[55.697521,50.330891],[55.697411,50.33284],[55.697239,50.334782],[55.69635,50.344231],[55.695911,50.348961],[55.695419,50.354191],[55.69521,50.356339],[55.690521,50.406368],[55.688931,50.423382],[55.68734,50.440971],[55.686909,50.447571],[55.686771,50.45068],[55.686459,50.468208],[55.686249,50.480068],[55.68605,50.492432],[55.685509,50.524719],[55.685299,50.53756],[55.685349,50.540649],[55.685429,50.54372],[55.68549,50.54525],[55.685581,50.54636],[55.686039,50.549801],[55.686821,50.554131],[55.687618,50.558208],[55.688141,50.561829],[55.68832,50.563541],[55.688499,50.566299],[55.68853,50.568859],[55.688549,50.570358],[55.688499,50.572529],[55.688351,50.57476],[55.68792,50.579449],[55.68745,50.583328],[55.68634,50.59124],[55.685959,50.593609],[55.685711,50.594891],[55.685169,50.596901],[55.684582,50.598881],[55.68396,50.60078],[55.683239,50.602749],[55.682251,50.605331],[55.681309,50.607971],[55.680618,50.610081],[55.68,50.61237],[55.679581,50.614182],[55.67915,50.616341],[55.678841,50.618198],[55.678539,50.620289],[55.67601,50.641548],[55.675159,50.648911],[55.675049,50.650261],[55.6749,50.652691],[55.674831,50.654949],[55.67482,50.657501],[55.67487,50.65955],[55.674999,50.662289],[55.67524,50.66497],[55.675529,50.667419],[55.675892,50.669891],[55.676929,50.675911],[55.677311,50.67804],[55.677631,50.679859],[55.678249,50.683979],[55.678711,50.687851],[55.678951,50.690338],[55.679119,50.692928],[55.679279,50.696079],[55.679291,50.699471],[55.677898,50.740601],[55.677589,50.748569],[55.677399,50.75116],[55.67709,50.753811],[55.676601,50.757061],[55.675961,50.760399],[55.675301,50.763119],[55.674541,50.7659],[55.6731,50.77002],[55.67226,50.77206],[55.670979,50.774719],[55.657162,50.800831],[55.653919,50.80698],[55.652611,50.80941],[55.651291,50.812],[55.65049,50.813931],[55.64954,50.81675],[55.648701,50.82],[55.64806,50.823479],[55.64769,50.826519],[55.64753,50.82851],[55.647369,50.83252],[55.646912,50.845772],[55.64653,50.855751],[55.645721,50.876942],[55.645618,50.87822],[55.64547,50.879902],[55.645351,50.88089],[55.64489,50.883621],[55.64452,50.88567],[55.644138,50.887661],[55.64341,50.89093],[55.641479,50.897221],[55.640289,50.90099],[55.63921,50.90485],[55.638802,50.906441],[55.638439,50.90807],[55.63805,50.910309],[55.637718,50.912609],[55.63747,50.91502],[55.637211,50.918209],[55.63657,50.928921],[55.636181,50.935612],[55.63575,50.943008],[55.635681,50.94548],[55.6357,50.948002],[55.63588,50.951729],[55.636238,50.955761],[55.636669,50.958931],[55.64035,50.980049],[55.642658,50.9935],[55.64296,50.995331],[55.643372,50.99828],[55.643719,51.00169],[55.64389,51.00452],[55.643951,51.007172],[55.643959,51.00975],[55.643959,51.012459],[55.644058,51.045509],[55.644169,51.047729],[55.64426,51.049591],[55.64455,51.051651],[55.64481,51.052929],[55.645081,51.054119],[55.645432,51.055191],[55.645721,51.055988],[55.646141,51.056919],[55.64666,51.057919],[55.647259,51.05896],[55.648029,51.060108],[55.64978,51.062431],[55.651482,51.064861],[55.652489,51.066429],[55.65332,51.068008],[55.654209,51.07019],[55.654709,51.07193],[55.655071,51.073841],[55.65519,51.07539],[55.655231,51.076809],[55.655201,51.07851],[55.654999,51.08028],[55.654659,51.082531],[55.65414,51.085091],[55.653461,51.08786],[55.652431,51.091888],[55.652142,51.093651],[55.651909,51.095669],[55.651859,51.09763],[55.651951,51.098869],[55.652279,51.100891],[55.652721,51.102619],[55.65324,51.104309],[55.655621,51.110699],[55.656132,51.112202],[55.656609,51.11422],[55.65707,51.11644],[55.65733,51.118481],[55.65736,51.119492],[55.657299,51.123192],[55.6572,51.124001],[55.656769,51.127159],[55.656479,51.128868],[55.655319,51.134979],[55.65453,51.139481],[55.65419,51.14172],[55.653759,51.145229],[55.653679,51.14616],[55.65345,51.149071],[55.653511,51.152081],[55.65374,51.15472],[55.654388,51.158871],[55.65506,51.16201],[55.65617,51.16552],[55.660042,51.17598],[55.661221,51.179111],[55.66349,51.186131],[55.665001,51.19173],[55.665798,51.195229],[55.66663,51.19968],[55.667809,51.207119],[55.66964,51.221359],[55.671249,51.234001],[55.671398,51.235371],[55.6717,51.2383],[55.67186,51.240551],[55.671921,51.242199],[55.671921,51.243191],[55.671909,51.244572],[55.67178,51.24646],[55.671631,51.247921],[55.671429,51.249191],[55.671162,51.250542],[55.670811,51.251888],[55.670368,51.2533],[55.6693,51.25629],[55.66856,51.258011],[55.665871,51.263908],[55.665352,51.265091],[55.66431,51.2677],[55.66396,51.268631],[55.663422,51.270229],[55.663052,51.271381],[55.662579,51.273159],[55.66235,51.27433],[55.662182,51.275089],[55.6619,51.27692],[55.66177,51.277821],[55.661591,51.279369],[55.661449,51.281639],[55.661331,51.284241],[55.66127,51.286369],[55.661259,51.287922],[55.661282,51.293129],[55.661301,51.295361],[55.661388,51.30225],[55.66135,51.304352],[55.661129,51.308788],[55.660969,51.311001],[55.660889,51.31181],[55.66048,51.314831],[55.660172,51.316669],[55.656269,51.33997],[55.65115,51.370121],[55.650101,51.376541],[55.64996,51.37743],[55.64954,51.37999],[55.64949,51.38031],[55.64912,51.38258],[55.648979,51.383911],[55.64893,51.384609],[55.648899,51.386002],[55.64896,51.387772],[55.649071,51.389061],[55.64941,51.39122],[55.649799,51.393108],[55.650059,51.39418],[55.650391,51.39518],[55.65134,51.396999],[55.65202,51.398102],[55.652679,51.398991],[55.653431,51.399872],[55.656631,51.402611],[55.657398,51.403191],[55.658329,51.403831],[55.661049,51.405479],[55.66185,51.406189],[55.66246,51.406811],[55.66296,51.407379],[55.66349,51.40807],[55.663818,51.40855],[55.66394,51.40873],[55.664612,51.40992],[55.665001,51.41077],[55.66539,51.4118],[55.66584,51.41317],[55.666321,51.414791],[55.66888,51.423191],[55.66972,51.4259],[55.67144,51.43161],[55.671909,51.433189],[55.672352,51.43462],[55.677689,51.452171],[55.67905,51.45612],[55.680439,51.459789],[55.68087,51.4608],[55.682091,51.463509],[55.6828,51.465],[55.68573,51.470791],[55.688469,51.476189],[55.689339,51.477989],[55.690701,51.481079],[55.690971,51.481758],[55.69199,51.48439],[55.693562,51.48893],[55.695011,51.493679],[55.695518,51.495628],[55.695889,51.497108],[55.70332,51.531422],[55.706501,51.5462],[55.706989,51.548721],[55.7075,51.55143],[55.708221,51.555592],[55.70882,51.559441],[55.709221,51.562199],[55.709591,51.565022],[55.7099,51.567551],[55.710339,51.571621],[55.711189,51.58115],[55.71254,51.596439],[55.712711,51.599602],[55.712811,51.60178],[55.712841,51.60294],[55.712849,51.60466],[55.712799,51.607578],[55.7122,51.624611],[55.712151,51.62603],[55.712101,51.627251],[55.711441,51.644531],[55.711319,51.64764],[55.711281,51.650318],[55.711288,51.652691],[55.711349,51.655529],[55.711559,51.659061],[55.7117,51.66074],[55.71188,51.662609],[55.712219,51.665421],[55.71246,51.66711],[55.71402,51.676769],[55.71463,51.679581],[55.715221,51.681911],[55.71693,51.687439],[55.718941,51.69244],[55.719601,51.694069],[55.720299,51.695671],[55.721561,51.698292],[55.721901,51.69891],[55.722099,51.699261],[55.72261,51.700039],[55.723381,51.701118],[55.72575,51.70401],[55.726799,51.705551],[55.727711,51.70739],[55.73074,51.71487],[55.731682,51.717339],[55.732731,51.72094],[55.73333,51.723331],[55.733871,51.725269],[55.734291,51.726639],[55.735668,51.730011],[55.736431,51.731579],[55.737579,51.733879],[55.738319,51.735439],[55.738831,51.736679],[55.739491,51.73859],[55.739899,51.739891],[55.74033,51.741421],[55.742481,51.75071],[55.743118,51.753731],[55.746429,51.768318],[55.748341,51.776112],[55.752659,51.790218],[55.759251,51.811508],[55.7607,51.815601],[55.762489,51.819321],[55.764339,51.822701],[55.766369,51.82571],[55.772129,51.832142],[55.77663,51.837151],[55.778831,51.839802],[55.780842,51.842659],[55.782471,51.84565],[55.78384,51.848549],[55.785179,51.851929],[55.786469,51.855801],[55.787449,51.859379],[55.788342,51.86385],[55.79689,51.908421],[55.797081,51.909882],[55.797611,51.916401],[55.79763,51.918541],[55.79763,51.9207],[55.7976,51.92284],[55.797409,51.927021],[55.797329,51.928532],[55.79726,51.930019],[55.797081,51.93383],[55.7971,51.934799],[55.79718,51.936218],[55.797249,51.937019],[55.797352,51.937721],[55.797501,51.938511],[55.79768,51.939339],[55.79784,51.93996],[55.797989,51.940491],[55.798161,51.941002],[55.798321,51.941448],[55.79866,51.942322],[55.79887,51.942741],[55.799332,51.9436],[55.799671,51.944172],[55.807259,51.956848],[55.807739,51.957722],[55.808239,51.95879],[55.808701,51.959949],[55.808979,51.96093],[55.813591,51.980122],[55.813961,51.981949],[55.814171,51.983379],[55.81432,51.985371],[55.814339,51.98695],[55.814251,51.998631],[55.814232,52.000389],[55.813709,52.06361],[55.81366,52.069031],[55.813648,52.070789],[55.81361,52.075951],[55.813301,52.108681],[55.81324,52.11496],[55.81319,52.1203],[55.813122,52.121632],[55.812851,52.123539],[55.812431,52.125431],[55.811821,52.12714],[55.811001,52.128849],[55.80444,52.139221],[55.803692,52.140442],[55.783829,52.171841],[55.783279,52.17284],[55.782768,52.174129],[55.782219,52.176041],[55.781929,52.17728],[55.781521,52.179192],[55.781361,52.18087],[55.781311,52.182621],[55.781311,52.183571],[55.781399,52.185379],[55.781429,52.186661],[55.781429,52.188091],[55.781399,52.188881],[55.78133,52.189789],[55.78125,52.190899],[55.781189,52.191502],[55.781132,52.192032],[55.78101,52.19265],[55.780819,52.193741],[55.780529,52.194908],[55.780361,52.195518],[55.78014,52.19622],[55.779881,52.196972],[55.779598,52.19767],[55.77927,52.19833],[55.778961,52.198971],[55.778599,52.199551],[55.77718,52.202],[55.77422,52.207008],[55.771309,52.211922],[55.76897,52.215889],[55.76841,52.216808],[55.766151,52.2206],[55.765202,52.222229],[55.759621,52.23164],[55.75816,52.234112],[55.757721,52.234821],[55.756699,52.236328],[55.75634,52.236832],[55.755852,52.2374],[55.755569,52.237671],[55.755348,52.237869],[55.75518,52.237999],[55.754238,52.238701],[55.75383,52.23904],[55.753559,52.239319],[55.7533,52.239639],[55.752312,52.240871],[55.751579,52.241791],[55.75127,52.242111],[55.75106,52.24229],[55.750519,52.242691],[55.749741,52.24321],[55.73579,52.251579],[55.727631,52.256451],[55.725208,52.2579],[55.72377,52.258781],[55.7234,52.25906],[55.722851,52.25956],[55.720501,52.262089],[55.720291,52.262321],[55.717449,52.265339],[55.71051,52.273041],[55.709721,52.273708],[55.709179,52.274078],[55.708549,52.274391],[55.703751,52.276489],[55.69817,52.278881],[55.69619,52.27977],[55.695301,52.280201],[55.693359,52.281471],[55.692009,52.282261],[55.69125,52.282619],[55.690701,52.282829],[55.690102,52.28297],[55.689499,52.283031],[55.689041,52.283051],[55.68858,52.28299],[55.68829,52.282959],[55.687962,52.282848],[55.68729,52.2826],[55.686741,52.282341],[55.68317,52.279949],[55.682301,52.279339],[55.682011,52.279148],[55.681671,52.278999],[55.681419,52.27898],[55.681149,52.27903],[55.68087,52.27919],[55.68074,52.279301],[55.680401,52.279739],[55.680061,52.280331],[55.679749,52.28075],[55.679111,52.281368],[55.67849,52.28191],[55.677841,52.282661],[55.677471,52.283279],[55.675369,52.28727],[55.674358,52.289181],[55.673279,52.29121],[55.673019,52.291721],[55.672562,52.292591],[55.672119,52.29343],[55.670609,52.296329],[55.67033,52.29686],[55.668861,52.299648],[55.66848,52.300381],[55.668339,52.30064],[55.667721,52.301811],[55.667461,52.30241],[55.667068,52.303429],[55.66674,52.304699],[55.666561,52.30563],[55.666439,52.30658],[55.66637,52.30748],[55.66637,52.308411],[55.666401,52.309368],[55.66655,52.310638],[55.666729,52.311661],[55.6674,52.314411],[55.668072,52.317181],[55.6684,52.318241],[55.668812,52.319221],[55.67284,52.32666],[55.675659,52.33189],[55.67635,52.33313],[55.676819,52.333981],[55.677719,52.335609],[55.677879,52.335911],[55.68063,52.340981],[55.68615,52.351101],[55.690151,52.35844],[55.69622,52.369579],[55.69659,52.370281],[55.696629,52.370338],[55.699631,52.375858],[55.69989,52.376339],[55.700821,52.37804],[55.70174,52.379749],[55.701801,52.379841],[55.702808,52.38171],[55.7033,52.382549],[55.703899,52.383709],[55.704239,52.384331],[55.704979,52.385731],[55.705872,52.387321],[55.707142,52.389622],[55.707169,52.389671],[55.707378,52.39027],[55.70742,52.39061],[55.707409,52.39093],[55.707371,52.39156],[55.707409,52.392189],[55.707409,52.39275],[55.707321,52.39315],[55.707191,52.393452],[55.706982,52.39381],[55.706039,52.39542],[55.705978,52.395531],[55.70512,52.396999],[55.704239,52.398479],[55.70282,52.400879],[55.701019,52.403938],[55.70005,52.405579],[55.69923,52.406952],[55.697472,52.40995],[55.696301,52.411949],[55.69445,52.415131],[55.68821,52.4258],[55.68763,52.42662],[55.68729,52.426929],[55.686039,52.427731],[55.685669,52.428059],[55.68531,52.428501],[55.68504,52.428982],[55.68483,52.429401],[55.684631,52.430019],[55.684139,52.43232],[55.68396,52.432941],[55.683769,52.433361],[55.68354,52.43383],[55.682079,52.436249],[55.67815,52.44297],[55.67725,52.444481],[55.676971,52.44495],[55.67622,52.446251],[55.675152,52.448051],[55.674011,52.45002],[55.670921,52.455299],[55.67057,52.455898],[55.670471,52.456181],[55.670429,52.45647],[55.67049,52.456779],[55.670609,52.457119],[55.67086,52.4576],[55.678631,52.471859],[55.682621,52.479179],[55.685921,52.485222],[55.685619,52.485741],[55.685261,52.486542],[55.685101,52.486881],[55.684761,52.487549],[55.682831,52.49123],[55.679352,52.497681],[55.677639,52.50095],[55.67712,52.50198],[55.67664,52.503071],[55.676079,52.504501],[55.675571,52.505939],[55.675209,52.50713],[55.67466,52.509109],[55.673908,52.511829],[55.673679,52.512699],[55.673489,52.513561],[55.67337,52.51432],[55.673328,52.514912],[55.673271,52.516418],[55.673241,52.517658],[55.67305,52.523499],[55.67292,52.528938],[55.67281,52.532299],[55.672661,52.537601],[55.6726,52.538269],[55.672451,52.539371],[55.672199,52.54076],[55.671501,52.543941],[55.670971,52.545891],[55.669621,52.54969],[55.667969,52.554371],[55.66539,52.563148],[55.66473,52.564739],[55.66301,52.56778],[55.662319,52.569321],[55.66164,52.571339],[55.658588,52.58429],[55.65654,52.593121],[55.655369,52.597691],[55.654362,52.601082],[55.65126,52.60873],[55.64576,52.622341],[55.643822,52.62743],[55.643391,52.628719],[55.643169,52.630539],[55.643108,52.63242],[55.64323,52.634209],[55.64381,52.641621],[55.645309,52.66272],[55.645321,52.665001],[55.645222,52.667549],[55.64325,52.682449],[55.642529,52.68782],[55.639309,52.712391],[55.637852,52.722641],[55.63607,52.733749],[55.635971,52.73761],[55.636169,52.743118],[55.636471,52.751598],[55.63649,52.754292],[55.636131,52.761169],[55.636269,52.7631],[55.63707,52.766842],[55.637798,52.77449],[55.63829,52.77763],[55.642929,52.80006],[55.643501,52.805939],[55.644241,52.815681],[55.644779,52.822552],[55.645939,52.83707],[55.646069,52.838692],[55.64642,52.84306],[55.64658,52.846931],[55.64695,52.849682],[55.64827,52.855042],[55.648991,52.85799],[55.65287,52.873421],[55.653889,52.876011],[55.65781,52.884899],[55.660789,52.892078],[55.661629,52.894821],[55.670052,52.921558],[55.674309,52.934212],[55.67485,52.935478],[55.682678,52.952129],[55.68465,52.958199],[55.691521,52.978222],[55.692421,52.981289],[55.69302,52.983971],[55.693562,52.987148],[55.694321,52.993038],[55.697681,53.011028],[55.69928,53.01918],[55.704781,53.040829],[55.70789,53.052311],[55.710011,53.059601],[55.710178,53.060631],[55.71014,53.061729],[55.709648,53.064369],[55.70866,53.068539],[55.70723,53.072842],[55.704472,53.079929],[55.702789,53.08424],[55.699131,53.093811],[55.694149,53.106819],[55.692871,53.110142],[55.676922,53.151619],[55.668449,53.173512],[55.660149,53.195129],[55.65966,53.196121],[55.650101,53.21085],[55.637341,53.230019],[55.628769,53.23912],[55.62315,53.245098],[55.619541,53.248459],[55.61657,53.250809],[55.613331,53.253071],[55.61142,53.255001],[55.60989,53.256939],[55.608349,53.259449],[55.60717,53.261848],[55.604401,53.268929],[55.598129,53.284931],[55.594898,53.292999],[55.581131,53.328781],[55.564869,53.370869],[55.550812,53.406952],[55.550091,53.40863],[55.548779,53.41198],[55.547771,53.415569],[55.547058,53.419151],[55.546749,53.420689],[55.546619,53.422409],[55.54705,53.434429],[55.548222,53.464298],[55.548389,53.46764],[55.54985,53.48539],[55.549969,53.487419],[55.5499,53.488548],[55.549671,53.489529],[55.548119,53.49712],[55.546909,53.503609],[55.542259,53.530602],[55.542068,53.531681],[55.541752,53.53487],[55.5392,53.56073],[55.53825,53.570389],[55.537701,53.575939],[55.537392,53.57917],[55.537182,53.580139],[55.536591,53.582211],[55.53326,53.59341],[55.53297,53.594631],[55.530918,53.608089],[55.530819,53.609329],[55.53083,53.610641],[55.531311,53.619499],[55.531189,53.622349],[55.52932,53.64687],[55.526699,53.66592],[55.524429,53.682209],[55.52264,53.694988],[55.52021,53.711361],[55.516571,53.739811],[55.514339,53.75666],[55.513729,53.76046],[55.51334,53.76226],[55.512871,53.763851],[55.51223,53.765751],[55.509541,53.773739],[55.508492,53.777111],[55.502892,53.803589],[55.50111,53.811771],[55.494579,53.834061],[55.490639,53.84745],[55.490189,53.849079],[55.489601,53.852291],[55.489239,53.856819],[55.48904,53.864101],[55.488972,53.867031],[55.488731,53.870461],[55.48848,53.87254],[55.488159,53.875191],[55.48772,53.878819],[55.48727,53.880661],[55.48658,53.882549],[55.484219,53.88773],[55.48243,53.892479],[55.481289,53.895081],[55.47945,53.898918],[55.477989,53.901131],[55.474831,53.90564],[55.47131,53.911831],[55.467682,53.918968],[55.46714,53.92078],[55.466629,53.923649],[55.466049,53.92635],[55.465599,53.927929],[55.46487,53.929932],[55.462429,53.936199],[55.461441,53.938709],[55.460609,53.941231],[55.460091,53.95723],[55.459911,53.962921],[55.45985,53.964741],[55.46014,53.965679],[55.47105,53.991089],[55.471519,53.992229],[55.47184,53.99353],[55.475712,54.01577],[55.477589,54.025909],[55.47768,54.02668],[55.477581,54.027409],[55.476978,54.029301],[55.47562,54.033089],[55.472099,54.042679],[55.46788,54.054298],[55.467541,54.055519],[55.466969,54.062222],[55.466251,54.07093],[55.46756,54.08437],[55.468208,54.091629],[55.469379,54.104031],[55.46936,54.105049],[55.4678,54.12318],[55.466782,54.134659],[55.466579,54.13686],[55.466011,54.138771],[55.465939,54.14032],[55.465542,54.151291],[55.465172,54.16132],[55.464439,54.181629],[55.464352,54.183262],[55.464069,54.18449],[55.46048,54.194721],[55.459839,54.19688],[55.458569,54.201759],[55.45583,54.212189],[55.45314,54.222198],[55.452351,54.22514],[55.450249,54.235771],[55.44936,54.240509],[55.448101,54.2467],[55.445122,54.260769],[55.443291,54.26936],[55.441669,54.277119],[55.440521,54.28236],[55.439941,54.285179],[55.43869,54.291149],[55.43848,54.292141],[55.437771,54.29549],[55.437672,54.29628],[55.437771,54.297291],[55.439812,54.306301],[55.440399,54.30888],[55.440369,54.309509],[55.44022,54.31002],[55.439949,54.31076],[55.438702,54.314041],[55.438412,54.315071],[55.438278,54.31609],[55.43832,54.317341],[55.438801,54.32312],[55.43996,54.328449],[55.440269,54.330811],[55.440929,54.33857],[55.441071,54.341572],[55.44125,54.354111],[55.44125,54.35651],[55.441471,54.37236],[55.441689,54.39426],[55.441898,54.396351],[55.443249,54.399651],[55.44857,54.412609],[55.453491,54.424721],[55.457619,54.434971],[55.459049,54.438339],[55.464409,54.449371],[55.472149,54.465191],[55.472691,54.466339],[55.473259,54.46796],[55.479778,54.48851],[55.48167,54.494282],[55.482269,54.4963],[55.482269,54.49688],[55.482208,54.497639],[55.480141,54.523861],[55.480061,54.52449],[55.479851,54.52504],[55.47739,54.529381],[55.477249,54.529961],[55.477139,54.531151],[55.476219,54.541729],[55.474201,54.56496],[55.472179,54.588112],[55.470009,54.602631],[55.46994,54.603722],[55.470009,54.60487],[55.47002,54.606098],[55.4697,54.607128],[55.466881,54.614262],[55.466309,54.615631],[55.465858,54.61721],[55.46109,54.641659],[55.45863,54.65427],[55.450989,54.692638],[55.448528,54.705078],[55.44825,54.706329],[55.447842,54.707321],[55.443432,54.714001],[55.44199,54.716171],[55.441441,54.717289],[55.44091,54.71899],[55.437439,54.732639],[55.436798,54.736691],[55.433289,54.762531],[55.429932,54.788712],[55.42807,54.804649],[55.42786,54.8064],[55.42186,54.808319],[55.415779,54.813831],[55.40538,54.82312],[55.403271,54.82542],[55.40086,54.828671],[55.397289,54.834862],[55.386391,54.854118],[55.380249,54.864861],[55.369701,54.8834],[55.358471,54.902908],[55.35318,54.912109],[55.351509,54.91544],[55.349781,54.919559],[55.342049,54.93811],[55.3386,54.946571],[55.336929,54.950459],[55.336231,54.951691],[55.334591,54.954632],[55.3298,54.96291],[55.312511,54.993309],[55.311871,54.994419],[55.308102,55.000999],[55.30405,55.008072],[55.3022,55.010731],[55.28294,55.035019],[55.279598,55.03928],[55.268822,55.05315],[55.267792,55.054459],[55.26683,55.05555],[55.265709,55.05661],[55.252621,55.067379],[55.25045,55.069149],[55.243279,55.07502],[55.224491,55.089691],[55.207741,55.103001],[55.199909,55.10997],[55.1982,55.111778],[55.19545,55.11475],[55.191879,55.118969],[55.19067,55.1203],[55.18932,55.12162],[55.186298,55.12389],[55.183521,55.125851],[55.181499,55.127331],[55.18042,55.128021],[55.179428,55.12838],[55.177521,55.12801],[55.16737,55.125011],[55.165501,55.124741],[55.164558,55.124889],[55.16367,55.125469],[55.16188,55.12706],[55.161518,55.127361],[55.160049,55.12886],[55.158371,55.131279],[55.155941,55.135269],[55.153461,55.1399],[55.15033,55.145969],[55.150051,55.146511],[55.149441,55.14777],[55.14867,55.149139],[55.14415,55.1558],[55.143341,55.15712],[55.142609,55.158779],[55.139751,55.16539],[55.138371,55.168598],[55.137951,55.169781],[55.1376,55.17123],[55.137371,55.173859],[55.1362,55.20266],[55.1362,55.205269],[55.13681,55.21809],[55.13707,55.223808],[55.137791,55.240391],[55.138359,55.25322],[55.138321,55.255421],[55.137699,55.262341],[55.136608,55.274231],[55.135632,55.28524],[55.135288,55.288342],[55.134731,55.2915],[55.133968,55.29459],[55.133099,55.297482],[55.132069,55.30043],[55.13176,55.301201],[55.131229,55.302311],[55.130878,55.30302],[55.12941,55.305309],[55.12796,55.307301],[55.126549,55.30899],[55.12381,55.311699],[55.11132,55.323582],[55.110668,55.324211],[55.108189,55.3265],[55.10717,55.327438],[55.105671,55.328819],[55.10144,55.332741],[55.09919,55.334999],[55.097191,55.336868],[55.09584,55.338089],[55.09359,55.34045],[55.092049,55.342411],[55.090729,55.344521],[55.089588,55.346729],[55.087269,55.35218],[55.08271,55.362839],[55.082249,55.36393],[55.081749,55.365261],[55.080891,55.36813],[55.080441,55.369781],[55.079609,55.37392],[55.07925,55.376831],[55.079079,55.37896],[55.079021,55.381001],[55.07909,55.384651],[55.079231,55.388241],[55.079262,55.388969],[55.079369,55.391682],[55.07935,55.394051],[55.07914,55.395279],[55.07906,55.395779],[55.078541,55.397449],[55.071011,55.4119],[55.0662,55.418678],[55.058552,55.429279],[55.056671,55.431881],[55.055168,55.433979],[55.054169,55.435371],[55.047668,55.444351],[55.043839,55.448471],[55.039921,55.452671],[55.036121,55.45673],[55.031078,55.462132],[55.02993,55.463169],[55.025261,55.46817],[55.022678,55.47121],[55.015419,55.479031],[55.011471,55.48325],[55.00721,55.487881],[55.005341,55.489841],[55.004292,55.490971],[55.00346,55.49194],[54.99976,55.498241],[54.998421,55.50032],[54.99715,55.502731],[54.995659,55.505291],[54.994041,55.508141],[54.992279,55.511211],[54.990582,55.51408],[54.990299,55.514549],[54.98629,55.521851],[54.985031,55.524109],[54.98386,55.526711],[54.982948,55.52956],[54.982239,55.53286],[54.981892,55.534679],[54.981621,55.536919],[54.9813,55.544868],[54.980869,55.552792],[54.980659,55.555901],[54.980492,55.557461],[54.980221,55.559052],[54.979321,55.562901],[54.97818,55.566582],[54.976959,55.569439],[54.975311,55.57222],[54.974522,55.573341],[54.973621,55.574402],[54.971722,55.576469],[54.971329,55.576859],[54.96925,55.57906],[54.96706,55.58123],[54.96434,55.583359],[54.963219,55.584129],[54.9617,55.584751],[54.960991,55.58493],[54.960312,55.585121],[54.95866,55.585331],[54.95718,55.585369],[54.955688,55.58519],[54.954731,55.58482],[54.95295,55.584179],[54.95126,55.583809],[54.94902,55.583092],[54.936508,55.579128],[54.929699,55.576931],[54.928501,55.576672],[54.927219,55.576641],[54.925781,55.57695],[54.924301,55.57769],[54.92363,55.578098],[54.922749,55.578892],[54.921341,55.580318],[54.920849,55.581131],[54.917332,55.586761],[54.912281,55.594929],[54.91058,55.598148],[54.909321,55.601109],[54.90807,55.604259],[54.907341,55.60648],[54.907028,55.607632],[54.906559,55.60955],[54.906288,55.611069],[54.904819,55.617901],[54.904518,55.619251],[54.904251,55.620491],[54.903919,55.623051],[54.90332,55.625488],[54.90237,55.628021],[54.89941,55.632771],[54.897282,55.636261],[54.895359,55.639481],[54.89484,55.640339],[54.893181,55.64394],[54.892159,55.646889],[54.891472,55.649391],[54.890732,55.652821],[54.88763,55.66811],[54.884869,55.681709],[54.88084,55.701359],[54.8797,55.707031],[54.879181,55.708351],[54.878559,55.709251],[54.877338,55.710411],[54.876289,55.710949],[54.875462,55.710911],[54.87104,55.70813],[54.868149,55.70644],[54.865608,55.705261],[54.86319,55.704411],[54.860741,55.703659],[54.859039,55.70335],[54.85738,55.70327],[54.85548,55.703381],[54.853649,55.703701],[54.851921,55.704239],[54.850761,55.704659],[54.849751,55.70525],[54.848782,55.70591],[54.84721,55.70734],[54.845921,55.708721],[54.844639,55.710331],[54.84071,55.715698],[54.836929,55.72089],[54.8363,55.72171],[54.834869,55.72319],[54.833141,55.72448],[54.83075,55.725441],[54.825741,55.726768],[54.824032,55.72728],[54.82127,55.728668],[54.819839,55.729481],[54.817902,55.73098],[54.81694,55.731861],[54.81477,55.734138],[54.812309,55.73679],[54.802979,55.746792],[54.800652,55.749561],[54.799351,55.751381],[54.79845,55.752991],[54.796921,55.75589],[54.795879,55.758228],[54.794369,55.761349],[54.79351,55.763039],[54.79216,55.76535],[54.79192,55.765701],[54.79015,55.768139],[54.787418,55.77142],[54.78384,55.775379],[54.782242,55.777538],[54.78157,55.77866],[54.780529,55.780682],[54.77985,55.782009],[54.77916,55.783081],[54.778511,55.783878],[54.777679,55.78474],[54.776909,55.78529],[54.775822,55.785759],[54.773682,55.785789],[54.767872,55.784031],[54.767189,55.783829],[54.763988,55.78289],[54.759991,55.781792],[54.75808,55.781342],[54.756199,55.781139],[54.754761,55.781101],[54.752392,55.781139],[54.750481,55.781422],[54.745941,55.782139],[54.742882,55.7826],[54.74194,55.782761],[54.737862,55.783428],[54.73595,55.783138],[54.73439,55.78228],[54.73304,55.78133],[54.727871,55.777618],[54.726528,55.777081],[54.72509,55.776852],[54.722149,55.776829],[54.716301,55.776749],[54.71484,55.776451],[54.713188,55.77586],[54.702301,55.769932],[54.701519,55.769451],[54.699902,55.768169],[54.698761,55.76675],[54.69836,55.76622],[54.697201,55.763741],[54.696548,55.762081],[54.694908,55.75774],[54.692669,55.752022],[54.692101,55.750641],[54.690891,55.748219],[54.689869,55.746479],[54.686829,55.74213],[54.682739,55.736439],[54.68071,55.733608],[54.67926,55.731918],[54.678429,55.73122],[54.677441,55.730518],[54.675678,55.72998],[54.67395,55.73003],[54.672249,55.730549],[54.667721,55.733021],[54.66748,55.733139],[54.665081,55.734409],[54.6642,55.734871],[54.66375,55.734989],[54.663479,55.73489],[54.663288,55.73465],[54.663139,55.734032],[54.66317,55.733631],[54.663349,55.733261],[54.66354,55.73307],[54.663929,55.73312],[54.664181,55.733551],[54.664421,55.734371],[54.664551,55.735081],[54.664921,55.737061],[54.66534,55.73914],[54.666069,55.743031],[54.67001,55.764301],[54.672119,55.77565],[54.673309,55.782028],[54.674702,55.79158],[54.67527,55.79491],[54.67614,55.799492],[54.676418,55.80175],[54.67643,55.802879],[54.67638,55.804379],[54.676319,55.80537],[54.676239,55.806561],[54.67598,55.809849],[54.675838,55.811871],[54.67556,55.81443],[54.67535,55.81543],[54.674171,55.820782],[54.672138,55.82967],[54.669331,55.841999],[54.66674,55.853401],[54.665531,55.858742],[54.6642,55.864491],[54.66288,55.870319],[54.66124,55.87759],[54.659679,55.8843],[54.65884,55.887218],[54.65807,55.88958],[54.657139,55.89201],[54.656559,55.893372],[54.655449,55.89584],[54.65424,55.89856],[54.65205,55.903351],[54.650982,55.905739],[54.649849,55.90834],[54.649391,55.90958],[54.648708,55.911469],[54.648022,55.913471],[54.647282,55.916161],[54.646801,55.918159],[54.6465,55.919479],[54.645939,55.922279],[54.645641,55.924271],[54.64521,55.926781],[54.6451,55.927639],[54.644539,55.930771],[54.64452,55.93137],[54.644321,55.932629],[54.644161,55.933701],[54.643681,55.937119],[54.643181,55.94035],[54.64291,55.942261],[54.642731,55.943569],[54.642559,55.94508],[54.642441,55.946609],[54.642399,55.947449],[54.642368,55.94833],[54.642349,55.949909],[54.64238,55.951591],[54.64246,55.95335],[54.64257,55.955132],[54.643391,55.967979],[54.643871,55.974979],[54.644112,55.9758],[54.645401,55.995911],[54.645649,55.999821],[54.64595,56.004421],[54.646801,56.017712],[54.64777,56.032749],[54.648731,56.047531],[54.649361,56.057251],[54.649399,56.057941],[54.650101,56.068951],[54.65044,56.074249],[54.650661,56.07782],[54.650669,56.078011],[54.650871,56.080952],[54.65089,56.081348],[54.65107,56.08419],[54.651089,56.08453],[54.651299,56.087551],[54.651409,56.08976],[54.652229,56.102268],[54.65279,56.10857],[54.653149,56.11108],[54.654079,56.115681],[54.654282,56.116501],[54.654678,56.118099],[54.655411,56.120739],[54.65723,56.127541],[54.659191,56.134892],[54.660511,56.139309],[54.662338,56.144741],[54.665249,56.153381],[54.66642,56.15691],[54.668629,56.16354],[54.672539,56.17519],[54.67445,56.180859],[54.675129,56.182831],[54.6763,56.185509],[54.677559,56.18787],[54.678829,56.18977],[54.681629,56.19302],[54.685379,56.1973],[54.687679,56.199921],[54.69323,56.206329],[54.69767,56.211479],[54.700779,56.21513],[54.70499,56.220051],[54.70713,56.222591],[54.70863,56.224312],[54.719292,56.236759],[54.72155,56.239792],[54.722988,56.242111],[54.724621,56.244949],[54.72646,56.248669],[54.728119,56.25267],[54.729301,56.255981],[54.730671,56.26046],[54.732208,56.266048],[54.73465,56.274929],[54.737309,56.284599],[54.740238,56.29528],[54.741459,56.299759],[54.742451,56.30331],[54.74308,56.305641],[54.743328,56.306549],[54.744011,56.309292],[54.744431,56.310799],[54.745178,56.313339],[54.746929,56.319698],[54.74913,56.327782],[54.75127,56.335579],[54.751911,56.337952],[54.752621,56.34087],[54.753189,56.343601],[54.75383,56.347221],[54.754681,56.352612],[54.755508,56.357979],[54.757141,56.368118],[54.758308,56.375591],[54.759369,56.38224],[54.760269,56.387981],[54.761181,56.393742],[54.76202,56.399109],[54.763481,56.408401],[54.764179,56.412868],[54.764912,56.417439],[54.766361,56.426579],[54.767849,56.436069],[54.769329,56.44548],[54.77029,56.451439],[54.77095,56.455681],[54.771599,56.459869],[54.772919,56.467838],[54.773529,56.471001],[54.77557,56.48167],[54.779339,56.501308],[54.782982,56.520302],[54.784142,56.526348],[54.78595,56.535759],[54.786251,56.537338],[54.786739,56.539989],[54.788971,56.551559],[54.791481,56.564621],[54.793541,56.575432],[54.7953,56.584549],[54.796471,56.590401],[54.802078,56.612301],[54.80304,56.616119],[54.80336,56.617279],[54.804211,56.620689],[54.80545,56.625519],[54.806412,56.629318],[54.807411,56.63324],[54.80817,56.636829],[54.808491,56.63871],[54.80912,56.643742],[54.809792,56.649261],[54.810619,56.656109],[54.811432,56.662949],[54.812271,56.66996],[54.813332,56.67894],[54.813869,56.683289],[54.81422,56.686359],[54.814671,56.69001],[54.815281,56.69503],[54.81559,56.697639],[54.81612,56.702271],[54.81625,56.703381],[54.816319,56.70443],[54.816441,56.706532],[54.816559,56.709141],[54.816639,56.714771],[54.816681,56.722599],[54.816738,56.729401],[54.81675,56.730419],[54.816799,56.73798],[54.81686,56.749969],[54.816921,56.757],[54.816921,56.757542],[54.81715,56.793861],[54.817181,56.799141],[54.817402,56.839279],[54.81752,56.863491],[54.817558,56.866192],[54.817768,56.868931],[54.818138,56.871922],[54.818588,56.874352],[54.81926,56.877159],[54.820061,56.87973],[54.82132,56.88287],[54.825951,56.893631],[54.826462,56.894989],[54.82671,56.896278],[54.8269,56.89827],[54.826988,56.900848],[54.827091,56.903469],[54.827251,56.90778],[54.827751,56.91758],[54.828339,56.922459],[54.82917,56.927349],[54.82991,56.93148],[54.830528,56.935371],[54.83102,56.939499],[54.831219,56.942089],[54.83136,56.944679],[54.83186,56.96133],[54.832298,56.976261],[54.832489,56.981819],[54.832611,56.98418],[54.832748,56.98595],[54.832909,56.987659],[54.841751,57.05891],[54.842751,57.066971],[54.845871,57.092319],[54.846611,57.098259],[54.847,57.1012],[54.847179,57.10244],[54.847271,57.103039],[54.847351,57.1035],[54.847511,57.104221],[54.847729,57.105179],[54.850578,57.11689],[54.85368,57.12962],[54.853931,57.13068],[54.856098,57.13966],[54.857651,57.146091],[54.859219,57.152538],[54.860199,57.156212],[54.86039,57.156841],[54.860592,57.157551],[54.86079,57.158089],[54.860989,57.15863],[54.861271,57.15929],[54.86327,57.164169],[54.865829,57.170479],[54.870941,57.183079],[54.873699,57.189919],[54.874222,57.191341],[54.874599,57.192589],[54.87492,57.193729],[54.875172,57.19487],[54.875389,57.19598],[54.87561,57.197201],[54.875809,57.198551],[54.87598,57.199921],[54.876228,57.20211],[54.879848,57.23526],[54.883839,57.271709],[54.88488,57.281361],[54.885391,57.286228],[54.885761,57.289349],[54.886009,57.291],[54.88623,57.29237],[54.88662,57.29438],[54.88707,57.296478],[54.887661,57.298771],[54.888168,57.30069],[54.888451,57.30154],[54.88868,57.30225],[54.88908,57.30341],[54.889408,57.304249],[54.889931,57.305592],[54.890362,57.306591],[54.89061,57.307152],[54.891491,57.309158],[54.893631,57.313969],[54.8983,57.324348],[54.90033,57.328899],[54.902451,57.333641],[54.902882,57.334629],[54.903229,57.33551],[54.903599,57.336491],[54.904221,57.338348],[54.904751,57.340061],[54.90514,57.341339],[54.905849,57.343498],[54.905949,57.344791],[54.907589,57.352791],[54.90855,57.35762],[54.909931,57.364521],[54.910099,57.365318],[54.911282,57.370911],[54.911678,57.372929],[54.911949,57.37447],[54.91214,57.375969],[54.912251,57.37751],[54.912239,57.379021],[54.91217,57.380489],[54.912048,57.382011],[54.911758,57.385181],[54.911671,57.386372],[54.911621,57.38739],[54.91164,57.388378],[54.911709,57.389439],[54.9118,57.390491],[54.911961,57.391682],[54.912128,57.392632],[54.912338,57.393501],[54.912579,57.394428],[54.913738,57.398151],[54.915539,57.40395],[54.915821,57.404789],[54.916302,57.406052],[54.916759,57.40707],[54.91745,57.40836],[54.918049,57.409409],[54.91856,57.410229],[54.91906,57.410919],[54.919621,57.41161],[54.920891,57.412979],[54.92168,57.41362],[54.922581,57.41423],[54.922661,57.41428],[54.923611,57.414799],[54.92411,57.415031],[54.924591,57.415218],[54.92514,57.41539],[54.925991,57.41552],[54.927502,57.41568],[54.928959,57.415852],[54.930241,57.41597],[54.931141,57.416088],[54.931541,57.41621],[54.93187,57.41637],[54.932251,57.416611],[54.932732,57.416939],[54.93317,57.417301],[54.933681,57.417839],[54.934261,57.418579],[54.934978,57.419701],[54.936569,57.422218],[54.9384,57.425159],[54.93906,57.42614],[54.93964,57.426949],[54.940189,57.42765],[54.940929,57.42841],[54.941841,57.429161],[54.942799,57.429859],[54.943611,57.430462],[54.944111,57.430882],[54.944618,57.431351],[54.945148,57.431881],[54.945789,57.432579],[54.946369,57.433239],[54.946819,57.4338],[54.94735,57.434559],[54.947849,57.43528],[54.948238,57.435871],[54.948559,57.43642],[54.94891,57.437119],[54.94923,57.438049],[54.949471,57.43898],[54.94981,57.44046],[54.951229,57.4473],[54.952629,57.454121],[54.953041,57.456089],[54.953308,57.45726],[54.953541,57.458179],[54.953732,57.458931],[54.953999,57.459751],[54.9543,57.46064],[54.954609,57.46146],[54.95499,57.46244],[54.955421,57.463322],[54.95623,57.46487],[54.956848,57.465889],[54.95752,57.466869],[54.959419,57.469212],[54.961609,57.471859],[54.964561,57.476082],[54.966679,57.479179],[54.96748,57.480358],[54.967831,57.480942],[54.968151,57.48151],[54.96851,57.482231],[54.969051,57.48349],[54.969601,57.484901],[54.969872,57.48568],[54.970131,57.48679],[54.970421,57.488289],[54.971851,57.496109],[54.973801,57.507069],[54.9743,57.509739],[54.974812,57.51218],[54.976761,57.520279],[54.97905,57.529819],[54.980228,57.53471],[54.980942,57.537682],[54.981831,57.541401],[54.982738,57.5452],[54.983238,57.547199],[54.983589,57.54863],[54.98391,57.54998],[54.984211,57.551189],[54.984638,57.553089],[54.985069,57.555191],[54.98534,57.556782],[54.986221,57.562389],[54.987881,57.573261],[54.989071,57.58107],[54.990009,57.587139],[54.990292,57.588848],[54.99073,57.59108],[54.991402,57.594082],[54.991611,57.594971],[54.991829,57.595711],[54.9921,57.596432],[54.992481,57.597321],[54.993031,57.598309],[54.99374,57.599461],[54.99625,57.603321],[54.996559,57.603901],[54.99678,57.604401],[54.997028,57.605068],[54.997261,57.60582],[54.997509,57.606812],[54.997761,57.60796],[54.99929,57.614929],[54.999401,57.615528],[54.999569,57.616638],[54.99963,57.617451],[54.999649,57.61824],[54.999619,57.619141],[54.999561,57.62038],[54.999458,57.621529],[54.999352,57.622421],[54.999161,57.62368],[54.998989,57.625019],[54.99894,57.62561],[54.998909,57.626289],[54.998932,57.626961],[54.999008,57.627781],[54.999111,57.628422],[54.999241,57.628922],[55.00016,57.631901],[55.000332,57.632721],[55.000439,57.63356],[55.000511,57.63483],[55.00053,57.636471],[55.00045,57.640511],[55.00042,57.641621],[55.000351,57.64259],[55.00021,57.643822],[55.00005,57.64492],[54.999748,57.646561],[54.999561,57.647572],[54.99942,57.648769],[54.999329,57.649891],[54.999298,57.6511],[54.999359,57.652069],[54.999569,57.65411],[54.99979,57.655891],[55.00016,57.658321],[55.000462,57.65979],[55.00074,57.660851],[55.00108,57.66193],[55.002369,57.66563],[55.00433,57.671101],[55.00518,57.67347],[55.005989,57.675831],[55.006229,57.676601],[55.00647,57.677422],[55.006779,57.678558],[55.00705,57.679668],[55.00732,57.68092],[55.007439,57.681728],[55.0075,57.682461],[55.007542,57.683418],[55.007561,57.684841],[55.007568,57.686138],[55.007542,57.687408],[55.007469,57.688499],[55.007381,57.689579],[55.007271,57.690868],[55.006889,57.69455],[55.006748,57.69582],[55.006229,57.701149],[55.006039,57.703571],[55.005871,57.70657],[55.005852,57.70681],[55.00584,57.70705],[55.0056,57.711048],[55.005508,57.711979],[55.005371,57.712799],[55.004532,57.716129],[55.004219,57.716888],[55.003811,57.71769],[55.003349,57.718189],[55.002869,57.718571],[55.002399,57.7188],[55.00169,57.718868],[55.001129,57.71875],[55.000629,57.718449],[55.00013,57.71801],[54.99934,57.71719],[54.998329,57.71587],[54.99786,57.715302],[54.99728,57.71468],[54.996689,57.71402],[54.996109,57.713409],[54.995838,57.713181],[54.99559,57.713032],[54.99535,57.712971],[54.995129,57.712978],[54.994869,57.713051],[54.994678,57.713169],[54.994511,57.713322],[54.994339,57.713558],[54.994171,57.71394],[54.994041,57.71434],[54.993969,57.71484],[54.993961,57.71534],[54.99408,57.71619],[54.994362,57.71743],[54.994888,57.719109],[54.995029,57.71981],[54.995121,57.720612],[54.99514,57.721199],[54.995071,57.721741],[54.99469,57.723579],[54.992451,57.73497],[54.99155,57.739571],[54.99041,57.745319],[54.986382,57.765751],[54.98336,57.777149],[54.982868,57.77919],[54.9827,57.780079],[54.982578,57.781471],[54.982521,57.7831],[54.982521,57.784019],[54.9827,57.78746],[54.982929,57.791069],[54.983139,57.794201],[54.983219,57.79554],[54.983261,57.79657],[54.98328,57.79734],[54.983231,57.798279],[54.98299,57.79966],[54.982281,57.802799],[54.981541,57.806122],[54.980991,57.80854],[54.980259,57.811661],[54.980068,57.812382],[54.97966,57.813519],[54.979259,57.81432],[54.978779,57.815109],[54.978222,57.815849],[54.977699,57.816441],[54.977139,57.81702],[54.975739,57.81852],[54.974232,57.82011],[54.97271,57.821732],[54.971359,57.823158],[54.970249,57.824379],[54.969761,57.82505],[54.96928,57.825802],[54.96904,57.826241],[54.96875,57.82695],[54.968449,57.827839],[54.968182,57.828892],[54.967529,57.832352],[54.965641,57.842831],[54.965321,57.846352],[54.965778,57.850979],[54.9683,57.866692],[54.96925,57.87114],[54.97163,57.87743],[54.97298,57.884399],[54.97345,57.88818],[54.973621,57.891861],[54.973221,57.896992],[54.971889,57.90617],[54.971489,57.90847],[54.971142,57.910809],[54.971001,57.911911],[54.970871,57.913189],[54.97076,57.914551],[54.97068,57.915878],[54.970631,57.917332],[54.970612,57.918831],[54.970772,57.925819],[54.970879,57.931122],[54.971111,57.93475],[54.970661,57.93922],[54.968941,57.954922],[54.968201,57.96059],[54.967072,57.96685],[54.966282,57.97089],[54.962391,57.982052],[54.959461,57.98822],[54.95628,57.993069],[54.947769,58.001431],[54.94186,58.00684],[54.93618,58.012051],[54.929489,58.01952],[54.922199,58.028999],[54.920761,58.031719],[54.919991,58.035351],[54.918999,58.04007],[54.91861,58.044579],[54.919621,58.05241],[54.919849,58.055222],[54.919689,58.057919],[54.918949,58.061138],[54.91687,58.066639],[54.914459,58.072941],[54.914261,58.07449],[54.914009,58.07719],[54.914108,58.080021],[54.91412,58.083241],[54.913422,58.08646],[54.910488,58.09568],[54.909309,58.099461],[54.90794,58.10371],[54.907349,58.105831],[54.90641,58.109039],[54.905319,58.111012],[54.904041,58.113071],[54.90316,58.115429],[54.90276,58.118912],[54.902111,58.122169],[54.901131,58.125],[54.89925,58.12878],[54.897621,58.13118],[54.896839,58.133331],[54.896439,58.137531],[54.896599,58.142029],[54.89621,58.14418],[54.896099,58.144779],[54.894371,58.152939],[54.8923,58.160568],[54.88839,58.16972],[54.877441,58.192841],[54.87616,58.19817],[54.87537,58.20314],[54.875019,58.205891],[54.872601,58.227779],[54.86969,58.252331],[54.86937,58.25486],[54.868851,58.257912],[54.86615,58.263439],[54.859852,58.274681],[54.85759,58.27953],[54.8568,58.282619],[54.855759,58.28717],[54.855221,58.2901],[54.855209,58.293781],[54.85516,58.296181],[54.854931,58.297989],[54.85429,58.300251],[54.85218,58.303909],[54.851109,58.30648],[54.85067,58.31023],[54.851349,58.315891],[54.852242,58.322498],[54.853432,58.328251],[54.855499,58.334511],[54.857578,58.339748],[54.860001,58.346272],[54.86356,58.359058],[54.864639,58.361889],[54.865711,58.363682],[54.866711,58.365101],[54.868511,58.367081],[54.870312,58.368992],[54.871632,58.370708],[54.87188,58.37104],[54.87233,58.371769],[54.87291,58.372799],[54.873981,58.375439],[54.875271,58.37883],[54.875259,58.378799],[54.87561,58.37991],[54.875881,58.381222],[54.876209,58.38335],[54.876369,58.38538],[54.876419,58.38731],[54.876549,58.388569],[54.876701,58.38958],[54.876888,58.39056],[54.87957,58.398319],[54.88208,58.405579],[54.88253,58.406719],[54.88303,58.407761],[54.883709,58.408772],[54.88446,58.409649],[54.884811,58.410118],[54.885071,58.410519],[54.885342,58.41114],[54.885609,58.41198],[54.88562,58.41209],[54.88588,58.413651],[54.885891,58.413731],[54.885941,58.414082],[54.886341,58.416908],[54.886429,58.4179],[54.886471,58.41938],[54.886478,58.420269],[54.88649,58.420891],[54.88662,58.423191],[54.88681,58.425011],[54.887581,58.43187],[54.88773,58.433399],[54.887829,58.434341],[54.887871,58.434719],[54.887932,58.435169],[54.88805,58.43618],[54.888119,58.43681],[54.888599,58.440239],[54.88921,58.444561],[54.88932,58.44585],[54.88929,58.447071],[54.889229,58.44799],[54.889091,58.44886],[54.888939,58.449711],[54.888691,58.450562],[54.888458,58.451302],[54.88821,58.451981],[54.88789,58.45269],[54.887508,58.453259],[54.886829,58.454208],[54.88588,58.45509],[54.884529,58.456032],[54.882469,58.457481],[54.881641,58.458061],[54.88073,58.458912],[54.88039,58.45937],[54.880058,58.459999],[54.876789,58.467121],[54.87598,58.469059],[54.87574,58.470112],[54.87542,58.47274],[54.875141,58.474892],[54.87492,58.475681],[54.874619,58.47641],[54.87336,58.47868],[54.871059,58.481972],[54.87067,58.482498],[54.869678,58.48386],[54.868858,58.485409],[54.868279,58.48671],[54.867729,58.488331],[54.867222,58.490761],[54.86694,58.492859],[54.866859,58.49493],[54.866859,58.4967],[54.867031,58.498428],[54.867279,58.500332],[54.868,58.505741],[54.86858,58.510281],[54.868698,58.512032],[54.86861,58.513531],[54.868351,58.51495],[54.867569,58.517971],[54.867329,58.519619],[54.867149,58.521931],[54.867031,58.524361],[54.86684,58.526409],[54.86652,58.528271],[54.865879,58.53072],[54.865391,58.532169],[54.864849,58.533569],[54.864231,58.534939],[54.86356,58.536221],[54.862251,58.53828],[54.860821,58.540161],[54.860008,58.54134],[54.859348,58.54269],[54.858711,58.544571],[54.85836,58.545929],[54.858109,58.547569],[54.857948,58.549541],[54.857922,58.558102],[54.858021,58.59304],[54.85812,58.601959],[54.858089,58.603661],[54.858028,58.607029],[54.857792,58.612381],[54.856152,58.65015],[54.856312,58.65461],[54.857529,58.67363],[54.8578,58.677269],[54.858101,58.67989],[54.85878,58.68224],[54.862438,58.69508],[54.86359,58.69994],[54.864601,58.708519],[54.865471,58.714401],[54.86536,58.716499],[54.864891,58.71854],[54.862438,58.724091],[54.8615,58.726311],[54.861301,58.726791],[54.861118,58.727341],[54.86076,58.72858],[54.86063,58.729568],[54.86055,58.730579],[54.860531,58.731232],[54.86055,58.73188],[54.860729,58.733189],[54.860821,58.733551],[54.861,58.734329],[54.861229,58.73505],[54.8615,58.735748],[54.861801,58.736431],[54.8633,58.739399],[54.864861,58.7425],[54.86726,58.747711],[54.86792,58.749409],[54.868431,58.75082],[54.86969,58.754509],[54.87112,58.75959],[54.872021,58.763599],[54.872471,58.766411],[54.873249,58.77142],[54.873669,58.77515],[54.874531,58.78252],[54.87529,58.78838],[54.875992,58.794739],[54.877651,58.804951],[54.87949,58.812359],[54.880798,58.817051],[54.881649,58.820202],[54.88184,58.8209],[54.882408,58.823139],[54.88818,58.84444],[54.889549,58.849411],[54.891258,58.85582],[54.89296,58.862019],[54.894009,58.865898],[54.895599,58.87178],[54.896351,58.874321],[54.897129,58.87656],[54.897869,58.87851],[54.898602,58.88028],[54.900181,58.883518],[54.90126,58.885422],[54.902088,58.886688],[54.90332,58.888519],[54.904209,58.88969],[54.905102,58.890732],[54.906528,58.892269],[54.90789,58.893501],[54.90921,58.894581],[54.916771,58.89999],[54.919979,58.902191],[54.921471,58.903381],[54.922241,58.904099],[54.922901,58.9048],[54.92342,58.905418],[54.923889,58.90612],[54.924431,58.906921],[54.92514,58.908249],[54.925701,58.909481],[54.926109,58.910461],[54.92659,58.911919],[54.926949,58.913349],[54.92717,58.914471],[54.927391,58.91584],[54.92757,58.91724],[54.927689,58.918709],[54.9277,58.92009],[54.927662,58.922642],[54.927521,58.92664],[54.927521,58.928459],[54.92762,58.930641],[54.92783,58.932461],[54.928108,58.93409],[54.928509,58.935711],[54.929001,58.937309],[54.929451,58.938568],[54.92981,58.939369],[54.930222,58.940151],[54.930569,58.94088],[54.93317,58.945461],[54.933681,58.946121],[54.9342,58.946751],[54.93483,58.947361],[54.935421,58.94783],[54.936131,58.948261],[54.93689,58.948669],[54.937778,58.948921],[54.938148,58.949032],[54.939041,58.949299],[54.941181,58.949848],[54.94286,58.950291],[54.948559,58.951759],[54.95015,58.952301],[54.951408,58.95293],[54.952469,58.953609],[54.953579,58.954441],[54.955879,58.95702],[54.956718,58.95816],[54.957458,58.959309],[54.95826,58.96077],[54.958961,58.962231],[54.960209,58.96526],[54.964561,58.97612],[54.966148,58.979691],[54.96846,58.98386],[54.971909,58.99012],[54.980068,59.004581],[54.98201,59.00872],[54.98317,59.011841],[54.984291,59.01524],[54.988029,59.02697],[54.988899,59.02961],[54.989639,59.031521],[54.990528,59.033482],[54.991428,59.03516],[54.992359,59.036671],[54.993172,59.037769],[54.995762,59.04158],[54.996811,59.043549],[54.997601,59.04528],[54.998409,59.047291],[54.998871,59.048698],[54.99931,59.050179],[54.999981,59.053009],[55.000969,59.05806],[55.001591,59.06147],[55.001881,59.063049],[55.002171,59.064411],[55.002541,59.0658],[55.002892,59.066929],[55.00325,59.067959],[55.003639,59.069],[55.004219,59.07024],[55.004688,59.071232],[55.00515,59.072071],[55.005798,59.073101],[55.00671,59.074471],[55.007648,59.075871],[55.009418,59.078602],[55.009991,59.07967],[55.010441,59.080662],[55.010929,59.081841],[55.012039,59.085289],[55.012371,59.08654],[55.012691,59.087978],[55.012901,59.089668],[55.013199,59.092682],[55.013451,59.095551],[55.013618,59.097679],[55.014332,59.106461],[55.014641,59.108871],[55.01498,59.110481],[55.01545,59.112091],[55.015831,59.11319],[55.016281,59.114239],[55.01688,59.115341],[55.017479,59.116329],[55.018269,59.11747],[55.019199,59.11871],[55.02042,59.120419],[55.020988,59.12122],[55.022541,59.123219],[55.02383,59.124649],[55.024811,59.125702],[55.025921,59.12674],[55.027531,59.128071],[55.032501,59.13216],[55.03307,59.132671],[55.034271,59.133629],[55.034901,59.134151],[55.038521,59.137138],[55.04015,59.138451],[55.04047,59.138741],[55.0415,59.139599],[55.04211,59.140049],[55.042591,59.140411],[55.044239,59.141479],[55.048489,59.144131],[55.050339,59.145309],[55.0509,59.145729],[55.0513,59.14603],[55.051731,59.14637],[55.05204,59.146629],[55.052319,59.14687],[55.05254,59.147079],[55.05278,59.147301],[55.053009,59.14753],[55.05452,59.149109],[55.059559,59.15451],[55.059799,59.154812],[55.059978,59.155022],[55.0602,59.155281],[55.06039,59.155529],[55.060558,59.15575],[55.060749,59.15601],[55.060982,59.156349],[55.061241,59.156769],[55.061508,59.157219],[55.062092,59.15831],[55.062199,59.158562],[55.06229,59.158798],[55.062382,59.159039],[55.062721,59.160069],[55.062908,59.16066],[55.06308,59.161221],[55.06321,59.161732],[55.063381,59.16238],[55.063568,59.163151],[55.063931,59.16457],[55.064159,59.16555],[55.064491,59.166882],[55.064751,59.167938],[55.065479,59.17107],[55.066669,59.17609],[55.068981,59.18594],[55.069931,59.18998],[55.07061,59.193001],[55.071239,59.19614],[55.071812,59.19902],[55.07225,59.2015],[55.073051,59.206139],[55.074249,59.21299],[55.07515,59.2183],[55.07552,59.220089],[55.076321,59.223579],[55.077019,59.226261],[55.07766,59.228409],[55.078308,59.230431],[55.078972,59.232281],[55.081261,59.238392],[55.08535,59.249168],[55.087631,59.255032],[55.0886,59.25729],[55.089062,59.258221],[55.089828,59.259731],[55.090889,59.26157],[55.09185,59.262989],[55.09269,59.264252],[55.093651,59.265469],[55.095951,59.26833],[55.096569,59.26907],[55.097462,59.27026],[55.098019,59.27116],[55.098541,59.272079],[55.099072,59.273102],[55.099758,59.27475],[55.100288,59.276279],[55.10078,59.277931],[55.10117,59.279331],[55.101639,59.281368],[55.1022,59.283661],[55.10268,59.285751],[55.102859,59.28648],[55.103088,59.287189],[55.103279,59.287701],[55.103519,59.28817],[55.103828,59.288639],[55.105659,59.29092],[55.105881,59.291321],[55.106079,59.29174],[55.106312,59.292301],[55.107021,59.29454],[55.10857,59.299801],[55.108898,59.30117],[55.10918,59.30238],[55.109459,59.303768],[55.109989,59.307079],[55.110519,59.310341],[55.110611,59.31094],[55.11068,59.311699],[55.110729,59.31263],[55.110748,59.31324],[55.110771,59.31432],[55.110649,59.319199],[55.110519,59.32346],[55.11042,59.326061],[55.110359,59.32769],[55.110298,59.330109],[55.110298,59.331009],[55.110321,59.33194],[55.110359,59.332951],[55.110401,59.333839],[55.110489,59.334721],[55.1106,59.335812],[55.110729,59.33691],[55.110939,59.33815],[55.11116,59.339218],[55.111439,59.34045],[55.111809,59.34206],[55.115021,59.35487],[55.115238,59.355801],[55.11562,59.357689],[55.11581,59.35886],[55.115959,59.360001],[55.116051,59.361031],[55.116119,59.361969],[55.11618,59.36314],[55.116192,59.364391],[55.11618,59.3657],[55.11615,59.36681],[55.116112,59.36787],[55.115879,59.372749],[55.11573,59.37569],[55.115589,59.378368],[55.115589,59.379139],[55.115589,59.379799],[55.11562,59.380531],[55.115688,59.381241],[55.115761,59.381802],[55.115879,59.38242],[55.116951,59.387329],[55.11702,59.38776],[55.117081,59.388271],[55.117142,59.388809],[55.11718,59.389301],[55.11721,59.389919],[55.117161,59.392971],[55.11702,59.396809],[55.11697,59.397652],[55.116909,59.398319],[55.116859,59.398869],[55.11676,59.399422],[55.11652,59.40028],[55.11618,59.401199],[55.11586,59.401741],[55.115501,59.402359],[55.115372,59.402531],[55.11528,59.402649],[55.114738,59.403351],[55.113369,59.40509],[55.113029,59.40559],[55.112659,59.4062],[55.112339,59.40704],[55.112171,59.407681],[55.11203,59.408379],[55.1119,59.409279],[55.111889,59.410118],[55.111919,59.41098],[55.112122,59.413879],[55.112259,59.415508],[55.112492,59.417099],[55.11264,59.417912],[55.112801,59.41848],[55.112968,59.418949],[55.113232,59.419601],[55.11351,59.420078],[55.113861,59.420631],[55.114769,59.421959],[55.11721,59.425442],[55.119701,59.428822],[55.12006,59.429211],[55.120548,59.429661],[55.123482,59.432072],[55.123798,59.432362],[55.124062,59.43261],[55.124298,59.432892],[55.124489,59.43317],[55.12468,59.433472],[55.12487,59.433842],[55.125092,59.43438],[55.125721,59.43589],[55.12719,59.440029],[55.127319,59.44051],[55.127441,59.440941],[55.127571,59.441521],[55.127651,59.442081],[55.127708,59.44273],[55.12772,59.44334],[55.12772,59.443851],[55.12767,59.44434],[55.127609,59.444851],[55.127529,59.445351],[55.127369,59.446049],[55.127171,59.446621],[55.12693,59.447201],[55.126621,59.447781],[55.126202,59.448399],[55.125,59.449959],[55.124748,59.45034],[55.124531,59.45076],[55.12431,59.451248],[55.12331,59.454609],[55.122761,59.456589],[55.12199,59.459351],[55.121761,59.46022],[55.121529,59.46106],[55.12133,59.46196],[55.121208,59.462841],[55.120991,59.46529],[55.12093,59.46587],[55.12085,59.466599],[55.120781,59.467098],[55.120689,59.467541],[55.12056,59.468079],[55.120338,59.468811],[55.120121,59.46944],[55.119888,59.47002],[55.11961,59.470581],[55.117699,59.47393],[55.117489,59.47438],[55.117229,59.47504],[55.117031,59.475651],[55.116879,59.476311],[55.116711,59.477131],[55.11657,59.477951],[55.116161,59.48074],[55.115761,59.483471],[55.11483,59.49308],[55.114189,59.501492],[55.112179,59.51009],[55.110081,59.516941],[55.10947,59.519161],[55.109039,59.52121],[55.10873,59.523621],[55.10865,59.525982],[55.10873,59.528],[55.108952,59.529942],[55.109409,59.532139],[55.10984,59.53363],[55.110432,59.535252],[55.111099,59.53677],[55.113239,59.541359],[55.113789,59.542641],[55.11425,59.543861],[55.114868,59.545769],[55.115292,59.547199],[55.115841,59.549469],[55.11694,59.554329],[55.11747,59.556259],[55.118118,59.558281],[55.11927,59.561562],[55.11972,59.562962],[55.12011,59.56435],[55.12056,59.565922],[55.121151,59.567581],[55.122509,59.571259],[55.122978,59.572731],[55.123299,59.574089],[55.123619,59.575611],[55.123989,59.577789],[55.124439,59.58099],[55.124989,59.584999],[55.12516,59.586498],[55.12524,59.58778],[55.12524,59.588848],[55.125092,59.590099],[55.124939,59.590851],[55.124748,59.591572],[55.124481,59.592289],[55.12418,59.59288],[55.123409,59.59404],[55.123329,59.594139],[55.122601,59.59499],[55.11953,59.59798],[55.117321,59.600151],[55.116501,59.600948],[55.115921,59.601379],[55.115299,59.60165],[55.114639,59.601711],[55.11412,59.601608],[55.11351,59.601299],[55.11026,59.599369],[55.109241,59.59885],[55.108608,59.59866],[55.107189,59.598419],[55.10659,59.598202],[55.105968,59.59779],[55.10545,59.597221],[55.10495,59.59642],[55.103981,59.59449],[55.103279,59.59317],[55.102772,59.592411],[55.102291,59.591862],[55.101688,59.591351],[55.10051,59.590549],[55.09898,59.589611],[55.09766,59.588779],[55.096279,59.58794],[55.094761,59.587158],[55.09462,59.58709],[55.093159,59.586491],[55.09169,59.586109],[55.090179,59.585899],[55.087391,59.585678],[55.08651,59.585609],[55.085659,59.58543],[55.084679,59.585098],[55.083912,59.584839],[55.083149,59.58469],[55.082291,59.584641],[55.07872,59.58461],[55.076729,59.58466],[55.075802,59.584759],[55.075039,59.585018],[55.074181,59.58556],[55.073639,59.586201],[55.072979,59.587341],[55.072472,59.588779],[55.072281,59.589512],[55.07201,59.590611],[55.068249,59.610561],[55.06686,59.617882],[55.066792,59.61824],[55.064869,59.628311],[55.064369,59.630939],[55.063782,59.63372],[55.063171,59.636219],[55.062881,59.63715],[55.062511,59.63834],[55.061649,59.640789],[55.06097,59.6423],[55.060009,59.64397],[55.059361,59.64513],[55.05859,59.646542],[55.05806,59.647812],[55.057621,59.649422],[55.057251,59.651299],[55.05698,59.653542],[55.056862,59.655731],[55.05669,59.6618],[55.05632,59.673031],[55.055679,59.696388],[55.055641,59.697941],[55.05545,59.70269],[55.055229,59.706039],[55.05479,59.70961],[55.054371,59.711731],[55.05373,59.714111],[55.052979,59.71627],[55.052181,59.71796],[55.05088,59.720058],[55.049549,59.721661],[55.048141,59.72298],[55.046951,59.723701],[55.045479,59.724319],[55.044159,59.724628],[55.04253,59.724789],[55.04084,59.724709],[55.039009,59.72438],[55.034672,59.723301],[55.032082,59.72263],[55.031349,59.722511],[55.030609,59.722439],[55.029442,59.722469],[55.02808,59.72274],[55.026699,59.72327],[55.025501,59.723991],[55.024311,59.724892],[55.022549,59.726681],[55.021229,59.72855],[55.019981,59.730789],[55.019112,59.7328],[55.01836,59.734989],[55.017818,59.73703],[55.017281,59.739811],[55.016949,59.742611],[55.016781,59.744831],[55.016548,59.752708],[55.016479,59.758751],[55.016541,59.760941],[55.01675,59.763359],[55.01712,59.765491],[55.01791,59.7687],[55.018188,59.77018],[55.018391,59.771759],[55.018471,59.77317],[55.01844,59.774551],[55.018261,59.776371],[55.017941,59.7784],[55.017021,59.782459],[55.01545,59.78944],[55.014591,59.792622],[55.013741,59.795219],[55.012909,59.797359],[55.011108,59.801861],[55.009972,59.80434],[55.00528,59.814522],[55.001629,59.82243],[54.998661,59.828949],[54.998161,59.83004],[54.99617,59.833672],[54.994751,59.83762],[54.993271,59.845428],[54.990711,59.852638],[54.988449,59.857792],[54.984798,59.864231],[54.983311,59.8666],[54.9762,59.877918],[54.975151,59.879589],[54.972931,59.882938],[54.971111,59.88689],[54.96899,59.892891],[54.966721,59.904572],[54.964111,59.922588],[54.963081,59.928169],[54.961498,59.93375],[54.958889,59.93924],[54.95475,59.948601],[54.953461,59.951599],[54.950409,59.955978],[54.948441,59.959332],[54.946911,59.96328],[54.946072,59.966621],[54.945499,59.96957],[54.945301,59.97123],[54.945251,59.972099],[54.94519,59.972939],[54.945091,59.974689],[54.945049,59.97646],[54.944969,59.983688],[54.944931,59.98642],[54.944809,59.995998],[54.944618,60.010189],[54.944569,60.012428],[54.944439,60.014481],[54.944302,60.017578],[54.94421,60.019371],[54.943981,60.023159],[54.943939,60.024429],[54.94384,60.027279],[54.94389,60.03072],[54.94389,60.031479],[54.944149,60.050861],[54.944229,60.054852],[54.94426,60.057011],[54.944279,60.05846],[54.944649,60.08567],[54.944889,60.102211],[54.944839,60.10564],[54.94466,60.10783],[54.94437,60.109631],[54.94392,60.111649],[54.94326,60.11367],[54.94249,60.11581],[54.941429,60.118179],[54.937809,60.126369],[54.93663,60.12925],[54.93581,60.131908],[54.934238,60.138969],[54.934101,60.13953],[54.932701,60.1455],[54.931992,60.14938],[54.931629,60.151779],[54.931301,60.155849],[54.93108,60.15937],[54.93087,60.165771],[54.930271,60.178749],[54.929359,60.198689],[54.929211,60.19973],[54.926651,60.217232],[54.924358,60.232849],[54.92395,60.235291],[54.923698,60.23925],[54.923599,60.242512],[54.92342,60.259071],[54.92326,60.27956],[54.923092,60.284538],[54.920158,60.315289],[54.92004,60.316509],[54.919449,60.322781],[54.919201,60.325329],[54.9189,60.32843],[54.918819,60.3293],[54.918621,60.33147],[54.916981,60.34874],[54.91441,60.374008],[54.911572,60.402851],[54.91098,60.409698],[54.91048,60.41692],[54.910339,60.42078],[54.910252,60.426491],[54.910351,60.434891],[54.910801,60.455132],[54.911251,60.486462],[54.911621,60.51305],[54.912979,60.534969],[54.91325,60.538929],[54.913342,60.54007],[54.913952,60.54858],[54.916229,60.584351],[54.919479,60.633011],[54.919842,60.638851],[54.920479,60.64851],[54.921619,60.675339],[54.92107,60.67408],[54.921509,60.69199],[54.921612,60.69524],[54.921799,60.69796],[54.922371,60.70192],[54.924622,60.71656],[54.925159,60.7192],[54.927841,60.729431],[54.9282,60.730999],[54.928398,60.73328],[54.92902,60.73719],[54.930241,60.74353],[54.930801,60.745392],[54.932491,60.752548],[54.932629,60.753159],[54.936001,60.767448],[54.936451,60.769508],[54.937248,60.773232],[54.93771,60.775459],[54.938122,60.77766],[54.93803,60.779171],[54.938332,60.78286],[54.939419,60.785549],[54.940842,60.794399],[54.94128,60.7971],[54.941471,60.798279],[54.942089,60.801979],[54.942909,60.807018],[54.94331,60.809681],[54.944839,60.818668],[54.94495,60.819389],[54.945629,60.824699],[54.94928,60.852829],[54.95261,60.882751],[54.954609,60.901951],[54.954708,60.904129],[54.95509,60.906891],[54.955589,60.909828],[54.956261,60.912861],[54.9576,60.917679],[54.958611,60.921341],[54.964859,60.94379],[54.96888,60.958241],[54.969551,60.961021],[54.97187,60.971321],[54.972969,60.976131],[54.977161,60.99435],[54.98082,61.010262],[54.982491,61.017448],[54.983349,61.021061],[54.986229,61.033569],[54.987339,61.038368],[54.988258,61.042351],[54.989109,61.046051],[54.989288,61.046822],[54.989632,61.048321],[54.98996,61.0499],[54.990189,61.05109],[54.990421,61.052479],[54.99057,61.05357],[54.9907,61.054642],[54.99081,61.055851],[54.990898,61.057018],[54.991009,61.058819],[54.991089,61.060139],[54.99128,61.063751],[54.99176,61.071911],[54.992748,61.08934],[54.993912,61.10981],[54.993931,61.110161],[54.99408,61.112862],[54.994148,61.11396],[54.994549,61.121311],[54.99472,61.123779],[54.994831,61.125111],[54.994862,61.125519],[54.994999,61.126659],[54.99522,61.12833],[54.99548,61.12981],[54.995819,61.1315],[54.99609,61.132759],[54.996498,61.134472],[54.996761,61.135448],[54.997131,61.136761],[54.997581,61.138161],[54.998871,61.142101],[54.999329,61.143509],[55.000858,61.148209],[55.001511,61.150211],[55.001968,61.151829],[55.002369,61.153412],[55.00272,61.1548],[55.002941,61.155941],[55.002979,61.156281],[55.002991,61.156651],[55.002991,61.156971],[55.002911,61.15749],[55.002781,61.158169],[55.002171,61.160671],[55.001949,61.161549],[55.00172,61.162239],[55.00148,61.16283],[55.001259,61.16333],[55.0009,61.163971],[55.000141,61.165058],[54.996979,61.168869],[54.993469,61.1731],[54.992802,61.173901],[54.99239,61.174412],[54.991531,61.175449],[54.990662,61.176491],[54.9874,61.180519],[54.98365,61.185501],[54.9804,61.19133],[54.977051,61.19854],[54.974892,61.20438],[54.97282,61.211929],[54.97171,61.217461],[54.971439,61.2188],[54.97065,61.224979],[54.96986,61.23476],[54.969269,61.249008],[54.968681,61.262569],[54.96751,61.29174],[54.967461,61.29483],[54.967461,61.299309],[54.967628,61.32032],[54.967682,61.326801],[54.967682,61.329762],[54.967461,61.33461],[54.967361,61.33614],[54.967041,61.341091],[54.96685,61.345928],[54.966789,61.34951],[54.966759,61.35709],[54.96685,61.360802],[54.96703,61.365589],[54.9673,61.37249],[54.96756,61.37883],[54.9678,61.383862],[54.967819,61.384609],[54.967812,61.385429],[54.96777,61.38623],[54.967701,61.386978],[54.967602,61.387669],[54.967529,61.3881],[54.96735,61.389259],[54.967232,61.38987],[54.967041,61.391029],[54.966961,61.391479],[54.966942,61.39185],[54.966949,61.39222],[54.967018,61.39257],[54.96711,61.39283],[54.967239,61.393101],[54.9674,61.393311],[54.967579,61.39344],[54.96777,61.393509],[54.967979,61.39352],[54.968208,61.393478],[54.968811,61.39325],[54.969051,61.3932],[54.969299,61.3932],[54.969582,61.393242],[54.96981,61.393341],[54.969978,61.393471],[54.970119,61.393631],[54.97057,61.394379],[54.972691,61.39875],[54.973919,61.40144],[54.97477,61.403461],[54.9786,61.413589],[54.97929,61.415291],[54.980492,61.418209],[54.980968,61.419491],[54.9814,61.42099],[54.981701,61.422161],[54.98204,61.42374],[54.982349,61.425129],[54.98278,61.426861],[54.983089,61.42791],[54.983528,61.4291],[54.983879,61.430061],[54.984329,61.431099],[54.988491,61.440079],[54.98954,61.442242],[54.990509,61.443989],[54.991692,61.445782],[54.99292,61.44733],[54.99382,61.448318],[54.994579,61.449471],[54.99509,61.450371],[54.995461,61.451359],[54.995789,61.452339],[54.996151,61.453629],[54.996479,61.454491],[54.997021,61.455688],[54.99786,61.45694],[54.998058,61.457169],[54.99876,61.457989],[54.999859,61.459122],[55.00042,61.459549],[55.00108,61.46006],[55.001888,61.460609],[55.002708,61.461159],[55.00367,61.46183],[55.004639,61.4627],[55.005379,61.46357],[55.00602,61.46452],[55.00666,61.465801],[55.00713,61.466999],[55.007519,61.46833],[55.007858,61.46986],[55.008099,61.471519],[55.008171,61.472672],[55.00824,61.487968],[55.008251,61.4897],[55.00827,61.491631],[55.008282,61.492649],[55.008331,61.495178],[55.00843,61.496571],[55.008659,61.498852],[55.008991,61.501289],[55.009682,61.504978],[55.01041,61.507641],[55.011532,61.511021],[55.012581,61.51416],[55.013309,61.516312],[55.01548,61.522869],[55.016811,61.527439],[55.017639,61.531071],[55.018478,61.53603],[55.019588,61.543861],[55.021111,61.554241],[55.023998,61.57375],[55.024578,61.578789],[55.024818,61.582489],[55.024849,61.58744],[55.02467,61.59557],[55.02454,61.601311],[55.024609,61.60276],[55.024769,61.605431],[55.025021,61.6078],[55.025421,61.61084],[55.026749,61.619942],[55.029579,61.638821],[55.031319,61.65118],[55.034569,61.680481],[55.035259,61.688889],[55.035259,61.69593],[55.034569,61.703819],[55.03339,61.71249],[55.032059,61.723049],[55.032009,61.72665],[55.03231,61.729401],[55.032799,61.731548],[55.03344,61.733521],[55.04266,61.757488],[55.043159,61.758759],[55.04372,61.759941],[55.04438,61.761181],[55.045071,61.762299],[55.04578,61.763302],[55.04644,61.764141],[55.04697,61.764709],[55.047508,61.76524],[55.048679,61.766232],[55.0494,61.766689],[55.050129,61.76709],[55.05154,61.76767],[55.054871,61.768799],[55.06678,61.77285],[55.078411,61.77684],[55.079399,61.7771],[55.080681,61.777309],[55.08197,61.777409],[55.08297,61.77739],[55.084461,61.77729],[55.085041,61.777222],[55.08564,61.777119],[55.087132,61.77673],[55.08857,61.776218],[55.089409,61.77586],[55.09024,61.775459],[55.102551,61.768341],[55.106609,61.765961],[55.107342,61.76545],[55.11039,61.763729],[55.13361,61.750259],[55.137341,61.748631],[55.14967,61.745499],[55.15696,61.743649],[55.163601,61.742901],[55.165352,61.742981],[55.167831,61.743301],[55.170029,61.743801],[55.17173,61.744308],[55.171921,61.744381],[55.17342,61.74498],[55.175461,61.745899],[55.182289,61.74913],[55.186352,61.75108],[55.18853,61.751949],[55.190708,61.75256],[55.198181,61.75436],[55.20409,61.75584],[55.20697,61.756569],[55.208,61.756641],[55.208752,61.756569],[55.20924,61.756451],[55.210201,61.7561],[55.21088,61.75573],[55.211529,61.755268],[55.212528,61.75436],[55.213451,61.75325],[55.21397,61.75246],[55.21537,61.75016],[55.218601,61.7449],[55.221039,61.740891],[55.22345,61.736889],[55.22403,61.73605],[55.224651,61.735291],[55.224831,61.735111],[55.225269,61.734669],[55.22604,61.734032],[55.226971,61.73336],[55.228149,61.732979],[55.228642,61.733219],[55.23011,61.73447],[55.23177,61.73605],[55.232601,61.736912],[55.232922,61.737339],[55.234909,61.743431],[55.236519,61.74818],[55.237141,61.75024],[55.237549,61.751659],[55.240261,61.762218],[55.242809,61.772251],[55.245392,61.782318],[55.2486,61.79491],[55.249069,61.796661],[55.24947,61.798],[55.25161,61.804279],[55.252178,61.805759],[55.252621,61.806992],[55.2551,61.813889],[55.256981,61.819141],[55.257702,61.82119],[55.261089,61.830421],[55.264759,61.840389],[55.26614,61.843891],[55.266972,61.846279],[55.26722,61.847141],[55.267529,61.848389],[55.26783,61.85033],[55.268002,61.853001],[55.26807,61.85487],[55.268059,61.857052],[55.267948,61.858978],[55.267818,61.86047],[55.26495,61.88015],[55.263599,61.888641],[55.26321,61.891022],[55.262878,61.89325],[55.261162,61.904709],[55.260529,61.908791],[55.25972,61.914051],[55.25898,61.91872],[55.25766,61.927021],[55.247292,61.971561],[55.23119,62.039539],[55.230511,62.044521],[55.230061,62.050442],[55.230049,62.055191],[55.230019,62.066662],[55.22987,62.07954],[55.229542,62.082401],[55.229229,62.08503],[55.221161,62.120651],[55.219151,62.130779],[55.218861,62.134121],[55.218761,62.149231],[55.219051,62.221668],[55.219009,62.249611],[55.219002,62.25959],[55.218861,62.359859],[55.21719,62.386688],[55.216511,62.397709],[55.212669,62.458649],[55.212589,62.460918],[55.212551,62.462688],[55.212608,62.466721],[55.21273,62.470371],[55.21286,62.47298],[55.212978,62.474522],[55.213112,62.47604],[55.21339,62.47887],[55.21376,62.48177],[55.214149,62.484749],[55.21566,62.49527],[55.216599,62.501961],[55.219742,62.524139],[55.223789,62.552738],[55.22406,62.555309],[55.22427,62.557701],[55.22443,62.55999],[55.22456,62.56229],[55.224659,62.565819],[55.22467,62.569351],[55.22464,62.572048],[55.224529,62.574848],[55.224239,62.580269],[55.222969,62.603519],[55.222839,62.605961],[55.222801,62.60849],[55.222431,62.62851],[55.22234,62.634449],[55.222141,62.646141],[55.22184,62.6637],[55.221802,62.665722],[55.221828,62.667389],[55.22197,62.669109],[55.222191,62.67083],[55.222462,62.672588],[55.222809,62.6744],[55.22324,62.676208],[55.223721,62.67812],[55.224659,62.68137],[55.225441,62.684299],[55.226212,62.687679],[55.227039,62.691471],[55.227581,62.693821],[55.228748,62.698212],[55.230701,62.705421],[55.231861,62.709789],[55.234619,62.71941],[55.235989,62.72533],[55.236671,62.731159],[55.23682,62.736401],[55.235512,62.767021],[55.23497,62.78035],[55.234951,62.781029],[55.234859,62.783001],[55.234791,62.78511],[55.234329,62.799831],[55.234081,62.829102],[55.234001,62.852989],[55.233929,62.871929],[55.233681,62.929691],[55.233479,62.976898],[55.233459,62.986481],[55.233471,62.988838],[55.233551,62.99118],[55.235119,63.02404],[55.23579,63.037411],[55.23819,63.08873],[55.24054,63.138859],[55.24284,63.165291],[55.244209,63.180828],[55.245461,63.191582],[55.248169,63.214821],[55.253731,63.247841],[55.254421,63.251881],[55.25444,63.252239],[55.254379,63.25293],[55.254311,63.25317],[55.254292,63.253479],[55.254318,63.253819],[55.254391,63.254139],[55.254532,63.25423],[55.25478,63.254688],[55.255001,63.255291],[55.25552,63.258629],[55.25597,63.261429],[55.257401,63.269409],[55.257729,63.270859],[55.258121,63.272518],[55.25856,63.274281],[55.25898,63.27586],[55.259392,63.277309],[55.26033,63.280411],[55.261299,63.28331],[55.26223,63.28582],[55.26289,63.28751],[55.263641,63.28928],[55.26524,63.29282],[55.269779,63.30257],[55.272469,63.308239],[55.289742,63.344082],[55.312511,63.391201],[55.334339,63.437031],[55.33736,63.445621],[55.339611,63.453171],[55.352982,63.506691],[55.361198,63.53952],[55.361931,63.543209],[55.36245,63.547668],[55.36264,63.551231],[55.362099,63.560669],[55.35981,63.590931],[55.357052,63.626511],[55.354858,63.6544],[55.354111,63.664101],[55.352779,63.681179],[55.35252,63.687321],[55.352711,63.724781],[55.352829,63.747829],[55.352982,63.775299],[55.354881,63.7995],[55.35918,63.850399],[55.360851,63.8708],[55.360981,63.872459],[55.361229,63.880951],[55.361519,63.89983],[55.36158,63.900051],[55.361858,63.91151],[55.362202,63.918461],[55.363369,63.92704],[55.36974,63.973782],[55.375999,64.019569],[55.379372,64.044548],[55.379829,64.049911],[55.379879,64.055313],[55.379761,64.058708],[55.379318,64.063507],[55.376541,64.081451],[55.37191,64.109947],[55.37093,64.116043],[55.37001,64.123421],[55.369659,64.128487],[55.369469,64.134583],[55.36961,64.140419],[55.371361,64.170288],[55.37162,64.175087],[55.37418,64.221138],[55.37513,64.237747],[55.37561,64.253632],[55.376541,64.287361],[55.377541,64.322197],[55.377998,64.327454],[55.378731,64.333282],[55.38308,64.359459],[55.387169,64.384857],[55.38763,64.388939],[55.389191,64.41568],[55.38924,64.416542],[55.390659,64.441994],[55.391781,64.46209],[55.392021,64.466301],[55.392231,64.469879],[55.394241,64.505539],[55.395802,64.532097],[55.397911,64.568993],[55.399921,64.603783],[55.401649,64.634758],[55.40313,64.661453],[55.404289,64.682663],[55.404331,64.683434],[55.40469,64.686127],[55.407791,64.702011],[55.415829,64.744667],[55.417759,64.754837],[55.420971,64.771858],[55.42157,64.775002],[55.424469,64.790497],[55.427631,64.807411],[55.428741,64.813278],[55.429642,64.818176],[55.430649,64.823486],[55.43095,64.825287],[55.431149,64.826813],[55.431431,64.829514],[55.431728,64.833153],[55.43198,64.836067],[55.432388,64.840958],[55.432781,64.845383],[55.433781,64.857193],[55.4375,64.902077],[55.441929,64.950661],[55.446789,65.001953],[55.44928,65.028252],[55.45269,65.089447],[55.453121,65.094482],[55.453541,65.098083],[55.453979,65.100883],[55.454521,65.103813],[55.45499,65.105957],[55.455479,65.108009],[55.4561,65.110352],[55.45676,65.112663],[55.45739,65.114647],[55.458172,65.116867],[55.464298,65.13385],[55.472229,65.155891],[55.474258,65.161232],[55.475731,65.165649],[55.476761,65.168533],[55.477951,65.172058],[55.478729,65.174263],[55.47884,65.174583],[55.479229,65.175957],[55.480709,65.180946],[55.481098,65.182266],[55.48172,65.184776],[55.483768,65.191566],[55.484459,65.194237],[55.486099,65.199707],[55.486172,65.199951],[55.486328,65.200493],[55.48645,65.200882],[55.48711,65.20311],[55.489799,65.212097],[55.493038,65.223244],[55.493221,65.223869],[55.493568,65.225082],[55.496841,65.23587],[55.501091,65.24958],[55.50132,65.250618],[55.501362,65.25132],[55.50132,65.251556],[55.50132,65.251862],[55.501381,65.252136],[55.501492,65.252357],[55.501572,65.252441],[55.501701,65.252533],[55.502048,65.253029],[55.50243,65.253777],[55.508209,65.272163],[55.51358,65.289261],[55.513599,65.289337],[55.51458,65.292801],[55.51572,65.29776],[55.51659,65.303421],[55.516941,65.308128],[55.516979,65.31089],[55.51701,65.312027],[55.516911,65.316544],[55.516769,65.31958],[55.516659,65.320442],[55.515739,65.328087],[55.51572,65.328232],[55.51038,65.346527],[55.506351,65.360077],[55.504719,65.36557],[55.503799,65.368629],[55.503262,65.370483],[55.501572,65.376152],[55.500092,65.381126],[55.499531,65.383018],[55.49836,65.386993],[55.497669,65.388397],[55.49757,65.388428],[55.497429,65.38855],[55.497341,65.388687],[55.497269,65.388947],[55.497261,65.389183],[55.49728,65.38942],[55.497318,65.389572],[55.49707,65.390923],[55.495461,65.395638],[55.494221,65.3992],[55.493561,65.401131],[55.493019,65.403038],[55.492779,65.404213],[55.492599,65.40538],[55.492359,65.407806],[55.492359,65.409523],[55.492439,65.411186],[55.492779,65.41362],[55.493252,65.415863],[55.49398,65.4179],[55.49477,65.419724],[55.496449,65.422722],[55.497082,65.424553],[55.49754,65.426537],[55.4977,65.428101],[55.497669,65.429817],[55.497311,65.432121],[55.496719,65.434174],[55.495869,65.435898],[55.495258,65.436653],[55.494282,65.437592],[55.493229,65.438118],[55.4921,65.438217],[55.491268,65.438026],[55.4902,65.437492],[55.489349,65.436729],[55.488659,65.43602],[55.488022,65.435287],[55.487789,65.435051],[55.487331,65.434776],[55.487068,65.434753],[55.48687,65.434776],[55.486629,65.434929],[55.480099,65.443237],[55.477669,65.447357],[55.474899,65.455009],[55.473259,65.459709],[55.468029,65.474663],[55.467461,65.476288],[55.459759,65.498352],[55.4585,65.503067],[55.45787,65.507019],[55.457432,65.512604],[55.455971,65.537918],[55.454269,65.564079],[55.453831,65.573692],[55.453732,65.576553],[55.45319,65.580566],[55.452759,65.583],[55.44976,65.59417],[55.445061,65.611649],[55.44495,65.612061],[55.429741,65.669823],[55.419739,65.707779],[55.394691,65.801437],[55.39352,65.805794],[55.38797,65.828491],[55.387482,65.830513],[55.386089,65.838669],[55.383629,65.853172],[55.382309,65.861343],[55.38002,65.87558],[55.37661,65.896263],[55.374458,65.911629],[55.3708,65.938843],[55.370121,65.945618],[55.369831,65.951973],[55.369781,65.961411],[55.370701,65.972397],[55.377041,66.022263],[55.382309,66.062943],[55.38818,66.089546],[55.389969,66.097618],[55.39669,66.128433],[55.397812,66.136932],[55.40147,66.178818],[55.4062,66.234261],[55.40659,66.248772],[55.40567,66.270103],[55.405609,66.271431],[55.404301,66.3013],[55.402439,66.343353],[55.39996,66.401802],[55.39893,66.433823],[55.39645,66.473557],[55.395969,66.481934],[55.39489,66.500603],[55.391869,66.54969],[55.38982,66.584198],[55.388779,66.599937],[55.38855,66.60041],[55.388321,66.601143],[55.388229,66.601692],[55.388309,66.602173],[55.388512,66.602852],[55.388649,66.603073],[55.388489,66.605331],[55.38826,66.609299],[55.387779,66.616966],[55.387039,66.629768],[55.384701,66.669167],[55.381729,66.717056],[55.381451,66.721474],[55.381241,66.724518],[55.380951,66.727364],[55.38055,66.73053],[55.380138,66.733421],[55.3797,66.73613],[55.379211,66.738777],[55.37851,66.742157],[55.377899,66.744591],[55.376991,66.747993],[55.370651,66.769859],[55.368019,66.778954],[55.360748,66.804863],[55.35627,66.820229],[55.355,66.824783],[55.352791,66.831543],[55.351139,66.835831],[55.34845,66.841583],[55.337379,66.865288],[55.324001,66.894043],[55.310959,66.922279],[55.307251,66.931549],[55.30529,66.939789],[55.303539,66.951118],[55.29982,66.992661],[55.29871,67.004959],[55.29689,67.025284],[55.292389,67.079521],[55.290241,67.089478],[55.28183,67.117592],[55.269909,67.157463],[55.266579,67.169472],[55.25782,67.219833],[55.25647,67.225433],[55.24807,67.253098],[55.244831,67.263847],[55.24469,67.263779],[55.244511,67.263779],[55.244339,67.263893],[55.244202,67.264091],[55.24411,67.264374],[55.24408,67.264687],[55.244122,67.264992],[55.244209,67.265259],[55.24435,67.265457],[55.240101,67.278992],[55.227638,67.317841],[55.214691,67.355843],[55.211689,67.365967],[55.204689,67.397057],[55.196541,67.432419],[55.195518,67.436813],[55.18961,67.463318],[55.188999,67.476341],[55.187962,67.50354],[55.188782,67.511383],[55.192871,67.533623],[55.194649,67.546417],[55.194962,67.553429],[55.19413,67.565613],[55.192741,67.580162],[55.192039,67.602631],[55.191132,67.621902],[55.189522,67.629898],[55.178429,67.668518],[55.174301,67.684967],[55.172569,67.693893],[55.164768,67.734177],[55.163471,67.737984],[55.149719,67.768517],[55.131649,67.807831],[55.12394,67.824364],[55.10191,67.865738],[55.09697,67.875008],[55.094269,67.883163],[55.092571,67.894051],[55.092621,67.918877],[55.092621,67.924637],[55.092609,67.925743],[55.092831,67.976692],[55.093311,67.983856],[55.097321,68.026131],[55.099781,68.05143],[55.104031,68.095139],[55.104511,68.104431],[55.10429,68.114708],[55.103031,68.132607],[55.099152,68.18882],[55.096649,68.203423],[55.092152,68.227898],[55.09082,68.240196],[55.091709,68.253601],[55.0938,68.267563],[55.094559,68.277641],[55.093231,68.286392],[55.087719,68.30201],[55.079151,68.324707],[55.068371,68.35363],[55.054989,68.390182],[55.046741,68.41256],[55.027309,68.466507],[55.014111,68.500633],[54.9939,68.554237],[54.99123,68.560219],[54.98875,68.562553],[54.973499,68.573959],[54.95079,68.59079],[54.924641,68.610069],[54.92448,68.610443],[54.924301,68.611618],[54.923611,68.616402],[54.923111,68.61998],[54.922451,68.624489],[54.92197,68.627922],[54.9212,68.633369],[54.920101,68.640846],[54.919559,68.644333],[54.91917,68.648529],[54.919128,68.653183],[54.919319,68.663483],[54.919361,68.672462],[54.919449,68.681358],[54.91954,68.690643],[54.919628,68.698692],[54.91967,68.706421],[54.919788,68.71479],[54.9198,68.718513],[54.919849,68.724922],[54.919941,68.735184],[54.92001,68.746468],[54.92009,68.758133],[54.920219,68.774109],[54.920429,68.799072],[54.920792,68.843628],[54.920818,68.854874],[54.919331,68.878441],[54.917,68.91478],[54.91502,68.944328],[54.912788,68.978416],[54.910358,69.015228],[54.909859,69.021294],[54.90905,69.034103],[54.908852,69.037292],[54.908489,69.042999],[54.90765,69.055283],[54.90731,69.05954],[54.90712,69.062553],[54.906719,69.065102],[54.906189,69.067772],[54.90509,69.07119],[54.905769,69.073486],[54.905869,69.073723],[54.907501,69.07753],[54.910469,69.085258],[54.911518,69.088371],[54.912521,69.091713],[54.913689,69.094673],[54.914989,69.097481],[54.91534,69.099037],[54.915409,69.100037],[54.915379,69.10125],[54.91354,69.114662],[54.91309,69.117012],[54.912762,69.118294],[54.912628,69.118797],[54.91246,69.119926],[54.912411,69.121162],[54.91267,69.125023],[54.912819,69.127327],[54.912109,69.127617],[54.911671,69.127953],[54.911308,69.128349],[54.911041,69.12896],[54.910751,69.129601],[54.910431,69.130463],[54.910229,69.131439],[54.910198,69.131683],[54.910179,69.131866],[54.910172,69.132111],[54.91016,69.132294],[54.910141,69.132477],[54.910141,69.132881],[54.91016,69.133003],[54.910221,69.133171],[54.9104,69.133217],[54.91058,69.133087],[54.91066,69.132919],[54.910721,69.132637],[54.910801,69.132362],[54.910881,69.132042],[54.910961,69.131866],[54.91153,69.131157],[54.91222,69.130302],[54.912338,69.13015],[54.912861,69.129601],[54.914219,69.128349],[54.915661,69.127457],[54.91748,69.12674],[54.919159,69.126549],[54.92194,69.126427],[54.92292,69.126663],[54.92358,69.12719],[54.924122,69.127861],[54.924679,69.128799],[54.92506,69.129837],[54.926399,69.13607],[54.926281,69.136269],[54.926189,69.136574],[54.926231,69.136848],[54.9263,69.137016],[54.926411,69.137169],[54.926559,69.137253],[54.926628,69.137207],[54.926579,69.137527],[54.924191,69.148048],[54.91798,69.17437],[54.917919,69.174316],[54.917728,69.174271],[54.917542,69.174347],[54.917469,69.174622],[54.91748,69.175148],[54.917549,69.175613],[54.917622,69.175697],[54.91769,69.175789],[54.917992,69.175819],[54.918091,69.175751],[54.91811,69.175591],[54.918251,69.176224],[54.93475,69.219063],[54.93576,69.220993],[54.937019,69.222343],[54.93795,69.222893],[54.945759,69.225929],[54.946678,69.226593],[54.94788,69.228241],[54.948399,69.229248],[54.954651,69.248573],[54.95512,69.250549],[54.955231,69.253548],[54.95219,69.281349],[54.951382,69.285461],[54.914391,69.430771],[54.913651,69.435097],[54.913269,69.439484],[54.913391,69.454674],[54.913952,69.525223],[54.914669,69.599983],[54.914902,69.623459],[54.91605,69.798088],[54.909809,69.909576],[54.90976,69.912453],[54.91502,70.140343],[54.915451,70.190514],[54.917278,70.354233],[54.918461,70.369408],[54.918449,70.374023],[54.918018,70.381271],[54.919399,70.435493],[54.92009,70.462624],[54.919998,70.466408],[54.91975,70.469276],[54.91795,70.480713],[54.91774,70.483856],[54.91927,70.528839],[54.930779,70.631973],[54.940411,70.762863],[54.94083,70.776108],[54.940651,70.779343],[54.93998,70.7827],[54.939251,70.784447],[54.937462,70.787086],[54.921299,70.801826],[54.91959,70.80442],[54.91851,70.807426],[54.91806,70.810226],[54.91798,70.81279],[54.919258,70.882713],[54.921379,70.984528],[54.921398,70.985802],[54.921959,71.016243],[54.92207,71.022346],[54.922741,71.059174],[54.923,71.080643],[54.921589,71.136688],[54.921612,71.140411],[54.922001,71.146027],[54.923069,71.153809],[54.923981,71.157944],[54.92514,71.161377],[54.925671,71.162971],[54.927711,71.167511],[54.929909,71.171478],[54.931171,71.174133],[54.93224,71.176979],[54.937721,71.19474],[54.947842,71.227577],[54.949181,71.232407],[54.950802,71.239929],[54.951969,71.247871],[54.952911,71.25663],[54.955811,71.283669],[54.95607,71.286148],[54.956211,71.287483],[54.973251,71.448219],[54.97401,71.453117],[54.974918,71.457787],[54.976719,71.465149],[54.978142,71.469757],[54.9804,71.476341],[54.981201,71.479446],[54.98233,71.483841],[54.98402,71.492989],[54.99025,71.540962],[54.990749,71.546097],[54.991131,71.555542],[54.987789,71.697289],[54.983429,71.778908],[54.983311,71.78492],[54.983589,71.79248],[54.99284,71.913406],[54.9963,71.958504],[54.996449,71.962212],[54.996399,71.966888],[54.996078,71.97171],[54.978851,72.105797],[54.978149,72.112457],[54.977421,72.122673],[54.972771,72.248459],[54.9659,72.335892],[54.965721,72.33828],[54.965549,72.341904],[54.965488,72.345627],[54.965611,72.34996],[54.96624,72.372711],[54.96669,72.391632],[54.966759,72.395111],[54.966591,72.398827],[54.966301,72.403053],[54.964802,72.419296],[54.963531,72.434708],[54.963501,72.436478],[54.963921,72.454826],[54.964569,72.483093],[54.966141,72.539192],[54.9664,72.543533],[54.96698,72.54879],[54.967319,72.551041],[54.96767,72.552994],[54.968491,72.557251],[54.984421,72.617264],[54.985882,72.625191],[54.98658,72.631699],[54.986809,72.635223],[54.990509,72.690758],[54.990501,72.820793],[54.990311,72.82589],[54.9897,72.831818],[54.98793,72.842369],[54.987728,72.843071],[54.985649,72.850288],[54.976269,72.875366],[54.97007,72.891907],[54.96825,72.896843],[54.96804,72.897087],[54.96788,72.897186],[54.96653,72.897278],[54.965801,72.897331],[54.961491,72.897469],[54.958618,72.897636],[54.956902,72.898079],[54.950729,72.900253],[54.940731,72.903793],[54.935379,72.905693],[54.930721,72.907242],[54.928219,72.908211],[54.92672,72.909103],[54.924301,72.911133],[54.922729,72.912666],[54.913921,72.925461],[54.913521,72.926041],[54.906811,72.935799],[54.904121,72.940048],[54.9016,72.944641],[54.895439,72.955879],[54.887291,72.970757],[54.885941,72.974823],[54.88472,72.978493],[54.883831,72.983292],[54.883438,72.987579],[54.883591,72.994751],[54.883598,72.995728],[54.883911,73.017487],[54.883961,73.024017],[54.88361,73.030411],[54.883308,73.033073],[54.88126,73.045387],[54.877781,73.066292],[54.875408,73.080193],[54.87376,73.090279],[54.87175,73.102318],[54.86882,73.119629],[54.866821,73.131432],[54.866501,73.133957],[54.866371,73.135094],[54.866341,73.135803],[54.866371,73.136703],[54.866741,73.139847],[54.86747,73.146378],[54.867661,73.148499],[54.86784,73.151398],[54.86797,73.156677],[54.867882,73.173286],[54.867519,73.213791],[54.86726,73.237701],[54.867352,73.241989],[54.869431,73.262611],[54.869598,73.264427],[54.869781,73.266312],[54.86998,73.268311],[54.870171,73.270348],[54.870232,73.27092],[54.870258,73.271248],[54.87048,73.273521],[54.870739,73.276932],[54.870739,73.277641],[54.870708,73.278999],[54.87059,73.280632],[54.87038,73.282341],[54.869789,73.285683],[54.86961,73.286743],[54.869431,73.287987],[54.86932,73.288872],[54.86924,73.289886],[54.86916,73.2911],[54.86916,73.292717],[54.869209,73.295464],[54.869141,73.296242],[54.869061,73.296532],[54.868969,73.296753],[54.868969,73.296951],[54.869011,73.29718],[54.869148,73.297836],[54.869148,73.299477],[54.869221,73.300499],[54.869221,73.30645],[54.869251,73.316261],[54.86927,73.321907],[54.869289,73.322884],[54.869301,73.323563],[54.86935,73.324303],[54.869438,73.325089],[54.86953,73.325798],[54.86969,73.326767],[54.869949,73.328011],[54.870258,73.329247],[54.87059,73.330307],[54.87093,73.331169],[54.87138,73.332222],[54.872211,73.33371],[54.873138,73.335159],[54.874279,73.336884],[54.875111,73.338219],[54.875809,73.339592],[54.87616,73.340462],[54.876678,73.342049],[54.87764,73.345131],[54.877991,73.346313],[54.878899,73.349327],[54.880051,73.353203],[54.879929,73.353333],[54.879822,73.353561],[54.879768,73.353767],[54.879749,73.353928],[54.879749,73.354073],[54.879768,73.354309],[54.879829,73.354507],[54.879959,73.354736],[54.880119,73.354889],[54.88031,73.354919],[54.880482,73.354843],[54.880611,73.355293],[54.88126,73.357567],[54.88139,73.358124],[54.881481,73.358727],[54.881741,73.36132],[54.881889,73.363533],[54.88192,73.365334],[54.881729,73.371681],[54.881451,73.379997],[54.881481,73.382294],[54.881592,73.384979],[54.881802,73.388153],[54.88195,73.389641],[54.882149,73.391228],[54.882778,73.395287],[54.883202,73.397476],[54.883801,73.400017],[54.884659,73.403008],[54.887199,73.410408],[54.887531,73.411636],[54.887829,73.412773],[54.887951,73.413879],[54.88802,73.414963],[54.888062,73.420387],[54.888081,73.420929],[54.888142,73.421219],[54.88821,73.421471],[54.88829,73.421638],[54.88842,73.421829],[54.888569,73.421951],[54.888809,73.422203],[54.889042,73.422394],[54.888618,73.423233],[54.88821,73.424088],[54.88789,73.424751],[54.887329,73.425941],[54.88715,73.426353],[54.88644,73.427856],[54.884941,73.431084],[54.882381,73.436417],[54.880909,73.439507],[54.880482,73.440399],[54.868172,73.466171],[54.86668,73.469353],[54.866322,73.470123],[54.866039,73.47081],[54.865761,73.471573],[54.86517,73.473412],[54.85984,73.490753],[54.85368,73.510521],[54.85284,73.512589],[54.8466,73.526047],[54.83498,73.548721],[54.83453,73.549553],[54.834049,73.550377],[54.833618,73.55098],[54.83321,73.551537],[54.832729,73.552147],[54.830601,73.55468],[54.827888,73.557899],[54.822762,73.564011],[54.820751,73.566383],[54.819462,73.567703],[54.817711,73.569542],[54.814739,73.572647],[54.81332,73.574203],[54.811901,73.57592],[54.808929,73.579613],[54.80759,73.581291],[54.80563,73.583649],[54.804951,73.584381],[54.802879,73.586372],[54.801941,73.587173],[54.800018,73.588654],[54.797569,73.590477],[54.792831,73.594032],[54.790249,73.595993],[54.785229,73.599648],[54.783138,73.601173],[54.7789,73.604309],[54.777069,73.605827],[54.775532,73.607147],[54.773121,73.609169],[54.770748,73.611153],[54.769341,73.612419],[54.768372,73.613197],[54.767658,73.613731],[54.766941,73.614067],[54.765961,73.614388],[54.765011,73.614693],[54.762569,73.615463],[54.761711,73.615753],[54.756569,73.617012],[54.754822,73.617607],[54.75317,73.61837],[54.75164,73.61927],[54.74894,73.621391],[54.745152,73.625214],[54.74316,73.62812],[54.741089,73.63163],[54.73513,73.641647],[54.730511,73.64946],[54.728809,73.652367],[54.721882,73.664207],[54.718559,73.669907],[54.71759,73.671562],[54.71666,73.673203],[54.715672,73.674896],[54.71521,73.67569],[54.71471,73.676537],[54.714008,73.677742],[54.713322,73.678917],[54.712662,73.680054],[54.712009,73.68116],[54.71133,73.68232],[54.710011,73.684593],[54.709129,73.686089],[54.708408,73.687332],[54.70797,73.688103],[54.706661,73.690353],[54.705219,73.692848],[54.704529,73.694031],[54.70319,73.69635],[54.697128,73.706757],[54.689751,73.717232],[54.689121,73.718262],[54.688412,73.719704],[54.685791,73.725609],[54.682621,73.732887],[54.681629,73.735649],[54.678638,73.74453],[54.676231,73.752121],[54.675499,73.754539],[54.67506,73.756592],[54.67461,73.759506],[54.669811,73.787872],[54.669552,73.789726],[54.66946,73.790932],[54.66943,73.793213],[54.669441,73.796127],[54.669491,73.80822],[54.669498,73.813004],[54.66938,73.815773],[54.669189,73.818489],[54.66906,73.819817],[54.66888,73.821373],[54.66692,73.835472],[54.664951,73.849541],[54.66441,73.853378],[54.664131,73.856163],[54.66404,73.859467],[54.664108,73.868423],[54.664131,73.870811],[54.664131,73.872337],[54.664139,73.874138],[54.664139,73.875427],[54.664082,73.876633],[54.66396,73.877777],[54.66383,73.878563],[54.663601,73.879478],[54.661869,73.884644],[54.661739,73.884933],[54.661201,73.886253],[54.66032,73.887688],[54.658298,73.890327],[54.657089,73.891907],[54.653198,73.896843],[54.65168,73.8992],[54.650318,73.901703],[54.648449,73.905403],[54.64526,73.911743],[54.637871,73.926323],[54.63044,73.941048],[54.626869,73.948608],[54.625771,73.951218],[54.624969,73.953522],[54.624229,73.956398],[54.623772,73.958412],[54.623428,73.960419],[54.623169,73.962578],[54.622849,73.966873],[54.621651,73.982079],[54.621319,73.984642],[54.62075,73.987991],[54.619888,73.991478],[54.61832,73.99633],[54.6152,74.003807],[54.614269,74.005737],[54.613159,74.007507],[54.61132,74.009789],[54.610828,74.010269],[54.609489,74.011414],[54.607498,74.012581],[54.604549,74.013771],[54.60173,74.014954],[54.5989,74.016251],[54.597881,74.01693],[54.597019,74.017609],[54.595379,74.019257],[54.59425,74.020737],[54.59322,74.022461],[54.59129,74.02655],[54.588409,74.032707],[54.587582,74.034554],[54.587109,74.035896],[54.586449,74.038002],[54.56488,74.108017],[54.564659,74.109169],[54.564449,74.110786],[54.564301,74.112923],[54.56377,74.130463],[54.563648,74.134773],[54.563492,74.136871],[54.563049,74.14006],[54.561069,74.153923],[54.560181,74.160744],[54.560211,74.16169],[54.560322,74.162651],[54.560509,74.163544],[54.567749,74.19046],[54.56805,74.191902],[54.568218,74.193542],[54.568199,74.194687],[54.567101,74.211533],[54.566978,74.212936],[54.5667,74.214546],[54.566319,74.215927],[54.562851,74.228378],[54.559299,74.240852],[54.552349,74.265221],[54.548969,74.276917],[54.54813,74.279793],[54.547531,74.281807],[54.546871,74.283401],[54.546299,74.28463],[54.545761,74.285744],[54.544842,74.287163],[54.54385,74.288544],[54.541809,74.290909],[54.538528,74.294937],[54.536869,74.297394],[54.536251,74.298447],[54.508018,74.353081],[54.506748,74.355583],[54.505489,74.358482],[54.504688,74.360657],[54.501949,74.369324],[54.496738,74.385857],[54.495602,74.389122],[54.494999,74.39032],[54.493629,74.392097],[54.493038,74.392776],[54.492298,74.393509],[54.491581,74.394119],[54.490971,74.394417],[54.49036,74.394653],[54.482731,74.396332],[54.481281,74.396652],[54.47961,74.397217],[54.47773,74.398064],[54.47562,74.399193],[54.474232,74.400238],[54.472851,74.401466],[54.471191,74.403214],[54.465809,74.409119],[54.45887,74.417],[54.445148,74.432838],[54.443569,74.434883],[54.44215,74.43718],[54.438179,74.444542],[54.43362,74.453758],[54.431332,74.458389],[54.429119,74.462929],[54.428329,74.464737],[54.42783,74.46611],[54.427052,74.468918],[54.413139,74.523643],[54.408821,74.545128],[54.4081,74.548126],[54.407089,74.55146],[54.405781,74.555069],[54.404621,74.557716],[54.40308,74.560806],[54.397282,74.571693],[54.395721,74.574806],[54.394821,74.577019],[54.393589,74.580391],[54.390739,74.589546],[54.386841,74.602287],[54.384472,74.608887],[54.381611,74.616341],[54.380341,74.619423],[54.378719,74.622581],[54.377731,74.624138],[54.373112,74.630463],[54.372139,74.631493],[54.370991,74.632347],[54.368649,74.633347],[54.364368,74.634827],[54.361431,74.635269],[54.357738,74.635162],[54.354401,74.635063],[54.350929,74.635101],[54.35017,74.635292],[54.34927,74.635674],[54.347839,74.636597],[54.346142,74.638138],[54.343109,74.641037],[54.340832,74.643372],[54.338032,74.646744],[54.332062,74.654007],[54.330589,74.655312],[54.329369,74.655983],[54.32576,74.657303],[54.32243,74.658546],[54.31868,74.659607],[54.29874,74.664368],[54.28014,74.66861],[54.278061,74.669518],[54.277,74.670227],[54.27573,74.671837],[54.27396,74.674751],[54.270531,74.681053],[54.266659,74.687439],[54.265072,74.68988],[54.26413,74.69091],[54.263069,74.69165],[54.26123,74.69252],[54.258911,74.692818],[54.256908,74.692574],[54.252628,74.692329],[54.243259,74.69162],[54.242008,74.691994],[54.24091,74.692574],[54.23978,74.693321],[54.23801,74.695251],[54.232651,74.700867],[54.230331,74.703293],[54.228249,74.705643],[54.226002,74.708588],[54.217861,74.718651],[54.209229,74.729713],[54.208382,74.731133],[54.205688,74.735611],[54.204262,74.737709],[54.20097,74.741524],[54.1954,74.747887],[54.190639,74.753242],[54.1852,74.759453],[54.17564,74.770332],[54.17469,74.771637],[54.173908,74.773117],[54.173279,74.774544],[54.172661,74.776466],[54.17202,74.77993],[54.17197,74.781616],[54.171879,74.783997],[54.17141,74.797913],[54.1712,74.802879],[54.170959,74.805511],[54.170601,74.80851],[54.170292,74.810463],[54.169842,74.812538],[54.16922,74.815399],[54.16898,74.816101],[54.168621,74.817009],[54.168159,74.818069],[54.167782,74.81871],[54.167339,74.819366],[54.166931,74.819893],[54.166618,74.820236],[54.16618,74.820663],[54.164379,74.822258],[54.163761,74.8228],[54.16143,74.824837],[54.157959,74.828072],[54.15588,74.830551],[54.15414,74.833023],[54.14859,74.841667],[54.145859,74.846199],[54.143539,74.850693],[54.126171,74.884651],[54.124008,74.888924],[54.12291,74.891113],[54.121391,74.893867],[54.119881,74.896347],[54.118961,74.897758],[54.11771,74.89959],[54.114922,74.90313],[54.112419,74.906281],[54.107731,74.912079],[54.095638,74.927193],[54.082512,74.94352],[54.079971,74.946693],[54.07436,74.953697],[54.071671,74.957077],[54.07008,74.958763],[54.06942,74.959419],[54.06868,74.960037],[54.06826,74.960327],[54.0672,74.961037],[54.06625,74.96151],[54.065159,74.961899],[54.06414,74.962181],[54.06308,74.96244],[54.062809,74.962463],[54.06152,74.962547],[54.052841,74.96302],[54.042881,74.963631],[54.03878,74.963852],[54.036629,74.963966],[54.034752,74.964188],[54.032211,74.964867],[54.029732,74.965874],[54.029461,74.966057],[54.02747,74.967407],[54.025749,74.96875],[54.018269,74.976044],[54.003441,74.990593],[53.999821,74.994102],[53.99894,74.995117],[53.998291,74.99604],[53.997601,74.997261],[53.996941,74.998703],[53.984928,75.026604],[53.981758,75.034012],[53.978291,75.04216],[53.970989,75.059402],[53.969181,75.063629],[53.966042,75.071037],[53.96199,75.080719],[53.961559,75.081619],[53.961201,75.082138],[53.96077,75.082573],[53.9603,75.082916],[53.959782,75.083122],[53.958988,75.083282],[53.952808,75.083763],[53.9506,75.083946],[53.93763,75.085129],[53.922729,75.086388],[53.92065,75.086517],[53.919949,75.086433],[53.91959,75.086357],[53.919189,75.08625],[53.918758,75.086113],[53.917461,75.085457],[53.91608,75.084793],[53.89254,75.073143],[53.886509,75.070107],[53.885971,75.069847],[53.885059,75.069397],[53.85207,75.053047],[53.845581,75.049728],[53.84314,75.048271],[53.841831,75.047333],[53.84074,75.046448],[53.840061,75.04612],[53.83939,75.045952],[53.834179,75.045486],[53.827469,75.045013],[53.822979,75.044693],[53.816269,75.044777],[53.814781,75.044838],[53.81382,75.044991],[53.809139,75.046387],[53.80328,75.048576],[53.797321,75.051277],[53.79525,75.052208],[53.790722,75.054222],[53.789162,75.054916],[53.788269,75.055367],[53.78756,75.055847],[53.786701,75.056519],[53.78455,75.058311],[53.778759,75.063278],[53.770481,75.070412],[53.757198,75.081909],[53.743389,75.093674],[53.73756,75.098572],[53.73172,75.103493],[53.720261,75.113182],[53.71302,75.11937],[53.707291,75.124252],[53.701962,75.128807],[53.69809,75.131989],[53.696869,75.132973],[53.69524,75.133926],[53.694248,75.134338],[53.69186,75.135223],[53.68578,75.13723],[53.677029,75.140228],[53.668419,75.143494],[53.659451,75.147034],[53.655479,75.148529],[53.653591,75.149269],[53.652241,75.150063],[53.65065,75.151268],[53.649139,75.152771],[53.64782,75.154587],[53.64653,75.156967],[53.645119,75.159668],[53.64109,75.167503],[53.617321,75.213669],[53.616631,75.214951],[53.615372,75.21682],[53.614319,75.218132],[53.61301,75.219513],[53.609341,75.223221],[53.604671,75.22805],[53.600021,75.232803],[53.596169,75.236603],[53.593948,75.239014],[53.59288,75.240448],[53.591839,75.242027],[53.58976,75.245743],[53.581951,75.260193],[53.58073,75.262482],[53.579708,75.264648],[53.57502,75.274643],[53.563271,75.299721],[53.562321,75.301727],[53.56139,75.303436],[53.56044,75.304993],[53.559071,75.306717],[53.55759,75.308319],[53.555511,75.310303],[53.553242,75.312363],[53.541851,75.323303],[53.537479,75.327553],[53.536171,75.32901],[53.53511,75.330566],[53.534489,75.331772],[53.534012,75.33287],[53.53347,75.334244],[53.53289,75.33622],[53.53075,75.345459],[53.528622,75.355003],[53.528259,75.356331],[53.52763,75.357857],[53.526871,75.359642],[53.519531,75.37545],[53.511829,75.391869],[53.507961,75.400261],[53.50388,75.409187],[53.496349,75.425369],[53.49411,75.429611],[53.487141,75.440918],[53.481949,75.449371],[53.480419,75.451622],[53.47884,75.453377],[53.477699,75.454468],[53.471352,75.459686],[53.45953,75.469933],[53.45129,75.47657],[53.4426,75.484047],[53.423809,75.499657],[53.405899,75.514816],[53.403011,75.517319],[53.400982,75.519676],[53.39257,75.529907],[53.379131,75.546082],[53.376369,75.549454],[53.373638,75.552551],[53.368839,75.557251],[53.361271,75.564484],[53.354622,75.57151],[53.346741,75.579842],[53.33374,75.593536],[53.332199,75.59507],[53.33054,75.596237],[53.32309,75.600822],[53.313171,75.60701],[53.303429,75.614983],[53.292061,75.625847],[53.28054,75.636963],[53.274841,75.642403],[53.269409,75.647438],[53.257622,75.658234],[53.25679,75.659019],[53.256062,75.659882],[53.25528,75.661018],[53.236881,75.692253],[53.224159,75.71373],[53.210369,75.737007],[53.184189,75.781197],[53.1828,75.783539],[53.18124,75.786362],[53.179989,75.7892],[53.178551,75.792747],[53.144051,75.880463],[53.13903,75.893288],[53.137718,75.896294],[53.121521,75.928673],[53.104469,75.962639],[53.103729,75.964798],[53.103119,75.967133],[53.098629,75.986427],[53.093159,76.010643],[53.08239,76.056717],[53.080021,76.06707],[53.079861,76.068283],[53.079788,76.06926],[53.079781,76.070702],[53.080002,76.072983],[53.083778,76.089394],[53.084011,76.092072],[53.083801,76.095413],[53.083351,76.098213],[53.081211,76.11013],[53.08083,76.112244],[53.079491,76.12011],[53.07848,76.123863],[53.077518,76.126373],[53.07658,76.128304],[53.075481,76.130173],[53.074551,76.131371],[53.073181,76.132782],[53.066799,76.138641],[53.060459,76.144562],[53.059891,76.145302],[53.058708,76.147507],[53.057671,76.150543],[53.046391,76.198189],[53.033669,76.251053],[53.03017,76.261673],[53.023602,76.281303],[53.01313,76.312683],[53.0103,76.321152],[52.99239,76.374603],[52.99131,76.377548],[52.988701,76.383408],[52.975609,76.412643],[52.959789,76.447762],[52.92849,76.517548],[52.927078,76.520401],[52.92522,76.523666],[52.923599,76.526367],[52.920731,76.531143],[52.912281,76.545067],[52.895981,76.571693],[52.894341,76.573639],[52.892899,76.575043],[52.89151,76.576134],[52.889301,76.577538],[52.879879,76.583122],[52.865108,76.59198],[52.838959,76.607697],[52.810711,76.624588],[52.79121,76.636238],[52.78701,76.638847],[52.78595,76.63945],[52.784939,76.640167],[52.736191,76.680183],[52.68597,76.721161],[52.684212,76.722443],[52.672199,76.730026],[52.656841,76.739647],[52.62907,76.757202],[52.618359,76.763992],[52.605968,76.771767],[52.58215,76.78669],[52.5345,76.816727],[52.52211,76.821098],[52.50993,76.825706],[52.485432,76.834663],[52.466202,76.84169],[52.40942,76.862663],[52.396179,76.868889],[52.37986,76.876846],[52.35146,76.890556],[52.35067,76.890938],[52.34148,76.89537],[52.329899,76.900993],[52.329559,76.901169],[52.32811,76.901947],[52.327049,76.902847],[52.326469,76.903397],[52.32436,76.90583],[52.313049,76.919693],[52.310089,76.923309],[52.309891,76.928452],[52.309071,76.94117],[52.308632,76.947121],[52.308498,76.949203],[52.308369,76.951317],[52.308079,76.955162],[52.307919,76.957283],[52.307789,76.958031],[52.307579,76.958633],[52.304588,76.960541],[52.302189,76.962097],[52.300522,76.963142],[52.29739,76.965118],[52.296429,76.965652],[52.296188,76.965668],[52.293209,76.965912],[52.291851,76.965919],[52.291389,76.965927],[52.290791,76.965988],[52.287601,76.966316],[52.285809,76.966431],[52.285671,76.966454],[52.28458,76.966713],[52.284031,76.967018],[52.28352,76.967438],[52.28307,76.967552],[52.275909,76.968437],[52.270489,76.96904],[52.268452,76.969261],[52.26461,76.969704],[52.264389,76.969749],[52.256741,76.970581],[52.25338,76.971031],[52.2528,76.97126],[52.252251,76.971741],[52.249111,76.976593],[52.24733,76.979172],[52.245079,76.982422],[52.245258,76.982758],[52.246681,76.985359],[52.245049,76.987846],[52.243629,76.985168],[52.24118,76.988808],[52.23851,76.992683],[52.23737,76.994247],[52.236721,76.995132],[52.232681,77.00103],[52.231129,77.003418],[52.22633,77.009827],[52.224651,77.011932],[52.223228,77.01329],[52.22081,77.014862],[52.20134,77.027008],[52.192451,77.033051],[52.155258,77.060623],[52.128948,77.078407],[52.120579,77.085007],[52.115608,77.089149],[52.114368,77.090462],[52.110329,77.095573],[52.087749,77.126488],[52.02565,77.220383],[52.017818,77.23365],[52.014431,77.238632],[52.009892,77.244614],[52.008942,77.245781],[52.003288,77.252037],[51.994431,77.26181],[51.987881,77.268944],[51.926472,77.334503],[51.91893,77.343452],[51.913319,77.350563],[51.91114,77.354134],[51.909191,77.358391],[51.90554,77.370628],[51.902649,77.381416],[51.90229,77.38253],[51.901718,77.384003],[51.900742,77.38607],[51.891979,77.400917],[51.8848,77.414436],[51.882252,77.419601],[51.881031,77.421867],[51.876968,77.426117],[51.86919,77.435799],[51.863548,77.443611],[51.861462,77.446404],[51.859451,77.448517],[51.856781,77.450691],[51.854179,77.452042],[51.828972,77.461777],[51.824478,77.463768],[51.820309,77.466713],[51.811329,77.473358],[51.805752,77.477402],[51.80146,77.480957],[51.79636,77.485367],[51.789841,77.490677],[51.770279,77.50605],[51.768761,77.507408],[51.76709,77.509178],[51.765709,77.510872],[51.73035,77.557549],[51.729481,77.558502],[51.728081,77.559578],[51.726379,77.560402],[51.725151,77.560593],[51.723949,77.560516],[51.722801,77.560226],[51.701229,77.551262],[51.70013,77.55098],[51.698509,77.550873],[51.697948,77.550949],[51.696819,77.5513],[51.681561,77.556793],[51.67968,77.557678],[51.67807,77.558594],[51.67651,77.559669],[51.65694,77.573929],[51.654819,77.5756],[51.6525,77.577698],[51.650768,77.579529],[51.637829,77.594147],[51.637039,77.594841],[51.635929,77.595558],[51.634789,77.5961],[51.633911,77.596329],[51.615162,77.599907],[51.614288,77.600143],[51.612862,77.600708],[51.61203,77.601196],[51.61095,77.60202],[51.597519,77.613213],[51.594929,77.615112],[51.5923,77.616814],[51.589958,77.61821],[51.54343,77.643517],[51.540958,77.644943],[51.539619,77.645889],[51.537781,77.647423],[51.53088,77.653717],[51.527859,77.656578],[51.52644,77.658257],[51.52536,77.659866],[51.522968,77.663757],[51.507431,77.6903],[51.5005,77.706619],[51.49971,77.708763],[51.491711,77.729446],[51.48793,77.741676],[51.487179,77.746033],[51.479191,77.798149],[51.477859,77.808937],[51.478561,77.820137],[51.47921,77.829269],[51.47839,77.838791],[51.473591,77.889008],[51.472099,77.898453],[51.47068,77.90657],[51.469509,77.91227],[51.468201,77.917809],[51.465511,77.928558],[51.46513,77.931038],[51.465,77.93309],[51.464909,77.935493],[51.464779,77.937134],[51.464298,77.945389],[51.463741,77.956268],[51.461029,77.989197],[51.460812,77.991142],[51.458012,78.012352],[51.45776,78.014717],[51.448521,78.092888],[51.44817,78.096573],[51.448158,78.098442],[51.4487,78.141037],[51.448662,78.141899],[51.447891,78.145554],[51.427341,78.207191],[51.418861,78.225723],[51.41803,78.22789],[51.40752,78.26239],[51.396679,78.298233],[51.39542,78.302254],[51.394371,78.304718],[51.394211,78.304947],[51.39386,78.305511],[51.393478,78.306084],[51.366341,78.342201],[51.358009,78.354073],[51.35482,78.360786],[51.233669,78.603119],[51.220341,78.630928],[51.188259,78.696838],[51.18729,78.69886],[51.186729,78.700058],[51.18626,78.701118],[51.124222,78.829292],[51.12355,78.830757],[51.12236,78.833801],[51.121422,78.837013],[51.12114,78.838249],[51.12051,78.841789],[51.095852,79.064957],[51.095509,79.068718],[51.095379,79.069504],[51.095032,79.071701],[51.09404,79.073753],[51.09264,79.075302],[51.079861,79.086357],[51.078751,79.087646],[51.07251,79.098297],[51.071159,79.100227],[51.05582,79.115723],[51.049122,79.122276],[51.046509,79.123253],[51.041889,79.123398],[51.039131,79.123734],[51.037231,79.125229],[51.035229,79.12896],[51.027439,79.144852],[51.026489,79.147476],[51.02626,79.148773],[51.02179,79.177223],[51.021488,79.178841],[51.020741,79.18203],[51.01981,79.187233],[51.01717,79.20491],[51.016891,79.206558],[51.016541,79.208183],[51.016029,79.210136],[51.015579,79.211617],[51.007591,79.234901],[51.005562,79.242317],[51.003342,79.251389],[51.003021,79.252533],[51.002659,79.253593],[51.001808,79.255669],[50.98951,79.284027],[50.98748,79.287827],[50.962818,79.324883],[50.962559,79.325447],[50.962379,79.326103],[50.962212,79.327141],[50.959042,79.355682],[50.958809,79.356934],[50.958149,79.358727],[50.957802,79.359367],[50.953659,79.365479],[50.930439,79.399277],[50.926579,79.403992],[50.918289,79.412323],[50.916969,79.413887],[50.913879,79.419724],[50.893089,79.460503],[50.872532,79.485619],[50.866772,79.489517],[50.82011,79.513809],[50.816929,79.5168],[50.814468,79.520363],[50.80534,79.535316],[50.795849,79.544861],[50.793091,79.548866],[50.770229,79.570343],[50.766281,79.576218],[50.758541,79.596062],[50.746498,79.631073],[50.731331,79.676567],[50.720749,79.708328],[50.703209,79.74054],[50.69994,79.747147],[50.69088,79.768768],[50.683689,79.79467],[50.67292,79.832642],[50.670799,79.840111],[50.662849,79.868134],[50.661018,79.872467],[50.65765,79.878677],[50.655571,79.882507],[50.63998,79.910912],[50.636139,79.916557],[50.620838,79.939331],[50.61507,79.951691],[50.600399,79.982117],[50.585468,80.013718],[50.580212,80.02227],[50.577808,80.02652],[50.57518,80.034264],[50.573009,80.041977],[50.57056,80.050537],[50.56884,80.056877],[50.566608,80.062363],[50.559872,80.072617],[50.553612,80.081573],[50.54895,80.091049],[50.54501,80.096603],[50.542839,80.097717],[50.533352,80.099632],[50.530899,80.100929],[50.525398,80.104149],[50.522221,80.105339],[50.51479,80.106903],[50.508839,80.10836],[50.507149,80.109169],[50.50613,80.109894],[50.505871,80.110092],[50.505508,80.110397],[50.499519,80.118111],[50.49921,80.118668],[50.498772,80.119797],[50.49789,80.123573],[50.49752,80.124908],[50.496269,80.129204],[50.495819,80.130363],[50.495411,80.131073],[50.49308,80.133904],[50.491718,80.135551],[50.490509,80.136971],[50.490189,80.137268],[50.486549,80.139992],[50.485451,80.140953],[50.481461,80.144653],[50.480961,80.14537],[50.480141,80.147072],[50.479561,80.148903],[50.479019,80.150627],[50.47871,80.151627],[50.478321,80.152977],[50.4776,80.156029],[50.477539,80.156303],[50.474152,80.174263],[50.473228,80.17939],[50.472271,80.184387],[50.47208,80.185463],[50.47179,80.187027],[50.47139,80.18969],[50.470718,80.196457],[50.470322,80.200493],[50.470058,80.202507],[50.469769,80.20388],[50.469521,80.204887],[50.469299,80.205589],[50.46806,80.20974],[50.46624,80.216202],[50.465012,80.21991],[50.46447,80.221497],[50.464031,80.222557],[50.463169,80.224312],[50.461349,80.227753],[50.460651,80.228928],[50.45948,80.230789],[50.458599,80.232033],[50.458118,80.232437],[50.456772,80.233307],[50.453121,80.235207],[50.448212,80.237793],[50.447819,80.237923],[50.447571,80.23793],[50.44733,80.237831],[50.447201,80.237694],[50.4459,80.236343],[50.44566,80.23613],[50.445492,80.235977],[50.445301,80.235924],[50.444969,80.23587],[50.444519,80.236481],[50.443932,80.237343],[50.443802,80.237633],[50.443722,80.237961],[50.443378,80.24015],[50.443199,80.241318],[50.44313,80.242111],[50.443039,80.243042],[50.442871,80.243759],[50.44278,80.244011],[50.442669,80.244308],[50.44231,80.24485],[50.441528,80.245911],[50.440762,80.24691],[50.440552,80.247276],[50.440559,80.251106],[50.440559,80.251862],[50.440571,80.255997],[50.44059,80.259911],[50.439892,80.258827],[50.438789,80.257118],[50.437721,80.25544],[50.437061,80.254433],[50.436649,80.253639],[50.436298,80.253082],[50.435532,80.251907],[50.434078,80.249634],[50.4338,80.249153],[50.432331,80.246696],[50.430851,80.244049],[50.429489,80.241982],[50.427849,80.239441],[50.426769,80.237717],[50.425671,80.235977],[50.424549,80.234207],[50.42345,80.232437],[50.422421,80.230797],[50.422329,80.230598],[50.422291,80.230423],[50.422272,80.230331],[50.422272,80.230019],[50.422218,80.229637],[50.422138,80.229317],[50.421902,80.228851],[50.4217,80.228592],[50.4216,80.228523],[50.42128,80.228302],[50.420979,80.228241],[50.420738,80.228401],[50.420589,80.228691],[50.42046,80.228798],[50.420231,80.228882],[50.419559,80.228821],[50.418201,80.228569],[50.41748,80.228432],[50.416191,80.22805],[50.415661,80.227791],[50.414989,80.227432],[50.414131,80.226929],[50.4053,80.221863],[50.40469,80.221527],[50.403019,80.221031],[50.402401,80.220863],[50.401581,80.220741],[50.401031,80.220657],[50.399311,80.22039],[50.39875,80.220543],[50.398548,80.220642],[50.398361,80.220787],[50.398159,80.220871],[50.397999,80.220901],[50.397629,80.220718],[50.3974,80.220711],[50.397072,80.220772],[50.396671,80.221039],[50.396351,80.221352],[50.395809,80.221992],[50.395439,80.222527],[50.395168,80.223038],[50.39502,80.223373],[50.39489,80.223763],[50.394798,80.223953],[50.394661,80.224113],[50.39455,80.224182],[50.394402,80.224228],[50.39402,80.224243],[50.39362,80.224319],[50.393101,80.224457],[50.392429,80.224716],[50.391159,80.225403],[50.390282,80.226082],[50.389118,80.22702],[50.385971,80.229622],[50.38485,80.23037],[50.38287,80.231682],[50.38155,80.232513],[50.380508,80.233391],[50.37973,80.234268],[50.37862,80.235771],[50.378281,80.236259],[50.378132,80.236458],[50.37574,80.239532],[50.37561,80.239922],[50.374352,80.241722],[50.37109,80.24633],[50.370972,80.246513],[50.368279,80.250412],[50.366982,80.252296],[50.36483,80.254951],[50.364552,80.255524],[50.363361,80.256828],[50.363029,80.256187],[50.36293,80.256058],[50.36277,80.255997],[50.36264,80.256119],[50.362091,80.25679],[50.361591,80.25737],[50.36013,80.259033],[50.359909,80.259407],[50.359852,80.25985],[50.359909,80.260277],[50.35997,80.260773],[50.3601,80.26178],[50.360271,80.263077],[50.36031,80.263931],[50.360378,80.265427],[50.360409,80.266212],[50.360451,80.267143],[50.360451,80.267761],[50.360378,80.268303],[50.36002,80.269943],[50.359829,80.27034],[50.359718,80.270462],[50.35952,80.270691],[50.358528,80.271301],[50.358398,80.271477],[50.357769,80.272652],[50.355282,80.276718],[50.353569,80.279518],[50.352551,80.281174],[50.349991,80.285347],[50.348801,80.287376],[50.34771,80.28933],[50.34613,80.292107],[50.344971,80.294273],[50.34164,80.300957],[50.339989,80.30381],[50.31815,80.339973],[50.317699,80.3405],[50.3097,80.352638],[50.29863,80.370323],[50.288872,80.387657],[50.254799,80.438637],[50.1786,80.543793],[50.147369,80.586998],[50.140499,80.595627],[50.129791,80.608902],[50.12748,80.611763],[50.125332,80.61425],[50.048908,80.68779],[50.013439,80.721893],[49.99485,80.740593],[49.99086,80.744957],[49.980228,80.756561],[49.977631,80.759216],[49.964771,80.772614],[49.960129,80.776558],[49.954281,80.780327],[49.948589,80.782913],[49.837891,80.833717],[49.83419,80.835533],[49.832191,80.837158],[49.80888,80.859039],[49.806938,80.860931],[49.797581,80.872002],[49.795361,80.87458],[49.794201,80.875519],[49.792919,80.875862],[49.782131,80.879662],[49.781448,80.879898],[49.77985,80.880836],[49.77879,80.882042],[49.777302,80.88385],[49.736259,80.945213],[49.733879,80.948143],[49.73111,80.950974],[49.673931,81.008041],[49.668369,81.014137],[49.662201,81.021088],[49.65498,81.028976],[49.646358,81.037537],[49.632919,81.050873],[49.631248,81.052078],[49.62986,81.052513],[49.625141,81.053543],[49.62352,81.054222],[49.621738,81.055252],[49.620129,81.056877],[49.605228,81.073448],[49.603111,81.076279],[49.59388,81.089241],[49.553799,81.14563],[49.5425,81.163139],[49.537991,81.17009],[49.53754,81.17112],[49.536152,81.171982],[49.532249,81.178162],[49.53075,81.180733],[49.523109,81.196442],[49.52261,81.198761],[49.52261,81.200989],[49.523109,81.203651],[49.52306,81.205711],[49.519772,81.231293],[49.5191,81.234207],[49.51704,81.241158],[49.509689,81.271461],[49.500149,81.299011],[49.499371,81.300636],[49.498089,81.302361],[49.48444,81.315964],[49.477909,81.323692],[49.474449,81.328407],[49.4725,81.331413],[49.470879,81.334503],[49.469261,81.338371],[49.455101,81.372704],[49.45393,81.374329],[49.45314,81.375107],[49.452301,81.37545],[49.445,81.376297],[49.443039,81.376823],[49.441429,81.377678],[49.44009,81.378883],[49.436741,81.383087],[49.435452,81.38472],[49.434219,81.38652],[49.433159,81.388237],[49.42725,81.401108],[49.421219,81.414253],[49.418541,81.419479],[49.411678,81.429916],[49.400391,81.447113],[49.39827,81.450287],[49.39156,81.461533],[49.38866,81.466682],[49.382511,81.47673],[49.380718,81.480247],[49.372341,81.49939],[49.37133,81.502136],[49.37072,81.504883],[49.36927,81.512001],[49.368649,81.514236],[49.367981,81.516037],[49.36647,81.518959],[49.364799,81.521713],[49.362339,81.525047],[49.356628,81.532257],[49.35479,81.53389],[49.34597,81.540771],[49.344952,81.541206],[49.343632,81.541473],[49.34333,81.541527],[49.340672,81.541313],[49.33812,81.541054],[49.335979,81.540817],[49.33514,81.540771],[49.334141,81.540863],[49.333038,81.54113],[49.332169,81.54155],[49.331421,81.542183],[49.329498,81.544533],[49.328152,81.546356],[49.32795,81.546631],[49.324299,81.551483],[49.322681,81.553627],[49.321751,81.554893],[49.321259,81.555237],[49.321011,81.555313],[49.32069,81.555267],[49.320511,81.555206],[49.320339,81.555031],[49.320141,81.554764],[49.32,81.554527],[49.319931,81.554253],[49.31987,81.553459],[49.319889,81.551407],[49.320042,81.544144],[49.320061,81.54332],[49.320091,81.541809],[49.320278,81.532089],[49.320541,81.520844],[49.321339,81.486343],[49.321339,81.484283],[49.321331,81.481621],[49.321308,81.47982],[49.32077,81.477058],[49.318619,81.468513],[49.318211,81.467102],[49.317501,81.464767],[49.31506,81.459068],[49.313931,81.456322],[49.29652,81.414993],[49.275181,81.364922],[49.254799,81.316856],[49.235931,81.271873],[49.23465,81.269058],[49.23217,81.264801],[49.230999,81.263184],[49.22913,81.261017],[49.226669,81.258499],[49.218109,81.250893],[49.19363,81.229141],[49.190189,81.22509],[49.189041,81.222366],[49.188091,81.219749],[49.187592,81.217003],[49.187149,81.214172],[49.187019,81.210899],[49.187302,81.204613],[49.187271,81.202583],[49.187061,81.200394],[49.186401,81.197197],[49.185638,81.195068],[49.18441,81.192802],[49.182369,81.190697],[49.179611,81.188919],[49.176208,81.187088],[49.174641,81.186363],[49.173618,81.185463],[49.172539,81.184052],[49.171612,81.182587],[49.17041,81.180519],[49.167099,81.174347],[49.16547,81.171173],[49.160641,81.158813],[49.15929,81.156151],[49.158119,81.154266],[49.1511,81.144478],[49.14925,81.141388],[49.147961,81.138901],[49.14621,81.134613],[49.145481,81.133408],[49.144531,81.132378],[49.142342,81.130493],[49.141048,81.128937],[49.140091,81.127403],[49.129929,81.109627],[49.128189,81.107323],[49.099369,81.076927],[49.09729,81.074699],[49.09594,81.072723],[49.09499,81.070839],[49.094372,81.069122],[49.09425,81.067413],[49.094372,81.065514],[49.0942,81.06337],[49.09351,81.059097],[49.091969,81.054367],[49.091129,81.052399],[49.089951,81.050339],[49.088772,81.048798],[49.071232,81.026314],[49.069771,81.024513],[49.068298,81.023216],[49.06707,81.02253],[49.059021,81.019096],[49.05661,81.017982],[49.048618,81.012573],[49.047379,81.011276],[49.037762,80.998329],[49.03619,80.996353],[49.03511,80.995407],[49.03371,80.994461],[49.020882,80.985367],[49.019501,80.984467],[49.014061,80.979347],[49.012428,80.978073],[49.01086,80.977211],[49.008888,80.976097],[49.00737,80.97464],[49.000839,80.966827],[48.999088,80.965027],[48.997849,80.963913],[48.99498,80.96199],[48.993118,80.960442],[48.99165,80.958298],[48.988419,80.95253],[48.987301,80.950897],[48.985722,80.94944],[48.984138,80.948486],[48.980709,80.947212],[48.978569,80.945923],[48.976822,80.944473],[48.95203,80.920937],[48.950581,80.919563],[48.94915,80.917877],[48.946911,80.913948],[48.913811,80.859528],[48.912689,80.8573],[48.9119,80.855164],[48.91127,80.852921],[48.910431,80.848801],[48.909691,80.846657],[48.903042,80.833443],[48.901741,80.831551],[48.900612,80.830002],[48.898918,80.828293],[48.89711,80.827003],[48.89357,80.825073],[48.887291,80.82206],[48.882999,80.819962],[48.881439,80.819473],[48.867081,80.817131],[48.866169,80.816963],[48.865391,80.816933],[48.864559,80.817062],[48.826309,80.825882],[48.824501,80.82666],[48.82275,80.827507],[48.82127,80.828537],[48.819519,80.830093],[48.80703,80.84082],[48.805389,80.84211],[48.803699,80.842957],[48.80172,80.843483],[48.798328,80.844597],[48.784302,80.850937],[48.783058,80.851288],[48.77718,80.851967],[48.775928,80.851967],[48.773079,80.85186],[48.76965,80.851547],[48.75919,80.850693],[48.756359,80.85054],[48.75177,80.848717],[48.739208,80.843727],[48.73711,80.842453],[48.735809,80.841164],[48.72823,80.829567],[48.726398,80.827591],[48.72459,80.826653],[48.722832,80.826393],[48.715981,80.82486],[48.71294,80.823891],[48.697102,80.817177],[48.691078,80.81456],[48.688881,80.813606],[48.687199,80.81292],[48.685501,80.812332],[48.683559,80.811493],[48.682331,80.810928],[48.68079,80.809769],[48.674721,80.80381],[48.670029,80.798843],[48.654549,80.782288],[48.652519,80.779533],[48.56625,80.656357],[48.562111,80.650528],[48.56052,80.649063],[48.558701,80.648117],[48.521759,80.631844],[48.514252,80.626694],[48.506981,80.62014],[48.470058,80.584862],[48.451328,80.564262],[48.445351,80.558434],[48.431862,80.544952],[48.428841,80.542213],[48.386341,80.499123],[48.384232,80.496117],[48.381611,80.492157],[48.36536,80.463501],[48.36467,80.462471],[48.36404,80.461952],[48.363251,80.4617],[48.359138,80.461868],[48.358231,80.461609],[48.35714,80.460922],[48.335468,80.440071],[48.334209,80.439377],[48.332901,80.43895],[48.33136,80.438698],[48.329479,80.438522],[48.303791,80.436546],[48.282089,80.435089],[48.280609,80.435013],[48.278839,80.435089],[48.276951,80.435349],[48.2565,80.442299],[48.218819,80.454918],[48.201778,80.461182],[48.199951,80.4617],[48.189301,80.464272],[48.18261,80.467102],[48.180321,80.467621],[48.178551,80.467789],[48.175289,80.467697],[48.151119,80.465637],[48.140419,80.464531],[48.138809,80.464012],[48.137661,80.463074],[48.13583,80.462547],[48.133202,80.462044],[48.129929,80.46067],[48.127239,80.459549],[48.125061,80.458183],[48.123798,80.457657],[48.120941,80.457237],[48.11853,80.456459],[48.114059,80.453888],[48.112919,80.453712],[48.110909,80.453712],[48.108559,80.454491],[48.102139,80.455261],[48.100361,80.455261],[48.094521,80.454659],[48.087639,80.453369],[48.082821,80.451309],[48.081959,80.450706],[48.0802,80.448807],[48.078949,80.446602],[48.07795,80.444893],[48.07597,80.443291],[48.073978,80.442009],[48.069759,80.440331],[48.068878,80.439133],[48.067829,80.436317],[48.066292,80.434669],[48.06041,80.433647],[48.05928,80.43306],[48.057381,80.43177],[48.05444,80.429626],[48.053261,80.428909],[48.051949,80.428711],[48.0438,80.429039],[48.0415,80.428818],[48.040199,80.428123],[48.03611,80.425949],[48.032051,80.423782],[48.030571,80.422501],[48.029652,80.421471],[48.02541,80.419167],[48.021198,80.416908],[48.019539,80.416183],[48.018749,80.4161],[48.017658,80.41629],[47.991871,80.420624],[47.99033,80.420883],[47.987949,80.420197],[47.987068,80.419563],[47.984379,80.416069],[47.98214,80.413673],[47.974831,80.406982],[47.963409,80.398438],[47.961182,80.397171],[47.958969,80.396156],[47.957169,80.395592],[47.955151,80.39521],[47.952431,80.394997],[47.948669,80.395233],[47.945518,80.395798],[47.940239,80.396606],[47.92968,80.398376],[47.927811,80.398933],[47.926281,80.399696],[47.924911,80.400841],[47.923679,80.402428],[47.92281,80.403801],[47.92189,80.405907],[47.921028,80.408737],[47.920361,80.413338],[47.920189,80.414627],[47.919071,80.421181],[47.917919,80.424767],[47.916519,80.42717],[47.915371,80.428757],[47.91367,80.430153],[47.912231,80.431068],[47.91,80.431641],[47.90947,80.431587],[47.908821,80.431511],[47.90741,80.43129],[47.90609,80.431107],[47.9039,80.430817],[47.901539,80.430519],[47.901409,80.430496],[47.901131,80.430527],[47.900841,80.430603],[47.9007,80.430649],[47.900421,80.430794],[47.900139,80.430977],[47.899738,80.43132],[47.89922,80.4319],[47.89888,80.432373],[47.89835,80.433281],[47.89814,80.433678],[47.897732,80.434517],[47.897449,80.43515],[47.897202,80.43576],[47.89706,80.436172],[47.896961,80.436607],[47.89687,80.437271],[47.896801,80.43882],[47.896111,80.441483],[47.8895,80.466629],[47.888458,80.469467],[47.88308,80.481781],[47.88253,80.484047],[47.88242,80.485947],[47.884239,80.498688],[47.884121,80.500748],[47.883259,80.503113],[47.872631,80.519592],[47.87114,80.521431],[47.86964,80.522461],[47.868599,80.523232],[47.867851,80.524094],[47.867081,80.525513],[47.865028,80.529671],[47.860371,80.535767],[47.846722,80.551987],[47.84539,80.552849],[47.843552,80.553879],[47.8428,80.554573],[47.84193,80.555679],[47.838188,80.558769],[47.824478,80.568977],[47.81485,80.57679],[47.79208,80.597733],[47.79047,80.599449],[47.788731,80.601768],[47.78735,80.603996],[47.785561,80.606148],[47.782742,80.608887],[47.762951,80.62709],[47.759609,80.629578],[47.752739,80.634468],[47.751869,80.635406],[47.75037,80.637993],[47.749512,80.639267],[47.748291,80.640556],[47.737209,80.650352],[47.735249,80.651627],[47.733231,80.652321],[47.730869,80.652496],[47.71777,80.652618],[47.71574,80.652786],[47.713951,80.653442],[47.71117,80.654472],[47.69194,80.662369],[47.684441,80.665321],[47.681252,80.667],[47.67836,80.667343],[47.67588,80.667603],[47.673679,80.668213],[47.672119,80.66906],[47.668591,80.671379],[47.66703,80.671982],[47.665409,80.671982],[47.66021,80.671204],[47.65744,80.670433],[47.655472,80.669144],[47.653679,80.667603],[47.650089,80.663834],[47.648769,80.661926],[47.64645,80.657806],[47.645531,80.656616],[47.644371,80.655586],[47.638119,80.650703],[47.636971,80.64949],[47.636341,80.648239],[47.635181,80.646782],[47.634201,80.645752],[47.632408,80.64489],[47.63055,80.644043],[47.628189,80.643257],[47.609489,80.641586],[47.595901,80.638283],[47.589649,80.636833],[47.587109,80.635887],[47.58363,80.633636],[47.578072,80.629959],[47.568802,80.623444],[47.56736,80.622231],[47.566078,80.621803],[47.564869,80.621628],[47.55537,80.622414],[47.549568,80.623093],[47.546799,80.623444],[47.543732,80.62336],[47.539551,80.622658],[47.532768,80.622917],[47.529751,80.623001],[47.526279,80.622147],[47.510658,80.61721],[47.487869,80.608543],[47.485722,80.607773],[47.480671,80.605751],[47.47731,80.604637],[47.43161,80.593521],[47.42905,80.592323],[47.421242,80.586311],[47.418598,80.584167],[47.416599,80.582916],[47.396759,80.579399],[47.392311,80.578667],[47.389759,80.579742],[47.387699,80.580429],[47.374851,80.580688],[47.372471,80.581078],[47.363312,80.584846],[47.360371,80.586273],[47.35825,80.586739],[47.352638,80.586647],[47.349819,80.587341],[47.34119,80.59259],[47.331879,80.597717],[47.319569,80.605148],[47.314831,80.610023],[47.300751,80.622543],[47.298939,80.623947],[47.296761,80.625023],[47.295071,80.626427],[47.292019,80.630363],[47.272099,80.654472],[47.270119,80.656708],[47.267269,80.658943],[47.260921,80.663689],[47.257599,80.666351],[47.25127,80.675407],[47.247211,80.683594],[47.246471,80.684959],[47.244949,80.686447],[47.243061,80.68705],[47.239849,80.687317],[47.233131,80.687828],[47.189499,80.691467],[47.144661,80.694481],[47.07082,80.699287],[47.052109,80.699966],[46.981419,80.698601],[46.977669,80.698257],[46.97451,80.696716],[46.971809,80.695],[46.969471,80.692078],[46.967251,80.688477],[46.935261,80.630463],[46.93327,80.626846],[46.930679,80.623589],[46.92189,80.6138],[46.89727,80.5858],[46.892929,80.58168],[46.890121,80.579361],[46.887299,80.57756],[46.861721,80.563393],[46.85849,80.562187],[46.85614,80.561417],[46.853561,80.560738],[46.839649,80.561081],[46.806992,80.561958],[46.728088,80.562302],[46.72385,80.56282],[46.721378,80.564018],[46.717739,80.56694],[46.714088,80.57106],[46.711262,80.575348],[46.709259,80.578957],[46.708199,80.581703],[46.706791,80.58342],[46.703732,80.583588],[46.68948,80.58342],[46.686069,80.583763],[46.683949,80.584793],[46.680531,80.588387],[46.678532,80.590446],[46.676289,80.591827],[46.674171,80.592346],[46.671822,80.59166],[46.666519,80.587883],[46.63953,80.570541],[46.635288,80.568657],[46.631519,80.568138],[46.628571,80.568481],[46.62513,80.569603],[46.557652,80.610458],[46.524948,80.630287],[46.49506,80.64814],[46.45723,80.670799],[46.428841,80.687798],[46.414989,80.696037],[46.413479,80.696259],[46.411678,80.696121],[46.41032,80.695602],[46.409321,80.695183],[46.40836,80.694923],[46.407001,80.694923],[46.405579,80.695351],[46.404751,80.695953],[46.402981,80.697411],[46.396648,80.703484],[46.384979,80.714737],[46.342571,80.749603],[46.303871,80.781372],[46.22459,80.846413],[46.207008,80.860657],[46.204029,80.863136],[46.19865,80.867607],[46.198219,80.868042],[46.197861,80.868729],[46.197861,80.869667],[46.198341,80.870354],[46.199711,80.87233],[46.200661,80.873878],[46.20298,80.880402],[46.203388,80.881767],[46.203449,80.883583],[46.20285,80.889503],[46.202621,80.89164],[46.201191,80.901688],[46.200062,80.904427],[46.19846,80.907349],[46.196499,80.910439],[46.190979,80.928886],[46.186642,80.939537],[46.185211,80.943008],[46.183781,80.947128],[46.182949,80.951332],[46.182598,80.955193],[46.182419,80.971069],[46.180462,80.972443],[46.176182,80.974503],[46.122959,81.002571],[46.11903,81.004288],[46.1157,81.006767],[46.086899,81.024117],[46.085949,81.024971],[46.085411,81.02626],[46.085171,81.027718],[46.084808,81.029182],[46.06403,81.067802],[46.061291,81.072441],[46.05891,81.075699],[46.01363,81.126251],[46.011719,81.128754],[46.010529,81.131401],[45.999378,81.170197],[45.99699,81.176643],[45.98489,81.20359],[45.983398,81.207283],[45.98209,81.2108],[45.974869,81.251556],[45.966999,81.295174],[45.96574,81.300751],[45.952202,81.352943],[45.92617,81.46151],[45.92474,81.467003],[45.923431,81.471207],[45.907719,81.513351],[45.884838,81.574379],[45.883888,81.576439],[45.88311,81.577553],[45.87851,81.58287],[45.841572,81.624672],[45.83918,81.627853],[45.82835,81.650421],[45.82291,81.661407],[45.782639,81.745087],[45.770489,81.775818],[45.711369,81.934608],[45.706032,81.947403],[45.701962,81.955116],[45.697521,81.961212],[45.695599,81.962929],[45.69392,81.963867],[45.69212,81.963959],[45.691051,81.963707],[45.686371,81.962837],[45.683491,81.962761],[45.682468,81.963188],[45.68079,81.964821],[45.58416,82.071327],[45.53891,82.121536],[45.502449,82.168114],[45.47237,82.206497],[45.435539,82.253471],[45.43288,82.256813],[45.352539,82.358437],[45.34301,82.370888],[45.295689,82.430367],[45.287159,82.441269],[45.282871,82.446083],[45.276649,82.452087],[45.258049,82.468567],[45.257339,82.469673],[45.256802,82.471046],[45.25655,82.472603],[45.256371,82.474907],[45.255772,82.476196],[45.255081,82.476967],[45.24276,82.492943],[45.24107,82.495087],[45.23835,82.500153],[45.23605,82.505562],[45.235748,82.50676],[45.235748,82.508476],[45.236408,82.513367],[45.23629,82.51474],[45.235691,82.516289],[45.234779,82.517754],[45.221298,82.542213],[45.217979,82.546928],[45.21302,82.553284],[45.21175,82.554398],[45.210171,82.555344],[45.208,82.556198],[45.2057,82.556969],[45.204491,82.557907],[45.200378,82.561691],[45.197479,82.564438],[45.195782,82.565468],[45.19421,82.56633],[45.19318,82.566406],[45.189789,82.565552],[45.17136,82.560516],[45.166561,82.559196],[45.163719,82.55809],[45.158691,82.556969],[45.152882,82.556717],[45.084499,82.560577],[45.081108,82.560997],[45.071529,82.563843],[45.0508,82.570007],[45.04612,82.571747],[45.04187,82.574661],[45.039688,82.57827],[45.01506,82.595444],[45.01239,82.597504],[45.005718,82.605743],[45.002682,82.608307],[44.99564,82.617073],[44.978771,82.627373],[44.958,82.636978],[44.947311,82.640244],[44.94281,82.639549],[44.936371,82.637833],[44.931629,82.632507],[44.93111,82.630547],[44.9258,82.610367],[44.903549,82.542389],[44.844742,82.543419],[44.835861,82.53981],[44.834709,82.554497],[44.825001,82.547546],[44.808102,82.535461],[44.803349,82.525513],[44.802368,82.523788],[44.798359,82.516747],[44.798481,82.514],[44.79129,82.502159],[44.78569,82.496147],[44.778252,82.493919],[44.77277,82.48774],[44.765209,82.48774],[44.7616,82.496841],[44.755459,82.512283],[44.755829,82.539062],[44.74157,82.540092],[44.725101,82.544388],[44.70644,82.549362],[44.700699,82.548683],[44.683128,82.544563],[44.676418,82.539917],[44.664211,82.517776],[44.65704,82.51091],[44.653099,82.507133],[44.595058,82.5037],[44.58345,82.503532],[44.582352,82.522926],[44.580879,82.523453],[44.557529,82.522873],[44.534039,82.522293],[44.52557,82.522072],[44.52927,82.554169],[44.5313,82.571716],[44.534229,82.594208],[44.53619,82.611549],[44.536442,82.617043],[44.536678,82.620987],[44.544998,82.64502],[44.546589,82.650337],[44.547451,82.655663],[44.548061,82.671463],[44.547199,82.679176],[44.547699,82.683823],[44.547699,82.686737],[44.546959,82.691711],[44.547451,82.696007],[44.547329,82.702187],[44.547569,82.705963],[44.545731,82.742699],[44.546101,82.745613],[44.554199,82.764877],[44.55444,82.765709],[44.557529,82.773193],[44.558979,82.777283],[44.56015,82.781342],[44.568581,82.81691],[44.569359,82.820198],[44.57032,82.823631],[44.571289,82.826576],[44.582081,82.85862],[44.582989,82.861427],[44.584259,82.865913],[44.585281,82.870201],[44.589359,82.889977],[44.590691,82.896233],[44.590988,82.897942],[44.59103,82.898331],[44.591629,82.901283],[44.592972,82.907463],[44.593128,82.908318],[44.594398,82.914139],[44.5956,82.919319],[44.595772,82.919952],[44.596539,82.921898],[44.597641,82.923813],[44.599129,82.92556],[44.59964,82.926018],[44.60025,82.926498],[44.601158,82.927078],[44.602718,82.927742],[44.608871,82.929962],[44.613121,82.931633],[44.61327,82.931717],[44.613789,82.93187],[44.617851,82.933357],[44.619282,82.933968],[44.628521,82.937401],[44.633331,82.93927],[44.63562,82.940033],[44.63689,82.940529],[44.637329,82.94075],[44.637859,82.940918],[44.641899,82.942482],[44.643261,82.943153],[44.643501,82.943359],[44.644581,82.944077],[44.645691,82.945137],[44.64632,82.945908],[44.647072,82.947403],[44.64753,82.948624],[44.647732,82.949257],[44.648071,82.950394],[44.648041,82.952026],[44.648121,82.954086],[44.647881,82.957283],[44.646622,82.960457],[44.645519,82.962517],[44.64283,82.96595],[44.640511,82.969559],[44.638519,82.972366],[44.63554,82.978752],[44.633381,82.985313],[44.632469,82.990089],[44.629028,83.018311],[44.627201,83.026718],[44.621578,83.048523],[44.615349,83.086113],[44.614861,83.091438],[44.615471,83.154221],[44.615681,83.190536],[44.61544,83.220917],[44.612629,83.238258],[44.601631,83.288887],[44.595638,83.3004],[44.59034,83.305893],[44.58234,83.314774],[44.57122,83.328331],[44.569988,83.330223],[44.565102,83.345497],[44.560581,83.365227],[44.551159,83.38755],[44.543209,83.426353],[44.542961,83.428749],[44.542839,83.452782],[44.549931,83.520592],[44.55006,83.523163],[44.549931,83.525574],[44.549568,83.527802],[44.54847,83.530891],[44.522888,83.596626],[44.51738,83.607964],[44.515301,83.610542],[44.493999,83.625816],[44.492531,83.626503],[44.49033,83.626678],[44.482121,83.626846],[44.480289,83.627708],[44.476238,83.630623],[44.474899,83.632339],[44.474159,83.634064],[44.473431,83.637154],[44.46228,83.72023],[44.46032,83.748039],[44.460442,83.753021],[44.464611,83.786148],[44.464851,83.791473],[44.462521,83.859108],[44.453579,83.898933],[44.43998,83.961418],[44.438141,83.967079],[44.41766,84.027496],[44.415581,84.031113],[44.38406,84.079178],[44.382961,84.081062],[44.381969,84.083122],[44.381359,84.086037],[44.379848,84.10498],[44.374119,84.176682],[44.371559,84.24231],[44.37125,84.250366],[44.371029,84.255867],[44.36956,84.293549],[44.369381,84.298866],[44.369419,84.305313],[44.369339,84.310707],[44.36924,84.314056],[44.368771,84.329811],[44.36895,84.336533],[44.369949,84.346283],[44.373421,84.381859],[44.374149,84.38546],[44.401112,84.488602],[44.401451,84.489929],[44.401489,84.49025],[44.401718,84.491364],[44.401939,84.492889],[44.402012,84.49366],[44.40205,84.494843],[44.40202,84.496437],[44.401958,84.497253],[44.401669,84.499237],[44.401421,84.500412],[44.401112,84.501549],[44.40057,84.503014],[44.399769,84.504753],[44.399059,84.506104],[44.39526,84.512733],[44.38364,84.533234],[44.382381,84.535522],[44.381882,84.536552],[44.381409,84.537643],[44.38113,84.538383],[44.38063,84.539909],[44.38044,84.54071],[44.38015,84.542343],[44.37999,84.543556],[44.379902,84.544807],[44.37986,84.546066],[44.37989,84.548592],[44.380539,84.571327],[44.38081,84.584824],[44.38163,84.621742],[44.38187,84.631577],[44.38195,84.634491],[44.38224,84.646912],[44.382339,84.648911],[44.382622,84.652283],[44.382851,84.654289],[44.383221,84.656693],[44.383591,84.65873],[44.38401,84.660812],[44.384491,84.662949],[44.38493,84.66465],[44.387989,84.675621],[44.395012,84.701317],[44.39798,84.712379],[44.398918,84.716614],[44.399319,84.718773],[44.399849,84.722267],[44.40015,84.724907],[44.400311,84.726669],[44.400551,84.730438],[44.401211,84.745941],[44.401871,84.761391],[44.40197,84.763748],[44.402451,84.774986],[44.40266,84.779877],[44.403,84.787857],[44.403179,84.791451],[44.40366,84.803093],[44.40369,84.805023],[44.40366,84.806641],[44.403519,84.809212],[44.403332,84.811028],[44.403172,84.812218],[44.40279,84.814468],[44.402401,84.816269],[44.401421,84.820137],[44.401199,84.821136],[44.400791,84.822662],[44.399288,84.828644],[44.399052,84.829597],[44.397511,84.835991],[44.396,84.842293],[44.39402,84.850548],[44.393211,84.855598],[44.392689,84.859741],[44.392189,84.865494],[44.39209,84.872017],[44.392109,84.87764],[44.39323,84.896751],[44.393291,84.902847],[44.393311,84.907852],[44.39307,84.916458],[44.393051,84.917793],[44.391701,84.944908],[44.391331,84.952461],[44.390469,84.958641],[44.38924,84.965851],[44.37661,85.01683],[44.373291,85.02816],[44.36483,85.052711],[44.36237,85.062317],[44.361019,85.069527],[44.360161,85.077087],[44.359669,85.083946],[44.359299,85.09185],[44.359669,85.099747],[44.36372,85.137863],[44.36433,85.146263],[44.36446,85.15313],[44.36433,85.160858],[44.36348,85.168922],[44.362,85.177849],[44.360039,85.184891],[44.357342,85.192963],[44.33942,85.237083],[44.33696,85.244797],[44.335121,85.251839],[44.333771,85.259743],[44.33316,85.267632],[44.333031,85.275528],[44.333889,85.284798],[44.334751,85.292862],[44.335121,85.299042],[44.335121,85.304192],[44.334511,85.310028],[44.334511,85.314323],[44.334869,85.322731],[44.336349,85.331833],[44.33831,85.342819],[44.338799,85.347282],[44.339169,85.352432],[44.339291,85.359642],[44.33905,85.365479],[44.337582,85.375954],[44.336472,85.384697],[44.335979,85.392601],[44.335979,85.403236],[44.33672,85.415077],[44.33979,85.453369],[44.340279,85.458],[44.341999,85.468483],[44.342731,85.474312],[44.343102,85.478783],[44.34322,85.484093],[44.343102,85.489243],[44.342491,85.495422],[44.338558,85.521858],[44.33794,85.528381],[44.337818,85.53405],[44.33807,85.545891],[44.33807,85.551041],[44.33733,85.556534],[44.336102,85.56237],[44.333771,85.568733],[44.33131,85.573883],[44.327141,85.579369],[44.322109,85.584343],[44.316212,85.588814],[44.312401,85.592758],[44.309212,85.596878],[44.306019,85.602028],[44.30331,85.607857],[44.30085,85.614899],[44.299011,85.622627],[44.298271,85.630524],[44.298149,85.639961],[44.29987,85.69558],[44.299381,85.703308],[44.298401,85.710693],[44.296799,85.718071],[44.28685,85.761147],[44.28574,85.768539],[44.284882,85.776947],[44.283161,85.799103],[44.282051,85.807854],[44.280331,85.816597],[44.27763,85.826042],[44.258949,85.880463],[44.256611,85.889732],[44.255131,85.898483],[44.25415,85.906563],[44.25354,85.914108],[44.25243,85.949982],[44.251942,85.956497],[44.25071,85.965431],[44.247509,85.98243],[44.246769,85.989639],[44.246399,85.995819],[44.246399,86.00354],[44.247021,86.009903],[44.25095,86.031181],[44.25563,86.052467],[44.25956,86.063797],[44.265461,86.077187],[44.26952,86.086113],[44.272099,86.093491],[44.273941,86.101387],[44.275169,86.109123],[44.275539,86.114433],[44.275661,86.120956],[44.275421,86.126793],[44.274681,86.133148],[44.273201,86.141037],[44.26226,86.187561],[44.246159,86.230133],[44.243328,86.239059],[44.24136,86.247993],[44.239891,86.257263],[44.23521,86.288498],[44.23312,86.298447],[44.2314,86.306183],[44.221561,86.339653],[44.216511,86.356651],[44.21455,86.363518],[44.21307,86.370728],[44.21233,86.377251],[44.21196,86.384277],[44.21233,86.39064],[44.212818,86.39682],[44.21418,86.403168],[44.216881,86.412613],[44.217991,86.418793],[44.218479,86.425659],[44.218479,86.432693],[44.217621,86.439217],[44.216019,86.445572],[44.213558,86.452606],[44.20052,86.483513],[44.198429,86.490196],[44.196701,86.497917],[44.195591,86.506851],[44.195221,86.515953],[44.195251,86.543556],[44.19471,86.554619],[44.19352,86.564163],[44.190159,86.588669],[44.189831,86.596909],[44.189831,86.604279],[44.19178,86.646683],[44.19178,86.655891],[44.1908,86.66391],[44.189499,86.671829],[44.186901,86.679314],[44.18372,86.68718],[44.18166,86.691147],[44.18071,86.692917],[44.178638,86.696259],[44.17778,86.697723],[44.176701,86.699837],[44.17556,86.702438],[44.174561,86.70517],[44.17395,86.70713],[44.17337,86.709412],[44.17284,86.71209],[44.172352,86.715782],[44.172249,86.71701],[44.17215,86.71917],[44.172009,86.728439],[44.171959,86.746559],[44.171791,86.759918],[44.171539,86.764847],[44.171219,86.768806],[44.17086,86.772324],[44.170589,86.774559],[44.1702,86.777046],[44.169151,86.782753],[44.16835,86.786324],[44.167511,86.789742],[44.166519,86.793556],[44.164181,86.802719],[44.16357,86.805313],[44.162861,86.808769],[44.16214,86.812958],[44.16148,86.818092],[44.161091,86.822517],[44.16058,86.831001],[44.160439,86.832359],[44.16008,86.834793],[44.159649,86.837013],[44.158669,86.840912],[44.157921,86.843369],[44.15683,86.846336],[44.155701,86.848953],[44.154442,86.851357],[44.153419,86.853218],[44.151951,86.855492],[44.15044,86.858032],[44.14957,86.859619],[44.148289,86.862106],[44.146641,86.865753],[44.145729,86.867897],[44.143909,86.872673],[44.14275,86.875504],[44.141731,86.877777],[44.1404,86.88047],[44.139519,86.882133],[44.13802,86.884773],[44.136848,86.886597],[44.13483,86.889458],[44.133209,86.891541],[44.131359,86.89373],[44.129169,86.896019],[44.119942,86.904999],[44.11771,86.907303],[44.114632,86.910797],[44.111851,86.914253],[44.109699,86.917122],[44.1073,86.920486],[44.105091,86.923759],[44.101471,86.928864],[44.097431,86.934837],[44.092442,86.942001],[44.091,86.944183],[44.08979,86.946167],[44.087761,86.949821],[44.086342,86.952797],[44.085121,86.955643],[44.083771,86.959244],[44.08276,86.962158],[44.08242,86.96331],[44.081749,86.96566],[44.08078,86.969597],[44.080059,86.973022],[44.076771,86.989891],[44.076229,86.992317],[44.07518,86.996613],[44.074291,86.999908],[44.072842,87.004631],[44.070599,87.010902],[44.069149,87.014557],[44.067589,87.018158],[44.066078,87.021446],[44.064331,87.024857],[44.06308,87.027153],[44.060379,87.031731],[44.053638,87.042503],[44.04911,87.049896],[44.046768,87.053978],[44.045158,87.056976],[44.043751,87.059807],[44.042549,87.062439],[44.037979,87.073174],[44.032749,87.085258],[44.03149,87.087898],[44.028469,87.093567],[44.027111,87.095787],[44.024738,87.099281],[44.022659,87.102112],[44.020248,87.105118],[44.017658,87.107986],[44.01181,87.113861],[44.006989,87.118851],[44.00354,87.122307],[44.0014,87.124702],[43.999149,87.127373],[43.995361,87.132362],[43.992489,87.136711],[43.990841,87.139389],[43.974121,87.167473],[43.972591,87.170227],[43.9706,87.174049],[43.969471,87.176369],[43.967602,87.180603],[43.966541,87.183228],[43.965569,87.185707],[43.96439,87.188911],[43.963001,87.192917],[43.954929,87.21653],[43.954769,87.216988],[43.953381,87.221046],[43.951832,87.226028],[43.950878,87.229561],[43.94986,87.233673],[43.9491,87.237152],[43.948372,87.240967],[43.94772,87.244904],[43.946381,87.25338],[43.945599,87.258263],[43.943878,87.26899],[43.943729,87.269943],[43.943661,87.270348],[43.94339,87.272049],[43.943081,87.273956],[43.94278,87.275772],[43.941769,87.280762],[43.941509,87.281837],[43.94083,87.284477],[43.940159,87.287323],[43.939629,87.289253],[43.939541,87.289574],[43.938251,87.293716],[43.93816,87.294029],[43.93755,87.295952],[43.935711,87.301018],[43.93557,87.301392],[43.93351,87.30648],[43.933399,87.306717],[43.9277,87.320503],[43.924629,87.327827],[43.924469,87.328171],[43.922958,87.331383],[43.92083,87.335472],[43.917881,87.340439],[43.915852,87.343498],[43.914989,87.344727],[43.9133,87.346977],[43.911129,87.349716],[43.908119,87.353493],[43.90696,87.35508],[43.905602,87.357002],[43.9044,87.358856],[43.90316,87.360962],[43.901939,87.36319],[43.900761,87.365501],[43.899651,87.367943],[43.898571,87.370491],[43.897621,87.373047],[43.89674,87.375633],[43.89579,87.37886],[43.895031,87.381783],[43.894871,87.382446],[43.894279,87.385109],[43.893951,87.386879],[43.893879,87.387268],[43.893501,87.389687],[43.893108,87.392593],[43.892899,87.394691],[43.892689,87.397362],[43.892529,87.400497],[43.892509,87.400887],[43.892479,87.404518],[43.89249,87.407967],[43.89249,87.411003],[43.89246,87.414047],[43.892361,87.415756],[43.892189,87.417381],[43.89196,87.419029],[43.891548,87.42086],[43.891022,87.422783],[43.8904,87.424583],[43.88958,87.426697],[43.88855,87.429367],[43.888359,87.42984],[43.88744,87.43222],[43.887341,87.43248],[43.886429,87.434799],[43.886311,87.435089],[43.88559,87.436859],[43.88485,87.438332],[43.884232,87.439407],[43.883789,87.440033],[43.883591,87.440277],[43.882641,87.441483],[43.881592,87.442558],[43.880539,87.443443],[43.879509,87.444138],[43.878349,87.444763],[43.87767,87.44503],[43.877491,87.445091],[43.876438,87.445389],[43.875191,87.445633],[43.873199,87.445862],[43.87233,87.446022],[43.871521,87.446297],[43.8708,87.446678],[43.86998,87.447144],[43.869301,87.447701],[43.868549,87.44841],[43.867981,87.449081],[43.86739,87.449913],[43.866821,87.450859],[43.866261,87.452019],[43.865822,87.453217],[43.864849,87.456688],[43.86478,87.456963],[43.86433,87.458298],[43.863811,87.459641],[43.863071,87.461128],[43.862381,87.462318],[43.861549,87.463501],[43.860691,87.464523],[43.85965,87.465569],[43.859409,87.465797],[43.85841,87.466583],[43.85751,87.467148],[43.85651,87.467682],[43.855469,87.468079],[43.854439,87.468384],[43.853588,87.46859],[43.853081,87.468727],[43.851749,87.469116],[43.8503,87.469673],[43.849232,87.470154],[43.848011,87.470772],[43.847389,87.471123],[43.84705,87.471336],[43.8461,87.47197],[43.844799,87.472923],[43.84341,87.474068],[43.842701,87.474693],[43.84201,87.475243],[43.84111,87.475983],[43.83971,87.476959],[43.83831,87.477814],[43.83717,87.478394],[43.8358,87.478996],[43.83424,87.479584],[43.832649,87.480026],[43.832432,87.480072],[43.830681,87.480377],[43.814949,87.482323],[43.813801,87.482513],[43.81266,87.482819],[43.81208,87.482986],[43.811771,87.483124],[43.810558,87.483627],[43.809471,87.4842],[43.808338,87.48494],[43.807209,87.485786],[43.806221,87.486656],[43.80513,87.487793],[43.804131,87.489014],[43.803341,87.490128],[43.802521,87.491386],[43.801628,87.492851],[43.80098,87.493896],[43.800289,87.494873],[43.79995,87.495247],[43.799122,87.496063],[43.798279,87.496712],[43.797352,87.497269],[43.796452,87.497643],[43.79562,87.497864],[43.79528,87.497917],[43.794739,87.497971],[43.79393,87.497971],[43.793282,87.497902],[43.792622,87.497749],[43.79195,87.497513],[43.79126,87.497223],[43.790421,87.496727],[43.78997,87.496391],[43.789669,87.496162],[43.78923,87.495773],[43.788609,87.495148],[43.786831,87.492996],[43.784351,87.489883],[43.78339,87.4888],[43.78244,87.487953],[43.781559,87.487282],[43.780479,87.486618],[43.779621,87.486221],[43.778622,87.485832],[43.777359,87.485489],[43.768581,87.484177],[43.7672,87.483994],[43.765968,87.483688],[43.76461,87.483208],[43.763302,87.482597],[43.762199,87.481934],[43.760948,87.481003],[43.759979,87.480133],[43.75798,87.478256],[43.75629,87.476753],[43.755219,87.475883],[43.75386,87.475052],[43.752739,87.474487],[43.751438,87.473969],[43.750031,87.473557],[43.749001,87.473343],[43.747791,87.473244],[43.74649,87.47319],[43.745319,87.473297],[43.744019,87.473534],[43.742809,87.473877],[43.741699,87.474297],[43.74049,87.474876],[43.739391,87.47554],[43.738281,87.476303],[43.73737,87.477051],[43.73629,87.478119],[43.735081,87.479286],[43.733238,87.481216],[43.72575,87.488892],[43.72366,87.490959],[43.722832,87.491814],[43.722229,87.492439],[43.721432,87.493263],[43.719742,87.494972],[43.717701,87.497032],[43.715801,87.499092],[43.713329,87.501373],[43.711281,87.503128],[43.708069,87.505676],[43.705551,87.507523],[43.702839,87.509422],[43.70277,87.509468],[43.688221,87.519676],[43.686871,87.520798],[43.685829,87.521828],[43.68462,87.523239],[43.683552,87.524712],[43.682499,87.526443],[43.68145,87.528549],[43.680691,87.530472],[43.68005,87.532501],[43.679531,87.534561],[43.679199,87.536484],[43.678959,87.538696],[43.6786,87.543793],[43.67857,87.544243],[43.67757,87.558968],[43.67749,87.560387],[43.677399,87.561157],[43.67728,87.562157],[43.677139,87.563583],[43.67701,87.564293],[43.67683,87.564903],[43.676601,87.565376],[43.676239,87.56588],[43.675919,87.566231],[43.675499,87.566544],[43.674992,87.56675],[43.674511,87.566833],[43.67387,87.566788],[43.67218,87.566673],[43.67149,87.566566],[43.667702,87.566078],[43.66563,87.565826],[43.664051,87.56575],[43.662689,87.565804],[43.661449,87.565971],[43.660259,87.566231],[43.659241,87.566559],[43.65818,87.566978],[43.657131,87.567467],[43.655708,87.568199],[43.649658,87.571487],[43.639301,87.577278],[43.637989,87.578117],[43.636768,87.579117],[43.635891,87.580017],[43.635071,87.58107],[43.634281,87.582336],[43.633598,87.583778],[43.633041,87.585251],[43.63274,87.586411],[43.632462,87.587967],[43.63224,87.589622],[43.632118,87.591454],[43.631851,87.597633],[43.63166,87.602814],[43.631641,87.603279],[43.631451,87.607712],[43.631241,87.612137],[43.631008,87.615463],[43.630951,87.616127],[43.630699,87.618637],[43.630329,87.621849],[43.62991,87.62468],[43.629162,87.629738],[43.627029,87.64415],[43.626369,87.648972],[43.626221,87.650948],[43.626209,87.652649],[43.626259,87.654282],[43.626381,87.655884],[43.626579,87.657341],[43.626831,87.658737],[43.627178,87.6605],[43.628189,87.664627],[43.62838,87.665329],[43.629429,87.669518],[43.629879,87.671638],[43.630192,87.673363],[43.63036,87.674721],[43.630501,87.676178],[43.630569,87.677811],[43.63055,87.679382],[43.630421,87.681129],[43.63026,87.682762],[43.630001,87.684677],[43.62574,87.709663],[43.62455,87.716537],[43.624481,87.717003],[43.624031,87.719711],[43.623959,87.720032],[43.62365,87.721848],[43.62323,87.724319],[43.619122,87.748306],[43.618641,87.750763],[43.618141,87.753036],[43.617962,87.754066],[43.60783,87.790024],[43.606331,87.79483],[43.604469,87.798782],[43.598629,87.809593],[43.5658,87.868134],[43.56356,87.873283],[43.562561,87.877747],[43.553478,87.936623],[43.550369,87.947952],[43.548012,87.953453],[43.545639,87.958076],[43.54229,87.962029],[43.51017,87.990517],[43.5047,87.995667],[43.501419,87.997803],[43.498638,87.998932],[43.49448,88],[43.492001,88.000366],[43.490589,88.001099],[43.48933,88.002701],[43.487259,88.007523],[43.485432,88.01181],[43.473808,88.040779],[43.471821,88.044037],[43.451771,88.064278],[43.42305,88.092621],[43.421719,88.094742],[43.418388,88.102074],[43.41431,88.110977],[43.40517,88.127991],[43.40303,88.132248],[43.401909,88.137573],[43.401039,88.144524],[43.401039,88.14724],[43.401409,88.150192],[43.40102,88.15242],[43.398079,88.160744],[43.39703,88.162621],[43.395271,88.164429],[43.388039,88.171944],[43.386688,88.174652],[43.37188,88.212837],[43.369881,88.215889],[43.367619,88.218224],[43.363781,88.220337],[43.352619,88.226151],[43.350868,88.227867],[43.350121,88.229424],[43.348751,88.233704],[43.346882,88.247093],[43.347191,88.253166],[43.347919,88.274597],[43.347969,88.280197],[43.3475,88.284607],[43.343578,88.307373],[43.343201,88.309288],[43.342369,88.311203],[43.34161,88.312332],[43.340641,88.313347],[43.336269,88.316933],[43.335411,88.31813],[43.333851,88.322166],[43.332958,88.323196],[43.331371,88.325027],[43.329269,88.329193],[43.328281,88.330704],[43.32671,88.331947],[43.324421,88.333443],[43.31831,88.337143],[43.317211,88.338058],[43.316551,88.338982],[43.316002,88.339928],[43.312481,88.348618],[43.311829,88.349541],[43.308739,88.353241],[43.307331,88.3545],[43.305771,88.355309],[43.304501,88.35553],[43.303329,88.355553],[43.302132,88.355293],[43.301041,88.354797],[43.299999,88.354073],[43.299019,88.352921],[43.29567,88.347366],[43.294922,88.34639],[43.29427,88.345863],[43.293468,88.345444],[43.292549,88.345306],[43.286049,88.345741],[43.28421,88.346138],[43.279449,88.348213],[43.278389,88.348846],[43.277592,88.349823],[43.275612,88.354141],[43.275002,88.354927],[43.27446,88.355331],[43.273899,88.355469],[43.273232,88.355362],[43.272732,88.355019],[43.27166,88.353889],[43.270939,88.353447],[43.27021,88.353317],[43.26955,88.35347],[43.268181,88.354393],[43.264778,88.35762],[43.263809,88.358849],[43.263401,88.360359],[43.26244,88.370163],[43.261951,88.37146],[43.261261,88.372208],[43.26041,88.372498],[43.25938,88.372566],[43.256512,88.372383],[43.255489,88.372543],[43.25478,88.372917],[43.24931,88.377213],[43.246029,88.379967],[43.244301,88.382111],[43.23455,88.400726],[43.232761,88.408127],[43.232342,88.411072],[43.232262,88.423782],[43.231758,88.42601],[43.227589,88.431534],[43.22604,88.433823],[43.224918,88.436653],[43.222912,88.445251],[43.222118,88.44709],[43.220909,88.448799],[43.217781,88.45314],[43.21653,88.454224],[43.214489,88.455139],[43.21336,88.455887],[43.211441,88.458023],[43.2104,88.458809],[43.206848,88.46019],[43.20443,88.461479],[43.199009,88.465073],[43.196541,88.467239],[43.19408,88.470032],[43.192829,88.471207],[43.191368,88.472076],[43.189159,88.473167],[43.188202,88.473831],[43.186279,88.47554],[43.185108,88.476303],[43.183319,88.476707],[43.180149,88.477287],[43.17802,88.477966],[43.174019,88.479759],[43.172951,88.480476],[43.172161,88.481453],[43.169781,88.484947],[43.168968,88.485672],[43.168079,88.486183],[43.167301,88.486397],[43.16626,88.48629],[43.162991,88.485527],[43.161709,88.485367],[43.16024,88.485497],[43.158871,88.485817],[43.157822,88.486397],[43.15678,88.487129],[43.15575,88.488297],[43.15485,88.489777],[43.15295,88.493713],[43.151932,88.495148],[43.150249,88.497177],[43.147289,88.499817],[43.145618,88.500908],[43.11911,88.508789],[43.113972,88.510857],[43.10878,88.514526],[43.104771,88.516747],[43.095871,88.520363],[43.08585,88.524307],[43.085049,88.52462],[43.084221,88.527397],[43.083469,88.533073],[43.064529,88.645844],[43.063782,88.650993],[43.06353,88.655983],[43.064659,88.704552],[43.062901,88.758797],[43.062149,88.766693],[43.061272,88.770302],[43.060139,88.773048],[43.054749,88.780937],[43.034679,88.809776],[43.031158,88.816467],[43.022129,88.835701],[43.020741,88.840851],[43.01685,88.861969],[43.01511,88.895157],[43.014431,88.903923],[43.01189,88.944511],[43.010181,88.985939],[43.008678,89.023689],[43.00766,89.051407],[43.006378,89.084343],[43.00621,89.086533],[43.00592,89.088699],[43.005348,89.091614],[43.004471,89.094673],[42.995232,89.121597],[42.994888,89.122597],[42.993141,89.127441],[42.986832,89.144073],[42.986031,89.1464],[42.983082,89.154968],[42.980911,89.161613],[42.97858,89.169212],[42.975029,89.179268],[42.974419,89.18145],[42.974018,89.182877],[42.970001,89.211029],[42.96912,89.214462],[42.968922,89.214996],[42.967739,89.218063],[42.957939,89.240379],[42.949902,89.258751],[42.931519,89.301567],[42.922131,89.323463],[42.92075,89.327423],[42.919739,89.332222],[42.919361,89.336693],[42.920872,89.430923],[42.92112,89.450844],[42.920872,89.456848],[42.91634,89.50766],[42.91534,89.513321],[42.912819,89.523277],[42.912071,89.528427],[42.91132,89.550583],[42.91169,89.55246],[42.912701,89.55452],[42.916729,89.560028],[42.917099,89.560532],[42.91848,89.563278],[42.919609,89.566368],[42.921749,89.569633],[42.924389,89.571167],[42.926029,89.572372],[42.929161,89.573227],[42.93055,89.574257],[42.931801,89.575813],[42.93243,89.578209],[42.93243,89.584053],[42.93306,89.586617],[42.935951,89.593658],[42.93721,89.597092],[42.937969,89.6007],[42.938339,89.604637],[42.938091,89.609283],[42.936081,89.6213],[42.934952,89.625237],[42.933819,89.628853],[42.933441,89.632111],[42.933441,89.634857],[42.933941,89.645332],[42.933689,89.64962],[42.931801,89.66198],[42.92263,89.702316],[42.921879,89.705238],[42.921879,89.708328],[42.922249,89.711418],[42.924259,89.721718],[42.9245,89.722847],[42.925522,89.727898],[42.926029,89.730988],[42.926029,89.734077],[42.92577,89.736481],[42.901379,89.832443],[42.900501,89.836906],[42.900249,89.841187],[42.900249,89.845154],[42.902519,89.868317],[42.903271,89.875359],[42.903271,89.879303],[42.902889,89.882736],[42.90189,89.887199],[42.89333,89.916039],[42.882519,89.957413],[42.879749,89.968567],[42.87484,89.992432],[42.875099,90.001534],[42.876228,90.003593],[42.877361,90.007881],[42.87812,90.013542],[42.87849,90.033287],[42.87925,90.038597],[42.880501,90.043587],[42.883518,90.048897],[42.8839,90.050797],[42.883518,90.052513],[42.882019,90.064011],[42.882389,90.07534],[42.885159,90.088043],[42.887299,90.107613],[42.887299,90.111557],[42.885658,90.118088],[42.884529,90.125473],[42.884529,90.155167],[42.884781,90.160141],[42.88755,90.178169],[42.89032,90.194313],[42.891571,90.202888],[42.892578,90.218163],[42.89283,90.225548],[42.894341,90.255417],[42.89547,90.257637],[42.897228,90.260223],[42.91433,90.276871],[42.916088,90.278587],[42.92572,90.286217],[42.926281,90.286659],[42.928669,90.289574],[42.954681,90.325447],[42.965561,90.339417],[42.969109,90.352364],[42.96933,90.354347],[42.97477,90.391518],[42.975849,90.398308],[42.976601,90.404121],[42.976608,90.404427],[42.979778,90.425003],[42.980309,90.428658],[42.981098,90.434731],[42.983521,90.450653],[42.98632,90.469856],[42.986919,90.474617],[42.987289,90.476891],[42.98819,90.483231],[42.98856,90.485153],[42.98893,90.486382],[42.989491,90.487823],[42.998089,90.50766],[42.998421,90.508636],[42.998821,90.510246],[42.999931,90.518677],[43.000271,90.520767],[43.000511,90.522957],[43.001389,90.528778],[43.00177,90.531792],[43.001911,90.532593],[43.002289,90.5355],[43.003151,90.540283],[43.00349,90.541817],[43.00515,90.55069],[43.005402,90.551743],[43.005741,90.553596],[43.00655,90.559807],[43.006821,90.561119],[43.010551,90.585213],[43.010761,90.586189],[43.01086,90.586868],[43.011879,90.59243],[43.012051,90.593674],[43.014481,90.607651],[43.015041,90.611397],[43.01532,90.612556],[43.016499,90.6185],[43.016621,90.618858],[43.01749,90.624069],[43.017841,90.625748],[43.01783,90.625999],[43.01865,90.62989],[43.019321,90.633347],[43.019691,90.634842],[43.019711,90.635452],[43.020451,90.639526],[43.023109,90.652611],[43.0243,90.659431],[43.025982,90.66787],[43.026249,90.669579],[43.027802,90.678146],[43.028332,90.680779],[43.028751,90.683296],[43.028961,90.684067],[43.029202,90.685738],[43.02927,90.686523],[43.030109,90.691254],[43.030991,90.695862],[43.031811,90.700508],[43.03191,90.701439],[43.033859,90.712013],[43.034119,90.713043],[43.034389,90.713882],[43.034821,90.714951],[43.035488,90.716331],[43.037731,90.720207],[43.038509,90.721474],[43.03936,90.722672],[43.039669,90.723244],[43.039711,90.723442],[43.041012,90.7258],[43.049889,90.741318],[43.078011,90.789993],[43.079781,90.793114],[43.091789,90.813927],[43.094238,90.818253],[43.105728,90.83815],[43.127251,90.875664],[43.128132,90.877113],[43.129059,90.878807],[43.152161,90.918983],[43.15641,90.926468],[43.15712,90.927567],[43.15815,90.928741],[43.160381,90.930939],[43.16106,90.931686],[43.161839,90.932793],[43.162491,90.934036],[43.162708,90.934593],[43.163059,90.935707],[43.167259,90.954353],[43.174629,90.9879],[43.177311,90.999687],[43.186829,91.042557],[43.18734,91.045181],[43.193069,91.070633],[43.197281,91.089661],[43.198051,91.092934],[43.200958,91.105988],[43.201221,91.106888],[43.201569,91.107857],[43.2425,91.200439],[43.247059,91.210648],[43.26371,91.248741],[43.269489,91.261757],[43.271019,91.265343],[43.275181,91.274818],[43.277649,91.280586],[43.28059,91.287086],[43.282509,91.291519],[43.285599,91.298424],[43.296082,91.322212],[43.296822,91.323753],[43.297359,91.324638],[43.303131,91.333267],[43.309929,91.343613],[43.311359,91.345619],[43.315521,91.3517],[43.31625,91.352943],[43.31702,91.354584],[43.32486,91.374878],[43.32983,91.387619],[43.33807,91.410332],[43.343979,91.426453],[43.347961,91.437576],[43.348209,91.438461],[43.348942,91.440407],[43.3494,91.441437],[43.352039,91.44873],[43.352589,91.451378],[43.3535,91.460182],[43.354031,91.465851],[43.354301,91.468117],[43.355129,91.476349],[43.355499,91.478973],[43.361481,91.501579],[43.363602,91.509407],[43.364449,91.512863],[43.37183,91.539879],[43.3741,91.548363],[43.374298,91.548882],[43.374851,91.549858],[43.375061,91.550453],[43.375771,91.553467],[43.37603,91.555138],[43.375938,91.555389],[43.37709,91.559853],[43.377621,91.562492],[43.380009,91.581299],[43.381809,91.596481],[43.382011,91.597931],[43.382099,91.598396],[43.382301,91.598907],[43.382561,91.601357],[43.382629,91.602577],[43.382641,91.604263],[43.382542,91.606644],[43.382259,91.609413],[43.381939,91.611397],[43.37965,91.621933],[43.378841,91.625473],[43.3764,91.634987],[43.37545,91.637947],[43.37505,91.639877],[43.374619,91.641647],[43.370998,91.655388],[43.37027,91.658417],[43.365871,91.675323],[43.365059,91.678452],[43.364731,91.67955],[43.363499,91.684471],[43.361439,91.692139],[43.359531,91.699547],[43.359241,91.701263],[43.359169,91.702637],[43.35928,91.703987],[43.359509,91.705276],[43.359982,91.707161],[43.36982,91.742973],[43.372631,91.753021],[43.37392,91.757812],[43.37442,91.759483],[43.375198,91.762428],[43.375401,91.763397],[43.375561,91.764717],[43.375599,91.765999],[43.375408,91.768929],[43.37521,91.770554],[43.374908,91.772171],[43.37463,91.773232],[43.374088,91.774811],[43.373291,91.776604],[43.364761,91.792717],[43.364399,91.793503],[43.363998,91.794601],[43.36359,91.796387],[43.36343,91.797989],[43.363441,91.799316],[43.363579,91.800652],[43.364021,91.802567],[43.366032,91.808868],[43.37429,91.834282],[43.375271,91.837433],[43.381149,91.855637],[43.382408,91.8592],[43.38306,91.861214],[43.393181,91.890991],[43.394131,91.893608],[43.404839,91.925247],[43.407921,91.934532],[43.408772,91.936867],[43.410931,91.943413],[43.411652,91.945847],[43.41333,91.951942],[43.41539,91.959442],[43.4156,91.960617],[43.415649,91.961197],[43.415649,91.961807],[43.415539,91.963013],[43.415421,91.963593],[43.41518,91.964447],[43.413719,91.968903],[43.408131,91.984978],[43.38829,92.04274],[43.38768,92.044403],[43.384071,92.055069],[43.383888,92.055931],[43.383739,92.062576],[43.383549,92.063652],[43.383751,92.077217],[43.383621,92.07988],[43.379551,92.111923],[43.3783,92.121323],[43.37817,92.12278],[43.378181,92.123451],[43.378139,92.123787],[43.37804,92.124077],[43.378078,92.124092],[43.377602,92.12693],[43.376678,92.134521],[43.37648,92.134933],[43.37635,92.13591],[43.376438,92.136101],[43.37492,92.146538],[43.3741,92.150238],[43.373829,92.150787],[43.373161,92.151619],[43.371979,92.152588],[43.371311,92.152802],[43.368759,92.1539],[43.343491,92.165489],[43.336319,92.16864],[43.33614,92.16864],[43.333519,92.169991],[43.322121,92.175133],[43.315922,92.177841],[43.315189,92.178223],[43.31448,92.17868],[43.31414,92.178963],[43.313519,92.179672],[43.31295,92.180489],[43.311031,92.183868],[43.309029,92.187683],[43.308578,92.188721],[43.308182,92.190086],[43.30558,92.201569],[43.305191,92.203537],[43.305031,92.204117],[43.304661,92.205032],[43.304211,92.205818],[43.303791,92.206337],[43.300419,92.209373],[43.29726,92.213799],[43.29509,92.219322],[43.293221,92.224327],[43.29282,92.225693],[43.29261,92.226868],[43.29121,92.236771],[43.290798,92.238876],[43.290199,92.241379],[43.290039,92.241692],[43.289768,92.243027],[43.289742,92.243393],[43.289631,92.243736],[43.289581,92.245827],[43.2896,92.249359],[43.28965,92.249733],[43.28944,92.251373],[43.28904,92.253258],[43.288872,92.253853],[43.288399,92.254959],[43.28759,92.2565],[43.286591,92.257843],[43.28548,92.259117],[43.266258,92.280243],[43.26268,92.284241],[43.258411,92.288857],[43.257809,92.289658],[43.25742,92.290321],[43.256969,92.29129],[43.256691,92.292053],[43.256378,92.293137],[43.2561,92.294647],[43.25592,92.296593],[43.255692,92.301987],[43.255619,92.306412],[43.255081,92.324226],[43.254978,92.326187],[43.254929,92.3265],[43.25465,92.327293],[43.25452,92.328056],[43.254539,92.331291],[43.254822,92.3321],[43.25502,92.332977],[43.25502,92.33429],[43.255081,92.334824],[43.255112,92.336983],[43.25491,92.351593],[43.25494,92.351967],[43.255192,92.352547],[43.255161,92.358383],[43.255341,92.369583],[43.255348,92.373428],[43.25544,92.37973],[43.255489,92.381088],[43.25544,92.38237],[43.255562,92.386459],[43.255569,92.38871],[43.255501,92.3909],[43.255562,92.41449],[43.255508,92.41684],[43.25544,92.417953],[43.255112,92.442863],[43.255032,92.44442],[43.254902,92.451012],[43.254879,92.455528],[43.254799,92.458504],[43.254829,92.460274],[43.254902,92.460899],[43.255131,92.46122],[43.255089,92.468697],[43.25489,92.477119],[43.254978,92.48597],[43.25494,92.488167],[43.25486,92.489609],[43.254711,92.507919],[43.25457,92.517036],[43.254532,92.517326],[43.254589,92.518883],[43.25581,92.530167],[43.25584,92.53196],[43.25576,92.533012],[43.255421,92.53582],[43.253208,92.549698],[43.252701,92.552528],[43.252499,92.553307],[43.251751,92.555443],[43.250801,92.557281],[43.250229,92.55851],[43.243992,92.570717],[43.242409,92.573624],[43.242149,92.574242],[43.236401,92.585487],[43.230221,92.597183],[43.22961,92.598503],[43.228851,92.599838],[43.2285,92.600647],[43.227299,92.602959],[43.22636,92.604622],[43.225151,92.607018],[43.222401,92.612137],[43.221802,92.61338],[43.219791,92.61718],[43.218559,92.61972],[43.2174,92.62175],[43.216888,92.622757],[43.2164,92.624069],[43.214039,92.628708],[43.213139,92.630333],[43.2122,92.632301],[43.212051,92.632523],[43.211658,92.63279],[43.210991,92.632889],[43.21035,92.633072],[43.210129,92.633209],[43.20993,92.633461],[43.207069,92.639236],[43.206989,92.639481],[43.205688,92.641998],[43.20525,92.64299],[43.204369,92.644783],[43.20388,92.645653],[43.19825,92.65416],[43.197201,92.655479],[43.196789,92.656464],[43.196609,92.657181],[43.19635,92.6577],[43.196079,92.65802],[43.190941,92.662827],[43.190338,92.663452],[43.188599,92.665031],[43.186859,92.666748],[43.185692,92.668007],[43.184761,92.669159],[43.183418,92.670967],[43.180092,92.676376],[43.172909,92.687592],[43.17234,92.688583],[43.169239,92.693604],[43.168331,92.695328],[43.167881,92.696358],[43.167221,92.698227],[43.166851,92.6996],[43.165169,92.706772],[43.16357,92.714363],[43.163559,92.714729],[43.161999,92.72184],[43.16135,92.722961],[43.15799,92.729736],[43.156681,92.732277],[43.155411,92.734993],[43.154388,92.737671],[43.153999,92.739197],[43.15382,92.740334],[43.153301,92.742409],[43.152962,92.744377],[43.15284,92.745354],[43.152012,92.750618],[43.151588,92.752319],[43.15163,92.752579],[43.151291,92.753853],[43.150669,92.755867],[43.150249,92.757011],[43.14949,92.75869],[43.14801,92.761574],[43.14732,92.762558],[43.145931,92.7649],[43.144001,92.767769],[43.1413,92.771973],[43.139622,92.77475],[43.138191,92.777542],[43.13784,92.778351],[43.136761,92.78141],[43.133678,92.791237],[43.133209,92.792923],[43.132771,92.79425],[43.132648,92.794487],[43.13208,92.796402],[43.130611,92.801697],[43.130001,92.804459],[43.129471,92.807159],[43.12764,92.815422],[43.12764,92.815628],[43.127708,92.816093],[43.128059,92.817108],[43.12809,92.817642],[43.127239,92.822151],[43.124889,92.833717],[43.12468,92.834572],[43.124001,92.836807],[43.123409,92.83847],[43.121769,92.843559],[43.117249,92.856644],[43.116928,92.857742],[43.097961,92.913582],[43.09219,92.930397],[43.091251,92.932861],[43.089909,92.936729],[43.08939,92.938499],[43.088219,92.941933],[43.085678,92.949699],[43.08448,92.953049],[43.084339,92.95372],[43.083939,92.954758],[43.081841,92.961029],[43.081139,92.962883],[43.077202,92.974609],[43.073639,92.984818],[43.07309,92.986237],[43.072651,92.98764],[43.071579,92.990761],[43.070629,92.993958],[43.06773,93.002113],[43.06179,93.019722],[43.059059,93.027451],[43.05798,93.03083],[43.05611,93.036209],[43.055599,93.037857],[43.054531,93.040833],[43.0536,93.043671],[43.050701,93.051971],[43.048828,93.05748],[43.04847,93.058357],[43.04398,93.071747],[43.04361,93.072983],[43.036949,93.0923],[43.030769,93.110497],[43.030392,93.111504],[43.02821,93.117996],[43.02644,93.122902],[43.02552,93.125717],[43.021511,93.137383],[43.020081,93.141777],[43.019531,93.143211],[43.018318,93.146812],[43.014252,93.158577],[43.012951,93.162216],[43.012581,93.163368],[43.012489,93.163933],[43.011021,93.167953],[43.01017,93.170631],[43.009911,93.171303],[42.956379,93.327377],[42.943939,93.363609],[42.93602,93.384903],[42.923698,93.417068],[42.914711,93.439667],[42.90744,93.457962],[42.906872,93.459129],[42.90659,93.460068],[42.90519,93.464157],[42.90258,93.470917],[42.902351,93.471611],[42.90118,93.474586],[42.89896,93.47998],[42.897121,93.484833],[42.895458,93.488991],[42.89336,93.494431],[42.892899,93.495789],[42.892529,93.496559],[42.88739,93.512894],[42.887272,93.517189],[42.888271,93.531914],[42.862091,93.564423],[42.861511,93.564209],[42.861229,93.564102],[42.86145,93.564613],[42.861591,93.565399],[42.861431,93.566383],[42.86108,93.567436],[42.860889,93.568802],[42.860519,93.574074],[42.860298,93.582787],[42.859718,93.588753],[42.859089,93.594093],[42.858608,93.596024],[42.858109,93.597328],[42.85775,93.598083],[42.844662,93.621597],[42.833488,93.641823],[42.828079,93.651497],[42.825699,93.655746],[42.824928,93.657333],[42.82415,93.659142],[42.823341,93.661308],[42.82259,93.663757],[42.821941,93.666389],[42.821411,93.669212],[42.82106,93.672157],[42.820869,93.675217],[42.820148,93.715927],[42.819351,93.749474],[42.819149,93.751984],[42.81884,93.754433],[42.81839,93.756721],[42.817348,93.760773],[42.816341,93.763344],[42.815842,93.763969],[42.81535,93.764908],[42.814701,93.766747],[42.812519,93.771149],[42.812069,93.772324],[42.811932,93.773102],[42.727871,93.941811],[42.721931,93.953537],[42.720589,93.955933],[42.719109,93.958252],[42.717548,93.960472],[42.699131,93.982513],[42.699059,93.983383],[42.698891,93.983681],[42.698071,93.984612],[42.696949,93.986053],[42.695301,93.987839],[42.69413,93.989487],[42.69381,93.99012],[42.69331,93.990646],[42.692101,93.991898],[42.69136,93.992996],[42.69014,93.994179],[42.687519,93.99733],[42.687038,93.997597],[42.686771,93.99736],[42.686432,93.997581],[42.65414,94.036118],[42.646832,94.044739],[42.645691,94.045403],[42.644489,94.046288],[42.644058,94.046982],[42.643921,94.047897],[42.64352,94.048683],[42.615822,94.081642],[42.615479,94.082474],[42.61515,94.083054],[42.61348,94.085068],[42.613319,94.085991],[42.612419,94.087349],[42.611771,94.087723],[42.610729,94.087997],[42.610352,94.088097],[42.5938,94.107742],[42.591869,94.110123],[42.591282,94.110817],[42.576759,94.127983],[42.57444,94.130577],[42.574371,94.130829],[42.55592,94.152588],[42.5546,94.153893],[42.552959,94.1549],[42.55114,94.155441],[42.549179,94.155487],[42.511021,94.154877],[42.50568,94.154716],[42.48864,94.154488],[42.479259,94.154243],[42.455231,94.153893],[42.45348,94.15358],[42.452808,94.153816],[42.416431,94.153236],[42.404751,94.152946],[42.390621,94.152786],[42.387569,94.152687],[42.38446,94.152702],[42.37709,94.15255],[42.375671,94.152588],[42.374401,94.152344],[42.37154,94.150558],[42.36993,94.14994],[42.368191,94.150368],[42.36639,94.151428],[42.364391,94.152222],[42.36224,94.152328],[42.34985,94.15213],[42.347618,94.152443],[42.345421,94.153099],[42.343281,94.154137],[42.341251,94.155533],[42.33934,94.15728],[42.33762,94.159363],[42.323891,94.17894],[42.299648,94.213142],[42.29924,94.213348],[42.29882,94.213783],[42.292431,94.222908],[42.292061,94.223824],[42.291611,94.224564],[42.26054,94.268501],[42.259979,94.269096],[42.258591,94.268639],[42.25832,94.269371],[42.258259,94.271477],[42.25798,94.272148],[42.221859,94.32328],[42.21785,94.328712],[42.201809,94.351463],[42.186401,94.3731],[42.18565,94.374268],[42.182468,94.378754],[42.17992,94.382103],[42.07518,94.501556],[42.07399,94.503014],[42.071751,94.506172],[42.070728,94.507843],[42.069248,94.510452],[42.05822,94.531387],[42.05555,94.536324],[42.034328,94.57663],[42.028992,94.586594],[42.01165,94.619476],[42.006409,94.629227],[42.002441,94.636864],[41.996479,94.647957],[41.97168,94.694656],[41.970669,94.696457],[41.96846,94.699707],[41.964611,94.704811],[41.961651,94.708549],[41.953011,94.719757],[41.951698,94.721367],[41.93182,94.747139],[41.928169,94.751717],[41.92601,94.754211],[41.917702,94.764259],[41.907219,94.776627],[41.906189,94.778198],[41.905659,94.779518],[41.90535,94.780724],[41.905182,94.781952],[41.905979,94.819061],[41.905891,94.82193],[41.904789,94.824211],[41.896778,94.833511],[41.889599,94.842018],[41.88821,94.843773],[41.886959,94.845734],[41.885899,94.847763],[41.872711,94.87912],[41.87204,94.881699],[41.871601,94.88427],[41.87085,94.886482],[41.86935,94.887657],[41.86618,94.889374],[41.864529,94.890427],[41.854229,94.897636],[41.853321,94.898354],[41.850658,94.900124],[41.845459,94.90377],[41.843231,94.905518],[41.84193,94.906731],[41.834141,94.91481],[41.83263,94.916656],[41.831348,94.918793],[41.830341,94.921066],[41.822659,94.947006],[41.822681,94.946938],[41.821529,94.950897],[41.811859,94.981277],[41.811451,94.982964],[41.811062,94.987167],[41.80801,95.009956],[41.807579,95.012787],[41.803242,95.035828],[41.80278,95.037987],[41.801811,95.039459],[41.800449,95.040283],[41.79937,95.041672],[41.798981,95.043709],[41.798931,95.046043],[41.79929,95.048683],[41.801491,95.056557],[41.807201,95.081543],[41.807819,95.084007],[41.808601,95.086418],[41.81176,95.094139],[41.812141,95.095657],[41.813389,95.102814],[41.81377,95.104523],[41.813801,95.106232],[41.81308,95.107803],[41.805882,95.116547],[41.79686,95.127617],[41.795639,95.128998],[41.795818,95.128799],[41.795311,95.129143],[41.795021,95.12973],[41.794418,95.130508],[41.793739,95.131241],[41.792912,95.131813],[41.791931,95.132187],[41.787621,95.133377],[41.785759,95.134048],[41.783821,95.13443],[41.77948,95.133087],[41.777401,95.133003],[41.769032,95.136383],[41.767269,95.13694],[41.761452,95.13842],[41.759869,95.138908],[41.758209,95.139793],[41.725281,95.170288],[41.716209,95.178574],[41.713089,95.181328],[41.7062,95.186333],[41.70443,95.187531],[41.702549,95.188553],[41.69426,95.191917],[41.69257,95.192741],[41.69117,95.193787],[41.690331,95.194557],[41.685749,95.199341],[41.67609,95.209084],[41.674431,95.210327],[41.67263,95.21125],[41.670658,95.211891],[41.66626,95.213074],[41.664299,95.214027],[41.662991,95.215828],[41.660839,95.219803],[41.65979,95.221008],[41.65844,95.221863],[41.648361,95.225349],[41.646259,95.226189],[41.644218,95.227188],[41.608528,95.247704],[41.60677,95.248993],[41.605129,95.250458],[41.603642,95.25209],[41.55867,95.303436],[41.557178,95.304878],[41.55547,95.306084],[41.5536,95.306976],[41.537659,95.313148],[41.521111,95.319687],[41.503269,95.326576],[41.499722,95.327744],[41.486279,95.331001],[41.483829,95.33149],[41.48151,95.331749],[41.418961,95.336037],[41.41769,95.336189],[41.34993,95.340813],[41.348049,95.341026],[41.346149,95.341423],[41.309109,95.351532],[41.299801,95.353996],[41.295872,95.355118],[41.286308,95.357643],[41.27911,95.359596],[41.267288,95.36293],[41.239849,95.370354],[41.235882,95.371529],[41.23431,95.371887],[41.230549,95.372963],[41.227638,95.37355],[41.210209,95.375168],[41.1908,95.376801],[41.1786,95.377998],[41.171768,95.378571],[41.170151,95.37912],[41.145889,95.396797],[41.144199,95.398277],[41.142658,95.39991],[41.14127,95.401672],[41.125759,95.42276],[41.12434,95.424553],[41.122841,95.426117],[41.121288,95.427467],[41.112598,95.434418],[41.11095,95.435333],[41.107349,95.436142],[41.10556,95.436951],[41.09116,95.448433],[41.089539,95.449463],[41.084831,95.452087],[41.083542,95.45327],[41.082561,95.454788],[41.078522,95.461853],[41.077301,95.463303],[41.075081,95.464668],[41.07473,95.464867],[41.073681,95.465584],[41.072338,95.466461],[41.06773,95.469482],[41.06414,95.472038],[41.061741,95.472977],[41.059601,95.473038],[41.05727,95.472641],[41.04948,95.469711],[41.047211,95.468109],[41.045151,95.467041],[41.043018,95.467041],[41.04055,95.467773],[41.037159,95.469513],[41.035561,95.469711],[41.033291,95.469711],[41.030491,95.469437],[41.028629,95.469437],[41.024899,95.470383],[41.021969,95.470909],[41.020901,95.470711],[41.019501,95.469383],[41.01804,95.468109],[41.015301,95.466637],[41.013241,95.466309],[41.008911,95.465981],[41.00671,95.466309],[41.004841,95.467308],[41.003052,95.468842],[41.000679,95.471848],[40.997429,95.475533],[40.993698,95.478722],[40.941299,95.523643],[40.882931,95.57193],[40.860771,95.59272],[40.852169,95.60096],[40.85096,95.601868],[40.849178,95.602623],[40.84457,95.604057],[40.84127,95.604858],[40.835602,95.606003],[40.832191,95.606857],[40.827271,95.608528],[40.824211,95.60997],[40.818081,95.613297],[40.815659,95.614197],[40.794498,95.620667],[40.79213,95.62159],[40.790161,95.622757],[40.739639,95.653053],[40.683159,95.68631],[40.560768,95.758293],[40.559139,95.75927],[40.557941,95.760551],[40.55727,95.761803],[40.556862,95.763359],[40.55566,95.769852],[40.55521,95.773392],[40.550732,95.791092],[40.5439,95.818512],[40.54306,95.821533],[40.543018,95.821587],[40.540649,95.831047],[40.53907,95.837341],[40.530319,95.872833],[40.529411,95.877419],[40.528881,95.881477],[40.528851,95.881737],[40.528599,95.886452],[40.528671,95.890549],[40.528831,95.892937],[40.529091,95.895401],[40.531139,95.913231],[40.531509,95.916992],[40.532009,95.922897],[40.532108,95.924156],[40.532829,95.935677],[40.533211,95.940323],[40.533291,95.941277],[40.533428,95.942421],[40.533798,95.945557],[40.534019,95.947113],[40.535252,95.954674],[40.53624,95.964233],[40.537189,95.976349],[40.539242,95.992767],[40.539989,96.005859],[40.54044,96.010193],[40.541,96.01384],[40.542919,96.026047],[40.543171,96.028214],[40.54752,96.070686],[40.54813,96.076599],[40.548721,96.084511],[40.549389,96.096077],[40.550598,96.11734],[40.55098,96.121567],[40.551849,96.128128],[40.556881,96.156647],[40.557098,96.158058],[40.557629,96.161926],[40.557949,96.165993],[40.55872,96.179993],[40.560951,96.199028],[40.563648,96.226624],[40.568291,96.274063],[40.56879,96.278961],[40.569698,96.285233],[40.57069,96.290207],[40.571339,96.292847],[40.57394,96.302109],[40.57439,96.30407],[40.574661,96.305313],[40.575359,96.308998],[40.57552,96.309914],[40.575581,96.310371],[40.575699,96.31115],[40.575871,96.312462],[40.576149,96.314682],[40.576519,96.319397],[40.576649,96.32518],[40.576401,96.338333],[40.57526,96.417137],[40.575562,96.426323],[40.576611,96.438957],[40.57682,96.443626],[40.576698,96.448219],[40.576618,96.451401],[40.576591,96.453537],[40.575729,96.465378],[40.575241,96.483818],[40.574841,96.488899],[40.573952,96.494553],[40.570702,96.510117],[40.569939,96.516006],[40.569469,96.522537],[40.569019,96.527107],[40.568401,96.531517],[40.567451,96.536507],[40.566219,96.54361],[40.565731,96.550591],[40.565731,96.553001],[40.566029,96.558853],[40.566509,96.568413],[40.566341,96.575249],[40.565929,96.582329],[40.565948,96.586288],[40.5662,96.590271],[40.566681,96.594307],[40.56736,96.599838],[40.567348,96.608368],[40.56723,96.61602],[40.567322,96.618179],[40.56736,96.618927],[40.56749,96.620659],[40.56765,96.622299],[40.5686,96.630157],[40.568958,96.634697],[40.571991,96.703812],[40.572929,96.710403],[40.575539,96.721573],[40.576149,96.725319],[40.576641,96.731293],[40.576611,96.736549],[40.576099,96.742088],[40.574718,96.750931],[40.574219,96.758362],[40.57423,96.758377],[40.574219,96.758362],[40.574409,96.762466],[40.575451,96.787216],[40.575531,96.792084],[40.5755,96.794434],[40.57523,96.799507],[40.574692,96.804893],[40.574379,96.807129],[40.570881,96.826408],[40.56163,96.876579],[40.559639,96.891777],[40.558578,96.896599],[40.558071,96.89843],[40.556839,96.9021],[40.555069,96.906273],[40.55328,96.909668],[40.540058,96.932861],[40.537289,96.936836],[40.536251,96.938164],[40.53344,96.941261],[40.530682,96.943817],[40.528179,96.94577],[40.5242,96.948303],[40.504028,96.959183],[40.497231,96.96241],[40.477169,96.971222],[40.476452,96.97155],[40.47179,96.973953],[40.467999,96.976357],[40.460899,96.981567],[40.451939,96.988083],[40.448231,96.990463],[40.44437,96.99221],[40.433559,96.996193],[40.428959,96.998672],[40.425781,97.000961],[40.424198,97.002312],[40.406921,97.019852],[40.404881,97.021606],[40.402088,97.023651],[40.40044,97.024658],[40.396702,97.026466],[40.391609,97.028053],[40.38802,97.028587],[40.381908,97.028717],[40.378609,97.02903],[40.375011,97.029701],[40.372089,97.03054],[40.359791,97.034866],[40.35503,97.03727],[40.35025,97.040588],[40.345829,97.044617],[40.341431,97.049957],[40.333191,97.061417],[40.330521,97.06485],[40.327141,97.068367],[40.323559,97.071114],[40.317268,97.075447],[40.31308,97.077667],[40.30891,97.079277],[40.305,97.080132],[40.30098,97.080467],[40.2971,97.080467],[40.293091,97.080917],[40.288311,97.082108],[40.26688,97.089203],[40.261761,97.091362],[40.257099,97.094933],[40.254799,97.097038],[40.237301,97.113998],[40.235271,97.116211],[40.232948,97.119034],[40.22443,97.130653],[40.220871,97.135269],[40.219921,97.136414],[40.217701,97.138802],[40.205471,97.150963],[40.202042,97.154533],[40.200539,97.156303],[40.198158,97.159508],[40.19643,97.162216],[40.194881,97.164932],[40.189041,97.176514],[40.188332,97.177803],[40.186069,97.181587],[40.185371,97.182716],[40.18232,97.18705],[40.175079,97.196701],[40.172459,97.200439],[40.17054,97.203568],[40.164322,97.214851],[40.157082,97.225838],[40.156799,97.226334],[40.155731,97.228149],[40.154251,97.23082],[40.154121,97.231056],[40.153229,97.232811],[40.151112,97.237022],[40.151009,97.237213],[40.150982,97.237267],[40.15041,97.238358],[40.148998,97.240868],[40.148609,97.241547],[40.146091,97.245667],[40.13966,97.255379],[40.138168,97.257477],[40.134159,97.262863],[40.132679,97.264732],[40.132481,97.264969],[40.131519,97.266159],[40.130619,97.26725],[40.125278,97.273499],[40.12468,97.274246],[40.124599,97.274353],[40.12376,97.275459],[40.123138,97.276314],[40.12138,97.278954],[40.11932,97.282463],[40.11787,97.285347],[40.11655,97.2883],[40.11364,97.29567],[40.112259,97.298973],[40.11026,97.303169],[40.108639,97.30616],[40.105339,97.311546],[40.103359,97.314743],[40.102581,97.315987],[40.0993,97.32074],[40.09594,97.324959],[40.0928,97.328407],[40.06662,97.353867],[40.065639,97.354958],[40.064789,97.355988],[40.063549,97.357536],[40.061871,97.359947],[40.06131,97.360832],[40.05941,97.364128],[40.058689,97.36557],[40.057331,97.368607],[40.05637,97.371147],[40.055241,97.374786],[40.05481,97.376282],[40.053959,97.380447],[40.05278,97.388863],[40.05191,97.393333],[40.050781,97.397476],[40.049431,97.401314],[40.047131,97.406311],[40.045422,97.409241],[40.042198,97.414253],[40.040081,97.417473],[40.037971,97.421021],[40.036121,97.424217],[40.034519,97.427292],[40.034119,97.428253],[40.03228,97.431709],[40.032021,97.43222],[40.029869,97.437187],[40.028511,97.441032],[40.025341,97.452019],[40.024109,97.455811],[40.023418,97.457764],[40.022968,97.458961],[40.02103,97.463692],[40.02071,97.464432],[40.013981,97.47892],[40.0061,97.496628],[40.00304,97.503929],[40.000721,97.509857],[39.995461,97.523727],[39.993599,97.52903],[39.990631,97.53772],[39.989929,97.539772],[39.98962,97.540733],[39.98864,97.543823],[39.988411,97.544548],[39.986259,97.552422],[39.98164,97.571747],[39.97945,97.579453],[39.979401,97.57962],[39.979351,97.579788],[39.979118,97.580513],[39.97887,97.581322],[39.976971,97.587341],[39.97562,97.59185],[39.974819,97.594749],[39.96983,97.615303],[39.96867,97.621437],[39.967949,97.626289],[39.96727,97.630531],[39.967091,97.631401],[39.96701,97.631737],[39.966751,97.63295],[39.966461,97.634132],[39.965889,97.6362],[39.964611,97.64003],[39.96413,97.641243],[39.96328,97.643227],[39.961391,97.647102],[39.95739,97.655563],[39.956459,97.657761],[39.952839,97.667587],[39.951511,97.671204],[39.950329,97.673973],[39.94931,97.676064],[39.948441,97.677696],[39.947762,97.678322],[39.947701,97.679047],[39.945889,97.682449],[39.945339,97.683403],[39.942699,97.687782],[39.940701,97.691788],[39.940109,97.693176],[39.93856,97.697433],[39.937222,97.702263],[39.93539,97.708588],[39.93507,97.709503],[39.933929,97.712547],[39.931839,97.717484],[39.92952,97.723167],[39.926521,97.73188],[39.922089,97.748093],[39.920631,97.752792],[39.920231,97.753883],[39.918991,97.757027],[39.916229,97.762711],[39.9146,97.765404],[39.905449,97.779282],[39.90078,97.786346],[39.90041,97.786903],[39.900028,97.787529],[39.899231,97.788834],[39.897919,97.791153],[39.897499,97.791946],[39.896629,97.793671],[39.896309,97.794373],[39.896091,97.794868],[39.894321,97.799217],[39.891281,97.808968],[39.889759,97.813011],[39.88876,97.81517],[39.886631,97.819153],[39.883789,97.823463],[39.883369,97.824059],[39.879879,97.829247],[39.87809,97.832474],[39.876228,97.836693],[39.875481,97.838623],[39.875309,97.839104],[39.874962,97.840103],[39.874771,97.840714],[39.874722,97.840858],[39.874321,97.842209],[39.87315,97.847214],[39.872742,97.849541],[39.872719,97.849663],[39.871429,97.857353],[39.870522,97.862541],[39.87038,97.863327],[39.869308,97.869034],[39.86927,97.869331],[39.868679,97.872292],[39.868259,97.874458],[39.868149,97.875038],[39.867668,97.877579],[39.867458,97.878647],[39.867161,97.880318],[39.86507,97.893143],[39.864841,97.894348],[39.86422,97.897163],[39.863911,97.898407],[39.863331,97.900642],[39.862461,97.903877],[39.861549,97.907227],[39.860451,97.910782],[39.859531,97.913383],[39.859241,97.914131],[39.85743,97.918419],[39.854691,97.92511],[39.85107,97.93644],[39.84874,97.942169],[39.842659,97.954224],[39.840599,97.958992],[39.839581,97.961853],[39.839069,97.963516],[39.838879,97.964233],[39.8386,97.965218],[39.838329,97.966293],[39.837719,97.969017],[39.83675,97.975533],[39.836411,97.980408],[39.835941,97.993233],[39.835751,97.995903],[39.835651,97.996964],[39.835098,98.001427],[39.83408,98.007278],[39.831661,98.019257],[39.830971,98.021942],[39.830681,98.022926],[39.830608,98.023193],[39.829281,98.027473],[39.827961,98.031921],[39.82518,98.042007],[39.825031,98.042557],[39.824108,98.045792],[39.823841,98.046638],[39.823441,98.047951],[39.82259,98.050499],[39.821659,98.053322],[39.821201,98.054817],[39.821121,98.055061],[39.8181,98.065804],[39.81255,98.082474],[39.808788,98.093147],[39.802261,98.115982],[39.801849,98.117073],[39.80143,98.118294],[39.800541,98.119141],[39.79985,98.119301],[39.799099,98.119057],[39.79842,98.118523],[39.796982,98.117729],[39.797039,98.118134],[39.79652,98.124336],[39.795589,98.126411],[39.795639,98.127251],[39.79586,98.127724],[39.796619,98.128571],[39.797409,98.129433],[39.798111,98.130386],[39.798328,98.130989],[39.798359,98.131729],[39.798031,98.133743],[39.79755,98.134857],[39.797009,98.135643],[39.796982,98.135674],[39.795631,98.137154],[39.793541,98.139603],[39.792252,98.141647],[39.791519,98.143112],[39.790741,98.145149],[39.79002,98.147614],[39.78804,98.154617],[39.780701,98.180634],[39.780441,98.182091],[39.780369,98.184196],[39.780418,98.184914],[39.78051,98.18557],[39.780621,98.186218],[39.780739,98.186783],[39.780972,98.187592],[39.781261,98.188377],[39.78223,98.190567],[39.783298,98.192757],[39.78352,98.193237],[39.784309,98.195053],[39.784859,98.196823],[39.785831,98.202904],[39.786282,98.204277],[39.78849,98.208946],[39.789669,98.211243],[39.790169,98.212196],[39.790649,98.213097],[39.795959,98.22258],[39.796169,98.223091],[39.79623,98.223351],[39.796291,98.223663],[39.79631,98.224037],[39.79631,98.224358],[39.796169,98.225693],[39.796021,98.227623],[39.795841,98.230141],[39.795841,98.23053],[39.79583,98.230713],[39.79578,98.231667],[39.795582,98.233299],[39.795071,98.242218],[39.794651,98.248848],[39.794151,98.250504],[39.79324,98.256889],[39.791481,98.268311],[39.788021,98.290779],[39.787079,98.297058],[39.786751,98.299362],[39.786461,98.301552],[39.786091,98.303917],[39.78603,98.304298],[39.785851,98.305321],[39.785561,98.306793],[39.785389,98.307648],[39.785061,98.309273],[39.784409,98.312523],[39.783039,98.321411],[39.782021,98.326538],[39.78178,98.327927],[39.78056,98.335876],[39.780079,98.339653],[39.779881,98.340431],[39.77956,98.34304],[39.77919,98.345444],[39.779011,98.347023],[39.778999,98.347427],[39.778149,98.352997],[39.777851,98.354439],[39.777699,98.356102],[39.776501,98.364517],[39.77597,98.367798],[39.77401,98.378723],[39.773579,98.380791],[39.770519,98.391006],[39.769279,98.395576],[39.76878,98.397713],[39.768452,98.39946],[39.767502,98.403862],[39.766529,98.408043],[39.765881,98.410362],[39.765621,98.41169],[39.76543,98.413017],[39.765171,98.415977],[39.76498,98.417648],[39.764271,98.422722],[39.764061,98.424698],[39.763851,98.427673],[39.763199,98.432503],[39.76268,98.440178],[39.76162,98.446182],[39.76141,98.447723],[39.761269,98.451622],[39.761139,98.452782],[39.760559,98.456367],[39.760319,98.458473],[39.76017,98.463516],[39.760139,98.469017],[39.759861,98.482643],[39.759819,98.487099],[39.759769,98.487679],[39.759571,98.488739],[39.7593,98.489487],[39.75909,98.489853],[39.75882,98.490143],[39.752739,98.493233],[39.752029,98.493523],[39.748878,98.495064],[39.738289,98.500366],[39.737671,98.500641],[39.736931,98.500282],[39.736752,98.500252],[39.73658,98.500671],[39.73679,98.50193],[39.736031,98.507088],[39.736031,98.507393],[39.735859,98.508347],[39.735641,98.50882],[39.7356,98.509163],[39.735699,98.509377],[39.735691,98.509933],[39.734879,98.515533],[39.734459,98.517387],[39.73423,98.518143],[39.73349,98.519363],[39.731339,98.522148],[39.7281,98.52726],[39.726971,98.529518],[39.72406,98.536087],[39.723068,98.540077],[39.71999,98.550377],[39.716782,98.56115],[39.71537,98.565041],[39.714031,98.566704],[39.713058,98.567459],[39.712219,98.569153],[39.71146,98.570107],[39.710419,98.571487],[39.70673,98.576279],[39.702721,98.58242],[39.69894,98.586761],[39.697819,98.588203],[39.684139,98.604286],[39.683121,98.605476],[39.68119,98.608124],[39.64846,98.658203],[39.644569,98.662773],[39.643269,98.664513],[39.643261,98.664833],[39.640518,98.667847],[39.607601,98.703133],[39.603149,98.708679],[39.601139,98.711227],[39.600971,98.711632],[39.59441,98.719849],[39.593201,98.721451],[39.59219,98.723343],[39.58913,98.733551],[39.587379,98.740196],[39.585281,98.747566],[39.586021,98.747627],[39.58485,98.749229],[39.582649,98.756844],[39.5784,98.772346],[39.576038,98.780312],[39.576111,98.780357],[39.574329,98.787033],[39.571388,98.82679],[39.571251,98.831139],[39.571301,98.872383],[39.571121,98.874039],[39.566021,98.892883],[39.565189,98.89576],[39.564991,98.895973],[39.562901,98.903687],[39.562199,98.905434],[39.561409,98.907211],[39.55806,98.91468],[39.55444,98.923119],[39.551739,98.928078],[39.550549,98.929718],[39.549809,98.930473],[39.543041,98.936996],[39.538151,98.939117],[39.5303,98.942497],[39.52425,98.944443],[39.522961,98.944969],[39.503269,98.959221],[39.49918,98.962677],[39.491112,98.96904],[39.488869,98.970703],[39.48769,98.971458],[39.474831,98.977982],[39.465591,98.982658],[39.464249,98.982803],[39.463219,98.98259],[39.44043,98.976547],[39.435268,98.975197],[39.430759,98.975433],[39.425461,98.975754],[39.419109,98.976158],[39.41626,98.976799],[39.41169,98.978249],[39.4104,98.978859],[39.409111,98.979713],[39.4021,98.985313],[39.380379,99.001549],[39.378712,99.00293],[39.372959,99.013206],[39.37006,99.019577],[39.368221,99.028664],[39.36755,99.030533],[39.365459,99.035042],[39.364899,99.036003],[39.363689,99.03862],[39.363079,99.040916],[39.363289,99.041077],[39.36293,99.042053],[39.363091,99.042236],[39.361801,99.045723],[39.359161,99.054321],[39.357269,99.060623],[39.356419,99.063431],[39.355801,99.069542],[39.35556,99.072449],[39.35223,99.082733],[39.35083,99.087013],[39.350349,99.089203],[39.349941,99.091743],[39.34956,99.092812],[39.348621,99.093613],[39.34539,99.09465],[39.344879,99.094971],[39.34433,99.095482],[39.343491,99.09729],[39.341419,99.103348],[39.341179,99.104057],[39.34127,99.104378],[39.340809,99.105591],[39.340618,99.106758],[39.34029,99.111366],[39.339458,99.122627],[39.339291,99.125473],[39.339031,99.125504],[39.339062,99.128487],[39.338871,99.13018],[39.33667,99.143822],[39.336281,99.145317],[39.32988,99.160294],[39.322922,99.176064],[39.321411,99.179459],[39.320782,99.180527],[39.318958,99.183006],[39.318039,99.184242],[39.317589,99.185204],[39.317451,99.185966],[39.317371,99.193848],[39.317188,99.195152],[39.31657,99.19735],[39.316299,99.198288],[39.315861,99.19986],[39.308239,99.227097],[39.296791,99.268066],[39.28944,99.29332],[39.28841,99.296143],[39.28421,99.303787],[39.280941,99.309776],[39.279888,99.311493],[39.275028,99.316841],[39.27433,99.318031],[39.272221,99.323334],[39.268768,99.333458],[39.26857,99.333878],[39.267639,99.335373],[39.26635,99.336998],[39.257931,99.347504],[39.257141,99.34848],[39.255829,99.350327],[39.254318,99.353149],[39.253361,99.35553],[39.23188,99.428017],[39.229439,99.436272],[39.22887,99.43763],[39.22739,99.439957],[39.227379,99.439842],[39.227371,99.440033],[39.224831,99.45179],[39.224781,99.453484],[39.22506,99.455002],[39.226871,99.460564],[39.2272,99.461502],[39.23122,99.469063],[39.232792,99.472069],[39.235748,99.478867],[39.235939,99.479828],[39.236271,99.48394],[39.236511,99.485748],[39.236938,99.48687],[39.237652,99.487846],[39.238331,99.488426],[39.238541,99.488548],[39.243401,99.489937],[39.24633,99.490753],[39.248489,99.491364],[39.249229,99.491653],[39.250969,99.492699],[39.25309,99.494164],[39.25983,99.497643],[39.261341,99.498772],[39.26313,99.498993],[39.263592,99.499229],[39.263969,99.499763],[39.264339,99.502136],[39.264141,99.505539],[39.26405,99.506943],[39.263851,99.509521],[39.263149,99.512421],[39.263081,99.513512],[39.26321,99.529457],[39.26326,99.543068],[39.265942,99.56086],[39.26627,99.562759],[39.266659,99.563828],[39.273312,99.579262],[39.276791,99.585587],[39.278049,99.588112],[39.27961,99.591179],[39.281841,99.596123],[39.28392,99.60022],[39.284031,99.600441],[39.284969,99.602753],[39.28653,99.607536],[39.292389,99.616859],[39.295189,99.621613],[39.296101,99.62326],[39.298328,99.627823],[39.3046,99.639008],[39.306141,99.642014],[39.30703,99.6437],[39.308552,99.646027],[39.309608,99.647614],[39.310169,99.648857],[39.311272,99.651543],[39.311722,99.653023],[39.314941,99.665878],[39.317089,99.671997],[39.325272,99.695152],[39.32645,99.698471],[39.329399,99.706573],[39.33012,99.709038],[39.330921,99.713821],[39.331009,99.715332],[39.330898,99.717041],[39.330791,99.718712],[39.330509,99.720238],[39.32444,99.733963],[39.321629,99.743492],[39.321362,99.745087],[39.32066,99.749489],[39.320358,99.750679],[39.319859,99.75238],[39.318211,99.756866],[39.315269,99.763817],[39.314651,99.765297],[39.3125,99.77124],[39.31179,99.773804],[39.307232,99.798157],[39.30724,99.798363],[39.30624,99.802261],[39.30579,99.803619],[39.304039,99.806503],[39.303089,99.808601],[39.301231,99.813339],[39.29937,99.818626],[39.29678,99.824249],[39.296059,99.825783],[39.293911,99.835258],[39.292961,99.837967],[39.29208,99.841263],[39.290489,99.84359],[39.289532,99.846039],[39.289379,99.847412],[39.289509,99.847923],[39.28949,99.851601],[39.289471,99.851898],[39.289619,99.854874],[39.289989,99.858093],[39.29121,99.868439],[39.29097,99.882759],[39.290371,99.885643],[39.289841,99.887009],[39.287552,99.891113],[39.286179,99.893799],[39.280209,99.907257],[39.279621,99.90831],[39.278042,99.910347],[39.275551,99.913368],[39.26358,99.931847],[39.247608,99.94902],[39.23772,99.959663],[39.233768,99.964027],[39.23381,99.964043],[39.232891,99.964813],[39.231831,99.965424],[39.229019,99.966759],[39.225101,99.967987],[39.223831,99.968613],[39.22287,99.969307],[39.221859,99.970322],[39.219028,99.973518],[39.217831,99.97477],[39.21484,99.977562],[39.21381,99.978691],[39.212311,99.981117],[39.211529,99.982117],[39.19817,99.993927],[39.19735,99.994827],[39.196949,99.995842],[39.196239,100.002251],[39.195889,100.00692],[39.19577,100.009262],[39.195641,100.010391],[39.19548,100.011673],[39.195061,100.01268],[39.193489,100.014412],[39.19268,100.015167],[39.192551,100.015137],[39.19252,100.01532],[39.19136,100.016487],[39.188541,100.019142],[39.18771,100.019958],[39.186081,100.02076],[39.182491,100.021347],[39.181751,100.021812],[39.181061,100.022751],[39.179779,100.025513],[39.17931,100.026199],[39.177872,100.028793],[39.177399,100.029953],[39.177029,100.031303],[39.176819,100.033096],[39.17691,100.037521],[39.176941,100.039017],[39.176842,100.043663],[39.175491,100.048759],[39.1749,100.050201],[39.174461,100.051987],[39.173759,100.055367],[39.172501,100.060173],[39.172588,100.060211],[39.172401,100.06073],[39.173038,100.069504],[39.17247,100.071899],[39.17226,100.073692],[39.17321,100.080002],[39.173149,100.081558],[39.173031,100.082077],[39.17268,100.083633],[39.172081,100.086273],[39.172218,100.086403],[39.171829,100.086838],[39.169621,100.091873],[39.1684,100.095497],[39.167149,100.098007],[39.16608,100.099167],[39.164761,100.100052],[39.16383,100.100693],[39.161388,100.10215],[39.16087,100.102692],[39.160172,100.103897],[39.157539,100.112488],[39.156929,100.113617],[39.156281,100.11451],[39.154079,100.11734],[39.153561,100.118408],[39.15316,100.119682],[39.15292,100.122673],[39.153061,100.123978],[39.154091,100.125526],[39.15649,100.128166],[39.157162,100.129143],[39.157452,100.130127],[39.156582,100.138634],[39.15657,100.138817],[39.156021,100.142693],[39.15493,100.14962],[39.15379,100.154404],[39.152962,100.157829],[39.151051,100.167427],[39.150871,100.167763],[39.147491,100.171143],[39.14727,100.171333],[39.14608,100.172897],[39.145721,100.173111],[39.143879,100.175812],[39.139511,100.181587],[39.138802,100.182419],[39.136372,100.184402],[39.135288,100.185448],[39.131851,100.192169],[39.131569,100.193153],[39.131149,100.197807],[39.130459,100.201263],[39.130039,100.202682],[39.127258,100.208557],[39.125149,100.213287],[39.121849,100.219254],[39.12056,100.221153],[39.117352,100.224907],[39.1129,100.232071],[39.112129,100.233353],[39.111488,100.234528],[39.110161,100.238693],[39.108261,100.24482],[39.106621,100.253532],[39.10601,100.255219],[39.099529,100.265472],[39.097809,100.267929],[39.09132,100.274979],[39.08886,100.278084],[39.08638,100.282143],[39.085449,100.283142],[39.083241,100.285378],[39.08152,100.287308],[39.079159,100.29039],[39.07848,100.290787],[39.077999,100.291763],[39.07642,100.293739],[39.074471,100.296593],[39.072319,100.299248],[39.07132,100.300247],[39.06966,100.301903],[39.057961,100.314529],[39.05022,100.322197],[39.04755,100.324883],[39.046558,100.325798],[39.043289,100.327919],[39.042301,100.328537],[39.041359,100.329247],[39.04044,100.330383],[39.03764,100.336403],[39.037201,100.337173],[39.031891,100.344978],[39.03001,100.347763],[39.01815,100.358269],[39.017208,100.359367],[39.014439,100.363419],[39.011909,100.366524],[39.011131,100.367569],[39.009892,100.370148],[39.009491,100.371307],[39.009411,100.37294],[39.009701,100.374458],[39.009899,100.376793],[39.009682,100.378067],[39.009171,100.379158],[39.00856,100.379959],[39.00684,100.381622],[39.006271,100.382782],[39.003311,100.390747],[39.000702,100.395638],[38.99966,100.398117],[38.99839,100.401466],[38.997978,100.402969],[38.997711,100.404762],[38.997398,100.406532],[38.996571,100.408501],[38.995571,100.410332],[38.995041,100.411652],[38.994362,100.414619],[38.994259,100.416],[38.994469,100.417084],[38.996239,100.421806],[38.996651,100.423264],[38.996609,100.428879],[38.996151,100.43045],[38.99585,100.430832],[38.991089,100.435509],[38.99017,100.435982],[38.989288,100.435959],[38.985409,100.434433],[38.980579,100.432991],[38.979401,100.433357],[38.97773,100.434357],[38.975861,100.437202],[38.974949,100.437912],[38.972141,100.438797],[38.960949,100.43602],[38.95298,100.433403],[38.95216,100.433128],[38.95126,100.432938],[38.95063,100.433144],[38.94836,100.434303],[38.942612,100.437157],[38.941761,100.437927],[38.938251,100.44165],[38.93692,100.443031],[38.9352,100.443413],[38.93541,100.444107],[38.935711,100.44725],[38.93644,100.452507],[38.93647,100.453751],[38.936588,100.45488],[38.936989,100.461548],[38.937401,100.465958],[38.937389,100.467453],[38.937469,100.468674],[38.937469,100.470398],[38.937439,100.472549],[38.937401,100.47464],[38.93734,100.477226],[38.937359,100.480133],[38.937489,100.482933],[38.937889,100.488083],[38.937908,100.488579],[38.93792,100.488907],[38.937729,100.488991],[38.934582,100.488632],[38.927471,100.487907],[38.92429,100.487694],[38.92131,100.487503],[38.918362,100.487297],[38.915371,100.487099],[38.911781,100.486893],[38.9081,100.486671],[38.906281,100.486549],[38.905769,100.486267],[38.905651,100.486282],[38.905361,100.486313],[38.905312,100.486366],[38.90453,100.487389],[38.903542,100.4888],[38.897739,100.496407],[38.894131,100.499657],[38.89225,100.500999],[38.888939,100.503441],[38.885078,100.50631],[38.878761,100.511673],[38.877159,100.51358],[38.87524,100.515968],[38.87027,100.52195],[38.860298,100.534897],[38.85957,100.537666],[38.85746,100.541687],[38.85574,100.54493],[38.854431,100.547401],[38.853851,100.548477],[38.853451,100.54921],[38.8521,100.551849],[38.851349,100.553253],[38.85001,100.555794],[38.84811,100.559349],[38.846142,100.563026],[38.84539,100.564133],[38.8442,100.565521],[38.839249,100.569122],[38.83136,100.571358],[38.83297,100.576851],[38.82534,100.582687],[38.81625,100.590927],[38.796181,100.60878],[38.763531,100.63195],[38.754429,100.637619],[38.725109,100.655472],[38.708359,100.664742],[38.70488,100.667488],[38.702068,100.670227],[38.688271,100.686203],[38.687061,100.687569],[38.676609,100.705421],[38.675941,100.706451],[38.66629,100.71315],[38.667099,100.716751],[38.6675,100.720528],[38.667759,100.723961],[38.672321,100.771339],[38.655701,100.774429],[38.61655,100.780777],[38.531059,100.795723],[38.483768,100.804131],[38.480141,100.805328],[38.47905,100.805946],[38.468189,100.812027],[38.46254,100.814774],[38.459721,100.815804],[38.448559,100.818031],[38.446949,100.818893],[38.445869,100.820427],[38.443581,100.8237],[38.441841,100.82576],[38.44009,100.82679],[38.43874,100.827637],[38.43565,100.829018],[38.416019,100.837936],[38.360451,100.86335],[38.358158,100.864899],[38.33218,100.886353],[38.31292,100.896477],[38.31076,100.897339],[38.305241,100.898201],[38.302811,100.898888],[38.277481,100.908836],[38.27182,100.911423],[38.267109,100.914162],[38.263329,100.916908],[38.240681,100.934937],[38.23893,100.935966],[38.230438,100.937851],[38.22525,100.938667],[38.22401,100.938904],[38.21764,100.940109],[38.215462,100.939423],[38.214828,100.939209],[38.21431,100.938957],[38.201801,100.93528],[38.20174,100.935257],[38.200401,100.934982],[38.194172,100.932129],[38.19355,100.932167],[38.191509,100.932266],[38.189819,100.932564],[38.188801,100.933067],[38.187191,100.933891],[38.183262,100.935593],[38.18232,100.93589],[38.18116,100.936142],[38.179989,100.936096],[38.178612,100.935837],[38.176151,100.935226],[38.17593,100.935158],[38.17543,100.935127],[38.17474,100.935226],[38.174381,100.935333],[38.173191,100.935997],[38.170811,100.938019],[38.169861,100.938141],[38.169529,100.938133],[38.16922,100.938057],[38.168282,100.936287],[38.166069,100.937134],[38.166561,100.93586],[38.16634,100.935364],[38.16626,100.934853],[38.165741,100.934723],[38.16497,100.93383],[38.162579,100.934982],[38.162231,100.93528],[38.161411,100.936569],[38.161209,100.936867],[38.16053,100.937439],[38.16029,100.937447],[38.15947,100.936722],[38.158779,100.936073],[38.15852,100.93576],[38.153389,100.931503],[38.152328,100.93026],[38.151409,100.928841],[38.1483,100.923149],[38.14677,100.922836],[38.14465,100.922813],[38.13913,100.922333],[38.138729,100.921997],[38.137669,100.920853],[38.13485,100.920441],[38.133919,100.920181],[38.133221,100.920242],[38.132881,100.920341],[38.126369,100.917053],[38.125771,100.917122],[38.12159,100.91671],[38.118771,100.917053],[38.11718,100.916672],[38.11676,100.91642],[38.11602,100.916412],[38.114201,100.916252],[38.113411,100.916367],[38.113071,100.916458],[38.113041,100.916473],[38.112598,100.916527],[38.112209,100.916611],[38.110981,100.917023],[38.11047,100.917229],[38.108398,100.917892],[38.105492,100.918831],[38.10294,100.919861],[38.101051,100.921097],[38.099892,100.921783],[38.09866,100.922501],[38.096241,100.920647],[38.095921,100.920799],[38.09502,100.921738],[38.09444,100.922363],[38.094238,100.922523],[38.092918,100.922768],[38.092659,100.922768],[38.091438,100.922371],[38.091202,100.92234],[38.09095,100.922371],[38.089951,100.92292],[38.089588,100.922997],[38.087589,100.922287],[38.086342,100.921783],[38.086128,100.921959],[38.085819,100.922127],[38.085381,100.922028],[38.08466,100.921509],[38.08456,100.921089],[38.084301,100.920227],[38.084221,100.920036],[38.08353,100.918831],[38.082909,100.91761],[38.08292,100.917099],[38.083038,100.916718],[38.083771,100.915039],[38.083309,100.911873],[38.0812,100.912231],[38.079781,100.910057],[38.077671,100.908447],[38.07642,100.907082],[38.075939,100.907028],[38.075169,100.906967],[38.073582,100.906807],[38.073139,100.906593],[38.072418,100.905533],[38.07119,100.903549],[38.070061,100.902039],[38.069592,100.901604],[38.069229,100.90123],[38.069118,100.901176],[38.068958,100.901093],[38.068691,100.900917],[38.066059,100.89875],[38.06493,100.896889],[38.064602,100.896294],[38.064362,100.895851],[38.064049,100.894623],[38.063911,100.894112],[38.06369,100.893761],[38.063389,100.893471],[38.061901,100.89257],[38.061508,100.892326],[38.061089,100.892036],[38.060539,100.891502],[38.06015,100.891083],[38.060131,100.89106],[38.05999,100.890923],[38.05806,100.889229],[38.057362,100.888283],[38.057281,100.888191],[38.056889,100.887894],[38.056358,100.887466],[38.055229,100.886688],[38.05442,100.886139],[38.053909,100.886078],[38.05283,100.886497],[38.050999,100.887207],[38.04887,100.887001],[38.047798,100.886871],[38.04686,100.887138],[38.04538,100.887756],[38.044159,100.888252],[38.042259,100.888908],[38.040859,100.889023],[38.039219,100.888992],[38.03812,100.889374],[38.035961,100.89048],[38.035191,100.891068],[38.033932,100.892174],[38.032829,100.893143],[38.0313,100.894478],[38.03019,100.89547],[38.029259,100.896149],[38.02895,100.896317],[38.028,100.8964],[38.02663,100.896248],[38.025509,100.896248],[38.024231,100.896317],[38.02322,100.896011],[38.021809,100.895432],[38.02076,100.89502],[38.01973,100.894882],[38.018162,100.894783],[38.016579,100.894653],[38.01572,100.894791],[38.014729,100.895241],[38.013451,100.895851],[38.01292,100.896111],[38.012611,100.896347],[38.0116,100.897499],[38.01049,100.898743],[38.009499,100.89991],[38.00872,100.901077],[38.007912,100.902313],[38.007401,100.903084],[38.006409,100.904556],[38.005939,100.90535],[38.00589,100.90554],[38.005859,100.906082],[38.006119,100.907249],[38.00631,100.907837],[38.006321,100.908043],[38.006199,100.908684],[38.005638,100.909477],[38.004921,100.909714],[38.004341,100.909889],[38.004211,100.909973],[38.00399,100.910172],[38.00354,100.910957],[38.00296,100.912216],[38.002159,100.913986],[38.001869,100.914558],[38.00148,100.915024],[38.000629,100.915543],[38.000141,100.916023],[38.000061,100.916191],[37.999931,100.916763],[37.99995,100.917664],[37.99976,100.918251],[37.999069,100.91922],[37.998081,100.920486],[37.994629,100.922951],[37.993259,100.923653],[37.992119,100.92395],[37.991749,100.924187],[37.991718,100.924271],[37.992081,100.924622],[37.992352,100.924583],[37.993462,100.924759],[37.994831,100.925262],[37.99577,100.925636],[37.995949,100.925858],[37.995369,100.926323],[37.994511,100.92617],[37.99313,100.926003],[37.991619,100.926338],[37.98933,100.927071],[37.988651,100.927277],[37.987629,100.927383],[37.986462,100.927254],[37.985901,100.927437],[37.985729,100.927917],[37.985729,100.928139],[37.985909,100.929626],[37.985851,100.929916],[37.98558,100.929962],[37.985111,100.929047],[37.98457,100.92804],[37.9841,100.927498],[37.983879,100.927353],[37.98291,100.927193],[37.981701,100.927467],[37.98,100.927994],[37.978321,100.928558],[37.976299,100.929497],[37.973499,100.930946],[37.97234,100.931587],[37.970921,100.932564],[37.969349,100.933693],[37.968651,100.934273],[37.96822,100.934914],[37.967701,100.935738],[37.966919,100.936974],[37.965889,100.938133],[37.96278,100.941231],[37.95332,100.950447],[37.95113,100.952316],[37.948059,100.954712],[37.946251,100.956261],[37.942341,100.960251],[37.940208,100.962517],[37.938641,100.964043],[37.925011,100.976463],[37.923859,100.977821],[37.912819,100.993507],[37.91153,100.995216],[37.906441,101.00177],[37.902988,101.006012],[37.897812,101.012581],[37.895741,101.015099],[37.894581,101.016342],[37.893471,101.017319],[37.886219,101.022598],[37.884129,101.0242],[37.882912,101.02549],[37.876579,101.034492],[37.87384,101.037201],[37.87289,101.038643],[37.871059,101.042099],[37.869381,101.045097],[37.865761,101.050629],[37.86404,101.053368],[37.861839,101.05851],[37.86116,101.060448],[37.860329,101.064133],[37.860329,101.065292],[37.8606,101.065331],[37.86047,101.066803],[37.86034,101.069008],[37.86026,101.069633],[37.860062,101.070129],[37.859489,101.070717],[37.85928,101.070801],[37.85873,101.070824],[37.85714,101.070374],[37.855881,101.070053],[37.855511,101.070183],[37.85537,101.070267],[37.854889,101.070847],[37.854771,101.07119],[37.854061,101.072327],[37.85331,101.073563],[37.85252,101.074989],[37.85228,101.075417],[37.85191,101.076263],[37.851521,101.077271],[37.850632,101.080223],[37.85051,101.080566],[37.8503,101.081352],[37.849998,101.082458],[37.84977,101.083717],[37.849621,101.084793],[37.849548,101.085373],[37.849491,101.085854],[37.849098,101.08725],[37.848598,101.088982],[37.847919,101.091454],[37.847698,101.093063],[37.84763,101.09433],[37.847599,101.094627],[37.84753,101.095673],[37.847462,101.096786],[37.847321,101.098503],[37.847118,101.099922],[37.846741,101.101959],[37.846489,101.103348],[37.846371,101.104027],[37.846199,101.104767],[37.8461,101.105431],[37.845741,101.10656],[37.84515,101.107933],[37.844719,101.109108],[37.84457,101.110367],[37.844479,101.112419],[37.844398,101.114662],[37.844311,101.115028],[37.84383,101.115433],[37.843449,101.115288],[37.842651,101.114532],[37.84185,101.11367],[37.840961,101.112709],[37.840488,101.112244],[37.840469,101.11219],[37.840439,101.112259],[37.840351,101.112129],[37.84013,101.111938],[37.839489,101.111588],[37.83905,101.111526],[37.83865,101.111588],[37.8381,101.111923],[37.8377,101.112373],[37.837238,101.113403],[37.8367,101.114769],[37.836479,101.115669],[37.8363,101.117081],[37.83577,101.12207],[37.835499,101.124001],[37.835121,101.125214],[37.834309,101.127197],[37.833679,101.129219],[37.833359,101.130989],[37.83305,101.133148],[37.83321,101.134811],[37.833881,101.137657],[37.834099,101.138351],[37.834702,101.13916],[37.83567,101.139702],[37.836121,101.139923],[37.836418,101.140373],[37.83614,101.140572],[37.835178,101.140648],[37.83382,101.140762],[37.832279,101.14077],[37.830601,101.140587],[37.82917,101.140778],[37.827431,101.140717],[37.825581,101.140388],[37.82452,101.1399],[37.823139,101.139297],[37.82214,101.139259],[37.821178,101.139618],[37.819019,101.140663],[37.817181,101.141411],[37.816669,101.141617],[37.815929,101.142174],[37.814751,101.143822],[37.813019,101.146439],[37.811901,101.148109],[37.811069,101.148567],[37.809551,101.148941],[37.807381,101.149544],[37.806061,101.150299],[37.804459,101.151299],[37.804119,101.151428],[37.80278,101.151962],[37.801182,101.152908],[37.798481,101.154587],[37.79567,101.156326],[37.795521,101.156441],[37.794899,101.157471],[37.793388,101.160606],[37.792149,101.163231],[37.791801,101.164368],[37.791191,101.167183],[37.790531,101.170303],[37.789902,101.173157],[37.789532,101.173958],[37.788589,101.17514],[37.787369,101.176498],[37.786541,101.177071],[37.785759,101.177933],[37.78442,101.179588],[37.783279,101.181313],[37.782421,101.183456],[37.7813,101.186394],[37.780449,101.188187],[37.779011,101.190361],[37.777809,101.191879],[37.77594,101.193947],[37.774529,101.194939],[37.772461,101.196312],[37.770329,101.197906],[37.7682,101.200546],[37.76577,101.203506],[37.76276,101.207207],[37.760689,101.210091],[37.75843,101.213463],[37.757191,101.215767],[37.755589,101.219109],[37.75441,101.222031],[37.753521,101.223457],[37.752949,101.224693],[37.752522,101.226517],[37.751942,101.228729],[37.751259,101.230072],[37.749901,101.232407],[37.749359,101.233803],[37.74844,101.236168],[37.7481,101.236839],[37.746868,101.238503],[37.745739,101.239891],[37.745441,101.240372],[37.74519,101.241577],[37.745049,101.24324],[37.744511,101.244423],[37.743649,101.246094],[37.742661,101.247627],[37.74091,101.249893],[37.739029,101.252281],[37.73679,101.255127],[37.734909,101.257561],[37.733028,101.260033],[37.732281,101.261452],[37.730949,101.264313],[37.730011,101.265556],[37.72863,101.266953],[37.727772,101.26783],[37.727531,101.268387],[37.727402,101.270111],[37.72736,101.27079],[37.727242,101.271141],[37.727051,101.271507],[37.726719,101.272079],[37.726391,101.272667],[37.725971,101.273331],[37.725208,101.274597],[37.724411,101.275932],[37.723999,101.277107],[37.723961,101.278053],[37.72422,101.279388],[37.724289,101.279747],[37.724159,101.28093],[37.723862,101.281448],[37.722301,101.283569],[37.721378,101.284973],[37.720901,101.286507],[37.72065,101.287338],[37.720161,101.288406],[37.719929,101.288811],[37.719589,101.289467],[37.719028,101.290482],[37.718262,101.291878],[37.71706,101.294037],[37.715969,101.296043],[37.714989,101.297813],[37.714699,101.298309],[37.71434,101.299026],[37.713829,101.300072],[37.713799,101.300117],[37.713242,101.300728],[37.712799,101.301132],[37.712601,101.301208],[37.712269,101.301277],[37.71159,101.301208],[37.71125,101.30101],[37.711079,101.300903],[37.71077,101.300743],[37.710209,101.300133],[37.709751,101.29969],[37.709309,101.299187],[37.708691,101.298683],[37.70834,101.298576],[37.707771,101.298767],[37.706871,101.299149],[37.706551,101.299294],[37.70607,101.299492],[37.705238,101.29985],[37.704762,101.300049],[37.704361,101.300217],[37.703651,101.300507],[37.70253,101.300987],[37.700699,101.30172],[37.698448,101.302338],[37.695919,101.302711],[37.69265,101.303146],[37.690048,101.303581],[37.68877,101.304001],[37.686951,101.304588],[37.686069,101.304909],[37.6847,101.305496],[37.68343,101.306107],[37.680759,101.307327],[37.67836,101.308121],[37.67527,101.309196],[37.672642,101.31041],[37.669472,101.311913],[37.668152,101.312767],[37.666481,101.313927],[37.665161,101.314903],[37.664322,101.315666],[37.662891,101.317139],[37.66127,101.318573],[37.660339,101.319321],[37.659191,101.320152],[37.65731,101.321297],[37.655869,101.322144],[37.654308,101.323029],[37.652191,101.324303],[37.648499,101.326591],[37.645439,101.328568],[37.64394,101.329826],[37.643021,101.330872],[37.64254,101.331497],[37.641319,101.333237],[37.639839,101.335373],[37.638199,101.337723],[37.636379,101.340317],[37.634541,101.342957],[37.632141,101.34639],[37.629341,101.350357],[37.627628,101.352814],[37.626659,101.354301],[37.62627,101.355598],[37.625721,101.357979],[37.625141,101.359108],[37.62434,101.360046],[37.62286,101.361603],[37.621571,101.363548],[37.62019,101.365372],[37.619209,101.366013],[37.617599,101.366814],[37.616562,101.367691],[37.61496,101.369507],[37.613701,101.370613],[37.610222,101.373337],[37.607319,101.375664],[37.60474,101.37793],[37.602089,101.380333],[37.598621,101.383461],[37.594391,101.387299],[37.591091,101.390297],[37.58691,101.394119],[37.583401,101.397293],[37.580681,101.399773],[37.580269,101.400131],[37.579899,101.400482],[37.579269,101.401047],[37.5783,101.401932],[37.57708,101.403053],[37.575291,101.404663],[37.57296,101.406754],[37.57003,101.409286],[37.566971,101.411903],[37.56599,101.412727],[37.56562,101.413033],[37.564522,101.413963],[37.563381,101.414726],[37.561989,101.415352],[37.56007,101.416077],[37.557541,101.417061],[37.554241,101.418373],[37.551399,101.419312],[37.547798,101.420357],[37.545071,101.421227],[37.542511,101.42215],[37.540421,101.422928],[37.53783,101.423813],[37.53566,101.424393],[37.534081,101.424332],[37.531898,101.42424],[37.529049,101.424202],[37.525181,101.424263],[37.52179,101.424278],[37.519741,101.424316],[37.516869,101.424393],[37.512939,101.424461],[37.508251,101.424538],[37.503899,101.424629],[37.500198,101.424683],[37.49575,101.424767],[37.492561,101.424797],[37.489559,101.424988],[37.487999,101.425407],[37.48576,101.425972],[37.482288,101.426201],[37.479931,101.426361],[37.4776,101.426498],[37.475159,101.426643],[37.473331,101.426697],[37.471889,101.426514],[37.47049,101.426529],[37.467419,101.426758],[37.46513,101.426933],[37.464211,101.42672],[37.464119,101.426697],[37.463982,101.426659],[37.463848,101.426582],[37.463139,101.426132],[37.46244,101.425659],[37.461079,101.424744],[37.459431,101.423668],[37.457729,101.422523],[37.45628,101.421501],[37.455479,101.420937],[37.45435,101.419746],[37.452621,101.417473],[37.451469,101.415993],[37.44981,101.413803],[37.44854,101.412338],[37.44804,101.412064],[37.44775,101.411888],[37.445492,101.411247],[37.443668,101.410637],[37.441891,101.40976],[37.44035,101.409012],[37.440208,101.408943],[37.43853,101.40863],[37.436539,101.408112],[37.434071,101.406921],[37.433498,101.406593],[37.432201,101.406242],[37.431061,101.406303],[37.42942,101.406502],[37.427738,101.406723],[37.425339,101.407478],[37.422489,101.408386],[37.420898,101.408218],[37.419739,101.407829],[37.417549,101.40773],[37.416061,101.407822],[37.414471,101.408257],[37.412609,101.408791],[37.411018,101.409241],[37.409962,101.409531],[37.40871,101.409767],[37.4076,101.409538],[37.406799,101.409302],[37.40564,101.409393],[37.404781,101.409843],[37.403141,101.410782],[37.401932,101.411163],[37.39996,101.411751],[37.398479,101.412033],[37.397221,101.412209],[37.396179,101.412369],[37.394939,101.412666],[37.394131,101.413139],[37.39407,101.413162],[37.393711,101.413223],[37.393089,101.412956],[37.391979,101.412209],[37.390869,101.411697],[37.389389,101.411148],[37.38903,101.410583],[37.38913,101.40995],[37.389179,101.409843],[37.389591,101.409142],[37.38966,101.408524],[37.389408,101.408096],[37.38839,101.406822],[37.387348,101.405571],[37.387112,101.405411],[37.386189,101.405357],[37.38554,101.40522],[37.384762,101.404449],[37.38401,101.403732],[37.38353,101.403618],[37.3825,101.403793],[37.38203,101.403572],[37.381908,101.40332],[37.38184,101.40303],[37.38163,101.401863],[37.381161,101.400917],[37.38028,101.399353],[37.379539,101.398064],[37.37907,101.397758],[37.378651,101.397919],[37.378529,101.398209],[37.378262,101.399963],[37.378239,101.400597],[37.378601,101.401222],[37.37904,101.401627],[37.37915,101.401901],[37.379169,101.402367],[37.37854,101.403183],[37.378342,101.40345],[37.378269,101.404053],[37.378471,101.404953],[37.378979,101.406151],[37.37957,101.407173],[37.379631,101.407341],[37.37973,101.407913],[37.379639,101.409309],[37.379372,101.409698],[37.378639,101.41011],[37.378429,101.410233],[37.378311,101.410339],[37.377861,101.411201],[37.377651,101.411713],[37.377571,101.411819],[37.376991,101.412308],[37.376259,101.412827],[37.374969,101.413727],[37.374741,101.413841],[37.373779,101.413933],[37.37265,101.414131],[37.372059,101.41494],[37.371849,101.415283],[37.37146,101.415459],[37.371319,101.415199],[37.37151,101.41481],[37.37159,101.414726],[37.37183,101.41449],[37.372509,101.413429],[37.373138,101.413017],[37.37431,101.412582],[37.37439,101.412537],[37.37524,101.411491],[37.376221,101.41021],[37.376579,101.409309],[37.37677,101.408707],[37.376801,101.407959],[37.376671,101.407494],[37.376549,101.407181],[37.375622,101.406151],[37.37534,101.405891],[37.374939,101.405739],[37.37405,101.405937],[37.372532,101.406487],[37.37244,101.406502],[37.371429,101.406052],[37.370049,101.405357],[37.369881,101.40464],[37.36993,101.404381],[37.370461,101.402924],[37.370449,101.402229],[37.370121,101.401772],[37.369801,101.401688],[37.368721,101.401741],[37.36731,101.401833],[37.36607,101.402046],[37.36491,101.402313],[37.363361,101.402893],[37.362251,101.403313],[37.36216,101.403671],[37.362228,101.403793],[37.362572,101.403816],[37.362751,101.403793],[37.36301,101.403664],[37.364571,101.40313],[37.364681,101.403091],[37.36499,101.403091],[37.365139,101.40345],[37.36483,101.403687],[37.364071,101.403687],[37.36314,101.404083],[37.362671,101.404282],[37.361889,101.404373],[37.361141,101.404373],[37.361,101.404381],[37.360821,101.404442],[37.360691,101.404716],[37.36097,101.405006],[37.362041,101.40477],[37.362999,101.404846],[37.363091,101.404861],[37.364029,101.404579],[37.364319,101.404488],[37.364849,101.404587],[37.36517,101.404739],[37.365719,101.40477],[37.366051,101.404442],[37.366531,101.404007],[37.366619,101.404022],[37.36742,101.404083],[37.367668,101.404312],[37.36755,101.404663],[37.36747,101.404694],[37.36647,101.404694],[37.366249,101.404793],[37.365921,101.405167],[37.365761,101.405357],[37.36499,101.405739],[37.363918,101.405998],[37.362591,101.406319],[37.36179,101.406464],[37.361012,101.406601],[37.360149,101.406754],[37.35891,101.406799],[37.358398,101.406807],[37.357201,101.407204],[37.356079,101.407928],[37.356022,101.407967],[37.35553,101.408157],[37.354881,101.407799],[37.353771,101.406982],[37.35355,101.40683],[37.337841,101.397949],[37.335972,101.398239],[37.33374,101.398643],[37.333111,101.398743],[37.33165,101.399529],[37.3283,101.401382],[37.327991,101.401611],[37.327702,101.402107],[37.327591,101.40287],[37.327621,101.403572],[37.32711,101.4048],[37.325871,101.406174],[37.32552,101.40638],[37.325272,101.406433],[37.324612,101.406219],[37.323872,101.405457],[37.32349,101.405167],[37.32299,101.405228],[37.321861,101.406189],[37.32111,101.407578],[37.32032,101.409317],[37.320179,101.40947],[37.319901,101.409416],[37.319881,101.408897],[37.319931,101.408813],[37.320728,101.407356],[37.321331,101.406303],[37.322369,101.404823],[37.322861,101.404213],[37.323071,101.403961],[37.323219,101.403831],[37.32349,101.40377],[37.324001,101.403893],[37.324501,101.403793],[37.3246,101.403587],[37.324551,101.402191],[37.324982,101.401337],[37.326141,101.400253],[37.326759,101.399658],[37.326931,101.399437],[37.326889,101.399101],[37.326778,101.398987],[37.326469,101.399132],[37.325409,101.400177],[37.32468,101.400787],[37.32391,101.401749],[37.323589,101.402153],[37.322632,101.40284],[37.32106,101.404533],[37.32021,101.405121],[37.31958,101.40609],[37.3195,101.406197],[37.31847,101.407379],[37.316929,101.409149],[37.31678,101.409607],[37.317039,101.412064],[37.317181,101.412399],[37.31757,101.412689],[37.318748,101.412956],[37.31889,101.412971],[37.319851,101.412727],[37.32058,101.412491],[37.32103,101.412643],[37.322189,101.413002],[37.32336,101.413361],[37.324661,101.413834],[37.324821,101.413918],[37.325069,101.414093],[37.325199,101.414383],[37.325119,101.414848],[37.324951,101.415009],[37.322498,101.415657],[37.322071,101.415771],[37.320229,101.415787],[37.31879,101.416527],[37.31702,101.417488],[37.314079,101.41925],[37.312801,101.420464],[37.31229,101.420959],[37.311039,101.421883],[37.308819,101.423248],[37.308151,101.423737],[37.307831,101.424103],[37.30756,101.424423],[37.307129,101.424561],[37.3064,101.424431],[37.306149,101.424408],[37.305901,101.424454],[37.305309,101.424759],[37.304619,101.42485],[37.303761,101.424797],[37.303371,101.424927],[37.302719,101.425468],[37.302361,101.425636],[37.302189,101.425346],[37.30238,101.425018],[37.303379,101.424522],[37.304871,101.424004],[37.306099,101.422768],[37.307281,101.422249],[37.307781,101.422028],[37.307709,101.421837],[37.306499,101.422058],[37.305401,101.42244],[37.30378,101.423218],[37.30299,101.423508],[37.30265,101.423378],[37.301788,101.422119],[37.299229,101.4188],[37.29887,101.418297],[37.297771,101.417084],[37.296501,101.415581],[37.295761,101.414757],[37.294979,101.414841],[37.29454,101.41497],[37.293732,101.414757],[37.292919,101.414383],[37.292629,101.414322],[37.290932,101.414398],[37.288929,101.414543],[37.287491,101.414978],[37.286819,101.415253],[37.285591,101.415314],[37.285339,101.415314],[37.284981,101.415489],[37.28487,101.416031],[37.284981,101.4161],[37.286949,101.415756],[37.287498,101.415688],[37.28775,101.415672],[37.28846,101.415657],[37.288528,101.415657],[37.288681,101.415703],[37.288731,101.415993],[37.288582,101.416199],[37.28772,101.416443],[37.28672,101.41655],[37.28492,101.416656],[37.282841,101.416847],[37.280769,101.416542],[37.277889,101.416054],[37.275749,101.415771],[37.273762,101.416153],[37.272942,101.416183],[37.272301,101.415916],[37.271969,101.415771],[37.270729,101.415771],[37.2687,101.416069],[37.26685,101.416168],[37.263821,101.41597],[37.2612,101.415314],[37.25959,101.41494],[37.25724,101.414398],[37.25568,101.41433],[37.253761,101.414413],[37.253609,101.414429],[37.251259,101.414558],[37.250561,101.415009],[37.24929,101.416481],[37.248531,101.417526],[37.244671,101.429771],[37.243301,101.435257],[37.242859,101.437271],[37.242939,101.438911],[37.24342,101.442207],[37.2449,101.44738],[37.245338,101.450417],[37.245529,101.452568],[37.245449,101.454262],[37.24464,101.464493],[37.24445,101.466148],[37.24437,101.466454],[37.244041,101.466988],[37.243401,101.467506],[37.243069,101.467857],[37.242939,101.468613],[37.243969,101.471687],[37.244919,101.472878],[37.245079,101.473251],[37.24514,101.475067],[37.243679,101.483513],[37.243172,101.48555],[37.242458,101.486748],[37.241989,101.487427],[37.24176,101.488922],[37.241661,101.490196],[37.24086,101.491463],[37.238831,101.495354],[37.238529,101.500031],[37.237782,101.50103],[37.236099,101.501312],[37.2356,101.501694],[37.2346,101.503036],[37.23447,101.503258],[37.234409,101.503517],[37.234539,101.504219],[37.235321,101.506203],[37.235191,101.507553],[37.235222,101.507881],[37.236031,101.509827],[37.235661,101.512444],[37.235168,101.516289],[37.23476,101.517311],[37.233669,101.518204],[37.233139,101.520264],[37.2327,101.520737],[37.23246,101.520737],[37.230881,101.520073],[37.230061,101.520126],[37.22958,101.520447],[37.229382,101.520668],[37.22855,101.521217],[37.228031,101.521927],[37.227242,101.522346],[37.226849,101.522469],[37.225948,101.523193],[37.224831,101.524261],[37.223831,101.526154],[37.222679,101.528816],[37.222561,101.528976],[37.22216,101.529846],[37.221958,101.530083],[37.221588,101.530113],[37.221241,101.529846],[37.22076,101.529358],[37.220341,101.529297],[37.219872,101.5298],[37.21909,101.531013],[37.218342,101.531342],[37.218159,101.531631],[37.218189,101.532112],[37.218819,101.534027],[37.219021,101.535423],[37.219009,101.535713],[37.21862,101.536133],[37.218182,101.53595],[37.216209,101.532883],[37.215919,101.532661],[37.215542,101.53273],[37.212608,101.537086],[37.21244,101.53727],[37.20805,101.53756],[37.207062,101.537064],[37.206692,101.537086],[37.206261,101.537643],[37.206009,101.537888],[37.20583,101.537933],[37.205631,101.537872],[37.20414,101.536377],[37.20364,101.536217],[37.203091,101.537331],[37.202221,101.538544],[37.20163,101.539177],[37.199741,101.539398],[37.199051,101.539177],[37.199131,101.539062],[37.200741,101.539124],[37.201439,101.538971],[37.20163,101.538849],[37.201561,101.538239],[37.200771,101.538116],[37.19978,101.538231],[37.19849,101.538254],[37.197311,101.538109],[37.19585,101.537376],[37.19503,101.537163],[37.19453,101.537262],[37.192909,101.538673],[37.18969,101.541893],[37.1894,101.542267],[37.18771,101.543747],[37.187351,101.544594],[37.18652,101.54702],[37.185921,101.547348],[37.18494,101.54747],[37.184078,101.547211],[37.182579,101.546593],[37.179371,101.547737],[37.177158,101.54882],[37.175419,101.549004],[37.174992,101.54911],[37.173851,101.550056],[37.171951,101.551811],[37.16856,101.555199],[37.16573,101.557533],[37.165051,101.558037],[37.1646,101.558212],[37.16185,101.558594],[37.150612,101.56044],[37.149799,101.560539],[37.148972,101.561523],[37.14526,101.565498],[37.145012,101.565239],[37.144112,101.564613],[37.142639,101.563789],[37.141941,101.563713],[37.141781,101.563766],[37.141171,101.564651],[37.140381,101.568283],[37.140129,101.569633],[37.139511,101.570518],[37.139111,101.570717],[37.13829,101.570168],[37.136162,101.569733],[37.127941,101.568977],[37.120708,101.566162],[37.115791,101.566833],[37.11084,101.566566],[37.11071,101.566589],[37.110439,101.566727],[37.110569,101.566597],[37.110451,101.56649],[37.10928,101.566307],[37.106831,101.565643],[37.10585,101.565697],[37.102749,101.566742],[37.100529,101.56694],[37.10001,101.56694],[37.09763,101.566391],[37.08778,101.565727],[37.084541,101.565201],[37.081539,101.566353],[37.078499,101.568489],[37.076111,101.570312],[37.07375,101.571854],[37.068119,101.575279],[37.06662,101.573463],[37.057621,101.568863],[37.054428,101.567383],[37.04855,101.566383],[37.045929,101.566063],[37.039959,101.569397],[37.038471,101.569267],[37.036831,101.568779],[37.031479,101.56675],[37.030899,101.566673],[37.0303,101.566719],[37.025002,101.56855],[37.023991,101.569206],[37.023399,101.569893],[37.021519,101.573753],[37.020229,101.57666],[37.01791,101.581337],[37.009121,101.59391],[37.005348,101.598343],[37.004761,101.600288],[37.00333,101.606148],[37.001411,101.615402],[37.001499,101.617416],[37.001041,101.619637],[36.99847,101.625504],[36.998131,101.625938],[36.996529,101.62748],[36.988991,101.633797],[36.98806,101.634453],[36.974491,101.64325],[36.96608,101.653717],[36.96159,101.659042],[36.96096,101.659973],[36.950859,101.667549],[36.948372,101.669502],[36.946701,101.670937],[36.943699,101.673103],[36.940811,101.675346],[36.938049,101.677582],[36.934719,101.680923],[36.927681,101.686798],[36.92522,101.689323],[36.92408,101.691132],[36.922691,101.694366],[36.921761,101.6968],[36.919979,101.702789],[36.919071,101.704964],[36.918449,101.706131],[36.916691,101.708611],[36.916679,101.708733],[36.91671,101.708809],[36.916759,101.70887],[36.917049,101.709122],[36.917431,101.709488],[36.91782,101.71003],[36.918171,101.710632],[36.918308,101.711243],[36.918079,101.711983],[36.91766,101.712891],[36.917179,101.713943],[36.916649,101.714989],[36.91605,101.716057],[36.915352,101.717194],[36.914558,101.718353],[36.9137,101.719528],[36.912769,101.720703],[36.911789,101.72187],[36.910728,101.723038],[36.909641,101.724213],[36.908501,101.725403],[36.907349,101.726593],[36.9062,101.727783],[36.905048,101.728996],[36.903889,101.730202],[36.902481,101.731659],[36.901321,101.732872],[36.900169,101.734077],[36.89901,101.735283],[36.89492,101.739517],[36.893959,101.740387],[36.892769,101.741287],[36.89156,101.742027],[36.89032,101.74263],[36.889,101.743149],[36.88768,101.743683],[36.886391,101.744308],[36.885139,101.745033],[36.88385,101.745789],[36.88253,101.746559],[36.88118,101.74736],[36.879841,101.748154],[36.87849,101.748947],[36.87714,101.749786],[36.87339,101.75248],[36.868092,101.756477],[36.866772,101.757263],[36.86541,101.758003],[36.864021,101.758713],[36.85524,101.761681],[36.85376,101.762123],[36.85231,101.762558],[36.850849,101.762993],[36.849369,101.763443],[36.832531,101.766273],[36.821499,101.769531],[36.812901,101.772072],[36.81139,101.772331],[36.758228,101.771317],[36.756771,101.770851],[36.755322,101.770401],[36.753849,101.769951],[36.75116,101.769203],[36.74971,101.768867],[36.748341,101.7686],[36.746971,101.768387],[36.745579,101.768204],[36.744171,101.768021],[36.742722,101.767822],[36.684299,101.766548],[36.68285,101.766586],[36.6814,101.766693],[36.67997,101.7668],[36.6786,101.76696],[36.67728,101.767159],[36.676041,101.767357],[36.6749,101.767563],[36.67384,101.767769],[36.672791,101.767982],[36.671791,101.768181],[36.670921,101.768356],[36.670441,101.768448],[36.670219,101.768509],[36.669899,101.76857],[36.66946,101.768646],[36.6689,101.768784],[36.668201,101.768944],[36.667488,101.769127],[36.66687,101.769287],[36.66642,101.769417],[36.666119,101.769524],[36.665741,101.769691],[36.66518,101.769867],[36.66449,101.770111],[36.663719,101.770401],[36.662949,101.770714],[36.662121,101.771027],[36.661228,101.771378],[36.66024,101.771767],[36.659199,101.772171],[36.658131,101.772583],[36.657089,101.772987],[36.656109,101.773369],[36.655209,101.773781],[36.654449,101.774147],[36.653919,101.774353],[36.653351,101.774567],[36.653011,101.774696],[36.652409,101.774918],[36.651878,101.775124],[36.65136,101.775291],[36.65062,101.775543],[36.6497,101.775574],[36.648708,101.775352],[36.648239,101.774963],[36.648102,101.774643],[36.647961,101.774147],[36.647781,101.773842],[36.647572,101.773697],[36.647209,101.773727],[36.646111,101.774017],[36.644958,101.774422],[36.64172,101.776169],[36.64053,101.776848],[36.640259,101.777359],[36.64035,101.777939],[36.640629,101.778648],[36.640591,101.779846],[36.640331,101.78064],[36.63974,101.782043],[36.639099,101.783524],[36.63863,101.784576],[36.638149,101.785751],[36.637661,101.787308],[36.636921,101.790131],[36.636768,101.790733],[36.636501,101.791649],[36.63623,101.792412],[36.63588,101.793198],[36.635471,101.793922],[36.634838,101.794792],[36.634369,101.795288],[36.63266,101.796669],[36.631969,101.797287],[36.63147,101.797859],[36.630901,101.798683],[36.630348,101.799767],[36.63007,101.800583],[36.629768,101.801903],[36.629539,101.80378],[36.62936,101.804733],[36.629009,101.805862],[36.628529,101.806923],[36.62804,101.807693],[36.627628,101.808243],[36.623409,101.813072],[36.622681,101.814003],[36.622162,101.814781],[36.621712,101.815613],[36.62014,101.818932],[36.619671,101.819687],[36.61898,101.820557],[36.618038,101.82151],[36.616959,101.822289],[36.612671,101.824448],[36.611801,101.824959],[36.610989,101.825569],[36.61042,101.826103],[36.609501,101.82708],[36.605671,101.831581],[36.60498,101.832253],[36.604431,101.832687],[36.603031,101.833603],[36.596249,101.837624],[36.595249,101.838371],[36.594379,101.839287],[36.5938,101.840103],[36.59309,101.841537],[36.592079,101.844223],[36.591572,101.845154],[36.590981,101.845978],[36.58989,101.846977],[36.588341,101.847977],[36.58757,101.848618],[36.58704,101.849213],[36.586411,101.850014],[36.58567,101.851311],[36.583961,101.855827],[36.58371,101.856491],[36.583389,101.857323],[36.582649,101.85907],[36.582081,101.860291],[36.581921,101.860588],[36.581089,101.862213],[36.580181,101.863838],[36.57859,101.866623],[36.578281,101.867188],[36.576771,101.869682],[36.575649,101.871872],[36.57513,101.873138],[36.57481,101.874153],[36.573139,101.879433],[36.572811,101.880302],[36.572319,101.881653],[36.572071,101.882149],[36.571621,101.882858],[36.571098,101.883499],[36.569538,101.885063],[36.568748,101.886147],[36.56823,101.887062],[36.568001,101.887573],[36.56741,101.889587],[36.567242,101.893753],[36.56715,101.89492],[36.566921,101.896339],[36.56657,101.897942],[36.565361,101.90155],[36.565159,101.90213],[36.56501,101.902573],[36.5648,101.903381],[36.564171,101.906937],[36.563869,101.909027],[36.563831,101.90934],[36.563728,101.910263],[36.563499,101.91169],[36.562759,101.915443],[36.562241,101.917618],[36.56118,101.921127],[36.560188,101.923721],[36.559429,101.925407],[36.55801,101.928009],[36.55735,101.929329],[36.556789,101.930763],[36.556438,101.932068],[36.55624,101.933167],[36.556141,101.934288],[36.55595,101.940407],[36.555901,101.941208],[36.555679,101.942772],[36.555401,101.944077],[36.5532,101.952919],[36.552898,101.954018],[36.552471,101.955353],[36.552071,101.956352],[36.551609,101.957291],[36.550812,101.958611],[36.548988,101.960968],[36.5485,101.961594],[36.54364,101.967583],[36.542759,101.968826],[36.54158,101.970863],[36.540878,101.972298],[36.539371,101.975861],[36.538769,101.977127],[36.53796,101.9786],[36.536041,101.981743],[36.535351,101.982986],[36.53484,101.984047],[36.533951,101.986221],[36.532661,101.989998],[36.531658,101.992554],[36.529919,101.9963],[36.527691,102.000778],[36.525009,102.006371],[36.524189,102.008232],[36.52359,102.009804],[36.523079,102.011726],[36.522671,102.013718],[36.522041,102.01722],[36.521339,102.021637],[36.520679,102.025291],[36.520351,102.026657],[36.520031,102.027733],[36.5186,102.031937],[36.51833,102.033043],[36.518169,102.033867],[36.518051,102.034721],[36.517971,102.035873],[36.517879,102.039383],[36.51767,102.041382],[36.51725,102.04335],[36.51638,102.04631],[36.5159,102.048157],[36.515629,102.049507],[36.51543,102.050903],[36.515289,102.052628],[36.51524,102.054077],[36.5154,102.058456],[36.51535,102.060219],[36.515121,102.062248],[36.5144,102.066704],[36.51424,102.067497],[36.514011,102.068283],[36.51366,102.069122],[36.51329,102.069763],[36.512821,102.070381],[36.51405,102.069],[36.514992,102.067719],[36.51535,102.066994],[36.515541,102.066483],[36.515732,102.065666],[36.51582,102.064537],[36.515701,102.062073],[36.51564,102.061752],[36.515499,102.059753],[36.515388,102.061218],[36.515121,102.062866],[36.514889,102.064522],[36.51487,102.066162],[36.515049,102.06778],[36.515442,102.06929],[36.51601,102.070717],[36.51664,102.072037],[36.5172,102.073357],[36.517639,102.074722],[36.517929,102.076103],[36.518059,102.07756],[36.518009,102.079102],[36.517689,102.080673],[36.517288,102.082336],[36.517052,102.084053],[36.51693,102.085716],[36.516819,102.087341],[36.516708,102.088913],[36.516579,102.090446],[36.51646,102.091858],[36.51635,102.093132],[36.516201,102.094276],[36.515961,102.095322],[36.515678,102.096283],[36.515369,102.097137],[36.515072,102.097809],[36.514832,102.098297],[36.514339,102.099182],[36.513672,102.100212],[36.51292,102.10144],[36.5121,102.102783],[36.51125,102.104141],[36.51041,102.105492],[36.50956,102.106888],[36.508709,102.108208],[36.50795,102.109558],[36.507332,102.110977],[36.506771,102.112473],[36.506302,102.113983],[36.505932,102.115494],[36.50565,102.116966],[36.505459,102.118408],[36.505341,102.119873],[36.505291,102.121384],[36.505291,102.122963],[36.505291,102.124634],[36.505291,102.12635],[36.50528,102.128067],[36.505291,102.129753],[36.505291,102.131401],[36.50531,102.133011],[36.505291,102.134583],[36.505219,102.136162],[36.5051,102.137733],[36.504951,102.139252],[36.504768,102.140717],[36.504539,102.142174],[36.504269,102.143677],[36.503948,102.145271],[36.503571,102.146896],[36.503159,102.148529],[36.502682,102.150146],[36.502178,102.151779],[36.50169,102.153442],[36.50119,102.155128],[36.500721,102.156883],[36.50029,102.158699],[36.499939,102.160583],[36.499569,102.162857],[36.499088,102.165863],[36.49881,102.167648],[36.498482,102.16935],[36.498081,102.171013],[36.497581,102.172569],[36.49699,102.174057],[36.4963,102.175423],[36.495522,102.17672],[36.494671,102.178017],[36.493801,102.179337],[36.492939,102.180656],[36.492069,102.181938],[36.491199,102.183212],[36.490349,102.184479],[36.48954,102.185707],[36.488831,102.186958],[36.48822,102.188217],[36.48764,102.189484],[36.487148,102.190773],[36.486759,102.192101],[36.48645,102.193459],[36.486191,102.194839],[36.486019,102.196243],[36.485859,102.197617],[36.485649,102.199074],[36.485439,102.200699],[36.48521,102.202408],[36.485001,102.204178],[36.484791,102.20594],[36.484558,102.207703],[36.484329,102.209351],[36.48407,102.210953],[36.483749,102.212486],[36.483391,102.214043],[36.483021,102.215584],[36.482571,102.21711],[36.482151,102.21859],[36.481731,102.220016],[36.481258,102.221397],[36.480751,102.222717],[36.48024,102.224037],[36.47971,102.225327],[36.47921,102.226562],[36.47876,102.22773],[36.478329,102.228928],[36.478088,102.230209],[36.477921,102.231552],[36.477879,102.232903],[36.477989,102.234261],[36.478088,102.235641],[36.478168,102.237137],[36.47826,102.23877],[36.47839,102.240379],[36.478519,102.241943],[36.47868,102.243439],[36.478882,102.244881],[36.47913,102.246277],[36.479408,102.247627],[36.479759,102.248993],[36.480141,102.25042],[36.480499,102.251892],[36.480862,102.253357],[36.48122,102.254807],[36.481579,102.256302],[36.481979,102.25782],[36.482441,102.259323],[36.48296,102.260757],[36.483471,102.262192],[36.48407,102.263641],[36.484718,102.265106],[36.48539,102.266541],[36.486012,102.267982],[36.48658,102.269432],[36.487011,102.270943],[36.48732,102.272476],[36.48745,102.274063],[36.487461,102.275627],[36.487289,102.277168],[36.486992,102.278641],[36.486599,102.28009],[36.486149,102.281517],[36.48563,102.282944],[36.485119,102.284378],[36.484581,102.285851],[36.4841,102.287376],[36.483749,102.28891],[36.48354,102.290466],[36.483398,102.292061],[36.483471,102.293587],[36.48362,102.29512],[36.48381,102.296677],[36.483978,102.298286],[36.484161,102.299919],[36.484341,102.301567],[36.48452,102.303177],[36.48465,102.304802],[36.484718,102.306412],[36.484749,102.307991],[36.484741,102.309563],[36.484699,102.311142],[36.484612,102.312683],[36.484482,102.314201],[36.484291,102.315689],[36.484081,102.317146],[36.483829,102.31855],[36.483559,102.319923],[36.483261,102.321312],[36.48291,102.322769],[36.482632,102.324226],[36.482399,102.325684],[36.482201,102.327171],[36.482059,102.328697],[36.48196,102.330231],[36.48185,102.331787],[36.48175,102.333397],[36.481651,102.33503],[36.481541,102.336693],[36.481441,102.338341],[36.4813,102.339897],[36.481152,102.341423],[36.48093,102.342857],[36.480652,102.344177],[36.480251,102.345413],[36.47982,102.346573],[36.479279,102.347778],[36.478661,102.348984],[36.477901,102.350281],[36.477112,102.351631],[36.476299,102.352989],[36.475491,102.354332],[36.47472,102.355698],[36.474079,102.357162],[36.473549,102.358688],[36.473122,102.360329],[36.472778,102.361992],[36.472519,102.363678],[36.47226,102.365356],[36.472,102.367058],[36.471741,102.368736],[36.471489,102.370407],[36.471241,102.372093],[36.471001,102.373756],[36.470749,102.375412],[36.47049,102.377068],[36.47023,102.378731],[36.46999,102.380379],[36.46973,102.382027],[36.469398,102.383659],[36.469101,102.385353],[36.468819,102.387062],[36.468571,102.388809],[36.468391,102.390533],[36.468281,102.392227],[36.468201,102.393929],[36.46817,102.395607],[36.46822,102.397293],[36.468311,102.398956],[36.468418,102.400627],[36.46854,102.402298],[36.46867,102.403969],[36.4688,102.405609],[36.468929,102.40728],[36.469059,102.409012],[36.46917,102.410759],[36.46925,102.412483],[36.469299,102.414177],[36.46928,102.415909],[36.469231,102.417641],[36.46909,102.419342],[36.468929,102.421013],[36.468739,102.422737],[36.468529,102.424477],[36.468342,102.426208],[36.468151,102.427872],[36.46796,102.429443],[36.467758,102.430946],[36.467579,102.432426],[36.467388,102.433937],[36.467171,102.435501],[36.466999,102.43705],[36.466881,102.438629],[36.466801,102.440239],[36.466751,102.441872],[36.46674,102.443466],[36.46677,102.445053],[36.466801,102.446579],[36.466801,102.448067],[36.46674,102.449516],[36.466549,102.450996],[36.466309,102.452454],[36.4659,102.453903],[36.465401,102.455292],[36.464828,102.456596],[36.464211,102.457817],[36.463581,102.459007],[36.46294,102.460167],[36.462299,102.461288],[36.461739,102.462334],[36.461151,102.463387],[36.460579,102.464439],[36.45993,102.465591],[36.45916,102.467003],[36.458431,102.468513],[36.457821,102.470093],[36.457352,102.471764],[36.457008,102.473488],[36.456791,102.475258],[36.4566,102.477028],[36.45644,102.47876],[36.456329,102.480461],[36.456181,102.482147],[36.456032,102.483803],[36.455952,102.485474],[36.455891,102.48716],[36.45591,102.488869],[36.455978,102.490601],[36.4561,102.492317],[36.45628,102.494019],[36.456459,102.495728],[36.456589,102.497452],[36.45657,102.499168],[36.456371,102.500893],[36.45607,102.502541],[36.455582,102.504173],[36.45496,102.50576],[36.45438,102.507317],[36.453819,102.508827],[36.453251,102.510307],[36.45274,102.511742],[36.452179,102.513206],[36.451561,102.514618],[36.45089,102.516006],[36.45015,102.517303],[36.44923,102.51857],[36.448299,102.519783],[36.447399,102.520927],[36.446529,102.522049],[36.445629,102.523178],[36.444729,102.524338],[36.443859,102.525436],[36.443008,102.526543],[36.442249,102.52755],[36.44162,102.528481],[36.441051,102.529404],[36.440578,102.530243],[36.440128,102.531029],[36.43969,102.532089],[36.439209,102.533524],[36.438808,102.53508],[36.43853,102.536713],[36.4384,102.53833],[36.438389,102.539978],[36.438499,102.541557],[36.438751,102.543022],[36.439079,102.544373],[36.439468,102.545677],[36.439899,102.546959],[36.44035,102.548233],[36.440811,102.549522],[36.441269,102.550812],[36.441669,102.552162],[36.442009,102.553596],[36.442211,102.555061],[36.442242,102.55658],[36.442051,102.558067],[36.44173,102.559517],[36.441269,102.56089],[36.440651,102.562233],[36.43996,102.563477],[36.439201,102.564728],[36.438412,102.565933],[36.43763,102.567123],[36.43684,102.568329],[36.43605,102.569527],[36.43528,102.570717],[36.43449,102.57193],[36.433681,102.573174],[36.43288,102.574402],[36.432121,102.575684],[36.431419,102.576973],[36.430759,102.578323],[36.430141,102.579697],[36.429531,102.5811],[36.42897,102.582497],[36.428459,102.583946],[36.427971,102.585457],[36.42757,102.587013],[36.4272,102.588516],[36.42683,102.590019],[36.426521,102.591553],[36.426239,102.593063],[36.4259,102.594582],[36.42551,102.596077],[36.425091,102.597572],[36.424599,102.599121],[36.424049,102.60067],[36.423489,102.602203],[36.422932,102.603737],[36.422352,102.605301],[36.42178,102.606827],[36.42123,102.60833],[36.420719,102.609802],[36.420238,102.611267],[36.419849,102.612663],[36.419529,102.614037],[36.419258,102.615433],[36.41898,102.616821],[36.41869,102.618233],[36.418468,102.619659],[36.418301,102.621063],[36.41819,102.622437],[36.41806,102.623863],[36.417931,102.625282],[36.417809,102.626678],[36.41769,102.628036],[36.417568,102.629356],[36.41745,102.630707],[36.417339,102.632027],[36.417221,102.633324],[36.41711,102.63459],[36.417,102.635918],[36.416828,102.637367],[36.416611,102.638893],[36.416279,102.640312],[36.415859,102.641762],[36.415352,102.643158],[36.414768,102.644478],[36.414131,102.645714],[36.413441,102.646812],[36.412739,102.64785],[36.411991,102.648811],[36.411201,102.649727],[36.410412,102.650673],[36.40955,102.651558],[36.40871,102.652481],[36.407871,102.653397],[36.407082,102.65432],[36.406368,102.655373],[36.405788,102.656548],[36.405411,102.657738],[36.405239,102.658928],[36.40517,102.660103],[36.405258,102.661217],[36.405491,102.662277],[36.4058,102.663422],[36.406132,102.664673],[36.406269,102.666008],[36.40617,102.667488],[36.405979,102.668938],[36.405548,102.670311],[36.40501,102.6716],[36.404251,102.672897],[36.4034,102.674133],[36.402451,102.675148],[36.401409,102.675972],[36.400311,102.676628],[36.399181,102.677101],[36.398029,102.677467],[36.396889,102.677834],[36.395802,102.678284],[36.364868,102.688026],[36.36396,102.688309],[36.362999,102.688637],[36.362,102.68911],[36.361,102.689774],[36.3601,102.690628],[36.35936,102.691597],[36.358742,102.692703],[36.358269,102.693863],[36.357868,102.695084],[36.357529,102.696289],[36.357231,102.69751],[36.356941,102.698799],[36.35667,102.700218],[36.356491,102.701668],[36.356461,102.703102],[36.35659,102.704483],[36.356838,102.70578],[36.357239,102.707047],[36.357792,102.708229],[36.358471,102.709267],[36.35918,102.710274],[36.35981,102.711349],[36.360279,102.71257],[36.360569,102.713837],[36.36071,102.715134],[36.360661,102.716423],[36.360439,102.717644],[36.360062,102.718781],[36.35965,102.720009],[36.3591,102.721207],[36.35844,102.722366],[36.357651,102.723473],[36.356758,102.724503],[36.355801,102.725403],[36.354801,102.726173],[36.35376,102.726898],[36.35268,102.727661],[36.351768,102.728653],[36.351051,102.729797],[36.350521,102.731071],[36.350109,102.732437],[36.349739,102.73391],[36.349369,102.735382],[36.348991,102.736839],[36.348671,102.738258],[36.348381,102.739609],[36.347988,102.741013],[36.34753,102.742332],[36.34005,102.754784],[36.339161,102.755432],[36.338169,102.756142],[36.33712,102.75695],[36.33596,102.757759],[36.334949,102.758667],[36.334141,102.75975],[36.33358,102.760887],[36.33321,102.76194],[36.332981,102.762993],[36.332859,102.764],[36.332878,102.765083],[36.333118,102.766228],[36.333401,102.767479],[36.333641,102.76873],[36.333832,102.77002],[36.33387,102.771461],[36.333691,102.773102],[36.333351,102.774803],[36.333031,102.776466],[36.33279,102.778137],[36.332611,102.779831],[36.33255,102.781532],[36.332619,102.783272],[36.332779,102.784943],[36.333,102.786591],[36.333241,102.788223],[36.333469,102.789871],[36.33371,102.791519],[36.333961,102.793167],[36.334221,102.794807],[36.334469,102.796463],[36.334751,102.798119],[36.335018,102.799782],[36.33527,102.80146],[36.335522,102.803047],[36.335701,102.804604],[36.335709,102.806122],[36.335571,102.80764],[36.33527,102.809128],[36.334789,102.810516],[36.33424,102.811836],[36.333691,102.813164],[36.333199,102.814468],[36.332821,102.815819],[36.33255,102.817177],[36.332378,102.818512],[36.332352,102.819801],[36.332409,102.821037],[36.332481,102.82225],[36.332569,102.823647],[36.33268,102.825363],[36.332802,102.827103],[36.33292,102.828842],[36.333038,102.830582],[36.33316,102.832314],[36.333271,102.834053],[36.333302,102.83577],[36.333069,102.837486],[36.332649,102.839211],[36.332062,102.840851],[36.331589,102.842529],[36.331371,102.844269],[36.33147,102.846001],[36.331718,102.847679],[36.332001,102.849373],[36.33226,102.851051],[36.332458,102.852707],[36.332451,102.854446],[36.33223,102.856232],[36.331841,102.85791],[36.331322,102.859482],[36.330509,102.860924],[36.32962,102.862282],[36.328651,102.863586],[36.327679,102.864929],[36.326698,102.866257],[36.325729,102.867592],[36.32476,102.868896],[36.323879,102.87027],[36.323071,102.871727],[36.322418,102.873322],[36.321899,102.874947],[36.321522,102.87661],[36.32122,102.878304],[36.32093,102.879982],[36.32061,102.881683],[36.32021,102.883362],[36.319729,102.885094],[36.31918,102.886726],[36.318581,102.888237],[36.31789,102.889702],[36.31715,102.891113],[36.31636,102.892509],[36.31546,102.893852],[36.31448,102.895157],[36.313461,102.896408],[36.312439,102.897636],[36.311409,102.898888],[36.310379,102.900078],[36.309341,102.901283],[36.308311,102.902496],[36.30732,102.903763],[36.3064,102.905037],[36.305618,102.906418],[36.304939,102.907898],[36.304379,102.90947],[36.30394,102.91111],[36.303631,102.912811],[36.303459,102.914543],[36.303349,102.916283],[36.303249,102.918022],[36.303169,102.919777],[36.303082,102.921577],[36.30299,102.923393],[36.302891,102.925148],[36.302811,102.926842],[36.302719,102.928467],[36.30275,102.930069],[36.302879,102.931648],[36.30307,102.933121],[36.303219,102.934509],[36.303249,102.935883],[36.303261,102.937149],[36.303242,102.938301],[36.303188,102.939346],[36.30312,102.940231],[36.302509,102.94854],[36.302429,102.949707],[36.302299,102.951012],[36.302052,102.952461],[36.30167,102.954018],[36.301109,102.95565],[36.300381,102.957191],[36.29958,102.958641],[36.298752,102.96006],[36.297901,102.961487],[36.297039,102.962936],[36.296181,102.964371],[36.29533,102.96582],[36.29446,102.967308],[36.293629,102.968842],[36.292938,102.970451],[36.292339,102.972061],[36.291771,102.973679],[36.291199,102.975304],[36.290668,102.976952],[36.290089,102.978577],[36.289429,102.980171],[36.288651,102.981689],[36.287769,102.983124],[36.286812,102.984482],[36.285789,102.985733],[36.284691,102.986877],[36.283539,102.987923],[36.282318,102.988853],[36.281071,102.989723],[36.279819,102.990578],[36.278629,102.991524],[36.2775,102.992592],[36.276402,102.993752],[36.275372,102.994957],[36.274429,102.99633],[36.273571,102.99781],[36.272812,102.999336],[36.27206,103.000877],[36.271278,103.002441],[36.2705,103.004028],[36.26984,103.0056],[36.269218,103.007156],[36.268581,103.008713],[36.267792,103.010246],[36.267071,103.011818],[36.266232,103.013313],[36.265228,103.014641],[36.264111,103.015762],[36.262798,103.016663],[36.26141,103.017357],[36.26004,103.017838],[36.258659,103.018257],[36.257309,103.018677],[36.255932,103.019127],[36.25457,103.019524],[36.25322,103.019897],[36.251839,103.020363],[36.250542,103.02108],[36.249359,103.022057],[36.248291,103.023262],[36.247379,103.024658],[36.24667,103.026222],[36.245949,103.027779],[36.245079,103.029182],[36.24408,103.030457],[36.243038,103.031708],[36.241989,103.032951],[36.240891,103.034233],[36.23983,103.035477],[36.23877,103.03672],[36.237789,103.037971],[36.236752,103.039223],[36.23576,103.040527],[36.234989,103.04203],[36.234489,103.043694],[36.234299,103.045448],[36.23436,103.047256],[36.234612,103.049057],[36.234859,103.050789],[36.234909,103.052551],[36.234669,103.054314],[36.23418,103.055977],[36.233521,103.057579],[36.232681,103.059013],[36.2318,103.060432],[36.230919,103.061852],[36.230049,103.063278],[36.229179,103.064713],[36.228291,103.066116],[36.227409,103.067543],[36.226589,103.068893],[36.225819,103.070343],[36.225121,103.071907],[36.224529,103.073502],[36.223999,103.075157],[36.22348,103.076859],[36.223,103.07856],[36.222569,103.080292],[36.22208,103.081963],[36.2215,103.083603],[36.22084,103.085167],[36.220119,103.08667],[36.219379,103.088173],[36.218639,103.089668],[36.217918,103.091179],[36.21722,103.092697],[36.21656,103.094208],[36.215981,103.095863],[36.2155,103.09758],[36.215191,103.099319],[36.214958,103.101059],[36.21476,103.102783],[36.214439,103.104477],[36.213909,103.106148],[36.21312,103.107712],[36.21209,103.1091],[36.211048,103.11039],[36.210018,103.111679],[36.20903,103.112991],[36.208172,103.114464],[36.207531,103.116043],[36.207211,103.117798],[36.207008,103.119583],[36.206829,103.121361],[36.206631,103.123161],[36.206459,103.124924],[36.20628,103.126694],[36.2061,103.128464],[36.205921,103.130234],[36.205811,103.132004],[36.20578,103.133774],[36.205841,103.135551],[36.205971,103.137329],[36.20612,103.139122],[36.206249,103.140907],[36.206322,103.142693],[36.206268,103.144447],[36.206039,103.146172],[36.205601,103.147781],[36.205009,103.1493],[36.204239,103.150772],[36.20332,103.152107],[36.202358,103.153252],[36.201359,103.154373],[36.200371,103.155518],[36.199459,103.156754],[36.198689,103.158157],[36.198021,103.159721],[36.19754,103.161339],[36.197262,103.163033],[36.197151,103.164787],[36.19722,103.166573],[36.197369,103.168312],[36.19754,103.170013],[36.197659,103.171692],[36.197681,103.173317],[36.19746,103.174927],[36.197029,103.176422],[36.196381,103.177856],[36.19553,103.179077],[36.194611,103.180206],[36.193699,103.18132],[36.192829,103.182426],[36.191952,103.183563],[36.191071,103.184753],[36.190231,103.185966],[36.189449,103.187233],[36.188648,103.188507],[36.187698,103.189781],[36.186691,103.190971],[36.18565,103.192047],[36.184521,103.193123],[36.18338,103.194138],[36.18224,103.195129],[36.18108,103.196098],[36.180031,103.197189],[36.17907,103.198433],[36.17823,103.199791],[36.177589,103.201393],[36.17709,103.203041],[36.176739,103.204681],[36.176399,103.206306],[36.17598,103.207893],[36.17548,103.209412],[36.174858,103.210854],[36.174191,103.212288],[36.173538,103.213852],[36.172989,103.2155],[36.172649,103.217247],[36.172531,103.219101],[36.172668,103.221329],[36.172939,103.22316],[36.173222,103.224876],[36.1735,103.226547],[36.173752,103.228127],[36.173939,103.229721],[36.174179,103.231247],[36.174438,103.232758],[36.174648,103.234306],[36.174759,103.235893],[36.17474,103.237457],[36.17469,103.239113],[36.174622,103.240784],[36.1745,103.242447],[36.174511,103.244179],[36.174648,103.245949],[36.17495,103.247719],[36.175381,103.249428],[36.175941,103.251106],[36.176579,103.252762],[36.177219,103.254372],[36.177799,103.255951],[36.178169,103.257561],[36.178371,103.259117],[36.178391,103.260643],[36.178268,103.262154],[36.178009,103.263657],[36.177662,103.26506],[36.177181,103.266342],[36.176559,103.267609],[36.175961,103.268806],[36.175381,103.269981],[36.17482,103.271133],[36.174301,103.27227],[36.17384,103.273376],[36.17345,103.274384],[36.173161,103.275284],[36.172939,103.27607],[36.172798,103.276749],[36.17268,103.277298],[36.172619,103.277718],[36.172619,103.278023],[36.17255,103.278267],[36.172482,103.278526],[36.172138,103.279694],[36.172081,103.279877],[36.171959,103.280159],[36.171791,103.280441],[36.17173,103.280579],[36.171711,103.280663],[36.171661,103.280769],[36.171638,103.280807],[36.1716,103.280853],[36.171551,103.280937],[36.171391,103.281303],[36.17112,103.282066],[36.170689,103.283333],[36.170292,103.284767],[36.170071,103.286293],[36.169991,103.287849],[36.170078,103.289436],[36.1702,103.291023],[36.170231,103.29258],[36.170151,103.293983],[36.169941,103.295372],[36.169571,103.296951],[36.16851,103.305054],[36.168419,103.306953],[36.16827,103.308723],[36.16785,103.310417],[36.167179,103.311996],[36.166271,103.313431],[36.16523,103.314774],[36.1642,103.316132],[36.163361,103.317711],[36.163029,103.31881],[36.162781,103.320084],[36.162498,103.325623],[36.162251,103.328667],[36.161888,103.330269],[36.161179,103.332024],[36.16016,103.333656],[36.157082,103.338173],[36.155689,103.340042],[36.154961,103.340767],[36.153721,103.341583],[36.148899,103.343163],[36.148109,103.343552],[36.1474,103.344063],[36.14653,103.344963],[36.142269,103.350891],[36.141861,103.351784],[36.141548,103.352837],[36.141392,103.353622],[36.141312,103.354942],[36.141312,103.356323],[36.141521,103.3582],[36.142639,103.366814],[36.14333,103.372566],[36.14349,103.37439],[36.143551,103.378151],[36.14362,103.380043],[36.143951,103.382278],[36.144451,103.38401],[36.145111,103.385612],[36.15411,103.398842],[36.155128,103.400093],[36.15612,103.401283],[36.157051,103.402473],[36.15781,103.403847],[36.158379,103.405357],[36.158821,103.406967],[36.159088,103.408684],[36.159321,103.410454],[36.159531,103.412643],[36.159882,103.414429],[36.16058,103.416023],[36.161499,103.417427],[36.16264,103.418617],[36.163952,103.419487],[36.165371,103.420067],[36.166809,103.420593],[36.168251,103.421089],[36.169708,103.421608],[36.17115,103.422272],[36.172501,103.423119],[36.173721,103.424263],[36.174858,103.425537],[36.175659,103.427223],[36.176361,103.429291],[36.176991,103.431534],[36.177189,103.432838],[36.177212,103.434021],[36.17717,103.434967],[36.17688,103.436829],[36.17598,103.441719],[36.175621,103.44455],[36.175591,103.446701],[36.176281,103.450691],[36.176701,103.452438],[36.177071,103.454086],[36.177361,103.455711],[36.17746,103.457237],[36.177158,103.456787],[36.176998,103.456589],[36.1768,103.456467],[36.176449,103.456459],[36.176331,103.456612],[36.17625,103.456818],[36.176201,103.457039],[36.176231,103.457268],[36.176331,103.457474],[36.176491,103.457603],[36.176689,103.457733],[36.17691,103.457787],[36.177349,103.458008],[36.177731,103.458298],[36.17804,103.458687],[36.178211,103.459213],[36.178299,103.459747],[36.178322,103.460243],[36.17831,103.460457],[36.178242,103.460709],[36.178249,103.46109],[36.177689,103.462067],[36.177311,103.462547],[36.1772,103.462738],[36.177109,103.462982],[36.17701,103.463928],[36.176899,103.464378],[36.1768,103.4645],[36.175251,103.465729],[36.174911,103.467194],[36.17487,103.467773],[36.174591,103.469757],[36.174309,103.470833],[36.174229,103.471077],[36.173988,103.471497],[36.173538,103.471733],[36.174229,103.471489],[36.17416,103.471832],[36.173969,103.472],[36.173069,103.475014],[36.171669,103.478172],[36.171021,103.480209],[36.170811,103.482384],[36.170441,103.482681],[36.169361,103.482674],[36.168732,103.482658],[36.167721,103.482674],[36.167332,103.482841],[36.16708,103.483437],[36.16634,103.486961],[36.165279,103.491341],[36.164589,103.493446],[36.163799,103.494377],[36.162411,103.495079],[36.155079,103.497543],[36.15213,103.498734],[36.151791,103.49884],[36.14447,103.500648],[36.14299,103.501266],[36.142841,103.501373],[36.141708,103.502586],[36.14072,103.503593],[36.14006,103.504601],[36.138741,103.508942],[36.138149,103.511543],[36.137932,103.513313],[36.138039,103.518738],[36.138,103.522591],[36.137661,103.524048],[36.136459,103.526466],[36.136051,103.526978],[36.13266,103.529221],[36.12867,103.530296],[36.123032,103.531723],[36.122059,103.532089],[36.11982,103.533241],[36.116169,103.535553],[36.115021,103.53627],[36.11412,103.537117],[36.11311,103.538673],[36.11042,103.545486],[36.109219,103.548241],[36.1087,103.550247],[36.108509,103.552002],[36.108749,103.556358],[36.108971,103.55764],[36.109459,103.559082],[36.1115,103.562927],[36.11195,103.564087],[36.111801,103.564117],[36.11142,103.564163],[36.11076,103.564323],[36.109909,103.56456],[36.109112,103.56485],[36.10836,103.565163],[36.10775,103.56543],[36.10733,103.565666],[36.10696,103.566017],[36.10664,103.566307],[36.10622,103.566803],[36.105869,103.566978],[36.105518,103.566887],[36.105099,103.56665],[36.104721,103.566406],[36.104382,103.566269],[36.104061,103.566223],[36.10379,103.566322],[36.1035,103.566559],[36.103199,103.566811],[36.10268,103.567261],[36.101822,103.567711],[36.100868,103.568237],[36.10009,103.569122],[36.09935,103.569992],[36.09861,103.57077],[36.098011,103.571213],[36.097469,103.571411],[36.096951,103.571587],[36.096409,103.571777],[36.095909,103.57196],[36.09539,103.572144],[36.09481,103.572159],[36.0942,103.572037],[36.09362,103.571877],[36.093029,103.571693],[36.092361,103.571571],[36.091492,103.57151],[36.09053,103.571442],[36.089512,103.571136],[36.088509,103.570709],[36.08754,103.570297],[36.086658,103.569923],[36.085831,103.569489],[36.085011,103.568947],[36.08429,103.568451],[36.08358,103.568001],[36.08279,103.567543],[36.081951,103.567322],[36.08112,103.567436],[36.080292,103.567734],[36.07943,103.567833],[36.078571,103.567574],[36.077759,103.567329],[36.077,103.567253],[36.076241,103.567482],[36.075581,103.568031],[36.074841,103.568703],[36.074081,103.569122],[36.07338,103.569473],[36.07267,103.569794],[36.071899,103.57016],[36.071281,103.570473],[36.07069,103.570763],[36.070011,103.570992],[36.069382,103.570869],[36.06881,103.570473],[36.06813,103.569923],[36.067268,103.569206],[36.06641,103.56852],[36.065659,103.56781],[36.065121,103.567162],[36.06464,103.566566],[36.064171,103.566093],[36.063671,103.565788],[36.06316,103.565529],[36.062641,103.565269],[36.062092,103.564987],[36.06168,103.564552],[36.061611,103.563751],[36.061699,103.562576],[36.061779,103.561279],[36.061821,103.56012],[36.06144,103.559196],[36.060928,103.558563],[36.060329,103.558067],[36.05983,103.557602],[36.059681,103.556778],[36.05991,103.555649],[36.060169,103.55442],[36.06041,103.553177],[36.060741,103.552063],[36.061352,103.55098],[36.061878,103.549911],[36.062229,103.54892],[36.062469,103.547882],[36.062538,103.546783],[36.062408,103.54567],[36.062168,103.544594],[36.061852,103.543556],[36.061321,103.54274],[36.060532,103.542427],[36.0597,103.542511],[36.058929,103.542641],[36.05827,103.542763],[36.057571,103.542877],[36.05674,103.54303],[36.055882,103.543091],[36.054989,103.543007],[36.054211,103.543007],[36.053532,103.54306],[36.05267,103.54364],[36.05183,103.544357],[36.051189,103.544891],[36.050709,103.545082],[36.050079,103.544983],[36.04929,103.544731],[36.048359,103.544601],[36.047379,103.544884],[36.04657,103.545647],[36.04586,103.546608],[36.045101,103.547447],[36.044239,103.547958],[36.043221,103.548027],[36.04221,103.547821],[36.041279,103.547829],[36.04044,103.548058],[36.039669,103.548241],[36.039051,103.548279],[36.03828,103.548019],[36.037239,103.548073],[36.036171,103.548233],[36.035,103.548187],[36.03418,103.548042],[36.033569,103.547798],[36.033138,103.547546],[36.03281,103.547379],[36.032139,103.547073],[36.0313,103.546738],[36.03046,103.546089],[36.029499,103.545258],[36.028412,103.544601],[36.027321,103.544006],[36.02631,103.543457],[36.02544,103.543007],[36.0247,103.543068],[36.024109,103.543259],[36.023312,103.542931],[36.0224,103.542397],[36.021481,103.541931],[36.02066,103.541771],[36.01923,103.541351],[36.01841,103.540916],[36.017712,103.540497],[36.01722,103.540237],[36.01685,103.53994],[36.016548,103.539543],[36.0163,103.538963],[36.01622,103.538322],[36.016319,103.537514],[36.016602,103.536491],[36.016899,103.535431],[36.017239,103.534363],[36.01749,103.533386],[36.01749,103.532539],[36.017208,103.531807],[36.0168,103.531281],[36.016399,103.530853],[36.016022,103.53038],[36.015701,103.529823],[36.015511,103.529167],[36.015419,103.528473],[36.015541,103.527573],[36.015862,103.526611],[36.01627,103.525742],[36.01672,103.524986],[36.0172,103.524429],[36.01767,103.52401],[36.01828,103.523903],[36.019169,103.524139],[36.020119,103.524406],[36.02108,103.524277],[36.0219,103.523712],[36.02269,103.523102],[36.023571,103.522758],[36.02457,103.522697],[36.025539,103.52256],[36.026371,103.522072],[36.027069,103.521233],[36.027729,103.520287],[36.028469,103.519417],[36.02932,103.518646],[36.03019,103.517883],[36.031052,103.517113],[36.031799,103.516441],[36.032398,103.515793],[36.032879,103.514977],[36.033272,103.514061],[36.033539,103.513077],[36.033741,103.512009],[36.034111,103.510986],[36.034561,103.509987],[36.03484,103.508858],[36.034859,103.507698],[36.034721,103.506607],[36.034519,103.505722],[36.03434,103.504883],[36.03421,103.503868],[36.034302,103.502808],[36.034489,103.501747],[36.034618,103.500687],[36.034512,103.499649],[36.034328,103.498642],[36.034161,103.49765],[36.03397,103.496681],[36.033791,103.495697],[36.033691,103.494698],[36.033852,103.493683],[36.0341,103.492653],[36.034271,103.491653],[36.034851,103.490936],[36.03537,103.490097],[36.0355,103.489067],[36.035511,103.488098],[36.035259,103.487198],[36.03503,103.486282],[36.035271,103.48539],[36.035851,103.48455],[36.03611,103.483437],[36.036289,103.482193],[36.036461,103.480927],[36.03656,103.479729],[36.036449,103.478622],[36.036308,103.477608],[36.036549,103.476707],[36.037239,103.476028],[36.03809,103.475502],[36.0438,103.472023],[36.044491,103.471581],[36.044979,103.47113],[36.04533,103.470642],[36.045639,103.469948],[36.045769,103.469147],[36.045811,103.468369],[36.04591,103.467506],[36.046101,103.466667],[36.046398,103.46582],[36.046768,103.464973],[36.047211,103.464149],[36.04768,103.463463],[36.048019,103.462967],[36.048401,103.462517],[36.048851,103.461937],[36.04937,103.461304],[36.04995,103.460564],[36.050499,103.459877],[36.051048,103.45919],[36.05164,103.458443],[36.052231,103.457718],[36.052872,103.456917],[36.053539,103.455994],[36.05407,103.454971],[36.054401,103.45388],[36.054588,103.452766],[36.054691,103.451637],[36.054779,103.450531],[36.054981,103.449379],[36.055248,103.44809],[36.055519,103.446823],[36.055759,103.445663],[36.055969,103.444656],[36.055969,103.443802],[36.05571,103.442848],[36.055401,103.441811],[36.05508,103.44072],[36.05476,103.439629],[36.05444,103.438599],[36.054131,103.437607],[36.053871,103.436653],[36.053699,103.435631],[36.0536,103.434662],[36.053501,103.4338],[36.053391,103.43293],[36.053249,103.431831],[36.053051,103.43071],[36.052872,103.429764],[36.052731,103.428963],[36.052608,103.428207],[36.052471,103.427383],[36.052349,103.426514],[36.052189,103.425667],[36.051991,103.424957],[36.0518,103.424332],[36.051609,103.42366],[36.051411,103.422951],[36.051151,103.422188],[36.05072,103.421577],[36.05019,103.42115],[36.049648,103.420738],[36.04911,103.420326],[36.048531,103.419884],[36.047852,103.419342],[36.047081,103.418777],[36.046211,103.418312],[36.04528,103.417999],[36.044319,103.417847],[36.043331,103.41774],[36.042358,103.417633],[36.041401,103.417557],[36.040531,103.417473],[36.039688,103.417389],[36.038879,103.417313],[36.038071,103.417229],[36.037331,103.417152],[36.036671,103.417038],[36.03606,103.416924],[36.03553,103.416801],[36.03513,103.416687],[36.034931,103.416634],[36.034752,103.416557],[36.033508,103.416237],[36.032879,103.416054],[36.032101,103.415817],[36.031219,103.415558],[36.030369,103.41526],[36.029572,103.414803],[36.028801,103.414139],[36.028091,103.413544],[36.02739,103.413071],[36.026649,103.412933],[36.02597,103.413177],[36.02533,103.41362],[36.0247,103.41407],[36.02409,103.414139],[36.02359,103.41378],[36.02317,103.413292],[36.02272,103.41275],[36.022209,103.412132],[36.02158,103.411392],[36.020859,103.410553],[36.020149,103.409683],[36.01939,103.40892],[36.01857,103.408272],[36.0177,103.407707],[36.016781,103.407303],[36.01585,103.406937],[36.014961,103.406616],[36.01416,103.406326],[36.013451,103.405968],[36.012798,103.40535],[36.012291,103.404457],[36.01181,103.40332],[36.011269,103.402077],[36.010719,103.400902],[36.010208,103.39978],[36.00972,103.398743],[36.009071,103.397873],[36.008339,103.397087],[36.007671,103.396378],[36.00716,103.395576],[36.006851,103.394493],[36.00663,103.393227],[36.006371,103.391907],[36.005951,103.390648],[36.005299,103.389511],[36.004532,103.388588],[36.003651,103.387939],[36.002659,103.387642],[36.00169,103.387741],[36.000679,103.387947],[35.99968,103.388184],[35.99876,103.388367],[35.99791,103.388344],[35.997021,103.387993],[35.996109,103.387543],[35.995152,103.387077],[35.994228,103.386673],[35.99342,103.386421],[35.99268,103.38665],[35.992088,103.38726],[35.99144,103.387802],[35.990589,103.388161],[35.989651,103.388153],[35.98872,103.387917],[35.98782,103.38755],[35.98695,103.387047],[35.986061,103.386543],[35.985241,103.386017],[35.984661,103.385193],[35.984119,103.384323],[35.983421,103.383781],[35.982712,103.383301],[35.982182,103.382423],[35.981739,103.38134],[35.981319,103.380302],[35.980881,103.379242],[35.98045,103.378166],[35.98003,103.377159],[35.979622,103.376213],[35.979359,103.375229],[35.979252,103.374123],[35.978951,103.373123],[35.97839,103.372238],[35.977871,103.371323],[35.977631,103.370201],[35.977291,103.369133],[35.9767,103.36837],[35.9762,103.367844],[35.975719,103.367332],[35.975201,103.366882],[35.974529,103.366463],[35.973789,103.365952],[35.97324,103.365128],[35.97274,103.364227],[35.97226,103.363327],[35.971748,103.362427],[35.970909,103.361908],[35.96991,103.361443],[35.968899,103.360977],[35.967949,103.360443],[35.96703,103.359848],[35.966141,103.359261],[35.96529,103.358704],[35.964481,103.358124],[35.963871,103.357224],[35.963322,103.35611],[35.962742,103.355072],[35.96204,103.354179],[35.96133,103.353317],[35.96072,103.352547],[35.960159,103.351891],[35.959671,103.351433],[35.959,103.350822],[35.958199,103.350197],[35.957401,103.349541],[35.9566,103.3489],[35.955761,103.34832],[35.954899,103.347893],[35.95401,103.347527],[35.953079,103.347183],[35.952209,103.346848],[35.951519,103.346367],[35.951019,103.345596],[35.95052,103.344849],[35.949871,103.344421],[35.94907,103.344223],[35.948292,103.344101],[35.947639,103.344002],[35.946999,103.343887],[35.946301,103.343773],[35.945591,103.343651],[35.944809,103.343529],[35.944,103.343323],[35.943291,103.342857],[35.942692,103.342148],[35.942131,103.341408],[35.94154,103.340843],[35.940899,103.340607],[35.94035,103.340424],[35.93993,103.34037],[35.939491,103.340332],[35.938862,103.340317],[35.938301,103.340363],[35.937832,103.340408],[35.937439,103.340424],[35.93705,103.340431],[35.936581,103.340317],[35.936211,103.339737],[35.93605,103.339012],[35.93589,103.338287],[35.935741,103.337608],[35.935551,103.336746],[35.93536,103.335999],[35.935181,103.33535],[35.93491,103.334801],[35.934639,103.334183],[35.934662,103.333519],[35.93483,103.332878],[35.934952,103.332329],[35.93502,103.331711],[35.934879,103.331123],[35.934502,103.330612],[35.934231,103.330093],[35.934292,103.329514],[35.934471,103.328979],[35.934689,103.328453],[35.934959,103.327942],[35.93523,103.327438],[35.935558,103.326881],[35.935928,103.326302],[35.936329,103.325996],[35.93676,103.325882],[35.937099,103.325798],[35.93716,103.325638],[35.93689,103.325508],[35.9366,103.325447],[35.936371,103.325523],[35.936001,103.325783],[35.935661,103.326157],[35.93544,103.326553],[35.93528,103.326714],[35.935001,103.326576],[35.934631,103.32637],[35.934261,103.326149],[35.934132,103.325859],[35.93417,103.32534],[35.93425,103.324707],[35.93433,103.324173],[35.934429,103.323708],[35.934502,103.323181],[35.93457,103.322563],[35.934631,103.321854],[35.934711,103.32106],[35.934811,103.320267],[35.934879,103.319504],[35.934971,103.318771],[35.934929,103.318176],[35.934952,103.317688],[35.934898,103.317123],[35.934818,103.316391],[35.934792,103.315918],[35.934799,103.315819],[35.93449,103.315529],[35.934021,103.3153],[35.933731,103.315079],[35.9333,103.314484],[35.932991,103.314209],[35.93206,103.31369],[35.931179,103.313438],[35.93055,103.31308],[35.93045,103.312927],[35.930561,103.31279],[35.931301,103.312927],[35.931931,103.312729],[35.932541,103.312851],[35.93264,103.312767],[35.932671,103.312683],[35.93259,103.312553],[35.932251,103.312363],[35.93095,103.312019],[35.93042,103.3116],[35.93021,103.311493],[35.93,103.311501],[35.929619,103.311707],[35.92934,103.311974],[35.929199,103.31218],[35.929001,103.312714],[35.92902,103.312897],[35.929161,103.313431],[35.929131,103.313599],[35.92905,103.31369],[35.92836,103.313927],[35.928131,103.313873],[35.92802,103.313766],[35.927731,103.313408],[35.92757,103.313408],[35.927471,103.313507],[35.927441,103.313728],[35.92749,103.313828],[35.92778,103.314056],[35.92786,103.31427],[35.927811,103.3144],[35.927441,103.314796],[35.927219,103.315201],[35.92659,103.316589],[35.92635,103.317291],[35.92606,103.31871],[35.925869,103.31913],[35.925659,103.319351],[35.921909,103.322456],[35.921421,103.322708],[35.921211,103.322723],[35.920971,103.322647],[35.9207,103.322456],[35.92025,103.321831],[35.91988,103.321548],[35.919651,103.321533],[35.9193,103.3218],[35.91909,103.3218],[35.918961,103.321693],[35.918789,103.321426],[35.91853,103.320938],[35.91827,103.320763],[35.918091,103.320763],[35.917961,103.320847],[35.917641,103.321823],[35.917561,103.321907],[35.917419,103.321968],[35.917191,103.321877],[35.91679,103.321487],[35.916691,103.321449],[35.916561,103.321487],[35.916161,103.3218],[35.915901,103.321831],[35.914989,103.321136],[35.914841,103.321091],[35.914459,103.321136],[35.913651,103.321487],[35.913311,103.321579],[35.912979,103.321579],[35.912811,103.321503],[35.912701,103.321327],[35.912571,103.320686],[35.912449,103.320587],[35.91235,103.320618],[35.912251,103.320877],[35.912121,103.321709],[35.91201,103.322006],[35.911621,103.322807],[35.911381,103.32312],[35.911091,103.323288],[35.910511,103.323349],[35.90971,103.323288],[35.909481,103.32338],[35.909069,103.323914],[35.90884,103.324318],[35.908539,103.325203],[35.908451,103.325363],[35.907921,103.325851],[35.907841,103.326057],[35.907871,103.326271],[35.908291,103.327103],[35.908451,103.327797],[35.90844,103.328041],[35.90834,103.328178],[35.90797,103.328407],[35.9076,103.328377],[35.90731,103.328247],[35.907181,103.32814],[35.906361,103.327087],[35.906281,103.326759],[35.90596,103.326157],[35.905769,103.326073],[35.904621,103.32605],[35.90448,103.325974],[35.90419,103.325638],[35.904121,103.32547],[35.903931,103.323669],[35.90382,103.323341],[35.9034,103.322639],[35.903271,103.322327],[35.903221,103.322166],[35.903141,103.321648],[35.903191,103.321518],[35.90332,103.321419],[35.903751,103.321373],[35.90398,103.32122],[35.90406,103.321098],[35.904079,103.320961],[35.904041,103.320587],[35.903931,103.320419],[35.903801,103.320358],[35.90366,103.320343],[35.90303,103.320427],[35.902809,103.320297],[35.90266,103.32],[35.90202,103.318047],[35.90184,103.317719],[35.9016,103.317497],[35.899841,103.318741],[35.89954,103.320923],[35.899841,103.321854],[35.899891,103.322159],[35.899761,103.32328],[35.899811,103.323608],[35.900421,103.324417],[35.900829,103.325241],[35.90099,103.325394],[35.901291,103.325539],[35.901581,103.325768],[35.902,103.326828],[35.902531,103.327347],[35.90313,103.328468],[35.903351,103.329033],[35.903721,103.329483],[35.90395,103.330208],[35.903961,103.330566],[35.903881,103.330856],[35.903931,103.331078],[35.90419,103.331284],[35.90443,103.33165],[35.904701,103.331947],[35.905319,103.332397],[35.905491,103.332619],[35.905651,103.333023],[35.90554,103.333847],[35.905609,103.334068],[35.90588,103.334503],[35.9062,103.334747],[35.907101,103.335007],[35.907181,103.335159],[35.907181,103.335693],[35.907219,103.335777],[35.907341,103.335876],[35.90757,103.335876],[35.90773,103.335777],[35.907879,103.335617],[35.908119,103.33519],[35.908291,103.335121],[35.90839,103.335159],[35.908779,103.33548],[35.909451,103.335854],[35.90955,103.335991],[35.90955,103.336067],[35.90942,103.336571],[35.90942,103.336723],[35.909931,103.337753],[35.90995,103.338097],[35.90974,103.338676],[35.909679,103.33876],[35.90918,103.339058],[35.908791,103.339523],[35.908291,103.339897],[35.9081,103.339897],[35.907909,103.339653],[35.90773,103.339607],[35.9076,103.339737],[35.907501,103.340157],[35.907391,103.340317],[35.906929,103.340553],[35.90678,103.3405],[35.90641,103.34005],[35.906231,103.340027],[35.905979,103.340157],[35.90591,103.340218],[35.90575,103.340828],[35.9053,103.341309],[35.905121,103.341347],[35.904881,103.341309],[35.904751,103.3414],[35.904411,103.342293],[35.9039,103.343323],[35.903801,103.343407],[35.903419,103.343559],[35.902191,103.343681],[35.90147,103.343674],[35.901081,103.343536],[35.90065,103.343536],[35.89859,103.343857],[35.89846,103.343979],[35.89817,103.344414],[35.897621,103.344704],[35.897129,103.345703],[35.896881,103.34639],[35.896431,103.34671],[35.895969,103.346939],[35.89587,103.347069],[35.895691,103.347488],[35.89558,103.347527],[35.89534,103.347504],[35.89521,103.347527],[35.89476,103.348007],[35.89463,103.348091],[35.89418,103.348106],[35.893681,103.348648],[35.893181,103.349037],[35.892849,103.34922],[35.89254,103.349564],[35.89238,103.349663],[35.891979,103.3498],[35.890751,103.349899],[35.890461,103.349991],[35.890411,103.350182],[35.89043,103.350258],[35.890511,103.350327],[35.89156,103.35038],[35.892181,103.350471],[35.893009,103.350128],[35.893799,103.349693],[35.89444,103.349716],[35.894539,103.349617],[35.894619,103.349274],[35.894699,103.349159],[35.89558,103.349037],[35.896191,103.348778],[35.896641,103.34893],[35.897041,103.34993],[35.89719,103.350098],[35.897339,103.350098],[35.89772,103.349899],[35.8978,103.349777],[35.8978,103.349579],[35.89764,103.349007],[35.8978,103.348557],[35.897709,103.348099],[35.8978,103.347931],[35.898121,103.347954],[35.89872,103.348198],[35.899151,103.348503],[35.89925,103.348503],[35.899361,103.34832],[35.89933,103.347771],[35.89941,103.34761],[35.89954,103.347588],[35.90036,103.347977],[35.900539,103.348007],[35.90073,103.347939],[35.90081,103.347816],[35.900829,103.347687],[35.90081,103.347557],[35.90065,103.347237],[35.900631,103.347099],[35.900749,103.346939],[35.900909,103.346909],[35.90134,103.347023],[35.901581,103.347237],[35.901871,103.347633],[35.902,103.347656],[35.90229,103.347557],[35.902451,103.347679],[35.902481,103.347763],[35.902481,103.347893],[35.90239,103.34819],[35.902279,103.348427],[35.902161,103.348557],[35.901821,103.34874],[35.901421,103.349083],[35.90097,103.349548],[35.900539,103.349586],[35.900391,103.34967],[35.8992,103.351128],[35.898899,103.35125],[35.89851,103.351738],[35.897949,103.352081],[35.897701,103.352127],[35.89711,103.351883],[35.89674,103.351799],[35.89637,103.351517],[35.896191,103.351509],[35.895741,103.352219],[35.895531,103.352287],[35.895241,103.35228],[35.895111,103.352341],[35.895081,103.352386],[35.89502,103.352798],[35.89492,103.353027],[35.89476,103.353088],[35.89397,103.353027],[35.893871,103.353111],[35.893799,103.353317],[35.893951,103.354019],[35.89389,103.354156],[35.8937,103.354309],[35.893311,103.354301],[35.89315,103.354233],[35.89241,103.353683],[35.892151,103.353607],[35.892021,103.353699],[35.892021,103.35376],[35.89212,103.353859],[35.892509,103.353973],[35.89323,103.354584],[35.893391,103.35466],[35.89381,103.354607],[35.893921,103.35466],[35.89402,103.35479],[35.89415,103.355057],[35.894161,103.35524],[35.89365,103.356293],[35.893379,103.357338],[35.89333,103.357857],[35.89352,103.358528],[35.893539,103.358757],[35.89328,103.359581],[35.893101,103.36042],[35.892891,103.36097],[35.892601,103.361397],[35.892479,103.361679],[35.892399,103.362267],[35.89225,103.362717],[35.891689,103.363441],[35.891701,103.363586],[35.89183,103.36393],[35.89188,103.364227],[35.891739,103.364799],[35.891239,103.365868],[35.89119,103.366417],[35.89098,103.366737],[35.89064,103.367073],[35.890411,103.367378],[35.890461,103.367554],[35.8909,103.367996],[35.890999,103.368294],[35.890999,103.368591],[35.890789,103.369034],[35.89082,103.36924],[35.891251,103.369507],[35.89138,103.369766],[35.89138,103.370003],[35.8913,103.370537],[35.89101,103.371597],[35.890831,103.371979],[35.89056,103.372147],[35.89024,103.372467],[35.890041,103.372566],[35.88974,103.372597],[35.88937,103.372917],[35.88903,103.373154],[35.88842,103.374519],[35.888161,103.374847],[35.886051,103.37606],[35.886009,103.37616],[35.88596,103.376633],[35.885849,103.376869],[35.88541,103.377274],[35.884781,103.377457],[35.884541,103.377586],[35.88446,103.377731],[35.884411,103.378151],[35.8843,103.378258],[35.883511,103.378441],[35.88298,103.378433],[35.882721,103.378593],[35.88261,103.378754],[35.882599,103.37886],[35.882771,103.379341],[35.882801,103.379578],[35.882759,103.379761],[35.882641,103.37989],[35.881191,103.380547],[35.880939,103.38073],[35.880829,103.380997],[35.880619,103.382156],[35.880322,103.382767],[35.880291,103.38385],[35.880409,103.384117],[35.880939,103.38459],[35.881069,103.384758],[35.88121,103.385139],[35.88121,103.385368],[35.881161,103.385468],[35.880951,103.385757],[35.88076,103.385887],[35.879971,103.386147],[35.879841,103.386299],[35.879841,103.386543],[35.88002,103.386917],[35.879921,103.387154],[35.879681,103.387321],[35.87952,103.387543],[35.879551,103.387688],[35.879791,103.388077],[35.879791,103.388206],[35.879631,103.38842],[35.879021,103.388748],[35.87709,103.389458],[35.876881,103.389587],[35.87672,103.389809],[35.87672,103.389977],[35.876801,103.39016],[35.878311,103.3909],[35.878521,103.391068],[35.878559,103.39119],[35.878521,103.391258],[35.878349,103.391243],[35.87804,103.390953],[35.877689,103.39077],[35.87616,103.39035],[35.876011,103.390266],[35.875931,103.390129],[35.87603,103.389709],[35.87619,103.389503],[35.87701,103.388939],[35.878201,103.388283],[35.87825,103.388153],[35.878231,103.388077],[35.87812,103.388031],[35.877522,103.388428],[35.875599,103.389351],[35.875351,103.389648],[35.87513,103.390297],[35.875111,103.390511],[35.87524,103.390678],[35.87656,103.391373],[35.87661,103.391434],[35.876629,103.391602],[35.876541,103.391769],[35.876339,103.39193],[35.875771,103.392357],[35.875191,103.392609],[35.874691,103.392929],[35.874081,103.393051],[35.87344,103.393417],[35.871861,103.39402],[35.87075,103.394524],[35.87011,103.394608],[35.869961,103.394691],[35.86961,103.395073],[35.868111,103.395668],[35.867321,103.396179],[35.867111,103.39637],[35.867069,103.396553],[35.867081,103.396683],[35.867199,103.396843],[35.86832,103.39743],[35.869591,103.398453],[35.87022,103.398804],[35.87038,103.399048],[35.870361,103.399178],[35.870201,103.399361],[35.869431,103.399841],[35.869091,103.399986],[35.86861,103.400093],[35.868141,103.400467],[35.86787,103.400551],[35.867661,103.400681],[35.867149,103.401268],[35.867119,103.401443],[35.867149,103.401558],[35.86763,103.402008],[35.867649,103.402283],[35.867481,103.402573],[35.867161,103.402901],[35.866291,103.403427],[35.86607,103.403679],[35.865761,103.404739],[35.865841,103.406013],[35.865971,103.40625],[35.86607,103.406303],[35.866211,103.406273],[35.867451,103.405586],[35.867729,103.40551],[35.867889,103.405602],[35.86832,103.406197],[35.868839,103.406593],[35.868931,103.406731],[35.86898,103.406891],[35.868931,103.407028],[35.868771,103.407204],[35.867191,103.407806],[35.866859,103.407967],[35.866791,103.408081],[35.866791,103.408257],[35.866909,103.408417],[35.867561,103.408813],[35.867691,103.408951],[35.86776,103.409119],[35.86768,103.409271],[35.867569,103.40934],[35.86515,103.410027],[35.864929,103.410172],[35.864769,103.410393],[35.864689,103.410759],[35.864761,103.411324],[35.864731,103.411621],[35.864109,103.412628],[35.86393,103.413116],[35.863892,103.414146],[35.86396,103.414627],[35.86388,103.414917],[35.863529,103.415466],[35.863441,103.415733],[35.863411,103.416649],[35.863491,103.416946],[35.863731,103.417427],[35.86372,103.417908],[35.863781,103.418327],[35.864071,103.418747],[35.864521,103.420151],[35.864891,103.42057],[35.86499,103.420769],[35.86499,103.421059],[35.864799,103.421509],[35.86478,103.421677],[35.865089,103.422218],[35.865089,103.422607],[35.86515,103.422897],[35.865471,103.423698],[35.865509,103.424347],[35.866211,103.425583],[35.866371,103.425957],[35.866501,103.426392],[35.866631,103.427513],[35.866611,103.427803],[35.866501,103.428108],[35.866081,103.428947],[35.866081,103.429131],[35.866161,103.429199],[35.866261,103.429161],[35.86668,103.428268],[35.86694,103.427948],[35.86705,103.427917],[35.867531,103.428108],[35.867661,103.428101],[35.86779,103.428017],[35.868309,103.427551],[35.86842,103.427544],[35.868481,103.427681],[35.868301,103.427917],[35.867771,103.428368],[35.867661,103.428436],[35.867161,103.42852],[35.867001,103.428658],[35.866699,103.429367],[35.866699,103.429558],[35.866791,103.429817],[35.866791,103.430061],[35.866631,103.430191],[35.866371,103.430267],[35.86623,103.430397],[35.866119,103.430641],[35.86594,103.431297],[35.86578,103.431534],[35.865601,103.431633],[35.86512,103.431763],[35.86441,103.432266],[35.864201,103.432281],[35.863701,103.432137],[35.86356,103.432137],[35.86343,103.432259],[35.86338,103.43248],[35.863491,103.433296],[35.864361,103.435059],[35.864361,103.435333],[35.864269,103.435577],[35.864109,103.435791],[35.863621,103.436157],[35.863491,103.436699],[35.863361,103.436943],[35.862949,103.437317],[35.86245,103.437477],[35.862171,103.437668],[35.861931,103.437866],[35.861752,103.438148],[35.86166,103.438637],[35.86132,103.439491],[35.861229,103.440849],[35.86158,103.441933],[35.861771,103.44236],[35.862122,103.442917],[35.862141,103.443161],[35.862011,103.443298],[35.86132,103.443497],[35.861111,103.443932],[35.861012,103.444],[35.86031,103.444054],[35.8601,103.444153],[35.860031,103.444237],[35.860031,103.444519],[35.86034,103.444893],[35.860371,103.445053],[35.860321,103.445221],[35.86005,103.445541],[35.859909,103.445587],[35.859699,103.445587],[35.858891,103.445396],[35.85844,103.445396],[35.856571,103.445953],[35.8563,103.446091],[35.855801,103.44648],[35.855221,103.446709],[35.85482,103.446999],[35.854191,103.447113],[35.85363,103.447479],[35.852451,103.447937],[35.851891,103.448051],[35.85046,103.447929],[35.850182,103.44796],[35.84903,103.448624],[35.847549,103.449226],[35.8456,103.450958],[35.8447,103.45121],[35.844551,103.451347],[35.844379,103.451988],[35.84417,103.452217],[35.841621,103.453018],[35.84103,103.4533],[35.840721,103.453308],[35.839741,103.453018],[35.839409,103.45269],[35.839081,103.452217],[35.838791,103.451988],[35.837379,103.45195],[35.836552,103.45182],[35.836411,103.451714],[35.836281,103.4515],[35.83577,103.44986],[35.835541,103.449448],[35.834641,103.449051],[35.8339,103.448349],[35.833389,103.448067],[35.831711,103.446968],[35.831539,103.446907],[35.831089,103.446907],[35.83028,103.446663],[35.829361,103.446587],[35.82859,103.446327],[35.828239,103.44632],[35.826759,103.446579],[35.825489,103.446587],[35.823792,103.446289],[35.822731,103.446251],[35.822109,103.445961],[35.82196,103.445953],[35.821239,103.446121],[35.82066,103.446564],[35.820499,103.446617],[35.819111,103.446938],[35.816921,103.447937],[35.816559,103.448021],[35.81599,103.447937],[35.814091,103.44809],[35.81358,103.448036],[35.812801,103.448151],[35.8125,103.448067],[35.81221,103.447906],[35.812111,103.447777],[35.81205,103.447578],[35.81213,103.446388],[35.812031,103.445686],[35.812229,103.444946],[35.812241,103.444763],[35.812191,103.44458],[35.811161,103.443619],[35.810452,103.442787],[35.809799,103.442299],[35.809681,103.442131],[35.808922,103.440361],[35.808731,103.440071],[35.80843,103.439758],[35.808281,103.439697],[35.807869,103.439728],[35.807449,103.439537],[35.806911,103.439407],[35.805611,103.438591],[35.804291,103.438309],[35.80405,103.438179],[35.803631,103.43782],[35.802731,103.437592],[35.802341,103.437393],[35.801941,103.437286],[35.80056,103.437141],[35.7995,103.437111],[35.798691,103.437286],[35.798481,103.43721],[35.798012,103.436867],[35.797791,103.436821],[35.795181,103.43663],[35.793781,103.436768],[35.792801,103.436974],[35.79229,103.43692],[35.79073,103.436157],[35.78941,103.435959],[35.788971,103.435799],[35.787891,103.434837],[35.787312,103.434486],[35.786201,103.434097],[35.785431,103.434029],[35.783321,103.432663],[35.78191,103.431961],[35.780861,103.431618],[35.780449,103.431396],[35.779381,103.431396],[35.77903,103.431473],[35.778332,103.431137],[35.777512,103.431],[35.77626,103.430901],[35.77512,103.430588],[35.774719,103.430557],[35.77388,103.430611],[35.77367,103.430557],[35.773472,103.430397],[35.773041,103.429649],[35.772831,103.429337],[35.771561,103.428581],[35.770069,103.427193],[35.769489,103.427048],[35.768162,103.42617],[35.767551,103.426033],[35.767231,103.425774],[35.76545,103.424019],[35.764339,103.423241],[35.763401,103.42289],[35.762741,103.422348],[35.762371,103.421913],[35.76136,103.420219],[35.761292,103.419991],[35.761238,103.419327],[35.76086,103.418114],[35.760712,103.417877],[35.76012,103.417557],[35.759979,103.417381],[35.759651,103.41674],[35.759491,103.41655],[35.758671,103.415916],[35.757431,103.415581],[35.757252,103.415482],[35.757038,103.415268],[35.756512,103.414574],[35.75589,103.414101],[35.755531,103.413559],[35.755131,103.413231],[35.75449,103.41291],[35.7537,103.412727],[35.753029,103.412468],[35.751961,103.4123],[35.751732,103.412338],[35.75153,103.412437],[35.750721,103.413139],[35.750191,103.413361],[35.748661,103.414337],[35.747501,103.415573],[35.747021,103.416161],[35.746319,103.416679],[35.74596,103.417007],[35.74577,103.417267],[35.745159,103.417717],[35.744869,103.418159],[35.74469,103.418793],[35.74456,103.418877],[35.744171,103.418907],[35.743889,103.419144],[35.74361,103.419609],[35.743511,103.41996],[35.743462,103.420349],[35.74345,103.420807],[35.743721,103.421707],[35.743698,103.42186],[35.743629,103.421928],[35.743401,103.421959],[35.742809,103.421829],[35.7416,103.421478],[35.741199,103.42128],[35.74094,103.421227],[35.74065,103.42131],[35.74012,103.421638],[35.739811,103.421738],[35.738621,103.421799],[35.737419,103.422371],[35.736851,103.422546],[35.736271,103.423141],[35.735371,103.423576],[35.734909,103.424309],[35.73457,103.42469],[35.733471,103.425323],[35.732941,103.425507],[35.732761,103.425659],[35.73243,103.426041],[35.731781,103.426521],[35.731392,103.426888],[35.73093,103.427017],[35.73019,103.427361],[35.729591,103.427727],[35.728901,103.427887],[35.727501,103.428978],[35.72707,103.429199],[35.726212,103.429367],[35.72541,103.430107],[35.725182,103.43026],[35.72477,103.430443],[35.723,103.431],[35.722721,103.430969],[35.72171,103.430527],[35.72142,103.430519],[35.720909,103.43058],[35.720711,103.430641],[35.719101,103.431473],[35.718399,103.43222],[35.718151,103.432373],[35.717541,103.432457],[35.717239,103.432411],[35.716431,103.432129],[35.716171,103.432137],[35.7155,103.432327],[35.714588,103.43293],[35.713051,103.43364],[35.71278,103.433823],[35.71246,103.434158],[35.712231,103.434334],[35.71172,103.434471],[35.711391,103.434441],[35.710972,103.434128],[35.710869,103.43399],[35.710831,103.433823],[35.71093,103.431198],[35.71101,103.430946],[35.7113,103.430458],[35.711399,103.430191],[35.711391,103.429947],[35.711239,103.429314],[35.711208,103.428047],[35.711151,103.427719],[35.710819,103.427368],[35.710091,103.426849],[35.70953,103.42601],[35.708981,103.425728],[35.708778,103.425507],[35.70842,103.424606],[35.708229,103.423592],[35.70797,103.42308],[35.707722,103.422737],[35.706871,103.422058],[35.706322,103.421387],[35.70499,103.419319],[35.7048,103.418739],[35.704361,103.416847],[35.703651,103.415848],[35.70327,103.41497],[35.703098,103.414879],[35.70266,103.414818],[35.702049,103.414467],[35.701721,103.414383],[35.701271,103.414291],[35.70076,103.414337],[35.700081,103.414261],[35.69939,103.413971],[35.69849,103.413681],[35.697868,103.413673],[35.697472,103.413559],[35.696949,103.413498],[35.696659,103.413551],[35.696331,103.413689],[35.696159,103.413696],[35.695,103.413429],[35.69334,103.41317],[35.692032,103.41304],[35.69128,103.41317],[35.690941,103.413109],[35.69067,103.412949],[35.690331,103.412468],[35.690182,103.412369],[35.687698,103.411743],[35.687191,103.411568],[35.68639,103.411217],[35.685081,103.41053],[35.684212,103.410477],[35.682892,103.410057],[35.68222,103.410103],[35.681419,103.41024],[35.680771,103.410057],[35.680248,103.410011],[35.67989,103.409798],[35.679691,103.409737],[35.679241,103.409889],[35.678841,103.41011],[35.678001,103.41021],[35.67762,103.410141],[35.676731,103.40963],[35.676571,103.409576],[35.6759,103.40979],[35.675289,103.410103],[35.675011,103.410103],[35.674641,103.410011],[35.674511,103.40992],[35.674179,103.409286],[35.67355,103.408478],[35.673241,103.407913],[35.672878,103.406868],[35.67276,103.406113],[35.672611,103.405769],[35.67205,103.40509],[35.671398,103.40477],[35.671242,103.40461],[35.67078,103.403748],[35.670349,103.403191],[35.669762,103.402283],[35.66938,103.401527],[35.667961,103.39978],[35.667419,103.399017],[35.666729,103.397881],[35.666481,103.397179],[35.666401,103.3964],[35.666401,103.396027],[35.6665,103.39534],[35.66684,103.394257],[35.666851,103.39389],[35.6661,103.392097],[35.665989,103.391739],[35.665932,103.391281],[35.66592,103.390427],[35.666031,103.389999],[35.66695,103.388039],[35.666988,103.387772],[35.666931,103.386757],[35.666962,103.386276],[35.667122,103.385788],[35.667679,103.38459],[35.667751,103.384331],[35.667721,103.384216],[35.667549,103.384087],[35.66613,103.383667],[35.665871,103.38353],[35.66489,103.382767],[35.664322,103.381897],[35.664261,103.381706],[35.664249,103.381287],[35.6642,103.381027],[35.664322,103.38092],[35.665871,103.378578],[35.666142,103.378319],[35.66671,103.378059],[35.666851,103.377937],[35.666889,103.377823],[35.66687,103.377693],[35.666512,103.37719],[35.666351,103.376846],[35.666328,103.376404],[35.666401,103.375977],[35.666561,103.375519],[35.66674,103.375221],[35.666988,103.374947],[35.66732,103.374748],[35.668049,103.374527],[35.668598,103.37394],[35.66864,103.373871],[35.66864,103.373657],[35.668331,103.373161],[35.668308,103.37291],[35.668442,103.372383],[35.668991,103.370827],[35.669281,103.370537],[35.669781,103.370399],[35.669899,103.370308],[35.67017,103.369781],[35.670681,103.369217],[35.670738,103.369003],[35.67075,103.368317],[35.671169,103.366959],[35.67131,103.366699],[35.67149,103.366508],[35.67197,103.366348],[35.672138,103.366158],[35.67226,103.365868],[35.672588,103.365303],[35.672779,103.364464],[35.673592,103.362717],[35.67384,103.362488],[35.674469,103.362373],[35.67466,103.362167],[35.674641,103.361969],[35.67429,103.361183],[35.674179,103.360779],[35.674141,103.360336],[35.674179,103.35997],[35.674278,103.35952],[35.6744,103.3592],[35.675159,103.357887],[35.675381,103.357407],[35.675671,103.356628],[35.67572,103.356117],[35.675522,103.354897],[35.675228,103.354187],[35.67519,103.353928],[35.67511,103.352631],[35.67495,103.351517],[35.674931,103.350708],[35.67498,103.349876],[35.675152,103.349289],[35.676109,103.348091],[35.676201,103.347801],[35.676189,103.347366],[35.67625,103.347],[35.67664,103.346359],[35.676708,103.346169],[35.676651,103.34594],[35.676479,103.345848],[35.67622,103.345863],[35.675591,103.346001],[35.675369,103.345947],[35.674358,103.34494],[35.674191,103.344566],[35.673908,103.343567],[35.673439,103.342529],[35.672691,103.341347],[35.672001,103.339569],[35.67157,103.338913],[35.67141,103.338219],[35.671101,103.337196],[35.671089,103.336029],[35.671391,103.335098],[35.67144,103.33448],[35.671391,103.334053],[35.671181,103.333214],[35.671169,103.332649],[35.671379,103.33062],[35.671589,103.32991],[35.671638,103.329498],[35.671589,103.329224],[35.670971,103.327377],[35.67094,103.326408],[35.671162,103.324913],[35.67104,103.323448],[35.670731,103.322311],[35.670158,103.321243],[35.670052,103.320953],[35.669651,103.319107],[35.669701,103.318359],[35.66983,103.317574],[35.670078,103.317001],[35.670559,103.316399],[35.671478,103.316109],[35.672039,103.315468],[35.672112,103.315041],[35.672001,103.314247],[35.672031,103.313904],[35.672371,103.312859],[35.672649,103.312218],[35.672852,103.31192],[35.673111,103.311699],[35.673901,103.31144],[35.674511,103.31105],[35.674591,103.310944],[35.674629,103.310707],[35.674511,103.310501],[35.674358,103.310379],[35.673752,103.310043],[35.673439,103.309769],[35.673,103.30909],[35.672859,103.308746],[35.672291,103.306664],[35.672249,103.30632],[35.672241,103.305237],[35.672031,103.30368],[35.67181,103.303261],[35.671211,103.302803],[35.671021,103.302429],[35.670952,103.302147],[35.670959,103.301697],[35.671268,103.30024],[35.671268,103.299927],[35.6712,103.299637],[35.67104,103.2994],[35.670189,103.298431],[35.669708,103.297737],[35.66906,103.29705],[35.668468,103.295937],[35.66814,103.295647],[35.667011,103.29483],[35.666752,103.294487],[35.66613,103.293007],[35.665619,103.291512],[35.665421,103.290428],[35.66547,103.289299],[35.66563,103.289001],[35.6661,103.288353],[35.666439,103.287956],[35.667191,103.287514],[35.667252,103.287369],[35.66721,103.287209],[35.666969,103.287086],[35.665951,103.287117],[35.66523,103.287567],[35.665001,103.287628],[35.664711,103.28759],[35.66431,103.287376],[35.664001,103.287308],[35.663181,103.287369],[35.662651,103.287308],[35.662441,103.287209],[35.662392,103.287086],[35.66243,103.286957],[35.662498,103.286911],[35.66312,103.287117],[35.663261,103.287079],[35.663288,103.286957],[35.663158,103.286827],[35.662258,103.286507],[35.661449,103.286011],[35.661442,103.285828],[35.661579,103.285767],[35.662231,103.286209],[35.662338,103.286217],[35.662361,103.286171],[35.662338,103.286049],[35.66177,103.285568],[35.661541,103.285301],[35.661201,103.284683],[35.66111,103.28434],[35.660938,103.282738],[35.6609,103.2826],[35.660751,103.282387],[35.660568,103.282318],[35.65966,103.282188],[35.659149,103.281898],[35.65765,103.281517],[35.65723,103.281487],[35.657101,103.281387],[35.65707,103.281288],[35.657101,103.281197],[35.65723,103.281128],[35.658131,103.281342],[35.658291,103.281258],[35.65831,103.281151],[35.658291,103.281067],[35.65818,103.281013],[35.65773,103.280991],[35.657372,103.280891],[35.656239,103.280273],[35.654949,103.279778],[35.654598,103.279572],[35.65456,103.279449],[35.654621,103.27935],[35.655392,103.279572],[35.65596,103.27951],[35.65641,103.279533],[35.65654,103.27948],[35.656582,103.279373],[35.656528,103.279259],[35.656471,103.279228],[35.655281,103.279137],[35.65514,103.279053],[35.65514,103.278923],[35.655182,103.278839],[35.655331,103.278748],[35.656681,103.278648],[35.656792,103.278557],[35.656761,103.278397],[35.656651,103.278313],[35.655998,103.278236],[35.655331,103.278297],[35.655258,103.278229],[35.655251,103.278137],[35.6553,103.278038],[35.65546,103.277946],[35.65675,103.27771],[35.65683,103.277557],[35.656811,103.277481],[35.6567,103.277397],[35.655861,103.277428],[35.65443,103.277191],[35.65427,103.277077],[35.654251,103.276917],[35.65448,103.276817],[35.65659,103.276543],[35.656731,103.276367],[35.656731,103.276268],[35.656681,103.276176],[35.656528,103.276077],[35.655151,103.27552],[35.65369,103.275146],[35.653419,103.275131],[35.653278,103.275177],[35.652969,103.275414],[35.652748,103.275414],[35.65258,103.275169],[35.652451,103.274719],[35.652321,103.27446],[35.651939,103.274063],[35.651451,103.273788],[35.651291,103.273598],[35.651299,103.27343],[35.65136,103.273361],[35.651501,103.273323],[35.651642,103.273369],[35.652271,103.273804],[35.65239,103.273811],[35.652481,103.273743],[35.6525,103.273628],[35.652458,103.273483],[35.65226,103.273148],[35.6521,103.272957],[35.651661,103.272659],[35.651211,103.272621],[35.65004,103.272881],[35.649658,103.273033],[35.649212,103.273361],[35.649109,103.273376],[35.648979,103.273323],[35.64819,103.272118],[35.646919,103.271004],[35.646561,103.270851],[35.64571,103.270798],[35.645481,103.270714],[35.64291,103.267601],[35.642479,103.267113],[35.641449,103.266518],[35.640148,103.265381],[35.639851,103.26535],[35.639332,103.26561],[35.638561,103.265511],[35.638519,103.265419],[35.638618,103.265297],[35.639278,103.265327],[35.639462,103.265289],[35.640018,103.264847],[35.64048,103.264709],[35.64053,103.264664],[35.640541,103.264526],[35.640461,103.264488],[35.640331,103.264511],[35.639488,103.264816],[35.639141,103.264877],[35.63884,103.264847],[35.637539,103.264397],[35.63736,103.26413],[35.636978,103.262703],[35.636829,103.262299],[35.63596,103.260696],[35.634201,103.25956],[35.633709,103.259323],[35.633259,103.259193],[35.633369,103.258347],[35.633419,103.257973],[35.63335,103.25753],[35.632938,103.256683],[35.631889,103.254807],[35.631321,103.253601],[35.630329,103.252037],[35.629211,103.251122],[35.627739,103.249153],[35.62553,103.245537],[35.62373,103.242867],[35.622391,103.240761],[35.620541,103.236931],[35.620201,103.236359],[35.618198,103.23378],[35.617821,103.233383],[35.616402,103.232117],[35.614368,103.230057],[35.612492,103.228554],[35.61097,103.227501],[35.61018,103.22702],[35.60989,103.226784],[35.60968,103.226479],[35.609032,103.225113],[35.608459,103.223633],[35.606361,103.217888],[35.60556,103.215599],[35.605331,103.214813],[35.605228,103.214073],[35.604889,103.211906],[35.604721,103.210388],[35.60458,103.209633],[35.604149,103.206146],[35.60376,103.203613],[35.6036,103.202927],[35.603359,103.202293],[35.603119,103.201691],[35.602638,103.200798],[35.601089,103.198578],[35.600658,103.198082],[35.599781,103.197357],[35.598999,103.196541],[35.597111,103.195717],[35.596088,103.194817],[35.59544,103.194504],[35.595081,103.19426],[35.59306,103.192612],[35.592621,103.192284],[35.59185,103.191849],[35.59042,103.190697],[35.590179,103.190697],[35.58989,103.19088],[35.588188,103.19265],[35.58741,103.193542],[35.584061,103.197113],[35.582069,103.199463],[35.58186,103.199707],[35.581558,103.199982],[35.575211,103.207153],[35.57468,103.207718],[35.57449,103.207787],[35.57439,103.207703],[35.5728,103.204857],[35.57233,103.203918],[35.571621,103.201767],[35.571049,103.200562],[35.567841,103.195183],[35.566792,103.19313],[35.56625,103.191948],[35.564529,103.187828],[35.56329,103.185181],[35.562019,103.182838],[35.56052,103.180397],[35.55962,103.179077],[35.556969,103.175499],[35.55489,103.17289],[35.550018,103.166527],[35.548321,103.164391],[35.5476,103.163391],[35.546902,103.162338],[35.545528,103.16008],[35.543041,103.15567],[35.54232,103.15464],[35.541561,103.153687],[35.54073,103.152809],[35.539799,103.152023],[35.538818,103.151321],[35.535782,103.149399],[35.534851,103.148666],[35.533989,103.147789],[35.533211,103.146782],[35.532539,103.145638],[35.53196,103.14431],[35.530941,103.141441],[35.530281,103.140083],[35.529461,103.138878],[35.526112,103.134903],[35.5242,103.13282],[35.523232,103.132057],[35.521309,103.13089],[35.520531,103.130219],[35.51989,103.129433],[35.519241,103.128273],[35.51741,103.124367],[35.516689,103.1231],[35.514229,103.119591],[35.5135,103.118378],[35.512829,103.117073],[35.511581,103.114212],[35.510941,103.1129],[35.510281,103.111717],[35.509041,103.109848],[35.505951,103.106201],[35.505112,103.104973],[35.50441,103.103653],[35.50386,103.102333],[35.50346,103.101013],[35.503189,103.099716],[35.502399,103.094597],[35.502201,103.093712],[35.501808,103.092293],[35.501389,103.090981],[35.50058,103.08902],[35.499882,103.087723],[35.495811,103.081123],[35.48962,103.071373],[35.488949,103.070259],[35.488369,103.069061],[35.487919,103.067871],[35.487572,103.066711],[35.48708,103.064552],[35.486481,103.062363],[35.486,103.060966],[35.485378,103.059608],[35.484631,103.058342],[35.483799,103.05722],[35.478809,103.051376],[35.47821,103.050323],[35.477829,103.049171],[35.47768,103.047943],[35.477772,103.045326],[35.47773,103.043961],[35.47747,103.042709],[35.477051,103.041588],[35.476521,103.040527],[35.47591,103.03965],[35.47348,103.036369],[35.473091,103.035751],[35.472778,103.035004],[35.472481,103.034416],[35.47213,103.033684],[35.471741,103.03286],[35.471352,103.031998],[35.470959,103.03112],[35.47057,103.030228],[35.4702,103.029404],[35.469872,103.028671],[35.469601,103.028069],[35.469429,103.02774],[35.469158,103.027458],[35.46896,103.027069],[35.468651,103.026581],[35.46825,103.025993],[35.467819,103.025383],[35.467369,103.024727],[35.4669,103.023933],[35.466431,103.022949],[35.465912,103.021828],[35.465328,103.020729],[35.46468,103.019623],[35.464008,103.018539],[35.463291,103.017517],[35.462559,103.016533],[35.461849,103.015556],[35.46114,103.014618],[35.46048,103.013733],[35.459919,103.012947],[35.45927,103.012123],[35.458549,103.011261],[35.457821,103.010536],[35.457119,103.009933],[35.456459,103.009354],[35.45591,103.008858],[35.455589,103.008537],[35.455299,103.008209],[35.45509,103.00795],[35.454781,103.007591],[35.454411,103.007004],[35.45396,103.00631],[35.45343,103.005493],[35.452881,103.004639],[35.45229,103.003723],[35.45166,103.002747],[35.450989,103.001732],[35.450352,103.000763],[35.449749,102.999847],[35.449181,102.99894],[35.448589,102.998016],[35.448009,102.997017],[35.44743,102.995979],[35.44685,102.994904],[35.446331,102.993752],[35.44582,102.992622],[35.44537,102.991463],[35.44492,102.990227],[35.444489,102.988983],[35.44408,102.987747],[35.44368,102.986572],[35.443291,102.985443],[35.442909,102.984306],[35.442478,102.983147],[35.442039,102.982018],[35.441681,102.981148],[35.44136,102.980476],[35.440971,102.97966],[35.440491,102.978683],[35.439949,102.977654],[35.439381,102.976646],[35.43877,102.975662],[35.438099,102.97467],[35.43742,102.97364],[35.436722,102.97261],[35.436008,102.971558],[35.435322,102.970543],[35.43462,102.969528],[35.433941,102.968452],[35.4333,102.967262],[35.43269,102.966011],[35.43211,102.964684],[35.43158,102.963417],[35.431,102.962303],[35.430302,102.961357],[35.429562,102.960564],[35.428768,102.959732],[35.427952,102.958832],[35.42709,102.957909],[35.426281,102.956879],[35.425621,102.955727],[35.425098,102.954536],[35.424549,102.953484],[35.423809,102.952728],[35.422932,102.952316],[35.422001,102.952164],[35.421009,102.951927],[35.420071,102.951408],[35.419189,102.950607],[35.418491,102.94957],[35.418018,102.94838],[35.417789,102.947189],[35.417782,102.946098],[35.41782,102.945053],[35.4179,102.944054],[35.417839,102.943031],[35.417629,102.941994],[35.417309,102.94101],[35.41695,102.940071],[35.416561,102.939163],[35.416069,102.938316],[35.415401,102.937714],[35.414631,102.937431],[35.41383,102.937317],[35.413139,102.937134],[35.412491,102.936829],[35.411789,102.936691],[35.4114,102.936707],[35.411301,102.936707],[35.411072,102.93676],[35.41066,102.936859],[35.409988,102.937027],[35.409199,102.937218],[35.408352,102.937424],[35.407452,102.937622],[35.406528,102.937851],[35.405682,102.938026],[35.404869,102.937973],[35.404079,102.937561],[35.403461,102.93679],[35.403118,102.935806],[35.403011,102.934837],[35.403049,102.933891],[35.40324,102.932953],[35.403542,102.932159],[35.40387,102.931419],[35.40424,102.930603],[35.40443,102.929657],[35.404491,102.928612],[35.404388,102.927582],[35.404121,102.926682],[35.403759,102.925926],[35.403309,102.925323],[35.402802,102.92482],[35.40226,102.924454],[35.401581,102.924118],[35.400791,102.923843],[35.399948,102.923599],[35.399151,102.9235],[35.39827,102.923492],[35.39735,102.923553],[35.396461,102.923607],[35.39558,102.923599],[35.394718,102.923477],[35.39389,102.923233],[35.39307,102.922943],[35.392231,102.922623],[35.39143,102.92234],[35.39061,102.921997],[35.389771,102.921677],[35.388908,102.921349],[35.388069,102.921028],[35.387199,102.9207],[35.386341,102.920349],[35.385529,102.919762],[35.38496,102.918961],[35.384529,102.918007],[35.384071,102.917122],[35.3834,102.916473],[35.382599,102.916077],[35.38166,102.915848],[35.380772,102.915627],[35.37994,102.915367],[35.379131,102.915009],[35.378422,102.914597],[35.377838,102.914192],[35.37468,102.90918],[35.374611,102.908829],[35.374439,102.908287],[35.374298,102.907402],[35.374321,102.906273],[35.374531,102.905228],[35.37495,102.904221],[35.375511,102.903107],[35.3759,102.90184],[35.375999,102.900543],[35.375912,102.899307],[35.375759,102.898193],[35.37561,102.897133],[35.375469,102.89608],[35.375301,102.894974],[35.374969,102.893929],[35.374378,102.89315],[35.37368,102.892708],[35.372768,102.892517],[35.371868,102.892357],[35.370911,102.892181],[35.36985,102.891998],[35.368778,102.891777],[35.367809,102.891579],[35.366951,102.891083],[35.366268,102.890213],[35.365891,102.889053],[35.365669,102.888008],[35.36544,102.887177],[35.36515,102.886414],[35.36488,102.885513],[35.36478,102.884354],[35.364731,102.883034],[35.364552,102.88176],[35.364288,102.880661],[35.364029,102.879623],[35.363899,102.878464],[35.364021,102.877327],[35.364441,102.876213],[35.364979,102.875038],[35.365551,102.873749],[35.366169,102.872398],[35.366798,102.870979],[35.36742,102.869614],[35.368019,102.868248],[35.368549,102.866814],[35.368858,102.865257],[35.368961,102.86364],[35.368801,102.862106],[35.368431,102.860733],[35.368,102.859467],[35.367599,102.858261],[35.36639,102.854156],[35.365791,102.853081],[35.364971,102.852219],[35.363811,102.851501],[35.363041,102.850388],[35.362431,102.84906],[35.362061,102.847656],[35.36227,102.846184],[35.362411,102.844818],[35.36026,102.837929],[35.359489,102.837067],[35.35873,102.836166],[35.35833,102.834877],[35.358231,102.833473],[35.35804,102.83223],[35.357498,102.831139],[35.35677,102.830231],[35.35622,102.829117],[35.355942,102.827766],[35.355701,102.826424],[35.35524,102.825127],[35.35461,102.823883],[35.35376,102.822739],[35.352798,102.821808],[35.35183,102.821068],[35.35104,102.820137],[35.350651,102.81884],[35.350788,102.81739],[35.35146,102.816071],[35.352291,102.814774],[35.352989,102.813347],[35.353378,102.811852],[35.353401,102.810509],[35.353149,102.809212],[35.35268,102.807991],[35.35199,102.806923],[35.351181,102.805923],[35.35033,102.804901],[35.349461,102.803833],[35.348579,102.802696],[35.347729,102.801422],[35.346909,102.800049],[35.346119,102.798599],[35.34531,102.797157],[35.344509,102.795769],[35.34375,102.794441],[35.342979,102.793121],[35.342239,102.791832],[35.341431,102.790657],[35.34045,102.789818],[35.339298,102.789383],[35.3381,102.789253],[35.336971,102.789108],[35.33593,102.788727],[35.334961,102.787979],[35.334099,102.786957],[35.333279,102.785858],[35.332409,102.784927],[35.331421,102.784317],[35.330471,102.784027],[35.329521,102.783981],[35.32848,102.783913],[35.3274,102.783783],[35.326351,102.783684],[35.325291,102.783577],[35.32428,102.783379],[35.32341,102.782951],[35.322651,102.782417],[35.321892,102.781883],[35.32111,102.781273],[35.320259,102.780647],[35.319302,102.779938],[35.318272,102.779167],[35.317268,102.778442],[35.316319,102.777733],[35.31538,102.777039],[35.314579,102.776443],[35.313789,102.775848],[35.313019,102.775261],[35.31218,102.774643],[35.311279,102.773972],[35.310329,102.773247],[35.309299,102.772476],[35.308281,102.771721],[35.30727,102.770973],[35.306221,102.770241],[35.305149,102.76963],[35.303982,102.769386],[35.302799,102.769669],[35.301762,102.770378],[35.300961,102.771469],[35.300449,102.772797],[35.300171,102.774277],[35.29998,102.775772],[35.29966,102.777222],[35.299042,102.778503],[35.298061,102.779442],[35.29686,102.779953],[35.29562,102.780006],[35.294418,102.77993],[35.293289,102.779846],[35.292091,102.779808],[35.290871,102.780098],[35.289761,102.780853],[35.288792,102.781937],[35.287811,102.783127],[35.286819,102.784317],[35.285671,102.785278],[35.284519,102.785851],[35.283691,102.786346],[35.282909,102.786987],[35.28215,102.787903],[35.281509,102.789078],[35.28088,102.790298],[35.27998,102.791092],[35.279041,102.791397],[35.278191,102.791832],[35.277489,102.792702],[35.276871,102.793739],[35.27599,102.794518],[35.275082,102.795197],[35.274281,102.796066],[35.273659,102.797142],[35.27285,102.797981],[35.271969,102.798538],[35.27113,102.799278],[35.270439,102.800369],[35.27002,102.801697],[35.269691,102.803078],[35.269009,102.804176],[35.26833,102.80526],[35.267719,102.806412],[35.267151,102.807663],[35.26646,102.808907],[35.265461,102.809837],[35.26432,102.810318],[35.263149,102.810349],[35.262001,102.810471],[35.260948,102.810944],[35.260021,102.811798],[35.259159,102.813004],[35.258171,102.814133],[35.256962,102.81472],[35.255711,102.814743],[35.254459,102.814583],[35.253288,102.814636],[35.252251,102.815086],[35.251461,102.81588],[35.250809,102.81662],[35.25013,102.817413],[35.24934,102.818222],[35.248451,102.819069],[35.247459,102.819939],[35.246399,102.820847],[35.2453,102.821823],[35.24419,102.822777],[35.243111,102.823723],[35.24213,102.824547],[35.241241,102.825233],[35.240318,102.825447],[35.23938,102.825203],[35.238338,102.824837],[35.237228,102.824516],[35.23616,102.824661],[35.235271,102.82534],[35.23457,102.826111],[35.23394,102.826828],[35.23325,102.827423],[35.232368,102.827667],[35.23151,102.827499],[35.230751,102.826981],[35.22998,102.826317],[35.229229,102.825653],[35.2285,102.825111],[35.227921,102.824867],[35.227428,102.824753],[35.226891,102.824638],[35.226311,102.824516],[35.225788,102.824364],[35.2253,102.824142],[35.224899,102.823929],[35.224579,102.823761],[35.224289,102.823593],[35.223721,102.823593],[35.223019,102.824867],[35.22028,102.823959],[35.219189,102.82222],[35.219341,102.820396],[35.217682,102.819847],[35.216991,102.819962],[35.216461,102.820084],[35.216099,102.820137],[35.21553,102.820168],[35.214588,102.82019],[35.212101,102.820183],[35.211349,102.820267],[35.210251,102.820648],[35.209091,102.821487],[35.20895,102.821457],[35.20776,102.822563],[35.207409,102.822762],[35.206841,102.82299],[35.20562,102.823189],[35.205009,102.823189],[35.203999,102.823151],[35.20266,102.82312],[35.20145,102.822144],[35.19294,102.825737],[35.191181,102.825211],[35.18959,102.824623],[35.18874,102.823799],[35.187778,102.822731],[35.187222,102.822189],[35.186218,102.821831],[35.18605,102.821823],[35.185322,102.821877],[35.184959,102.821877],[35.184441,102.821777],[35.18425,102.821716],[35.182701,102.820602],[35.182388,102.82045],[35.181721,102.820358],[35.180901,102.820633],[35.180462,102.820976],[35.180199,102.821297],[35.17981,102.822037],[35.179729,102.822243],[35.179531,102.822861],[35.17952,102.824043],[35.177551,102.824539],[35.176521,102.824928],[35.169189,102.832947],[35.168301,102.831947],[35.167881,102.832352],[35.16703,102.833344],[35.166321,102.834084],[35.165489,102.834763],[35.164631,102.835503],[35.16338,102.836906],[35.162361,102.838348],[35.16256,102.839882],[35.156368,102.845108],[35.15435,102.845139],[35.153439,102.845741],[35.152439,102.846649],[35.15229,102.846764],[35.151039,102.847153],[35.14999,102.847733],[35.148682,102.84922],[35.144951,102.850227],[35.143131,102.848869],[35.142151,102.848541],[35.140621,102.848083],[35.1395,102.847763],[35.138168,102.847656],[35.137821,102.847679],[35.136589,102.847939],[35.13625,102.848083],[35.134949,102.848778],[35.13311,102.849907],[35.130322,102.850929],[35.12952,102.851608],[35.128719,102.85257],[35.127361,102.853859],[35.126019,102.855324],[35.114201,102.858513],[35.114029,102.860222],[35.113811,102.860641],[35.11343,102.861794],[35.11274,102.863426],[35.111851,102.86483],[35.110458,102.866867],[35.110008,102.867348],[35.108829,102.868202],[35.106941,102.869392],[35.1059,102.870377],[35.105209,102.871582],[35.104801,102.872726],[35.10276,102.878822],[35.101971,102.881264],[35.101219,102.882874],[35.100349,102.884193],[35.09911,102.886208],[35.09874,102.887062],[35.098228,102.888268],[35.097759,102.889137],[35.09724,102.889877],[35.096531,102.890739],[35.09597,102.891609],[35.095181,102.893143],[35.094181,102.894974],[35.093029,102.896812],[35.09185,102.898552],[35.091179,102.899857],[35.09074,102.90136],[35.09066,102.902786],[35.090691,102.903732],[35.090698,102.904198],[35.090401,102.905327],[35.090199,102.905724],[35.089939,102.906036],[35.089359,102.906487],[35.088699,102.906723],[35.088348,102.906731],[35.08746,102.906471],[35.086861,102.906021],[35.085949,102.905281],[35.085789,102.905167],[35.084629,102.90464],[35.084122,102.904533],[35.083241,102.904503],[35.08252,102.904678],[35.082439,102.905113],[35.080551,102.905243],[35.080002,102.905342],[35.07943,102.905388],[35.078529,102.905533],[35.077862,102.905724],[35.07674,102.906197],[35.076092,102.906303],[35.075779,102.906281],[35.075321,102.906151],[35.074951,102.905998],[35.074261,102.905907],[35.073589,102.905968],[35.073021,102.906273],[35.0728,102.906464],[35.07222,102.907021],[35.07185,102.907333],[35.070881,102.907707],[35.07037,102.90773],[35.069679,102.907471],[35.069519,102.907372],[35.06921,102.907112],[35.06815,102.905968],[35.067699,102.905647],[35.066841,102.905418],[35.066139,102.905472],[35.065319,102.905853],[35.06353,102.906998],[35.060638,102.908791],[35.059471,102.909378],[35.05872,102.909523],[35.057129,102.909554],[35.05666,102.909569],[35.055828,102.909561],[35.055069,102.909683],[35.05476,102.909767],[35.054298,102.909988],[35.053692,102.910393],[35.053219,102.910629],[35.052132,102.911293],[35.05164,102.911552],[35.051029,102.911957],[35.050388,102.9123],[35.049751,102.912727],[35.049061,102.913116],[35.0485,102.913307],[35.047729,102.91349],[35.04673,102.913612],[35.045731,102.913612],[35.045341,102.913628],[35.04422,102.91391],[35.043549,102.914284],[35.043388,102.914413],[35.042709,102.915176],[35.042332,102.915733],[35.041721,102.916733],[35.04084,102.918243],[35.040649,102.918663],[35.04018,102.919487],[35.03981,102.920067],[35.039669,102.920258],[35.038979,102.920837],[35.034828,102.92321],[35.034069,102.923576],[35.033489,102.923683],[35.032349,102.923714],[35.031311,102.924141],[35.03067,102.924637],[35.030319,102.92485],[35.029362,102.925087],[35.028751,102.925011],[35.027981,102.924629],[35.02702,102.924057],[35.02623,102.923759],[35.025589,102.923683],[35.025311,102.923691],[35.02446,102.924072],[35.023602,102.924522],[35.023251,102.924591],[35.022881,102.924622],[35.022148,102.924583],[35.021389,102.924629],[35.020828,102.924843],[35.020691,102.924896],[35.020302,102.925171],[35.019508,102.925797],[35.018921,102.926018],[35.017399,102.926132],[35.017029,102.926201],[35.01582,102.92659],[35.015659,102.926613],[35.014999,102.926613],[35.0144,102.926361],[35.01395,102.926071],[35.013599,102.925758],[35.01334,102.925507],[35.01223,102.924316],[35.011372,102.923477],[35.010792,102.922783],[35.010441,102.922287],[35.01025,102.921921],[35.01001,102.921494],[35.00967,102.9207],[35.008801,102.918907],[35.008308,102.917824],[35.007332,102.915756],[35.005859,102.912498],[35.00528,102.91127],[35.004841,102.910263],[35.004608,102.909851],[35.00452,102.909607],[35.00441,102.909309],[35.004002,102.908371],[35.003311,102.906532],[35.002911,102.905418],[35.00272,102.904968],[35.002331,102.904541],[35.00214,102.904472],[35.001499,102.904503],[35.000359,102.904617],[34.999981,102.904694],[34.998661,102.905273],[34.99477,102.905273],[34.993271,102.904968],[34.993111,102.906036],[34.993172,102.906326],[34.993172,102.906883],[34.993061,102.907677],[34.992901,102.9077],[34.992901,102.907707],[34.99292,102.907784],[34.992962,102.908218],[34.993011,102.908371],[34.99297,102.908592],[34.992722,102.908707],[34.99202,102.90873],[34.990101,102.908607],[34.989811,102.908546],[34.98624,102.908333],[34.97057,102.907372],[34.970188,102.907257],[34.96883,102.907173],[34.968571,102.907097],[34.968449,102.906738],[34.968349,102.906082],[34.96822,102.905457],[34.967999,102.904533],[34.967899,102.904167],[34.967709,102.903862],[34.967522,102.903618],[34.967319,102.90345],[34.966942,102.903412],[34.96677,102.903374],[34.966469,102.903259],[34.966099,102.903061],[34.965698,102.902763],[34.96529,102.902351],[34.965,102.90197],[34.964722,102.90155],[34.96365,102.899529],[34.96339,102.899071],[34.96312,102.898552],[34.962379,102.897202],[34.961761,102.896187],[34.961559,102.895844],[34.961151,102.895271],[34.960979,102.894951],[34.96072,102.894524],[34.960529,102.894287],[34.960339,102.893967],[34.958981,102.892014],[34.958031,102.890839],[34.957039,102.889557],[34.956711,102.889183],[34.954849,102.886749],[34.954552,102.886398],[34.95417,102.885887],[34.953442,102.884987],[34.95295,102.884338],[34.95298,102.884361],[34.952621,102.883888],[34.95232,102.883553],[34.950809,102.881683],[34.949909,102.880409],[34.949902,102.880363],[34.949459,102.879562],[34.949249,102.879082],[34.948891,102.878151],[34.94838,102.876427],[34.94825,102.875931],[34.94809,102.875397],[34.947899,102.874863],[34.947491,102.873863],[34.94685,102.872551],[34.946629,102.872147],[34.945992,102.871132],[34.945702,102.870758],[34.945068,102.870163],[34.944729,102.869919],[34.944359,102.869698],[34.94392,102.869476],[34.943031,102.869164],[34.9426,102.86898],[34.94141,102.868584],[34.940441,102.868263],[34.940182,102.868202],[34.94017,102.868172],[34.93821,102.867638],[34.92548,102.864548],[34.924671,102.864166],[34.924419,102.864082],[34.924049,102.864014],[34.923771,102.863907],[34.921612,102.863007],[34.920521,102.862503],[34.919701,102.862137],[34.919361,102.862007],[34.919041,102.861908],[34.91869,102.861847],[34.917961,102.861893],[34.917591,102.861954],[34.91721,102.862061],[34.916382,102.862396],[34.915192,102.862839],[34.91394,102.863182],[34.90559,102.863182],[34.905281,102.86306],[34.90493,102.862877],[34.904579,102.86264],[34.904289,102.862381],[34.90379,102.861794],[34.903591,102.861473],[34.903091,102.860428],[34.902969,102.860107],[34.902748,102.859421],[34.90255,102.858582],[34.902401,102.857788],[34.90229,102.856934],[34.90226,102.855743],[34.902302,102.854851],[34.902699,102.843513],[34.902748,102.843033],[34.902802,102.842773],[34.902882,102.842484],[34.902969,102.842239],[34.903091,102.841988],[34.903259,102.841743],[34.90345,102.841476],[34.903641,102.841309],[34.903839,102.841148],[34.90427,102.840889],[34.90451,102.840767],[34.904919,102.840477],[34.90519,102.840347],[34.90554,102.840111],[34.905949,102.839867],[34.9062,102.839684],[34.906399,102.8395],[34.906651,102.839073],[34.90675,102.838837],[34.906841,102.838516],[34.906841,102.838203],[34.906799,102.837883],[34.906731,102.837639],[34.906609,102.837341],[34.906422,102.837128],[34.9062,102.836983],[34.905891,102.836929],[34.905659,102.837013],[34.905479,102.837128],[34.905289,102.837334],[34.904961,102.837769],[34.9048,102.837929],[34.90456,102.838112],[34.904369,102.838158],[34.90416,102.838158],[34.90387,102.838058],[34.903702,102.837914],[34.903561,102.8377],[34.90345,102.83744],[34.9034,102.837181],[34.903358,102.8367],[34.903389,102.834],[34.90337,102.833641],[34.903309,102.833313],[34.90316,102.833023],[34.902889,102.832733],[34.902481,102.832588],[34.902111,102.83255],[34.901699,102.832443],[34.90139,102.832268],[34.901291,102.832199],[34.90126,102.832207],[34.900959,102.832062],[34.90073,102.831909],[34.900188,102.831413],[34.899799,102.830994],[34.899551,102.830391],[34.89954,102.829742],[34.89975,102.828796],[34.900291,102.826729],[34.900459,102.826141],[34.900791,102.825249],[34.901192,102.824402],[34.901939,102.823067],[34.902519,102.821953],[34.902809,102.820869],[34.902828,102.820053],[34.90266,102.818581],[34.90242,102.817253],[34.902142,102.816521],[34.90155,102.816017],[34.901119,102.815987],[34.90094,102.816032],[34.900219,102.81646],[34.89735,102.818604],[34.89658,102.819038],[34.896309,102.81913],[34.895592,102.81926],[34.89455,102.81913],[34.894299,102.819038],[34.894279,102.819054],[34.893848,102.818817],[34.891331,102.817307],[34.890549,102.816818],[34.88974,102.816223],[34.889099,102.81562],[34.88662,102.813263],[34.885929,102.812698],[34.885239,102.812553],[34.883179,102.812737],[34.882179,102.812881],[34.881531,102.813217],[34.880081,102.814484],[34.879219,102.815117],[34.87833,102.815407],[34.876251,102.815826],[34.87524,102.816177],[34.87442,102.816704],[34.8736,102.817513],[34.871979,102.819473],[34.871269,102.820374],[34.87011,102.822029],[34.868389,102.825363],[34.8675,102.827492],[34.867031,102.82843],[34.866348,102.829491],[34.865631,102.830368],[34.86274,102.833412],[34.862671,102.833473],[34.862171,102.833946],[34.861832,102.834343],[34.86105,102.835129],[34.8605,102.835587],[34.859859,102.836037],[34.859131,102.836388],[34.85902,102.836411],[34.85841,102.836441],[34.856838,102.836319],[34.85606,102.836372],[34.855518,102.83654],[34.854542,102.836899],[34.85199,102.837784],[34.851212,102.838028],[34.850399,102.838058],[34.849541,102.837807],[34.847771,102.83709],[34.846642,102.836693],[34.845551,102.836502],[34.84444,102.836479],[34.84346,102.836617],[34.842529,102.836884],[34.838779,102.838303],[34.837971,102.838623],[34.836941,102.838989],[34.836239,102.839203],[34.835381,102.839401],[34.834461,102.839531],[34.83366,102.839577],[34.832821,102.839577],[34.83197,102.8395],[34.831059,102.839348],[34.830219,102.839012],[34.82938,102.838501],[34.8284,102.837921],[34.827801,102.837502],[34.828339,102.837227],[34.8283,102.836708],[34.827179,102.836128],[34.827049,102.835678],[34.826839,102.834747],[34.826328,102.83239],[34.82626,102.831909],[34.826221,102.831367],[34.825481,102.809509],[34.82452,102.804512],[34.824749,102.800652],[34.82336,102.796608],[34.823029,102.794762],[34.822659,102.792732],[34.82222,102.790337],[34.82225,102.789932],[34.82235,102.789238],[34.822399,102.788689],[34.822479,102.788254],[34.822819,102.78569],[34.82291,102.78476],[34.822922,102.784363],[34.822948,102.783829],[34.82283,102.782516],[34.822781,102.782173],[34.822762,102.781914],[34.822659,102.781242],[34.822479,102.78022],[34.822361,102.77935],[34.822289,102.778992],[34.822231,102.77858],[34.8218,102.77594],[34.82169,102.775124],[34.82148,102.773903],[34.821281,102.772614],[34.821251,102.772308],[34.821159,102.771797],[34.82077,102.769218],[34.820641,102.768478],[34.820499,102.767776],[34.82032,102.767067],[34.82,102.766113],[34.81992,102.765938],[34.81881,102.76329],[34.817699,102.760696],[34.817261,102.759697],[34.816891,102.758812],[34.816559,102.758057],[34.816399,102.757668],[34.816101,102.757004],[34.815361,102.755127],[34.81501,102.754242],[34.814602,102.753212],[34.814301,102.752411],[34.81414,102.752022],[34.814011,102.751694],[34.813309,102.749931],[34.812111,102.746841],[34.81181,102.746033],[34.811581,102.745331],[34.811359,102.744476],[34.811249,102.743782],[34.811211,102.743439],[34.811161,102.743103],[34.811131,102.742279],[34.81115,102.741661],[34.811211,102.740913],[34.81134,102.740082],[34.81142,102.739647],[34.811649,102.738876],[34.811939,102.738121],[34.812569,102.736847],[34.812939,102.736191],[34.813702,102.734894],[34.81395,102.734512],[34.814281,102.73394],[34.814442,102.733627],[34.814701,102.733047],[34.814831,102.732674],[34.814941,102.732277],[34.815048,102.731667],[34.815029,102.731659],[34.815189,102.730492],[34.81522,102.730164],[34.815319,102.729599],[34.815411,102.728943],[34.81546,102.72863],[34.815491,102.728317],[34.815609,102.727676],[34.815632,102.727371],[34.815681,102.727142],[34.815811,102.726151],[34.81591,102.725548],[34.815979,102.724693],[34.815971,102.723831],[34.815922,102.723358],[34.81583,102.722801],[34.815731,102.722366],[34.81546,102.72139],[34.813671,102.702057],[34.813679,102.701981],[34.813641,102.701767],[34.813622,102.701439],[34.81358,102.701263],[34.81353,102.700867],[34.81329,102.699417],[34.813221,102.699097],[34.813171,102.698761],[34.812931,102.697617],[34.812698,102.696899],[34.81258,102.696678],[34.81245,102.696259],[34.811798,102.69503],[34.810711,102.6931],[34.80978,102.691353],[34.80933,102.69059],[34.808609,102.689217],[34.807819,102.687881],[34.807301,102.687149],[34.806492,102.686287],[34.806389,102.68618],[34.805779,102.685753],[34.804722,102.685097],[34.80024,102.682579],[34.798962,102.681671],[34.798031,102.68074],[34.797771,102.68045],[34.796791,102.679237],[34.795681,102.677917],[34.794701,102.676682],[34.793739,102.675369],[34.792339,102.673683],[34.79084,102.672112],[34.790329,102.671608],[34.789688,102.671013],[34.78886,102.67012],[34.7882,102.669006],[34.787392,102.667397],[34.786709,102.666054],[34.786228,102.665031],[34.785648,102.663887],[34.785099,102.662712],[34.784191,102.660843],[34.783691,102.659462],[34.783642,102.659241],[34.783249,102.657211],[34.783051,102.656487],[34.782711,102.65522],[34.782429,102.653969],[34.781731,102.651283],[34.781391,102.649628],[34.78133,102.647057],[34.7812,102.644676],[34.781181,102.643707],[34.781181,102.641258],[34.78093,102.639847],[34.780602,102.638451],[34.78027,102.637558],[34.779869,102.636703],[34.77692,102.631866],[34.77594,102.630173],[34.775299,102.629143],[34.774818,102.628311],[34.774311,102.627243],[34.773731,102.625763],[34.773201,102.624527],[34.77282,102.623756],[34.77142,102.62188],[34.77108,102.621521],[34.770821,102.621147],[34.77055,102.620667],[34.770279,102.620064],[34.769798,102.619324],[34.769329,102.618683],[34.767971,102.617058],[34.767368,102.616386],[34.766109,102.615143],[34.765209,102.614143],[34.764912,102.613869],[34.764641,102.613586],[34.763229,102.611977],[34.762489,102.611],[34.76207,102.610291],[34.761742,102.609581],[34.76152,102.6092],[34.760941,102.608047],[34.759949,102.60598],[34.75972,102.605438],[34.75909,102.604111],[34.75845,102.603073],[34.75753,102.601501],[34.756649,102.600288],[34.75621,102.599533],[34.75499,102.597313],[34.75415,102.595909],[34.753601,102.594887],[34.753201,102.593872],[34.753159,102.593674],[34.75293,102.591904],[34.752861,102.590759],[34.752949,102.589401],[34.753078,102.588303],[34.75351,102.586922],[34.75565,102.579758],[34.75584,102.578217],[34.755981,102.576653],[34.756039,102.576088],[34.75629,102.574623],[34.7565,102.57196],[34.756531,102.571327],[34.75676,102.568359],[34.756779,102.567932],[34.75708,102.564949],[34.757191,102.564148],[34.757309,102.563568],[34.75753,102.56205],[34.757702,102.560501],[34.757729,102.559914],[34.75769,102.55909],[34.757641,102.558891],[34.75716,102.557549],[34.756889,102.557037],[34.75618,102.556236],[34.755322,102.55571],[34.754429,102.555428],[34.753979,102.555321],[34.752979,102.555206],[34.750229,102.554993],[34.749149,102.554863],[34.74852,102.554703],[34.747108,102.554283],[34.746811,102.554123],[34.746132,102.55365],[34.745998,102.553543],[34.745251,102.552658],[34.74506,102.55217],[34.744949,102.55172],[34.744862,102.551529],[34.74464,102.550888],[34.744049,102.549103],[34.743271,102.547394],[34.742561,102.546082],[34.74268,102.54583],[34.74239,102.545258],[34.742222,102.544983],[34.741859,102.544289],[34.741718,102.543991],[34.74144,102.54348],[34.740608,102.541634],[34.740349,102.540916],[34.739979,102.539757],[34.739399,102.537689],[34.73888,102.535637],[34.73838,102.533928],[34.738071,102.532784],[34.73782,102.531952],[34.737358,102.530571],[34.73682,102.529381],[34.73637,102.52861],[34.736069,102.528183],[34.73502,102.526894],[34.73431,102.526207],[34.733829,102.525833],[34.73296,102.525223],[34.732029,102.524673],[34.731319,102.524223],[34.726311,102.521217],[34.723518,102.519577],[34.722172,102.518883],[34.72105,102.518623],[34.719391,102.51841],[34.717651,102.518143],[34.717461,102.518097],[34.71558,102.517487],[34.71307,102.51667],[34.709629,102.515488],[34.708309,102.515083],[34.707741,102.514877],[34.70652,102.51416],[34.705318,102.513],[34.704071,102.511543],[34.703339,102.510597],[34.70274,102.509758],[34.702259,102.508583],[34.70203,102.507317],[34.70182,102.505287],[34.701599,102.502953],[34.70126,102.500847],[34.700729,102.498833],[34.700359,102.49704],[34.700291,102.49659],[34.700001,102.494347],[34.699799,102.493042],[34.69915,102.491188],[34.698078,102.490112],[34.696999,102.489166],[34.695801,102.488373],[34.69511,102.488029],[34.694759,102.4879],[34.69408,102.487679],[34.692692,102.487457],[34.690979,102.487511],[34.689369,102.487808],[34.68774,102.488319],[34.685471,102.489143],[34.683971,102.489433],[34.68269,102.489357],[34.682259,102.489273],[34.68082,102.488647],[34.679729,102.487808],[34.678478,102.486389],[34.67598,102.483437],[34.674229,102.4813],[34.67318,102.479584],[34.672508,102.4786],[34.67181,102.478119],[34.671429,102.477966],[34.671051,102.477898],[34.668739,102.477768],[34.667679,102.477547],[34.667271,102.477371],[34.665409,102.476357],[34.664761,102.476143],[34.662941,102.475693],[34.66077,102.475197],[34.659939,102.474907],[34.659328,102.474617],[34.65836,102.47403],[34.657051,102.473282],[34.65633,102.472839],[34.655609,102.472458],[34.654861,102.472214],[34.65448,102.472153],[34.654079,102.47213],[34.653461,102.472183],[34.651669,102.47242],[34.650768,102.472382],[34.6492,102.472054],[34.648781,102.471931],[34.647369,102.471687],[34.646561,102.471687],[34.64637,102.471703],[34.64497,102.472054],[34.64394,102.472504],[34.642288,102.473297],[34.640911,102.473801],[34.640308,102.473846],[34.63929,102.473633],[34.638321,102.473129],[34.636902,102.472618],[34.635311,102.472473],[34.633961,102.472221],[34.633759,102.472153],[34.63192,102.471359],[34.629452,102.470207],[34.628571,102.469833],[34.627731,102.469353],[34.626911,102.468842],[34.626579,102.468613],[34.624931,102.467598],[34.62447,102.467377],[34.623749,102.467003],[34.620998,102.465317],[34.619572,102.464363],[34.617699,102.462662],[34.617031,102.462303],[34.6161,102.461952],[34.61515,102.461853],[34.61438,102.461983],[34.61335,102.46241],[34.612289,102.463211],[34.611771,102.463799],[34.611141,102.464928],[34.610661,102.466003],[34.610538,102.466187],[34.610062,102.46682],[34.609459,102.467216],[34.608841,102.467323],[34.608318,102.467293],[34.607849,102.467133],[34.607441,102.466827],[34.606098,102.465607],[34.605228,102.464577],[34.60186,102.460617],[34.601051,102.459717],[34.59996,102.458519],[34.597759,102.456078],[34.597462,102.455803],[34.59639,102.455307],[34.595989,102.455292],[34.595409,102.455429],[34.594521,102.455887],[34.594219,102.456169],[34.593861,102.456657],[34.59367,102.45694],[34.593369,102.457336],[34.593029,102.45787],[34.591129,102.46077],[34.588699,102.464363],[34.58794,102.46537],[34.58733,102.46595],[34.586712,102.466316],[34.58577,102.46666],[34.584919,102.466667],[34.584469,102.466583],[34.583969,102.466507],[34.582829,102.466202],[34.582531,102.466187],[34.582298,102.466118],[34.58157,102.466019],[34.578449,102.46534],[34.577202,102.464851],[34.575939,102.464088],[34.574711,102.463013],[34.573879,102.461967],[34.573132,102.460823],[34.570789,102.456993],[34.56992,102.455521],[34.568779,102.454231],[34.567451,102.453133],[34.56498,102.451134],[34.563641,102.449997],[34.56292,102.44928],[34.56282,102.449142],[34.56234,102.448418],[34.560749,102.445572],[34.55888,102.442146],[34.558361,102.441238],[34.556309,102.437523],[34.555641,102.436447],[34.55505,102.435829],[34.554169,102.435059],[34.553329,102.434258],[34.552429,102.432999],[34.55085,102.430573],[34.549931,102.429123],[34.549271,102.428207],[34.548389,102.427467],[34.547298,102.426773],[34.546532,102.425888],[34.546001,102.424759],[34.54562,102.423302],[34.545071,102.421654],[34.544369,102.420593],[34.54319,102.419388],[34.542789,102.418854],[34.542461,102.418289],[34.542191,102.417671],[34.541901,102.41658],[34.54158,102.414993],[34.541168,102.413979],[34.540581,102.413132],[34.53854,102.410606],[34.537159,102.408981],[34.536518,102.408287],[34.53492,102.407066],[34.53458,102.406693],[34.53373,102.405434],[34.53315,102.404007],[34.532421,102.40184],[34.531719,102.400589],[34.53067,102.399391],[34.52882,102.397598],[34.52821,102.396782],[34.526871,102.394547],[34.525902,102.39312],[34.525051,102.392174],[34.523788,102.390823],[34.522869,102.389793],[34.521931,102.388527],[34.52145,102.38765],[34.520679,102.386192],[34.519939,102.384987],[34.519279,102.384018],[34.518421,102.382797],[34.517941,102.38208],[34.516659,102.380219],[34.515621,102.378754],[34.514771,102.376633],[34.50613,102.368523],[34.505322,102.366173],[34.5037,102.363876],[34.501049,102.359802],[34.500092,102.358276],[34.49889,102.3563],[34.497841,102.354683],[34.496971,102.353416],[34.495789,102.352112],[34.494671,102.351784],[34.48978,102.338341],[34.490662,102.336861],[34.490559,102.335258],[34.490429,102.333649],[34.490398,102.333054],[34.490261,102.331688],[34.490219,102.330711],[34.490131,102.329948],[34.489769,102.328743],[34.4893,102.32785],[34.488739,102.327042],[34.487259,102.325104],[34.48687,102.324623],[34.486191,102.323677],[34.485748,102.322968],[34.485409,102.32235],[34.485249,102.322037],[34.48457,102.320282],[34.483841,102.318626],[34.480789,102.313278],[34.479919,102.311729],[34.478199,102.308777],[34.477699,102.308037],[34.477131,102.307373],[34.47683,102.307083],[34.476021,102.306396],[34.472462,102.303352],[34.471939,102.302994],[34.47176,102.302872],[34.470989,102.302498],[34.470181,102.302277],[34.469139,102.302208],[34.468719,102.302254],[34.46809,102.302391],[34.467178,102.303284],[34.466572,102.302879],[34.465462,102.303436],[34.464691,102.303574],[34.46426,102.303612],[34.463089,102.303551],[34.462589,102.303452],[34.461342,102.302994],[34.460819,102.30275],[34.455811,102.300583],[34.45499,102.30027],[34.45414,102.300056],[34.453041,102.299957],[34.450451,102.300034],[34.44627,102.300171],[34.445278,102.300171],[34.44389,102.299896],[34.441971,102.299477],[34.439621,102.298927],[34.431759,102.297218],[34.429379,102.296806],[34.426949,102.296707],[34.426071,102.296623],[34.425629,102.296516],[34.424591,102.296173],[34.42358,102.295723],[34.42215,102.295219],[34.421108,102.295021],[34.419628,102.294083],[34.41708,102.29528],[34.413521,102.295677],[34.410141,102.296028],[34.40892,102.29612],[34.398399,102.297173],[34.394421,102.297592],[34.393822,102.297684],[34.392269,102.298111],[34.38921,102.299088],[34.38755,102.299583],[34.38662,102.299812],[34.382931,102.300613],[34.380459,102.301064],[34.379219,102.301178],[34.378189,102.301247],[34.37674,102.301529],[34.372559,102.302727],[34.370708,102.303192],[34.369881,102.303368],[34.364689,102.304161],[34.363022,102.304207],[34.359451,102.303726],[34.358231,102.303619],[34.357208,102.303612],[34.353741,102.303864],[34.352852,102.303909],[34.35051,102.304108],[34.350021,102.304199],[34.349758,102.304291],[34.348721,102.304733],[34.347759,102.305511],[34.346939,102.306488],[34.34655,102.307022],[34.346069,102.307747],[34.345402,102.308563],[34.344791,102.309082],[34.344631,102.309189],[34.34396,102.309593],[34.343269,102.309853],[34.34251,102.310028],[34.341579,102.310066],[34.338428,102.3097],[34.33593,102.309433],[34.33326,102.309067],[34.33086,102.308769],[34.32967,102.30835],[34.329151,102.307983],[34.328819,102.307709],[34.32795,102.306801],[34.327499,102.306381],[34.326248,102.305489],[34.325771,102.305237],[34.325089,102.304947],[34.32362,102.304588],[34.32235,102.30468],[34.321461,102.304947],[34.319901,102.305779],[34.318371,102.30661],[34.31649,102.307579],[34.31612,102.307793],[34.315159,102.308479],[34.313511,102.309837],[34.310379,102.312492],[34.308121,102.314293],[34.305241,102.316673],[34.303188,102.318352],[34.301781,102.319527],[34.297661,102.322906],[34.296581,102.323822],[34.29166,102.327873],[34.291111,102.328346],[34.289768,102.329712],[34.288582,102.331207],[34.280128,102.343491],[34.27388,102.352661],[34.27211,102.355057],[34.270851,102.356216],[34.268822,102.357643],[34.266102,102.359451],[34.262959,102.361519],[34.26181,102.362518],[34.260311,102.364166],[34.257961,102.366676],[34.248569,102.377083],[34.247108,102.378723],[34.24577,102.38015],[34.244541,102.381317],[34.24242,102.383034],[34.23119,102.391983],[34.222839,102.39859],[34.221378,102.399857],[34.220169,102.401161],[34.218891,102.402946],[34.215382,102.408546],[34.213509,102.411499],[34.20911,102.417763],[34.20789,102.418282],[34.207649,102.419868],[34.205429,102.422913],[34.204109,102.424973],[34.203629,102.426666],[34.203098,102.428757],[34.20248,102.432091],[34.20042,102.442657],[34.197849,102.456253],[34.1973,102.459023],[34.19706,102.460426],[34.196369,102.464111],[34.196129,102.466629],[34.195629,102.474739],[34.195271,102.477531],[34.193829,102.483788],[34.1926,102.486267],[34.19241,102.489609],[34.191132,102.493523],[34.189491,102.497711],[34.189571,102.501793],[34.188831,102.504898],[34.188229,102.508217],[34.18763,102.509987],[34.186218,102.515877],[34.185211,102.520317],[34.183899,102.525864],[34.183189,102.528763],[34.182529,102.531616],[34.181938,102.534042],[34.181278,102.536423],[34.180641,102.538559],[34.179699,102.541634],[34.17907,102.5439],[34.178169,102.546806],[34.177151,102.550217],[34.176739,102.55175],[34.176121,102.553719],[34.175461,102.555748],[34.17477,102.557159],[34.17395,102.558182],[34.17289,102.558884],[34.171749,102.559273],[34.170589,102.559387],[34.168159,102.559578],[34.16251,102.560081],[34.160141,102.560318],[34.15765,102.560509],[34.15731,102.560608],[34.157009,102.560783],[34.15667,102.561234],[34.155861,102.562752],[34.154591,102.564873],[34.154411,102.565613],[34.154419,102.565758],[34.154598,102.566277],[34.154881,102.566757],[34.155289,102.567383],[34.155651,102.567993],[34.155701,102.568123],[34.15572,102.568939],[34.155331,102.569717],[34.1549,102.570488],[34.154251,102.571564],[34.154091,102.571739],[34.15382,102.571907],[34.15242,102.572319],[34.151798,102.572937],[34.151661,102.573471],[34.151508,102.574753],[34.151279,102.577316],[34.150928,102.580673],[34.150951,102.581352],[34.151138,102.583923],[34.15094,102.584732],[34.150742,102.584976],[34.15062,102.585083],[34.15036,102.585197],[34.148972,102.585426],[34.146721,102.585762],[34.146019,102.585907],[34.145489,102.586121],[34.14447,102.586723],[34.14291,102.587181],[34.1423,102.58741],[34.141529,102.58786],[34.14101,102.588257],[34.140419,102.588898],[34.139992,102.589684],[34.137878,102.594872],[34.137569,102.595581],[34.137058,102.596458],[34.136478,102.597252],[34.136108,102.597794],[34.135769,102.598373],[34.135502,102.59919],[34.135269,102.599823],[34.134621,102.600739],[34.13414,102.601173],[34.133541,102.601761],[34.132969,102.602966],[34.13279,102.603416],[34.132259,102.604134],[34.131371,102.605133],[34.130749,102.605881],[34.130569,102.606178],[34.13039,102.606453],[34.129902,102.607567],[34.129478,102.608711],[34.129021,102.609818],[34.128429,102.610817],[34.128059,102.611389],[34.125,102.616364],[34.123699,102.618591],[34.12326,102.619942],[34.123058,102.621437],[34.123169,102.623863],[34.12286,102.62487],[34.122269,102.625343],[34.121922,102.625443],[34.120152,102.62561],[34.11916,102.629173],[34.117748,102.629852],[34.11734,102.630692],[34.11689,102.631721],[34.116718,102.632317],[34.11668,102.632736],[34.116741,102.633392],[34.117569,102.634941],[34.117119,102.636574],[34.117851,102.637733],[34.117489,102.639999],[34.11742,102.640556],[34.11742,102.640762],[34.117611,102.641777],[34.117809,102.642403],[34.118019,102.64315],[34.118118,102.64357],[34.118328,102.644272],[34.118549,102.645073],[34.118622,102.645287],[34.11869,102.6455],[34.118961,102.646332],[34.119091,102.646553],[34.119579,102.646988],[34.12048,102.647331],[34.120602,102.647346],[34.120838,102.647476],[34.121189,102.647629],[34.121571,102.647881],[34.12178,102.648064],[34.122101,102.648453],[34.122299,102.648804],[34.122421,102.649071],[34.12252,102.649559],[34.12254,102.650414],[34.12241,102.651123],[34.12159,102.654167],[34.12141,102.654877],[34.120789,102.657181],[34.120602,102.657951],[34.119202,102.663193],[34.11874,102.664993],[34.117939,102.667877],[34.117481,102.669327],[34.117271,102.669952],[34.116741,102.671371],[34.116451,102.672081],[34.11586,102.673431],[34.115139,102.674973],[34.114189,102.67688],[34.113899,102.67749],[34.113861,102.677513],[34.113602,102.678078],[34.11298,102.679298],[34.111851,102.681679],[34.11161,102.682251],[34.111301,102.683113],[34.110828,102.684723],[34.110661,102.68541],[34.11026,102.686928],[34.10931,102.690353],[34.108589,102.693024],[34.108318,102.694092],[34.107891,102.695663],[34.107639,102.696693],[34.10741,102.697479],[34.107201,102.698318],[34.106979,102.699112],[34.1068,102.699806],[34.106602,102.700508],[34.10611,102.702332],[34.105911,102.703239],[34.10569,102.704292],[34.105518,102.705276],[34.10527,102.70755],[34.105209,102.708504],[34.10516,102.709648],[34.105122,102.711617],[34.105061,102.712791],[34.104931,102.713821],[34.104752,102.714607],[34.104321,102.715973],[34.104279,102.716187],[34.104019,102.716766],[34.10371,102.71772],[34.103432,102.71846],[34.103142,102.71933],[34.102959,102.720306],[34.10294,102.720757],[34.103001,102.72171],[34.10358,102.725479],[34.10368,102.726471],[34.10368,102.727333],[34.103619,102.727814],[34.103371,102.728653],[34.102989,102.729439],[34.102558,102.730049],[34.102509,102.730164],[34.10207,102.730568],[34.10099,102.731247],[34.100201,102.731697],[34.098301,102.732727],[34.09761,102.733131],[34.09655,102.733688],[34.095421,102.734306],[34.094818,102.734612],[34.094059,102.734802],[34.093418,102.734848],[34.092781,102.734718],[34.092171,102.734459],[34.091621,102.734123],[34.090931,102.733582],[34.090691,102.733414],[34.087151,102.730698],[34.086498,102.730301],[34.086021,102.730087],[34.085419,102.729973],[34.084221,102.729912],[34.08215,102.729851],[34.081181,102.729134],[34.07951,102.730637],[34.07851,102.729851],[34.077999,102.729927],[34.078018,102.729927],[34.077862,102.72998],[34.077381,102.730087],[34.07605,102.730476],[34.0742,102.730957],[34.073021,102.731308],[34.072559,102.731361],[34.072121,102.731377],[34.071659,102.731323],[34.071259,102.731216],[34.069962,102.730743],[34.0695,102.730553],[34.067268,102.729713],[34.06567,102.729057],[34.064571,102.728554],[34.062561,102.727524],[34.062019,102.727226],[34.05949,102.725906],[34.059021,102.725723],[34.058472,102.725548],[34.05484,102.724602],[34.054459,102.724518],[34.05402,102.724388],[34.053341,102.724113],[34.052719,102.723793],[34.04837,102.721077],[34.048031,102.720886],[34.04689,102.720177],[34.04665,102.720039],[34.04604,102.719757],[34.045361,102.719566],[34.044289,102.719398],[34.0443,102.719414],[34.044189,102.719414],[34.043919,102.71936],[34.043369,102.719299],[34.042461,102.719162],[34.042141,102.719139],[34.04137,102.719017],[34.04052,102.718941],[34.040279,102.71888],[34.039242,102.718773],[34.038658,102.718681],[34.038349,102.718658],[34.037701,102.718559],[34.036789,102.718437],[34.036201,102.718437],[34.03595,102.718483],[34.035679,102.718536],[34.035469,102.71862],[34.035061,102.718903],[34.034851,102.719101],[34.034481,102.719582],[34.034019,102.720261],[34.032318,102.722923],[34.032169,102.723129],[34.031799,102.723518],[34.031601,102.723686],[34.03141,102.723824],[34.03117,102.723953],[34.03093,102.724037],[34.030689,102.724113],[34.03043,102.724152],[34.03019,102.724136],[34.029148,102.72406],[34.028519,102.723984],[34.028259,102.723991],[34.027969,102.723953],[34.02771,102.723953],[34.027409,102.723999],[34.027111,102.724083],[34.026871,102.724167],[34.026611,102.724319],[34.026119,102.724693],[34.025501,102.725212],[34.025318,102.725319],[34.02512,102.725502],[34.024391,102.726021],[34.023659,102.726501],[34.023232,102.726753],[34.023048,102.726883],[34.022831,102.726997],[34.021309,102.72789],[34.021019,102.728081],[34.020611,102.728416],[34.020409,102.72863],[34.019951,102.729271],[34.019691,102.729782],[34.018902,102.731781],[34.018452,102.732986],[34.018139,102.733757],[34.017879,102.734299],[34.01767,102.734619],[34.017479,102.734863],[34.01725,102.735107],[34.017052,102.735359],[34.016781,102.735641],[34.013119,102.738113],[34.008789,102.741043],[34.00354,102.74456],[34.002659,102.745171],[34.002548,102.745232],[34.001911,102.745667],[34.001431,102.745911],[34.000221,102.746902],[33.99966,102.747452],[33.999161,102.748161],[33.998959,102.74855],[33.998829,102.748894],[33.998611,102.749763],[33.99855,102.750549],[33.998581,102.751427],[33.998661,102.752113],[33.99894,102.753883],[33.998981,102.754433],[33.99905,102.754868],[33.999142,102.755241],[33.999321,102.756371],[33.999962,102.760437],[34.00042,102.763367],[34.00053,102.764191],[34.00061,102.765053],[34.00058,102.765778],[34.00045,102.766693],[34.000111,102.767281],[33.99979,102.767883],[33.997421,102.771591],[33.997379,102.77169],[33.997211,102.771896],[33.9944,102.77623],[33.991291,102.781052],[33.990311,102.782539],[33.988289,102.785713],[33.98724,102.787323],[33.985649,102.789726],[33.984509,102.791489],[33.983978,102.792351],[33.982471,102.794647],[33.980518,102.797699],[33.980141,102.798248],[33.979351,102.799507],[33.978889,102.800194],[33.97575,102.805038],[33.97533,102.805717],[33.974899,102.806343],[33.97456,102.806892],[33.97398,102.807747],[33.97361,102.808327],[33.973179,102.808983],[33.97274,102.809677],[33.97234,102.81028],[33.971889,102.810997],[33.967892,102.817139],[33.966999,102.818527],[33.966179,102.819763],[33.965462,102.820877],[33.96508,102.821442],[33.96019,102.828987],[33.95985,102.829529],[33.956089,102.83532],[33.955639,102.836037],[33.955219,102.836662],[33.954239,102.838188],[33.953659,102.83905],[33.953629,102.839073],[33.953621,102.839127],[33.953159,102.839882],[33.950729,102.843613],[33.950432,102.844116],[33.949982,102.844757],[33.943562,102.854668],[33.941631,102.857613],[33.937241,102.864418],[33.936729,102.865189],[33.936131,102.865997],[33.935501,102.866768],[33.93491,102.867416],[33.934181,102.868118],[33.930019,102.871872],[33.929482,102.872414],[33.928982,102.873016],[33.928581,102.873756],[33.928459,102.874039],[33.928261,102.874702],[33.927151,102.879211],[33.926868,102.880211],[33.92659,102.880882],[33.926262,102.881554],[33.92585,102.882187],[33.925751,102.882309],[33.92522,102.882874],[33.924709,102.883324],[33.92411,102.883743],[33.921749,102.8853],[33.912102,102.891747],[33.909801,102.893257],[33.908459,102.894173],[33.90493,102.896492],[33.90419,102.897003],[33.902908,102.897842],[33.900631,102.899384],[33.894958,102.903137],[33.894371,102.903549],[33.88932,102.906891],[33.88871,102.907333],[33.888161,102.907669],[33.885799,102.909233],[33.885151,102.909683],[33.88385,102.910522],[33.880421,102.912827],[33.872849,102.917847],[33.871632,102.918694],[33.871029,102.91906],[33.861191,102.925621],[33.84753,102.934692],[33.843861,102.937149],[33.8433,102.937508],[33.839359,102.94014],[33.838619,102.940613],[33.837799,102.94117],[33.83699,102.941803],[33.83633,102.942436],[33.835701,102.943169],[33.83033,102.950912],[33.830059,102.951248],[33.82962,102.951691],[33.829041,102.952103],[33.828609,102.952293],[33.828289,102.952393],[33.827839,102.952477],[33.825901,102.952759],[33.825291,102.952873],[33.824951,102.952972],[33.82473,102.953056],[33.82378,102.95359],[33.82267,102.954277],[33.822578,102.954353],[33.821991,102.954712],[33.821289,102.955017],[33.82061,102.9552],[33.817371,102.955978],[33.815041,102.95649],[33.814362,102.956612],[33.813492,102.95665],[33.812759,102.956581],[33.811111,102.95649],[33.809631,102.956383],[33.808189,102.956322],[33.80751,102.956383],[33.806839,102.956612],[33.806271,102.956963],[33.80566,102.957474],[33.803619,102.959358],[33.802921,102.959923],[33.802151,102.96032],[33.801472,102.960487],[33.800758,102.96051],[33.800201,102.960388],[33.799492,102.960083],[33.798309,102.959412],[33.797821,102.959167],[33.797161,102.958946],[33.796391,102.958923],[33.79549,102.959068],[33.795151,102.959137],[33.794991,102.959137],[33.79488,102.95919],[33.789989,102.960152],[33.788921,102.960342],[33.788219,102.960487],[33.787189,102.960617],[33.786499,102.960617],[33.78574,102.960587],[33.784649,102.96048],[33.783852,102.960327],[33.781792,102.96003],[33.781132,102.959969],[33.78038,102.959976],[33.779659,102.960052],[33.778271,102.960243],[33.777191,102.960342],[33.775761,102.960533],[33.77491,102.960587],[33.77422,102.960609],[33.773399,102.960564],[33.772469,102.960442],[33.771858,102.960327],[33.7701,102.959953],[33.767799,102.959488],[33.763859,102.958656],[33.76247,102.958344],[33.760979,102.957939],[33.759571,102.957527],[33.758968,102.957336],[33.75602,102.956253],[33.75528,102.955994],[33.74733,102.953102],[33.746521,102.952003],[33.739429,102.953453],[33.73904,102.95488],[33.738609,102.955276],[33.738121,102.955704],[33.737041,102.956688],[33.73307,102.960243],[33.732578,102.960716],[33.731289,102.961899],[33.730652,102.962433],[33.72995,102.962967],[33.729382,102.963333],[33.72916,102.963417],[33.728291,102.963753],[33.72757,102.963913],[33.726791,102.963966],[33.720871,102.964233],[33.71986,102.964287],[33.719379,102.964302],[33.717449,102.964409],[33.711418,102.964668],[33.706329,102.964928],[33.704552,102.964989],[33.703678,102.964943],[33.7029,102.96479],[33.700619,102.964142],[33.699989,102.963997],[33.699162,102.963982],[33.69836,102.964157],[33.696911,102.964821],[33.6945,102.966003],[33.68998,102.968147],[33.689308,102.968353],[33.68885,102.96843],[33.68819,102.968384],[33.687592,102.968231],[33.687099,102.967987],[33.686779,102.967796],[33.686111,102.967247],[33.685181,102.966362],[33.684639,102.965912],[33.684299,102.965668],[33.683739,102.965393],[33.683189,102.965149],[33.682461,102.964928],[33.681049,102.964546],[33.68066,102.96447],[33.67968,102.964203],[33.679169,102.964073],[33.678822,102.963959],[33.677391,102.9636],[33.677269,102.963593],[33.676781,102.963371],[33.676491,102.963211],[33.67598,102.962837],[33.675831,102.962708],[33.674549,102.961243],[33.674171,102.960907],[33.673759,102.960617],[33.673061,102.96032],[33.67297,102.960274],[33.672691,102.960243],[33.672081,102.96022],[33.672058,102.960243],[33.671799,102.960251],[33.67091,102.960327],[33.669979,102.960426],[33.668468,102.960564],[33.667591,102.960587],[33.666801,102.96048],[33.66629,102.960281],[33.66592,102.960052],[33.66552,102.959747],[33.66534,102.959587],[33.665039,102.959244],[33.66473,102.958801],[33.663448,102.956543],[33.662201,102.954262],[33.66201,102.953957],[33.66161,102.953217],[33.661018,102.952362],[33.66029,102.951698],[33.659512,102.951286],[33.659019,102.951157],[33.65802,102.950996],[33.653961,102.950623],[33.65266,102.95047],[33.651711,102.950119],[33.65136,102.949898],[33.650639,102.949242],[33.649712,102.94828],[33.648491,102.946968],[33.64846,102.946907],[33.647911,102.946327],[33.647621,102.946083],[33.6474,102.945847],[33.647099,102.945572],[33.646801,102.945328],[33.64645,102.945084],[33.646141,102.944893],[33.645821,102.944748],[33.64521,102.944527],[33.644489,102.944389],[33.643711,102.944397],[33.64344,102.944443],[33.64278,102.944603],[33.64246,102.94471],[33.641861,102.945023],[33.641541,102.945221],[33.641239,102.945457],[33.640751,102.945892],[33.640251,102.946373],[33.63728,102.9496],[33.63625,102.950737],[33.635609,102.951401],[33.635101,102.951851],[33.634411,102.95224],[33.634312,102.952278],[33.633221,102.95253],[33.631989,102.952599],[33.631111,102.952782],[33.630299,102.953247],[33.62973,102.953773],[33.628448,102.955116],[33.627991,102.955566],[33.627449,102.955917],[33.626678,102.956131],[33.625938,102.956017],[33.625351,102.955704],[33.624329,102.954811],[33.624031,102.954567],[33.623772,102.954407],[33.623371,102.954208],[33.623089,102.954109],[33.622799,102.954048],[33.622501,102.95401],[33.622181,102.954018],[33.620621,102.954269],[33.620171,102.954308],[33.619781,102.954308],[33.61916,102.954224],[33.618759,102.954086],[33.618351,102.953903],[33.618019,102.95369],[33.617241,102.95314],[33.616989,102.952904],[33.616562,102.95256],[33.615978,102.952049],[33.615711,102.951843],[33.615139,102.951447],[33.614639,102.951218],[33.614071,102.951111],[33.613449,102.951157],[33.61269,102.951347],[33.612331,102.951462],[33.611542,102.95166],[33.61105,102.951683],[33.610149,102.951462],[33.609959,102.951347],[33.609249,102.950798],[33.609169,102.950706],[33.60878,102.950104],[33.607841,102.947853],[33.607712,102.94751],[33.607029,102.945877],[33.60688,102.945473],[33.606258,102.944077],[33.605999,102.943443],[33.606239,102.942429],[33.605961,102.942207],[33.605289,102.941772],[33.603168,102.941093],[33.602612,102.939697],[33.598629,102.938179],[33.598061,102.937988],[33.597691,102.937843],[33.597599,102.937843],[33.596951,102.937767],[33.59639,102.937759],[33.595661,102.93869],[33.594891,102.938461],[33.59399,102.938477],[33.59269,102.940697],[33.592319,102.940483],[33.592289,102.940483],[33.59235,102.940598],[33.592289,102.940742],[33.59235,102.941292],[33.59026,102.944901],[33.588982,102.944992],[33.588531,102.945557],[33.588219,102.94593],[33.58786,102.946457],[33.586781,102.947868],[33.586369,102.948547],[33.58622,102.948624],[33.58601,102.948837],[33.585121,102.949966],[33.584629,102.950562],[33.584221,102.950989],[33.583839,102.951408],[33.582951,102.952339],[33.582539,102.952797],[33.580509,102.954964],[33.579029,102.956596],[33.57869,102.95694],[33.577942,102.957771],[33.577641,102.958038],[33.57756,102.958092],[33.577511,102.958138],[33.577469,102.958168],[33.57653,102.961349],[33.576649,102.961388],[33.576839,102.9618],[33.577148,102.962677],[33.577599,102.964157],[33.577709,102.964577],[33.578209,102.965652],[33.577011,102.967728],[33.562309,102.992767],[33.56229,102.995613],[33.56152,102.997063],[33.560551,102.998123],[33.558681,102.998947],[33.55827,103.000237],[33.558331,103.003082],[33.55722,103.005333],[33.556961,103.007217],[33.556789,103.008347],[33.55669,103.00946],[33.55669,103.016533],[33.556629,103.018227],[33.556561,103.018593],[33.556301,103.019386],[33.556061,103.019974],[33.55497,103.022774],[33.554691,103.023613],[33.554531,103.024307],[33.554489,103.024986],[33.554611,103.025681],[33.554852,103.026299],[33.555038,103.026611],[33.55547,103.027077],[33.556049,103.027412],[33.556301,103.027473],[33.558159,103.027588],[33.558571,103.027443],[33.560741,103.027687],[33.562149,103.02787],[33.564812,103.028107],[33.56588,103.028259],[33.566101,103.028313],[33.566521,103.02845],[33.567268,103.028893],[33.568119,103.029701],[33.568401,103.03009],[33.568619,103.030518],[33.569099,103.031937],[33.56929,103.032692],[33.570278,103.03598],[33.570869,103.037613],[33.571529,103.038567],[33.571819,103.038918],[33.572639,103.039703],[33.57436,103.041023],[33.576141,103.042473],[33.577438,103.043503],[33.578541,103.044456],[33.57946,103.045403],[33.58009,103.046387],[33.580711,103.047668],[33.581051,103.048508],[33.581772,103.050163],[33.582081,103.050926],[33.582359,103.051498],[33.583759,103.054657],[33.584389,103.05619],[33.5853,103.058311],[33.585911,103.059708],[33.58717,103.062637],[33.587841,103.064102],[33.588612,103.066017],[33.589489,103.067993],[33.590069,103.069412],[33.59116,103.072006],[33.592331,103.0737],[33.592239,103.076012],[33.591888,103.077469],[33.588421,103.091187],[33.58823,103.093384],[33.587769,103.099693],[33.586311,103.101318],[33.58577,103.102692],[33.58519,103.103661],[33.584728,103.104362],[33.584541,103.104553],[33.583931,103.10508],[33.583511,103.105438],[33.582981,103.105759],[33.581848,103.106354],[33.576511,103.108421],[33.56625,103.112213],[33.562092,103.113823],[33.560051,103.114532],[33.557999,103.115288],[33.556381,103.115921],[33.554642,103.116798],[33.55278,103.118057],[33.540932,103.12635],[33.540051,103.126831],[33.53867,103.127197],[33.536831,103.127403],[33.534981,103.127831],[33.533508,103.128571],[33.532131,103.129562],[33.530449,103.130882],[33.528648,103.132103],[33.52784,103.132584],[33.526031,103.13372],[33.525089,103.134483],[33.523491,103.136093],[33.52187,103.137619],[33.520359,103.138779],[33.518581,103.139954],[33.51659,103.141243],[33.51403,103.142937],[33.512081,103.144287],[33.510559,103.145508],[33.5093,103.146713],[33.508282,103.147774],[33.506821,103.149513],[33.505219,103.151497],[33.503681,103.153297],[33.502419,103.154572],[33.501141,103.155182],[33.498909,103.156174],[33.49741,103.157066],[33.496059,103.158203],[33.494041,103.160233],[33.490829,103.163582],[33.4893,103.164886],[33.488022,103.165588],[33.48666,103.165993],[33.482281,103.167053],[33.48,103.167587],[33.47776,103.167923],[33.47578,103.167976],[33.47366,103.167992],[33.473042,103.168053],[33.472118,103.168411],[33.471451,103.168877],[33.46891,103.171303],[33.46743,103.172752],[33.466019,103.173973],[33.465092,103.174339],[33.464039,103.174347],[33.463402,103.17424],[33.460442,103.17347],[33.459129,103.173553],[33.458099,103.17395],[33.456661,103.174797],[33.452709,103.177162],[33.451981,103.177551],[33.450802,103.177933],[33.448799,103.178253],[33.4459,103.178673],[33.444172,103.178818],[33.442329,103.178841],[33.440689,103.178886],[33.43597,103.178757],[33.43486,103.178963],[33.434509,103.179077],[33.43354,103.179619],[33.432861,103.180191],[33.432621,103.180367],[33.428909,103.183418],[33.427761,103.184303],[33.426731,103.185028],[33.426079,103.185371],[33.424889,103.185768],[33.423561,103.186249],[33.42234,103.186783],[33.42144,103.187538],[33.420849,103.188568],[33.41993,103.190323],[33.419071,103.191368],[33.41795,103.1922],[33.416611,103.192886],[33.41518,103.193527],[33.414162,103.193932],[33.412579,103.19426],[33.411289,103.194458],[33.409969,103.194748],[33.409081,103.195297],[33.408409,103.195999],[33.407421,103.197197],[33.40657,103.198158],[33.40559,103.198967],[33.40443,103.199654],[33.403301,103.200119],[33.402142,103.200333],[33.400848,103.200493],[33.3992,103.20047],[33.39814,103.200737],[33.397228,103.201271],[33.395699,103.202797],[33.39473,103.20369],[33.393841,103.204552],[33.393452,103.204903],[33.39249,103.205544],[33.391548,103.20594],[33.39053,103.205963],[33.38789,103.205322],[33.3843,103.204483],[33.38155,103.203796],[33.380268,103.203644],[33.380119,103.203667],[33.37936,103.20401],[33.378689,103.204781],[33.377628,103.206673],[33.377392,103.20694],[33.376301,103.207603],[33.37542,103.207771],[33.375221,103.207787],[33.373589,103.207779],[33.371601,103.207703],[33.369869,103.20768],[33.368271,103.207527],[33.364609,103.206711],[33.363331,103.206749],[33.362511,103.206848],[33.35915,103.207161],[33.35651,103.207298],[33.354771,103.207253],[33.352612,103.206963],[33.350712,103.206741],[33.350052,103.206711],[33.348801,103.20694],[33.34761,103.207336],[33.346218,103.207764],[33.344971,103.207817],[33.34351,103.207718],[33.340851,103.207443],[33.339149,103.207283],[33.337589,103.207191],[33.33651,103.207367],[33.335629,103.207718],[33.335289,103.207893],[33.33448,103.208481],[33.33342,103.209343],[33.332958,103.209671],[33.331921,103.210167],[33.33073,103.210426],[33.328442,103.210587],[33.326839,103.21067],[33.32542,103.210709],[33.324169,103.210793],[33.322571,103.210983],[33.32114,103.211067],[33.31963,103.21125],[33.318501,103.211456],[33.318321,103.211517],[33.317341,103.212067],[33.317051,103.212341],[33.31641,103.213173],[33.315929,103.214523],[33.315769,103.215584],[33.315392,103.217644],[33.315022,103.218781],[33.31493,103.218964],[33.314308,103.219673],[33.31403,103.219887],[33.31282,103.220322],[33.310768,103.220886],[33.309471,103.221313],[33.308739,103.221474],[33.307789,103.221581],[33.307049,103.221519],[33.304871,103.221161],[33.30373,103.221107],[33.30304,103.221283],[33.301949,103.221893],[33.30154,103.222267],[33.3009,103.223007],[33.300018,103.223831],[33.29895,103.224327],[33.297581,103.224564],[33.296982,103.22464],[33.295471,103.22496],[33.294319,103.225349],[33.292728,103.226143],[33.291061,103.226891],[33.288261,103.227432],[33.286781,103.227943],[33.282139,103.229927],[33.280621,103.230652],[33.276501,103.233047],[33.274921,103.234009],[33.273731,103.234467],[33.27227,103.234741],[33.271271,103.23468],[33.270931,103.234619],[33.27002,103.234413],[33.26836,103.233803],[33.26722,103.233566],[33.266048,103.233704],[33.264832,103.233948],[33.261791,103.23468],[33.26038,103.234917],[33.25914,103.235062],[33.257462,103.235161],[33.253731,103.235443],[33.25238,103.235397],[33.25106,103.235001],[33.249592,103.234207],[33.245819,103.232117],[33.244678,103.231339],[33.24382,103.230408],[33.240059,103.225594],[33.238972,103.224113],[33.23819,103.223106],[33.23785,103.22274],[33.23695,103.222267],[33.236149,103.22216],[33.235329,103.222282],[33.233398,103.222618],[33.231781,103.22258],[33.231091,103.222488],[33.22718,103.221893],[33.225471,103.221657],[33.224178,103.221687],[33.223011,103.22187],[33.221619,103.222328],[33.219818,103.223061],[33.218491,103.223648],[33.21571,103.2248],[33.214199,103.225372],[33.212749,103.225952],[33.20895,103.227547],[33.202869,103.230019],[33.201542,103.230637],[33.199081,103.23204],[33.197811,103.23259],[33.19664,103.232933],[33.19558,103.233063],[33.194279,103.233063],[33.192841,103.23288],[33.191399,103.232643],[33.18642,103.231979],[33.185291,103.231842],[33.183811,103.231827],[33.18346,103.231873],[33.182259,103.232147],[33.180988,103.232643],[33.179909,103.233147],[33.178261,103.233887],[33.176609,103.234703],[33.1754,103.23526],[33.17424,103.235748],[33.173161,103.236099],[33.171631,103.236526],[33.168621,103.23732],[33.167042,103.237823],[33.16547,103.238548],[33.164291,103.239281],[33.160252,103.242126],[33.15736,103.244202],[33.155819,103.245247],[33.15461,103.245842],[33.15316,103.246277],[33.15181,103.246437],[33.14666,103.246887],[33.145031,103.24704],[33.1436,103.247307],[33.142368,103.247726],[33.14098,103.248497],[33.139992,103.249237],[33.134682,103.253471],[33.13332,103.254578],[33.132111,103.255623],[33.13126,103.256447],[33.130001,103.257912],[33.128738,103.259537],[33.127579,103.261253],[33.126831,103.262512],[33.12627,103.263611],[33.124859,103.266617],[33.124149,103.268204],[33.123569,103.269531],[33.12236,103.272102],[33.12175,103.273468],[33.121052,103.274872],[33.1194,103.278381],[33.118641,103.280159],[33.118469,103.281509],[33.118641,103.284523],[33.118599,103.285828],[33.118481,103.286583],[33.11805,103.287819],[33.116661,103.290291],[33.11607,103.291298],[33.114521,103.294037],[33.113831,103.295357],[33.110771,103.300713],[33.108799,103.30423],[33.10693,103.307663],[33.10585,103.309563],[33.10474,103.311562],[33.10376,103.313301],[33.10342,103.313927],[33.10157,103.317261],[33.100632,103.318848],[33.099758,103.320091],[33.096821,103.323883],[33.096001,103.324966],[33.095161,103.326042],[33.094471,103.327003],[33.093639,103.328377],[33.092258,103.331177],[33.091648,103.332573],[33.091042,103.333832],[33.090149,103.335831],[33.089481,103.337082],[33.088829,103.338371],[33.08831,103.339577],[33.087849,103.340714],[33.087318,103.342339],[33.087101,103.343529],[33.086899,103.345703],[33.086929,103.347954],[33.08675,103.349571],[33.0863,103.350693],[33.08556,103.351624],[33.084641,103.352303],[33.078941,103.355186],[33.078522,103.35537],[33.077671,103.355667],[33.076359,103.355904],[33.075459,103.355949],[33.0746,103.355873],[33.07333,103.355553],[33.07206,103.355103],[33.071529,103.354889],[33.069302,103.35408],[33.06802,103.353828],[33.066929,103.353844],[33.06506,103.35424],[33.063622,103.354446],[33.062641,103.354362],[33.061691,103.354103],[33.060921,103.353767],[33.060162,103.353394],[33.05899,103.352783],[33.056351,103.351448],[33.055248,103.350853],[33.05402,103.350143],[33.052711,103.349342],[33.051449,103.348427],[33.050282,103.347649],[33.049179,103.347076],[33.048111,103.346832],[33.046661,103.346809],[33.04493,103.347054],[33.043259,103.347359],[33.04216,103.347313],[33.040951,103.347214],[33.039921,103.347031],[33.038059,103.346832],[33.037102,103.347107],[33.029449,103.349022],[33.028889,103.349289],[33.02813,103.349907],[33.027081,103.351288],[33.026409,103.352318],[33.025848,103.353027],[33.024971,103.353699],[33.023991,103.354027],[33.021801,103.354317],[33.020592,103.354553],[33.019341,103.354713],[33.017941,103.354828],[33.016911,103.35479],[33.016479,103.354752],[33.01535,103.354446],[33.01424,103.354088],[33.013458,103.353592],[33.01091,103.352257],[33.0103,103.351982],[33.008732,103.351624],[33.005501,103.351112],[33.004581,103.3507],[33.003799,103.350021],[33.003651,103.349854],[33.003201,103.349083],[33.002541,103.347862],[33.001862,103.346657],[33.001579,103.346313],[33.00087,103.345573],[32.999931,103.345062],[32.998878,103.344803],[32.992008,103.343224],[32.990391,103.343048],[32.989071,103.34304],[32.987709,103.343117],[32.986309,103.343323],[32.984741,103.343651],[32.979359,103.344963],[32.977219,103.345512],[32.974861,103.346077],[32.970989,103.347076],[32.96925,103.347572],[32.967682,103.348213],[32.966331,103.348824],[32.965172,103.349152],[32.964169,103.349197],[32.963829,103.349136],[32.962742,103.348732],[32.960621,103.347633],[32.959702,103.347198],[32.95908,103.347054],[32.95863,103.347038],[32.958031,103.347107],[32.957119,103.347351],[32.955151,103.347977],[32.952831,103.348663],[32.952141,103.3489],[32.951641,103.349167],[32.95116,103.349442],[32.949409,103.350571],[32.94825,103.351273],[32.94762,103.351593],[32.947079,103.351791],[32.945309,103.35257],[32.944351,103.3526],[32.943501,103.352821],[32.943272,103.352859],[32.941738,103.353241],[32.940842,103.353378],[32.940022,103.353416],[32.93951,103.353409],[32.938541,103.353279],[32.937328,103.352989],[32.936821,103.352829],[32.935581,103.352386],[32.93502,103.352127],[32.93438,103.35173],[32.92968,103.348557],[32.928959,103.348389],[32.92881,103.348389],[32.927872,103.348579],[32.927238,103.348923],[32.926979,103.349167],[32.926231,103.350121],[32.92588,103.350883],[32.92561,103.351929],[32.925621,103.353188],[32.926079,103.354408],[32.92646,103.355003],[32.926689,103.355247],[32.926819,103.35537],[32.927231,103.355652],[32.92894,103.356537],[32.92939,103.356903],[32.92963,103.357208],[32.929829,103.357567],[32.929981,103.358223],[32.930019,103.358673],[32.93,103.359138],[32.929909,103.3601],[32.930092,103.361542],[32.93021,103.362022],[32.93042,103.36274],[32.930618,103.364227],[32.930641,103.364723],[32.930511,103.366203],[32.93037,103.366928],[32.929901,103.370033],[32.929829,103.370567],[32.92918,103.373558],[32.928799,103.375076],[32.928452,103.376228],[32.928242,103.377434],[32.928139,103.378677],[32.928169,103.3797],[32.928249,103.38044],[32.928341,103.380913],[32.928692,103.382339],[32.928909,103.382988],[32.929192,103.383743],[32.929409,103.384277],[32.929859,103.385559],[32.930119,103.386688],[32.93008,103.38781],[32.929829,103.388687],[32.92976,103.388863],[32.929501,103.389328],[32.929329,103.389587],[32.928612,103.390182],[32.927959,103.390533],[32.92667,103.391029],[32.9259,103.391296],[32.924332,103.391922],[32.924019,103.392059],[32.921459,103.393173],[32.92033,103.393883],[32.918991,103.394997],[32.91835,103.397507],[32.918289,103.399567],[32.918541,103.402367],[32.918579,103.403191],[32.918869,103.404228],[32.91993,103.406593],[32.920429,103.408546],[32.9212,103.410851],[32.921989,103.412651],[32.922771,103.414688],[32.92392,103.417473],[32.9244,103.418663],[32.92532,103.420891],[32.92561,103.421631],[32.925999,103.422462],[32.926659,103.423683],[32.927441,103.424919],[32.928329,103.426208],[32.928848,103.427254],[32.928989,103.427818],[32.92905,103.429153],[32.928909,103.430054],[32.928532,103.431862],[32.928421,103.432999],[32.928551,103.434288],[32.928719,103.435532],[32.928741,103.436203],[32.92852,103.437347],[32.92844,103.437569],[32.927872,103.438599],[32.926811,103.440201],[32.92614,103.441238],[32.925838,103.441612],[32.92487,103.442177],[32.924221,103.442284],[32.923759,103.442238],[32.92308,103.442139],[32.92284,103.442032],[32.922298,103.441994],[32.921169,103.441811],[32.919289,103.441727],[32.917931,103.441872],[32.917221,103.442162],[32.916569,103.442596],[32.914398,103.444443],[32.913891,103.444946],[32.912571,103.446381],[32.911499,103.447723],[32.91016,103.449493],[32.90984,103.449928],[32.909279,103.450684],[32.90884,103.451134],[32.907711,103.452148],[32.90715,103.452873],[32.906818,103.453522],[32.90646,103.454453],[32.906151,103.455406],[32.905731,103.456581],[32.905121,103.457428],[32.904419,103.458252],[32.90411,103.458588],[32.903252,103.459747],[32.903019,103.460037],[32.90263,103.460426],[32.90176,103.461113],[32.901588,103.461182],[32.901039,103.461357],[32.900089,103.461479],[32.89872,103.461533],[32.897171,103.46167],[32.896172,103.461678],[32.894901,103.461601],[32.89386,103.461304],[32.893242,103.461021],[32.892818,103.460808],[32.88744,103.45845],[32.885921,103.458076],[32.884232,103.45826],[32.88364,103.458801],[32.88335,103.459244],[32.883228,103.460114],[32.883331,103.461067],[32.883701,103.462151],[32.884941,103.464317],[32.885361,103.465477],[32.88559,103.466217],[32.885941,103.46756],[32.886768,103.471481],[32.88702,103.472878],[32.88702,103.473999],[32.886959,103.474541],[32.8867,103.475273],[32.886589,103.475487],[32.886299,103.475929],[32.885639,103.476753],[32.885151,103.477409],[32.884171,103.4786],[32.883739,103.479172],[32.883289,103.480072],[32.883289,103.481178],[32.88422,103.483498],[32.884609,103.484032],[32.885479,103.484833],[32.885681,103.485199],[32.885921,103.486977],[32.886101,103.48748],[32.88789,103.488998],[32.88847,103.489853],[32.889359,103.490211],[32.88966,103.490784],[32.89048,103.491524],[32.890678,103.491867],[32.890888,103.492531],[32.89201,103.494492],[32.89254,103.495956],[32.8932,103.496986],[32.893539,103.497864],[32.894569,103.499237],[32.894711,103.499672],[32.894741,103.500282],[32.895451,103.501518],[32.89576,103.503227],[32.895981,103.503563],[32.896961,103.504143],[32.898571,103.505417],[32.898788,103.505783],[32.89922,103.506897],[32.89954,103.508629],[32.899872,103.509567],[32.901138,103.512047],[32.9021,103.513329],[32.90271,103.514191],[32.90337,103.515282],[32.903599,103.5159],[32.90369,103.51725],[32.903641,103.5177],[32.903542,103.51815],[32.9034,103.51857],[32.903118,103.51918],[32.90287,103.519539],[32.901981,103.52021],[32.89875,103.521294],[32.897659,103.521713],[32.896591,103.52224],[32.895561,103.522926],[32.89481,103.523613],[32.89386,103.524544],[32.892632,103.525681],[32.89151,103.526657],[32.889999,103.528061],[32.88969,103.528328],[32.887032,103.530907],[32.88538,103.532829],[32.88414,103.534088],[32.883041,103.535133],[32.88232,103.535957],[32.88184,103.536827],[32.881329,103.538147],[32.880569,103.539284],[32.880119,103.539719],[32.87899,103.540367],[32.878181,103.540756],[32.876961,103.541527],[32.87677,103.541687],[32.875542,103.542923],[32.87439,103.544113],[32.87344,103.544777],[32.87281,103.54496],[32.872379,103.544991],[32.871529,103.544769],[32.869991,103.543968],[32.868919,103.543694],[32.86871,103.543694],[32.86792,103.543907],[32.865631,103.545013],[32.864841,103.545326],[32.863529,103.546043],[32.863209,103.546341],[32.862499,103.547562],[32.862141,103.548943],[32.861809,103.550858],[32.86142,103.552467],[32.86134,103.552696],[32.860748,103.55394],[32.860229,103.554649],[32.859379,103.555748],[32.858181,103.55687],[32.857422,103.557388],[32.855759,103.558571],[32.854111,103.559631],[32.852581,103.560661],[32.85178,103.56115],[32.850929,103.561546],[32.84938,103.560806],[32.847279,103.562027],[32.846119,103.561127],[32.844318,103.560806],[32.842979,103.560966],[32.83886,103.561691],[32.836922,103.561974],[32.835239,103.562263],[32.835041,103.562317],[32.833969,103.562889],[32.832489,103.56398],[32.832199,103.56424],[32.830921,103.565247],[32.829681,103.565933],[32.828079,103.566483],[32.826851,103.566849],[32.826199,103.566994],[32.825119,103.566849],[32.82309,103.565964],[32.82196,103.56604],[32.821091,103.566437],[32.819809,103.567093],[32.81958,103.567169],[32.818661,103.567421],[32.816849,103.567734],[32.81509,103.567963],[32.813641,103.568352],[32.81329,103.568604],[32.81266,103.569221],[32.81216,103.570007],[32.811611,103.570801],[32.810741,103.571503],[32.80975,103.571831],[32.80854,103.571991],[32.806389,103.572197],[32.80484,103.572342],[32.801029,103.572723],[32.800159,103.572884],[32.79948,103.573219],[32.79895,103.573669],[32.79842,103.574249],[32.79784,103.575233],[32.79734,103.576553],[32.79668,103.578011],[32.796631,103.578827],[32.796841,103.581757],[32.796799,103.582779],[32.796261,103.583809],[32.795582,103.584511],[32.793018,103.585953],[32.792259,103.586868],[32.79192,103.587959],[32.79147,103.592941],[32.79113,103.595108],[32.79044,103.596313],[32.789612,103.596863],[32.78825,103.597397],[32.788052,103.597458],[32.787029,103.597878],[32.786579,103.598267],[32.786301,103.598579],[32.78574,103.599663],[32.78553,103.60096],[32.78524,103.603996],[32.785069,103.605637],[32.785721,103.607887],[32.785721,103.608856],[32.785389,103.609711],[32.784641,103.610893],[32.78352,103.612663],[32.782211,103.614609],[32.78183,103.615097],[32.780869,103.616226],[32.78072,103.616257],[32.780609,103.61631],[32.780491,103.616371],[32.780258,103.616623],[32.779961,103.616898],[32.778049,103.618217],[32.776642,103.619171],[32.775639,103.619743],[32.774971,103.619812],[32.774311,103.619583],[32.773739,103.619347],[32.773289,103.619118],[32.772671,103.618927],[32.771999,103.618568],[32.771679,103.618523],[32.771259,103.618523],[32.770809,103.618294],[32.770481,103.618217],[32.770248,103.61824],[32.7701,103.618294],[32.769852,103.618462],[32.769402,103.618912],[32.769089,103.619797],[32.768589,103.620064],[32.76759,103.620682],[32.767712,103.618896],[32.767509,103.618248],[32.767559,103.617279],[32.767399,103.616951],[32.767208,103.616699],[32.766899,103.61644],[32.766251,103.616249],[32.76609,103.616226],[32.765862,103.616249],[32.765579,103.616241],[32.765041,103.616058],[32.76498,103.616013],[32.764648,103.615883],[32.76403,103.615891],[32.763828,103.615959],[32.763561,103.616081],[32.762581,103.616364],[32.76236,103.616409],[32.76173,103.616272],[32.76059,103.615753],[32.756771,103.614197],[32.755939,103.613922],[32.754959,103.613441],[32.754341,103.613152],[32.754169,103.613091],[32.753738,103.61306],[32.753349,103.613052],[32.75243,103.612778],[32.751999,103.612778],[32.751919,103.612762],[32.751499,103.612793],[32.750641,103.612663],[32.750401,103.61261],[32.749691,103.612511],[32.748161,103.612556],[32.747429,103.612289],[32.746552,103.611816],[32.745739,103.611656],[32.74556,103.611679],[32.745361,103.611656],[32.744301,103.611977],[32.74408,103.612099],[32.7439,103.612099],[32.743488,103.611992],[32.743408,103.611992],[32.743271,103.612053],[32.742981,103.61232],[32.742882,103.612396],[32.74255,103.61274],[32.742531,103.61274],[32.742401,103.612938],[32.74218,103.613113],[32.741951,103.613312],[32.74173,103.613472],[32.741379,103.613831],[32.741161,103.613983],[32.74057,103.614433],[32.740231,103.614548],[32.740028,103.614571],[32.739491,103.614548],[32.738289,103.614304],[32.737469,103.614227],[32.736851,103.614113],[32.736641,103.614113],[32.736401,103.614021],[32.736271,103.614014],[32.73555,103.613983],[32.734982,103.613892],[32.73439,103.614037],[32.73407,103.614166],[32.73391,103.614182],[32.73341,103.614281],[32.733051,103.614441],[32.73288,103.614662],[32.731121,103.615913],[32.733009,103.614578],[32.731171,103.616257],[32.728809,103.614731],[32.72821,103.614487],[32.72781,103.61451],[32.7276,103.614601],[32.727131,103.615219],[32.7267,103.615868],[32.726521,103.616058],[32.726341,103.616112],[32.725739,103.616089],[32.724991,103.615448],[32.723011,103.613426],[32.722759,103.613197],[32.722198,103.612961],[32.72105,103.612663],[32.720032,103.612297],[32.71991,103.612244],[32.719711,103.612053],[32.719181,103.611343],[32.718578,103.610367],[32.718201,103.60994],[32.717861,103.609596],[32.7174,103.609222],[32.716751,103.608887],[32.71611,103.608681],[32.714588,103.608047],[32.71349,103.607727],[32.712181,103.607422],[32.711411,103.607193],[32.71056,103.607246],[32.710251,103.607239],[32.709042,103.606903],[32.70776,103.606293],[32.707481,103.606216],[32.707062,103.606163],[32.706421,103.606087],[32.70546,103.605927],[32.704552,103.605583],[32.703732,103.605598],[32.70332,103.605667],[32.703072,103.605698],[32.702839,103.605667],[32.70211,103.605438],[32.701931,103.605408],[32.701771,103.605408],[32.701271,103.605263],[32.700932,103.605141],[32.700531,103.604874],[32.699711,103.604362],[32.699169,103.604118],[32.698891,103.604088],[32.698589,103.604118],[32.698139,103.604012],[32.6973,103.603699],[32.69627,103.6036],[32.695469,103.603432],[32.695122,103.60334],[32.694538,103.603218],[32.693939,103.603157],[32.69331,103.602837],[32.69286,103.602531],[32.692181,103.602127],[32.69138,103.602203],[32.690689,103.60231],[32.68866,103.601852],[32.687641,103.601738],[32.68716,103.601822],[32.686211,103.602089],[32.686081,103.602112],[32.684361,103.601738],[32.682961,103.601402],[32.682331,103.601341],[32.681709,103.601334],[32.680939,103.601372],[32.68008,103.601387],[32.679352,103.601357],[32.67865,103.60128],[32.67775,103.60128],[32.67635,103.601967],[32.67564,103.60199],[32.6745,103.601768],[32.673389,103.60173],[32.671902,103.601349],[32.671082,103.601578],[32.670502,103.601852],[32.669762,103.602242],[32.66906,103.602257],[32.667542,103.602127],[32.666489,103.602188],[32.665051,103.602013],[32.663712,103.601898],[32.661572,103.601799],[32.660351,103.601608],[32.659389,103.601212],[32.658588,103.60099],[32.657459,103.600868],[32.657021,103.600853],[32.655869,103.600868],[32.654869,103.600761],[32.652618,103.600151],[32.65189,103.599792],[32.651279,103.599457],[32.650551,103.598969],[32.650131,103.598763],[32.64856,103.59819],[32.64624,103.597343],[32.64613,103.597282],[32.646099,103.597252],[32.644691,103.596863],[32.64436,103.596947],[32.644329,103.59697],[32.64418,103.597214],[32.643421,103.598312],[32.643139,103.598549],[32.64296,103.598618],[32.64146,103.598503],[32.640888,103.598488],[32.638309,103.598106],[32.637669,103.597969],[32.637081,103.597794],[32.63623,103.597557],[32.635571,103.597229],[32.634159,103.59642],[32.633621,103.595932],[32.633099,103.595192],[32.63298,103.595062],[32.630989,103.593307],[32.630871,103.593224],[32.63018,103.593033],[32.62859,103.592728],[32.627861,103.592484],[32.627331,103.592087],[32.626701,103.591553],[32.626431,103.591339],[32.625969,103.591042],[32.625401,103.590927],[32.624741,103.590843],[32.623569,103.590637],[32.62336,103.590607],[32.620441,103.590843],[32.61964,103.590919],[32.618912,103.591141],[32.618301,103.591522],[32.617229,103.592491],[32.61618,103.593407],[32.613911,103.59549],[32.612141,103.597343],[32.60939,103.600151],[32.60881,103.600609],[32.60812,103.600983],[32.607559,103.601189],[32.60487,103.602074],[32.60397,103.601501],[32.599178,103.605614],[32.598019,103.605003],[32.597408,103.605362],[32.597099,103.605637],[32.596779,103.605873],[32.5961,103.606407],[32.59581,103.607697],[32.58968,103.610817],[32.588779,103.609818],[32.587219,103.609459],[32.58707,103.609444],[32.586552,103.60965],[32.58593,103.61013],[32.585361,103.610619],[32.585091,103.61097],[32.584961,103.611092],[32.58469,103.611214],[32.584171,103.611511],[32.58358,103.612038],[32.583382,103.613289],[32.573071,103.617027],[32.572479,103.61599],[32.572121,103.61599],[32.57011,103.616623],[32.56966,103.616882],[32.569519,103.617027],[32.569351,103.617126],[32.56926,103.617233],[32.568729,103.617599],[32.56815,103.617767],[32.567829,103.61776],[32.567451,103.617661],[32.566639,103.617523],[32.566261,103.61763],[32.565498,103.618553],[32.565231,103.618668],[32.561069,103.620064],[32.560051,103.620728],[32.560001,103.62178],[32.54961,103.625549],[32.546169,103.626801],[32.544022,103.627579],[32.5396,103.629181],[32.539082,103.628212],[32.530869,103.630623],[32.528111,103.630257],[32.527721,103.630333],[32.526001,103.631042],[32.52544,103.631203],[32.52467,103.631088],[32.523991,103.630859],[32.523708,103.630859],[32.522869,103.631157],[32.52224,103.631233],[32.521599,103.631126],[32.520771,103.631111],[32.520168,103.631279],[32.519741,103.6315],[32.519482,103.631683],[32.519119,103.632027],[32.518742,103.632233],[32.51857,103.632362],[32.518261,103.632889],[32.518059,103.633118],[32.517811,103.633324],[32.517342,103.633774],[32.516441,103.634323],[32.5159,103.634613],[32.515598,103.634857],[32.515469,103.635094],[32.515301,103.636017],[32.515099,103.636948],[32.514881,103.637337],[32.514751,103.63868],[32.510632,103.641068],[32.509769,103.639954],[32.509331,103.639832],[32.508751,103.63958],[32.508579,103.639526],[32.508289,103.639519],[32.507221,103.639709],[32.506599,103.639847],[32.505138,103.64035],[32.504871,103.640373],[32.504539,103.640282],[32.504421,103.640213],[32.504131,103.639923],[32.504051,103.639793],[32.502449,103.639282],[32.502102,103.639664],[32.501961,103.639877],[32.501869,103.640083],[32.50156,103.641472],[32.501389,103.642082],[32.500481,103.644814],[32.4991,103.645393],[32.498219,103.645126],[32.49791,103.645111],[32.49778,103.645119],[32.49712,103.645409],[32.496429,103.645859],[32.493111,103.648804],[32.492649,103.648972],[32.49192,103.649017],[32.49152,103.648979],[32.491261,103.648872],[32.491058,103.648666],[32.49078,103.648216],[32.490429,103.647552],[32.490261,103.647293],[32.48975,103.646797],[32.489422,103.646507],[32.488869,103.646133],[32.488708,103.646088],[32.488609,103.646103],[32.488419,103.646156],[32.488251,103.646294],[32.487968,103.646683],[32.487228,103.647362],[32.4869,103.647827],[32.486591,103.648651],[32.486309,103.649246],[32.485149,103.651466],[32.484699,103.652138],[32.484268,103.652397],[32.483719,103.652641],[32.482811,103.652809],[32.481812,103.653061],[32.481209,103.653191],[32.480999,103.653259],[32.48045,103.653709],[32.480061,103.654411],[32.479839,103.655159],[32.479599,103.656219],[32.479561,103.656441],[32.479481,103.657791],[32.47961,103.659042],[32.475731,103.661293],[32.474949,103.660133],[32.474339,103.660072],[32.47393,103.660149],[32.472481,103.660339],[32.47221,103.660408],[32.469349,103.661484],[32.468899,103.662041],[32.46833,103.662727],[32.467201,103.664032],[32.466019,103.66507],[32.464512,103.666359],[32.464039,103.666801],[32.463879,103.66703],[32.463669,103.667793],[32.463581,103.668404],[32.463928,103.669243],[32.455311,103.675484],[32.44862,103.680344],[32.443989,103.683693],[32.438961,103.687317],[32.43782,103.686546],[32.43652,103.686813],[32.436062,103.686958],[32.435749,103.687141],[32.43425,103.688454],[32.433849,103.688766],[32.43364,103.688881],[32.43288,103.689041],[32.432201,103.689087],[32.431709,103.689262],[32.43148,103.689537],[32.431221,103.689781],[32.430901,103.690392],[32.430779,103.690521],[32.430569,103.690689],[32.430302,103.691002],[32.43005,103.691017],[32.429619,103.691109],[32.429199,103.691223],[32.428699,103.691429],[32.4282,103.691597],[32.427891,103.691879],[32.427719,103.692093],[32.427269,103.692978],[32.42688,103.693932],[32.426559,103.694733],[32.426208,103.695396],[32.425591,103.695999],[32.42511,103.6968],[32.424549,103.697533],[32.423981,103.698036],[32.42355,103.69838],[32.42337,103.698738],[32.423248,103.699593],[32.42337,103.700943],[32.42247,103.701736],[32.42268,103.703369],[32.422531,103.703758],[32.421791,103.704437],[32.42112,103.705002],[32.420502,103.705597],[32.419819,103.70636],[32.41909,103.707314],[32.41893,103.707489],[32.4179,103.709068],[32.41293,103.713463],[32.411888,103.713661],[32.410511,103.71376],[32.409721,103.713173],[32.4021,103.720001],[32.401299,103.720428],[32.387909,103.726318],[32.387878,103.727661],[32.387779,103.727737],[32.387428,103.728081],[32.387211,103.728348],[32.386478,103.728844],[32.38607,103.728958],[32.385349,103.728912],[32.384682,103.728897],[32.383949,103.728867],[32.38303,103.727943],[32.37851,103.728539],[32.378052,103.729881],[32.377319,103.730423],[32.377121,103.730499],[32.37574,103.730873],[32.374809,103.731003],[32.374081,103.731056],[32.373859,103.73111],[32.373112,103.73143],[32.37228,103.731667],[32.371811,103.73175],[32.371632,103.731697],[32.37093,103.731216],[32.369781,103.730347],[32.369221,103.729057],[32.365871,103.728638],[32.36549,103.726868],[32.365139,103.726471],[32.364941,103.726196],[32.364769,103.726021],[32.3647,103.725861],[32.36459,103.725563],[32.364441,103.724899],[32.364208,103.724403],[32.363659,103.723984],[32.36335,103.723862],[32.36224,103.723877],[32.361752,103.723869],[32.361462,103.723907],[32.3605,103.724121],[32.360321,103.724121],[32.35928,103.723869],[32.358891,103.724007],[32.358719,103.724167],[32.358139,103.725037],[32.35788,103.725449],[32.357471,103.726189],[32.35717,103.72718],[32.357121,103.727638],[32.357059,103.727814],[32.356861,103.727661],[32.35606,103.728683],[32.356659,103.730026],[32.356579,103.730827],[32.356449,103.731697],[32.356121,103.733276],[32.355782,103.735153],[32.355492,103.735832],[32.35524,103.736168],[32.35519,103.736282],[32.35503,103.736519],[32.35458,103.736748],[32.353859,103.736992],[32.3536,103.73703],[32.35339,103.73703],[32.352219,103.736847],[32.350929,103.736702],[32.350719,103.736748],[32.350319,103.736893],[32.350101,103.736282],[32.34993,103.737289],[32.34943,103.737503],[32.348598,103.737381],[32.348,103.737122],[32.347729,103.736923],[32.347641,103.735962],[32.34623,103.735779],[32.345821,103.734337],[32.34568,103.7342],[32.345551,103.734009],[32.345379,103.733856],[32.340771,103.727203],[32.34053,103.726822],[32.340481,103.726677],[32.340439,103.726479],[32.34045,103.726242],[32.3405,103.726082],[32.34066,103.72567],[32.340672,103.725456],[32.340439,103.724876],[32.340099,103.724167],[32.340019,103.723389],[32.340031,103.72316],[32.340111,103.7229],[32.340462,103.722481],[32.340611,103.722221],[32.340599,103.721718],[32.340519,103.721527],[32.340092,103.720932],[32.339809,103.720772],[32.33762,103.72052],[32.33683,103.72049],[32.336369,103.720421],[32.335609,103.720207],[32.33519,103.720032],[32.334728,103.719711],[32.334259,103.71933],[32.333832,103.719162],[32.333599,103.719109],[32.332722,103.718712],[32.33234,103.718613],[32.331558,103.71875],[32.330231,103.719467],[32.329472,103.719803],[32.329041,103.719841],[32.328621,103.719849],[32.32827,103.71981],[32.327869,103.719887],[32.327389,103.719841],[32.327122,103.719658],[32.327019,103.719437],[32.32682,103.718987],[32.32658,103.718788],[32.32629,103.718719],[32.326061,103.718613],[32.325771,103.718536],[32.325531,103.71859],[32.325089,103.718727],[32.324959,103.718803],[32.32428,103.719032],[32.32365,103.719139],[32.323429,103.719193],[32.3232,103.719276],[32.323051,103.71936],[32.322319,103.719917],[32.321701,103.720268],[32.320808,103.72068],[32.320461,103.720589],[32.32016,103.720291],[32.319981,103.7202],[32.31926,103.720177],[32.319061,103.7202],[32.318741,103.720169],[32.318642,103.720329],[32.318451,103.720284],[32.31786,103.720062],[32.317741,103.720062],[32.317532,103.720154],[32.317039,103.720467],[32.316441,103.721413],[32.316071,103.721367],[32.315369,103.72123],[32.314651,103.720978],[32.313961,103.720818],[32.313251,103.720802],[32.312721,103.720818],[32.312141,103.720993],[32.31142,103.721336],[32.31131,103.721367],[32.310471,103.721367],[32.310162,103.721313],[32.30938,103.720802],[32.30904,103.72068],[32.308788,103.720657],[32.30843,103.720863],[32.308201,103.7211],[32.307041,103.721878],[32.30603,103.722488],[32.30579,103.722588],[32.305161,103.723068],[32.304489,103.723373],[32.30444,103.723373],[32.303829,103.723457],[32.303188,103.72361],[32.302551,103.723793],[32.301521,103.723824],[32.300659,103.723892],[32.300339,103.723938],[32.29982,103.724121],[32.299648,103.724281],[32.299541,103.724426],[32.29929,103.725037],[32.299129,103.725609],[32.299,103.726334],[32.29895,103.726807],[32.29908,103.72802],[32.28278,103.735847],[32.282139,103.734863],[32.281811,103.734901],[32.281319,103.734909],[32.280991,103.734932],[32.280048,103.735046],[32.279228,103.734962],[32.27861,103.735107],[32.278561,103.73513],[32.2784,103.735298],[32.277771,103.736427],[32.277031,103.737267],[32.276718,103.737709],[32.27663,103.7388],[32.27467,103.739754],[32.274441,103.741219],[32.273811,103.741577],[32.27319,103.741737],[32.272499,103.741997],[32.271721,103.742462],[32.27121,103.742844],[32.270771,103.743271],[32.27013,103.743736],[32.269711,103.743942],[32.26902,103.744179],[32.26878,103.744217],[32.268242,103.7444],[32.267399,103.744713],[32.266949,103.745033],[32.266449,103.745407],[32.266289,103.745499],[32.26561,103.745697],[32.264511,103.745117],[32.26244,103.74675],[32.26263,103.748032],[32.262428,103.748466],[32.26202,103.748802],[32.261749,103.748993],[32.26149,103.749092],[32.261181,103.749313],[32.260849,103.749634],[32.260441,103.749863],[32.259892,103.749931],[32.259129,103.749352],[32.255508,103.75219],[32.255661,103.75383],[32.25523,103.755402],[32.2547,103.756187],[32.254581,103.756477],[32.25425,103.756783],[32.25404,103.757088],[32.253658,103.757812],[32.253181,103.758797],[32.252628,103.759499],[32.252041,103.759956],[32.251362,103.76017],[32.250881,103.760178],[32.250431,103.760246],[32.250271,103.760193],[32.250019,103.760139],[32.24942,103.760101],[32.24892,103.760193],[32.24855,103.760353],[32.248371,103.760628],[32.24818,103.760788],[32.247921,103.76078],[32.247719,103.760857],[32.247601,103.760986],[32.24733,103.761414],[32.24699,103.761803],[32.24659,103.762108],[32.246311,103.762253],[32.24559,103.762543],[32.24535,103.762657],[32.24522,103.762688],[32.244541,103.762772],[32.24379,103.762787],[32.243359,103.762917],[32.243111,103.763077],[32.242298,103.764],[32.24152,103.764717],[32.240849,103.765167],[32.2402,103.76545],[32.239552,103.765663],[32.238811,103.765701],[32.23835,103.765701],[32.23772,103.765602],[32.237068,103.765427],[32.236561,103.76516],[32.236031,103.764816],[32.23555,103.764458],[32.234901,103.763496],[32.233509,103.764069],[32.23288,103.764282],[32.224331,103.765762],[32.220219,103.766548],[32.219711,103.765091],[32.219559,103.764893],[32.219341,103.764732],[32.219231,103.764687],[32.21899,103.764641],[32.218861,103.764603],[32.217991,103.764503],[32.216721,103.764427],[32.21656,103.764503],[32.21627,103.76458],[32.215931,103.764526],[32.215691,103.764557],[32.215611,103.764603],[32.215092,103.7649],[32.21487,103.765068],[32.214329,103.765556],[32.213848,103.765984],[32.21368,103.766083],[32.213299,103.766129],[32.21262,103.765923],[32.212448,103.765938],[32.212139,103.765953],[32.21146,103.766144],[32.211151,103.766167],[32.210129,103.766037],[32.20974,103.765907],[32.208851,103.765282],[32.20853,103.765259],[32.20784,103.765244],[32.207291,103.765198],[32.206909,103.765213],[32.205502,103.765457],[32.20406,103.765137],[32.20266,103.764061],[32.202389,103.763924],[32.202091,103.763809],[32.201061,103.763603],[32.200821,103.763321],[32.200741,103.762932],[32.200588,103.762619],[32.200359,103.762421],[32.200008,103.762177],[32.199879,103.762032],[32.199371,103.762123],[32.19912,103.762032],[32.197449,103.761223],[32.19677,103.760948],[32.19651,103.760857],[32.19553,103.760399],[32.195431,103.760384],[32.194851,103.760391],[32.19352,103.760483],[32.193169,103.76049],[32.192711,103.760437],[32.19249,103.760361],[32.192451,103.760384],[32.19223,103.760292],[32.191719,103.760223],[32.19112,103.760071],[32.190578,103.759804],[32.190128,103.759468],[32.189541,103.758987],[32.189251,103.758774],[32.189072,103.758713],[32.1884,103.758659],[32.18734,103.75856],[32.186588,103.758537],[32.18642,103.758507],[32.185841,103.758492],[32.185539,103.758423],[32.18528,103.758179],[32.185169,103.757729],[32.184952,103.757149],[32.184818,103.756958],[32.184601,103.756721],[32.183971,103.756264],[32.182529,103.755493],[32.18235,103.755463],[32.180672,103.755501],[32.18037,103.755623],[32.180271,103.755722],[32.179218,103.756973],[32.17902,103.757111],[32.178589,103.757187],[32.178162,103.757187],[32.17794,103.757133],[32.1782,103.757179],[32.177479,103.756889],[32.176491,103.756157],[32.175869,103.755608],[32.17561,103.755188],[32.175282,103.754471],[32.17485,103.753616],[32.174622,103.752991],[32.174191,103.751953],[32.174129,103.751694],[32.173981,103.75135],[32.173321,103.750267],[32.172981,103.749519],[32.172749,103.748756],[32.17263,103.748497],[32.17244,103.748177],[32.171909,103.747513],[32.171791,103.747299],[32.171471,103.746872],[32.171249,103.746223],[32.171101,103.745667],[32.171001,103.745117],[32.171021,103.744598],[32.171059,103.744263],[32.17112,103.743896],[32.171131,103.743523],[32.171082,103.743179],[32.170929,103.742683],[32.1707,103.742149],[32.17046,103.741623],[32.170261,103.741432],[32.170029,103.74147],[32.169788,103.741653],[32.169571,103.741737],[32.16925,103.741951],[32.168861,103.742126],[32.168369,103.742264],[32.167759,103.742081],[32.167648,103.741997],[32.16708,103.741257],[32.166809,103.741043],[32.16544,103.740593],[32.164761,103.740387],[32.164242,103.740181],[32.163879,103.739899],[32.163651,103.739647],[32.163429,103.739227],[32.16325,103.738724],[32.163109,103.738358],[32.162701,103.737907],[32.162079,103.737297],[32.16188,103.737061],[32.161549,103.736763],[32.161449,103.736633],[32.161121,103.73629],[32.16048,103.735924],[32.159801,103.735672],[32.158619,103.735321],[32.158321,103.735168],[32.157829,103.734978],[32.157619,103.734871],[32.157261,103.734863],[32.15641,103.734749],[32.156132,103.734734],[32.155869,103.734741],[32.15556,103.734787],[32.15498,103.734978],[32.154881,103.734993],[32.15456,103.734863],[32.154018,103.734497],[32.153561,103.734306],[32.153309,103.734123],[32.153069,103.733887],[32.15284,103.73362],[32.152649,103.733353],[32.152611,103.7332],[32.152512,103.733101],[32.152302,103.732964],[32.152199,103.732933],[32.151611,103.732811],[32.150921,103.732643],[32.150028,103.73246],[32.149891,103.732407],[32.14967,103.732384],[32.149471,103.732323],[32.149132,103.732269],[32.148769,103.732162],[32.148399,103.732109],[32.148102,103.732147],[32.147652,103.732246],[32.147018,103.732269],[32.146889,103.732231],[32.146309,103.731903],[32.146118,103.731773],[32.145882,103.731682],[32.145241,103.731667],[32.14481,103.731697],[32.144581,103.731773],[32.143681,103.732109],[32.14352,103.732193],[32.14336,103.732239],[32.143082,103.732399],[32.142429,103.732674],[32.142059,103.732903],[32.14172,103.7332],[32.141521,103.733467],[32.14122,103.733803],[32.140888,103.733917],[32.14045,103.733757],[32.140251,103.733597],[32.139679,103.733017],[32.13945,103.732826],[32.138981,103.732613],[32.138741,103.732536],[32.138519,103.732513],[32.138199,103.732567],[32.137489,103.732903],[32.13707,103.733231],[32.136742,103.733437],[32.136459,103.733528],[32.136021,103.73365],[32.135731,103.733757],[32.13538,103.733849],[32.135151,103.733849],[32.134472,103.733772],[32.134109,103.733658],[32.1339,103.733612],[32.133678,103.733719],[32.13327,103.734016],[32.132912,103.734138],[32.132721,103.734177],[32.132309,103.734451],[32.13208,103.734528],[32.131302,103.734627],[32.130322,103.734642],[32.129959,103.734703],[32.129459,103.734818],[32.128342,103.734962],[32.12801,103.734932],[32.12796,103.734947],[32.127811,103.734932],[32.127411,103.734818],[32.127129,103.734779],[32.126709,103.734642],[32.126419,103.734444],[32.12624,103.734329],[32.12587,103.733849],[32.125641,103.733711],[32.125179,103.733582],[32.124821,103.733543],[32.123871,103.733559],[32.12331,103.733521],[32.122761,103.733383],[32.12159,103.732971],[32.12088,103.732597],[32.120209,103.732147],[32.119419,103.731651],[32.118851,103.731148],[32.118061,103.73037],[32.11755,103.729736],[32.117001,103.728928],[32.11657,103.728508],[32.116482,103.728447],[32.11618,103.728317],[32.115959,103.728271],[32.115841,103.728233],[32.11515,103.728073],[32.114681,103.727882],[32.114521,103.727791],[32.11412,103.727226],[32.11396,103.727127],[32.1138,103.726967],[32.113609,103.726753],[32.11338,103.726562],[32.112801,103.726143],[32.11261,103.726112],[32.112209,103.726151],[32.112041,103.726128],[32.111629,103.725693],[32.111462,103.725578],[32.111382,103.725487],[32.11079,103.725159],[32.110691,103.725189],[32.110519,103.725319],[32.110249,103.725563],[32.11005,103.725731],[32.109749,103.725662],[32.109631,103.725563],[32.109341,103.725449],[32.108501,103.725731],[32.108212,103.725983],[32.107979,103.726227],[32.107899,103.726288],[32.107689,103.726372],[32.107262,103.726448],[32.107059,103.726433],[32.106621,103.726227],[32.1064,103.725937],[32.106468,103.725822],[32.10664,103.725662],[32.106419,103.725403],[32.106838,103.724632],[32.106541,103.724342],[32.106781,103.723579],[32.10656,103.723412],[32.106461,103.723213],[32.105831,103.723534],[32.10561,103.723511],[32.105389,103.723541],[32.103531,103.725349],[32.103321,103.725487],[32.103142,103.725563],[32.102829,103.725723],[32.102638,103.725754],[32.102261,103.725891],[32.102081,103.725922],[32.1017,103.725937],[32.100639,103.725937],[32.100368,103.725883],[32.100151,103.725639],[32.099911,103.725288],[32.099491,103.724838],[32.0994,103.724709],[32.09919,103.724068],[32.09903,103.723351],[32.09874,103.722366],[32.09869,103.722183],[32.098431,103.721733],[32.098091,103.721329],[32.098011,103.721268],[32.097778,103.72123],[32.09734,103.721336],[32.096729,103.721321],[32.096039,103.721069],[32.095852,103.72084],[32.095718,103.720329],[32.095692,103.720032],[32.095558,103.719658],[32.095242,103.71949],[32.094551,103.719528],[32.093971,103.719597],[32.093029,103.719841],[32.092461,103.720016],[32.092072,103.719994],[32.09169,103.720093],[32.09132,103.720222],[32.090988,103.720383],[32.090691,103.720467],[32.09034,103.720451],[32.090019,103.72039],[32.08976,103.720177],[32.089458,103.719994],[32.089298,103.719978],[32.08894,103.719887],[32.088661,103.71965],[32.088459,103.719582],[32.08799,103.719368],[32.0877,103.71917],[32.087158,103.718628],[32.086891,103.718407],[32.08662,103.718384],[32.08622,103.718437],[32.085991,103.718513],[32.085491,103.718719],[32.085121,103.718826],[32.08485,103.718964],[32.08456,103.719177],[32.084278,103.719513],[32.083988,103.719597],[32.083691,103.719414],[32.08334,103.719078],[32.083149,103.71891],[32.082939,103.718788],[32.082661,103.718811],[32.082359,103.718948],[32.081539,103.719131],[32.081551,103.719147],[32.08149,103.719147],[32.081402,103.719177],[32.081322,103.719177],[32.081108,103.719292],[32.0807,103.719437],[32.080441,103.719467],[32.079571,103.719292],[32.079418,103.7192],[32.079071,103.718903],[32.078289,103.718468],[32.077709,103.71804],[32.07732,103.717697],[32.077068,103.717644],[32.076691,103.717667],[32.07597,103.71785],[32.075291,103.717949],[32.074791,103.717903],[32.07415,103.717781],[32.073978,103.71769],[32.073811,103.717697],[32.073521,103.71759],[32.073269,103.71756],[32.073101,103.717461],[32.072868,103.717392],[32.072659,103.7173],[32.072201,103.717331],[32.071869,103.717308],[32.071651,103.717239],[32.071442,103.717163],[32.071369,103.717056],[32.071178,103.716927],[32.070919,103.716942],[32.070351,103.717209],[32.069969,103.717339],[32.069939,103.717133],[32.069771,103.716927],[32.071201,103.716042],[32.07135,103.715736],[32.07127,103.715477],[32.070969,103.715363],[32.070621,103.715279],[32.070332,103.715103],[32.070061,103.714867],[32.06992,103.714828],[32.06934,103.714539],[32.06897,103.714447],[32.068741,103.714417],[32.068489,103.714371],[32.068489,103.714256],[32.068359,103.714127],[32.068241,103.71376],[32.068069,103.71347],[32.067909,103.713387],[32.067501,103.713242],[32.06707,103.713173],[32.066971,103.713188],[32.06673,103.713463],[32.066639,103.713783],[32.06649,103.71405],[32.065781,103.714432],[32.065659,103.714233],[32.065651,103.713913],[32.06575,103.71283],[32.065701,103.712608],[32.065639,103.712532],[32.065121,103.71212],[32.065071,103.711838],[32.065239,103.711227],[32.065262,103.710899],[32.06509,103.710602],[32.064751,103.710327],[32.064442,103.710121],[32.064159,103.710213],[32.063801,103.71051],[32.063591,103.710823],[32.06345,103.711143],[32.063278,103.711411],[32.063019,103.711502],[32.06271,103.711517],[32.062469,103.71138],[32.062168,103.711082],[32.06192,103.710777],[32.06189,103.710609],[32.061798,103.710243],[32.061611,103.709633],[32.06134,103.709129],[32.0611,103.708908],[32.06097,103.70874],[32.06094,103.708641],[32.060879,103.708618],[32.060692,103.708397],[32.060551,103.708183],[32.06041,103.707863],[32.06041,103.707817],[32.060459,103.707581],[32.060478,103.707321],[32.06041,103.707062],[32.060181,103.706543],[32.06015,103.70636],[32.060181,103.705681],[32.05999,103.705177],[32.059761,103.704674],[32.05954,103.704399],[32.059391,103.704086],[32.05901,103.703987],[32.058632,103.703957],[32.05806,103.703819],[32.057991,103.703613],[32.05806,103.703194],[32.057499,103.703552],[32.057331,103.703819],[32.05698,103.704231],[32.05648,103.704903],[32.05624,103.705261],[32.056068,103.705452],[32.055962,103.705627],[32.055691,103.705872],[32.0555,103.705994],[32.05529,103.70607],[32.055061,103.7062],[32.054859,103.706284],[32.0546,103.706306],[32.054409,103.705971],[32.0541,103.705528],[32.05405,103.705307],[32.053959,103.705109],[32.053959,103.704964],[32.054081,103.704842],[32.054539,103.704552],[32.054741,103.704468],[32.054859,103.704231],[32.05481,103.703911],[32.054722,103.703659],[32.0546,103.703461],[32.054501,103.703247],[32.054451,103.703056],[32.054619,103.702797],[32.05455,103.702911],[32.056252,103.701553],[32.056499,103.701393],[32.056709,103.70118],[32.056801,103.701027],[32.057209,103.700912],[32.057961,103.700989],[32.058311,103.700768],[32.058529,103.700684],[32.058811,103.700706],[32.059181,103.700844],[32.0592,103.700867],[32.059509,103.701019],[32.059669,103.701073],[32.060009,103.700996],[32.060581,103.700813],[32.06073,103.700661],[32.06078,103.700417],[32.06076,103.700233],[32.06057,103.699951],[32.060429,103.699837],[32.060169,103.699677],[32.058109,103.698669],[32.057529,103.698318],[32.057381,103.698257],[32.057308,103.69825],[32.057011,103.698143],[32.056919,103.69809],[32.05685,103.698013],[32.056671,103.697723],[32.056561,103.697388],[32.056461,103.696854],[32.0564,103.696701],[32.055801,103.695648],[32.055531,103.695229],[32.055012,103.694649],[32.054909,103.69442],[32.05484,103.693748],[32.054829,103.693298],[32.054821,103.693039],[32.05484,103.69265],[32.054699,103.692177],[32.05471,103.692101],[32.054562,103.691803],[32.053829,103.690521],[32.053612,103.690224],[32.053162,103.689713],[32.052589,103.688713],[32.052509,103.688606],[32.05228,103.688454],[32.051979,103.688316],[32.051769,103.688171],[32.05154,103.687897],[32.05138,103.687752],[32.051041,103.687187],[32.05088,103.687027],[32.050549,103.687027],[32.04998,103.687103],[32.049671,103.686989],[32.04921,103.686707],[32.04884,103.68615],[32.048988,103.685677],[32.048859,103.684868],[32.048698,103.684334],[32.04834,103.6828],[32.048092,103.681953],[32.048038,103.681664],[32.048149,103.68132],[32.04829,103.681358],[32.048149,103.681213],[32.047981,103.680946],[32.047791,103.680733],[32.04731,103.680023],[32.046822,103.679764],[32.046478,103.679703],[32.046249,103.679611],[32.046211,103.679604],[32.0462,103.679619],[32.045959,103.679878],[32.045879,103.680122],[32.045681,103.680962],[32.045631,103.681129],[32.045521,103.681473],[32.045311,103.682533],[32.045219,103.682877],[32.04509,103.683601],[32.044991,103.683937],[32.044788,103.684158],[32.044609,103.684196],[32.043598,103.68428],[32.042339,103.684319],[32.04211,103.684349],[32.04179,103.684509],[32.041679,103.684669],[32.0415,103.684883],[32.04113,103.684967],[32.041069,103.684937],[32.040691,103.684624],[32.04034,103.68454],[32.03973,103.684624],[32.039589,103.684593],[32.039341,103.684464],[32.038689,103.683983],[32.038311,103.68383],[32.0382,103.683769],[32.038101,103.683678],[32.037682,103.683083],[32.037521,103.682961],[32.037281,103.682922],[32.037289,103.682953],[32.037029,103.683006],[32.03677,103.68309],[32.036461,103.683273],[32.036072,103.683601],[32.036011,103.683693],[32.035789,103.684303],[32.035461,103.684898],[32.035381,103.686089],[32.033588,103.686653],[32.03339,103.687881],[32.033291,103.688087],[32.033081,103.688461],[32.032982,103.68856],[32.032951,103.688622],[32.03281,103.688744],[32.032391,103.689171],[32.032379,103.689217],[32.03233,103.689247],[32.031929,103.689728],[32.031879,103.689758],[32.0317,103.689934],[32.031361,103.69017],[32.031109,103.690269],[32.030891,103.690323],[32.030621,103.690323],[32.030411,103.690247],[32.029942,103.690117],[32.029812,103.690063],[32.029789,103.690041],[32.029701,103.69001],[32.02953,103.689987],[32.02906,103.689789],[32.02874,103.689713],[32.028679,103.689682],[32.02832,103.689552],[32.027969,103.689598],[32.02779,103.689713],[32.02774,103.689789],[32.027599,103.689911],[32.02747,103.690048],[32.02689,103.690582],[32.026562,103.690826],[32.025902,103.691238],[32.025791,103.691353],[32.02533,103.691628],[32.025211,103.691757],[32.025082,103.691963],[32.02504,103.692108],[32.025021,103.692329],[32.025021,103.692688],[32.02504,103.69278],[32.025021,103.693359],[32.024921,103.693649],[32.024811,103.69381],[32.024632,103.693947],[32.02438,103.694],[32.024231,103.693916],[32.023949,103.693527],[32.02346,103.693108],[32.023392,103.693024],[32.023048,103.692467],[32.0228,103.692017],[32.022049,103.690773],[32.02161,103.68985],[32.02132,103.68856],[32.021198,103.68856],[32.018799,103.687172],[32.018398,103.687973],[32.017841,103.688713],[32.017681,103.688873],[32.01749,103.688988],[32.017269,103.689072],[32.016529,103.689171],[32.01627,103.689232],[32.016109,103.68924],[32.015911,103.689194],[32.015789,103.689087],[32.015659,103.688873],[32.015282,103.688042],[32.01524,103.687988],[32.015141,103.687767],[32.01498,103.6875],[32.014832,103.687309],[32.014671,103.687241],[32.014599,103.687248],[32.014469,103.687302],[32.014351,103.687393],[32.01403,103.687553],[32.013962,103.68763],[32.013512,103.687889],[32.013248,103.687958],[32.013031,103.687897],[32.012581,103.687714],[32.012291,103.687553],[32.01202,103.687332],[32.01173,103.686836],[32.01165,103.686684],[32.011608,103.686623],[32.01152,103.686417],[32.0112,103.685883],[32.01107,103.685593],[32.010941,103.68515],[32.010891,103.684738],[32.010761,103.683968],[32.010681,103.683746],[32.01062,103.683708],[32.010551,103.683678],[32.01012,103.683777],[32.00996,103.683853],[32.009838,103.683937],[32.00935,103.684143],[32.0093,103.684174],[32.009121,103.684242],[32.00806,103.684708],[32.00771,103.684776],[32.006889,103.684822],[32.005989,103.684822],[32.005859,103.684799],[32.00555,103.684593],[32.005421,103.684341],[32.005329,103.684013],[32.00515,103.683601],[32.005001,103.683434],[32.004749,103.683296],[32.004169,103.683273],[32.003941,103.68338],[32.00388,103.68364],[32.00391,103.684212],[32.004059,103.68502],[32.004089,103.685089],[32.004139,103.685707],[32.004219,103.686089],[32.00441,103.686531],[32.004959,103.687462],[32.005562,103.688522],[32.005859,103.689491],[32.005871,103.69001],[32.00568,103.690758],[32.00552,103.691643],[32.004871,103.693199],[32.004799,103.693359],[32.0047,103.693489],[32.00449,103.693489],[32.004379,103.69326],[32.00444,103.692886],[32.004509,103.692108],[32.00449,103.691849],[32.00444,103.691673],[32.004009,103.690979],[32.00378,103.690742],[32.003441,103.690742],[32.003101,103.690804],[32.00272,103.690826],[32.002499,103.690697],[32.002419,103.690392],[32.0023,103.689796],[32.002209,103.689667],[32.00145,103.688766],[32.00124,103.688393],[32.00082,103.687828],[32.000992,103.687607],[32.000961,103.687553],[32.00106,103.687531],[32.001209,103.687347],[32.00016,103.685837],[31.99964,103.685143],[31.99942,103.684769],[31.999229,103.684349],[31.99905,103.683792],[31.998989,103.683434],[31.998949,103.683281],[31.998859,103.683098],[31.998819,103.68306],[31.998409,103.682907],[31.998079,103.682671],[31.997959,103.682503],[31.997829,103.682228],[31.997499,103.682091],[31.997,103.682266],[31.996469,103.682426],[31.99605,103.682426],[31.99486,103.682411],[31.994129,103.681923],[31.99395,103.681549],[31.99382,103.680733],[31.99361,103.680489],[31.993389,103.680641],[31.992479,103.681931],[31.992331,103.682098],[31.99192,103.682259],[31.991211,103.682198],[31.990641,103.682121],[31.989719,103.681847],[31.98885,103.681557],[31.98814,103.681267],[31.98777,103.681091],[31.98768,103.680992],[31.987761,103.680817],[31.987921,103.680878],[31.988609,103.681297],[31.990959,103.681488],[31.991449,103.681488],[31.991989,103.68116],[31.9921,103.680992],[31.99231,103.680511],[31.99242,103.680313],[31.99271,103.680031],[31.992861,103.679916],[31.99299,103.679764],[31.993219,103.67907],[31.9935,103.678726],[31.993641,103.67865],[31.993731,103.678436],[31.99354,103.678329],[31.993441,103.678413],[31.99317,103.678703],[31.99308,103.678848],[31.992929,103.67939],[31.992689,103.67968],[31.992359,103.679787],[31.99194,103.680229],[31.99155,103.680397],[31.99077,103.680252],[31.990499,103.680153],[31.99,103.679901],[31.989771,103.679802],[31.98945,103.679733],[31.98896,103.679604],[31.988859,103.679558],[31.98881,103.679497],[31.988251,103.679222],[31.987749,103.679077],[31.98703,103.679077],[31.98654,103.679153],[31.98535,103.679413],[31.98514,103.67942],[31.984949,103.67939],[31.98477,103.679337],[31.98423,103.678902],[31.98399,103.678673],[31.98382,103.678413],[31.98365,103.677872],[31.983561,103.67691],[31.983561,103.676697],[31.983521,103.676399],[31.983509,103.676422],[31.983419,103.6763],[31.98321,103.676147],[31.983049,103.676079],[31.982861,103.676041],[31.9825,103.676003],[31.982321,103.676003],[31.98192,103.675957],[31.98172,103.675972],[31.981541,103.676003],[31.981211,103.676132],[31.98065,103.67646],[31.98004,103.676773],[31.979469,103.677017],[31.978901,103.677094],[31.97864,103.677101],[31.978121,103.677193],[31.97716,103.677322],[31.97678,103.677353],[31.97662,103.677361],[31.976391,103.677406],[31.975889,103.677467],[31.97518,103.677452],[31.97434,103.677452],[31.972851,103.677422],[31.972481,103.677498],[31.972269,103.677597],[31.972019,103.677711],[31.97098,103.678223],[31.970699,103.678268],[31.97035,103.67823],[31.970209,103.678169],[31.9692,103.677452],[31.969009,103.677406],[31.968861,103.677422],[31.968651,103.677467],[31.968149,103.677643],[31.96809,103.677628],[31.96797,103.677681],[31.96767,103.677963],[31.96734,103.678337],[31.96706,103.678772],[31.96677,103.679108],[31.96656,103.679268],[31.96627,103.679611],[31.96604,103.680023],[31.965691,103.680557],[31.9653,103.680649],[31.964319,103.680389],[31.963421,103.680183],[31.96328,103.679947],[31.96348,103.679878],[31.963539,103.679893],[31.96409,103.680153],[31.96434,103.680191],[31.96452,103.680191],[31.964701,103.680153],[31.96505,103.679962],[31.96534,103.679703],[31.96578,103.679398],[31.966209,103.678726],[31.966619,103.67791],[31.966999,103.677277],[31.96771,103.676239],[31.967979,103.675949],[31.96834,103.675743],[31.96888,103.675522],[31.96911,103.675323],[31.969009,103.675201],[31.96888,103.675278],[31.968691,103.675461],[31.968349,103.675697],[31.96773,103.67601],[31.96744,103.676178],[31.967239,103.676422],[31.96682,103.67717],[31.96637,103.677567],[31.965931,103.677887],[31.965731,103.677994],[31.96524,103.678032],[31.964569,103.677971],[31.96418,103.678108],[31.96356,103.678459],[31.963341,103.678352],[31.963449,103.678131],[31.964211,103.677711],[31.96497,103.677437],[31.96604,103.677391],[31.966471,103.677063],[31.96681,103.676117],[31.967119,103.675697],[31.96789,103.675049],[31.968349,103.674713],[31.968861,103.674477],[31.968941,103.674232],[31.968691,103.674118],[31.968611,103.674133],[31.968361,103.674217],[31.96801,103.674431],[31.96714,103.675072],[31.96664,103.67527],[31.966471,103.675247],[31.966181,103.675323],[31.96574,103.675484],[31.965521,103.675537],[31.96493,103.675636],[31.963949,103.675972],[31.96307,103.676208],[31.96254,103.67617],[31.96192,103.675827],[31.960951,103.675194],[31.960871,103.675133],[31.960739,103.674927],[31.96084,103.67482],[31.961069,103.674911],[31.96154,103.675346],[31.962179,103.675468],[31.962669,103.675468],[31.962879,103.67543],[31.96319,103.675293],[31.96376,103.674843],[31.96398,103.674622],[31.964001,103.674301],[31.963751,103.674339],[31.963039,103.674927],[31.962721,103.675018],[31.962061,103.674911],[31.96166,103.674683],[31.96077,103.673447],[31.96077,103.673424],[31.95982,103.672707],[31.95936,103.672493],[31.95837,103.672241],[31.95751,103.672234],[31.9566,103.672363],[31.95599,103.67218],[31.95553,103.671944],[31.95491,103.671677],[31.953979,103.671417],[31.953461,103.671089],[31.95289,103.67086],[31.95249,103.670731],[31.95084,103.670067],[31.950411,103.670029],[31.950081,103.670082],[31.94912,103.670319],[31.94894,103.670326],[31.948771,103.670303],[31.948521,103.670303],[31.94829,103.670341],[31.948021,103.670441],[31.94791,103.670509],[31.947599,103.670509],[31.94602,103.67038],[31.945841,103.670433],[31.94503,103.670418],[31.94383,103.670372],[31.943661,103.670387],[31.943171,103.670403],[31.942419,103.670448],[31.941509,103.67067],[31.941351,103.670692],[31.941111,103.670776],[31.940821,103.670929],[31.94002,103.671257],[31.93902,103.671547],[31.93849,103.671623],[31.93815,103.671692],[31.937639,103.671738],[31.937469,103.671783],[31.93697,103.671852],[31.93646,103.672043],[31.93585,103.672333],[31.934759,103.672752],[31.93413,103.672867],[31.933599,103.673019],[31.93354,103.673058],[31.932859,103.673279],[31.93256,103.67334],[31.931919,103.673264],[31.931589,103.673149],[31.931379,103.673042],[31.93117,103.672859],[31.930771,103.67276],[31.930531,103.67276],[31.93025,103.672691],[31.929951,103.672691],[31.92959,103.672623],[31.929331,103.672401],[31.929041,103.672379],[31.92865,103.672188],[31.92831,103.672058],[31.92807,103.672012],[31.927919,103.671783],[31.92782,103.671547],[31.92782,103.671547],[31.927719,103.671501],[31.92771,103.671417],[31.92749,103.671432],[31.926901,103.671623],[31.92679,103.671707],[31.926661,103.671753],[31.926371,103.671883],[31.92581,103.672043],[31.925119,103.672096],[31.9249,103.67215],[31.92481,103.672127],[31.92453,103.671997],[31.92415,103.671989],[31.923849,103.672096],[31.92359,103.67215],[31.922529,103.672409],[31.922079,103.672539],[31.921459,103.672783],[31.92091,103.673141],[31.920349,103.673569],[31.919979,103.67379],[31.919319,103.674133],[31.918659,103.674423],[31.91729,103.675049],[31.91678,103.675262],[31.91613,103.675682],[31.91539,103.676239],[31.915359,103.676582],[31.914511,103.677742],[31.914009,103.678291],[31.913601,103.678833],[31.91308,103.678993],[31.912729,103.679131],[31.9121,103.679466],[31.911579,103.679718],[31.91099,103.679832],[31.910271,103.679893],[31.90967,103.679993],[31.9091,103.68026],[31.907619,103.681168],[31.907049,103.681503],[31.906269,103.681839],[31.90589,103.681938],[31.904499,103.682213],[31.904249,103.682297],[31.90403,103.682281],[31.904119,103.682426],[31.903959,103.68248],[31.903431,103.682518],[31.90321,103.682602],[31.901991,103.683411],[31.90144,103.683746],[31.90024,103.684357],[31.899611,103.684769],[31.898359,103.685959],[31.897631,103.686348],[31.89703,103.686691],[31.896799,103.68679],[31.896139,103.686897],[31.89554,103.68692],[31.89493,103.686859],[31.894199,103.68663],[31.89382,103.686569],[31.893709,103.686577],[31.89315,103.686852],[31.89258,103.687492],[31.892191,103.68811],[31.891279,103.689301],[31.890841,103.689812],[31.89011,103.690804],[31.889391,103.691223],[31.889191,103.691292],[31.888929,103.691277],[31.888611,103.691231],[31.88792,103.690979],[31.887289,103.690666],[31.88656,103.690437],[31.886129,103.690376],[31.88599,103.690407],[31.885361,103.690712],[31.885,103.690567],[31.884661,103.690491],[31.884489,103.690613],[31.88435,103.690804],[31.884199,103.691093],[31.88397,103.691597],[31.883671,103.692062],[31.88357,103.692192],[31.88382,103.692307],[31.88278,103.69278],[31.882139,103.69313],[31.88139,103.693382],[31.87995,103.693489],[31.879089,103.693687],[31.87871,103.693871],[31.87858,103.693947],[31.878481,103.693916],[31.878059,103.694077],[31.87727,103.694649],[31.8771,103.694809],[31.876459,103.695236],[31.876011,103.69548],[31.87565,103.695534],[31.875521,103.695457],[31.874981,103.695259],[31.874701,103.695236],[31.874319,103.695343],[31.873831,103.695557],[31.87311,103.695923],[31.872299,103.696114],[31.871611,103.696136],[31.87063,103.696083],[31.87023,103.696098],[31.86994,103.696152],[31.869049,103.696487],[31.86899,103.696548],[31.86886,103.696854],[31.868799,103.697189],[31.86879,103.697708],[31.86862,103.698029],[31.868509,103.698059],[31.86772,103.698013],[31.867599,103.69796],[31.86746,103.69796],[31.867069,103.697998],[31.866871,103.697891],[31.86672,103.69767],[31.866501,103.697449],[31.866051,103.697197],[31.865761,103.696892],[31.865219,103.696541],[31.864599,103.696083],[31.864519,103.695999],[31.86438,103.695717],[31.863899,103.69545],[31.86322,103.695358],[31.862711,103.695427],[31.86134,103.695557],[31.861099,103.695442],[31.86097,103.695412],[31.860649,103.695374],[31.860359,103.695358],[31.860029,103.695427],[31.859529,103.695686],[31.85914,103.695938],[31.858879,103.695969],[31.85874,103.69603],[31.85832,103.696037],[31.858009,103.696136],[31.85664,103.696747],[31.856409,103.696793],[31.856199,103.696777],[31.8557,103.696693],[31.855379,103.696671],[31.85475,103.696823],[31.853951,103.69706],[31.853689,103.69709],[31.853081,103.697052],[31.852369,103.696953],[31.85146,103.696747],[31.850861,103.696648],[31.849831,103.696602],[31.849291,103.696671],[31.848949,103.696671],[31.8487,103.696831],[31.848021,103.696877],[31.847349,103.696777],[31.84696,103.696739],[31.8466,103.696617],[31.8458,103.695999],[31.845579,103.695717],[31.845369,103.695389],[31.845169,103.694893],[31.844761,103.694054],[31.844509,103.693748],[31.84387,103.693314],[31.8437,103.693169],[31.843361,103.693047],[31.84314,103.693153],[31.843069,103.693283],[31.843031,103.693367],[31.842939,103.693893],[31.842859,103.694023],[31.84277,103.694077],[31.841921,103.694344],[31.841619,103.694389],[31.841511,103.694489],[31.841459,103.694504],[31.84137,103.694862],[31.841339,103.695251],[31.84124,103.695763],[31.841061,103.696518],[31.84091,103.696716],[31.8407,103.696854],[31.840509,103.697037],[31.84016,103.697861],[31.839609,103.698853],[31.839121,103.699532],[31.83886,103.70108],[31.838499,103.701141],[31.838421,103.701653],[31.838369,103.702339],[31.838329,103.702591],[31.838249,103.702843],[31.83782,103.703659],[31.836781,103.704193],[31.836821,103.705048],[31.83672,103.705704],[31.83482,103.710823],[31.835489,103.71196],[31.83531,103.712517],[31.835011,103.713013],[31.83404,103.712936],[31.832781,103.716331],[31.83177,103.715919],[31.831129,103.716087],[31.830839,103.716331],[31.83029,103.716728],[31.83008,103.716957],[31.829781,103.717499],[31.829479,103.71814],[31.829161,103.718758],[31.82902,103.718933],[31.828711,103.719254],[31.82844,103.719498],[31.82836,103.719704],[31.828369,103.71981],[31.82831,103.719887],[31.828291,103.719978],[31.82782,103.720734],[31.826111,103.721161],[31.823009,103.724838],[31.822451,103.725182],[31.821369,103.725723],[31.820841,103.726112],[31.82028,103.72644],[31.820021,103.726547],[31.81946,103.726852],[31.819099,103.727173],[31.81893,103.727631],[31.818899,103.727852],[31.818899,103.727951],[31.81883,103.728271],[31.8188,103.728691],[31.81778,103.728409],[31.81743,103.7286],[31.81723,103.728737],[31.81683,103.728958],[31.81637,103.729111],[31.81601,103.729378],[31.815741,103.729462],[31.815371,103.729492],[31.81517,103.729584],[31.814989,103.729752],[31.814989,103.729897],[31.815599,103.730919],[31.81551,103.731392],[31.81539,103.731552],[31.81481,103.731583],[31.813641,103.731087],[31.813419,103.73127],[31.813231,103.731483],[31.81304,103.731712],[31.81291,103.73201],[31.812599,103.732117],[31.81226,103.732399],[31.81201,103.732559],[31.81159,103.732712],[31.81119,103.732674],[31.811069,103.732788],[31.81065,103.732727],[31.81044,103.732819],[31.81044,103.732948],[31.8099,103.732964],[31.809681,103.732986],[31.809259,103.733231],[31.809,103.73333],[31.808741,103.733383],[31.808281,103.733231],[31.8078,103.733177],[31.80777,103.733208],[31.80809,103.734016],[31.80801,103.734131],[31.80776,103.734138],[31.80702,103.733963],[31.806049,103.73391],[31.80595,103.734001],[31.80534,103.734131],[31.805201,103.734467],[31.805201,103.735077],[31.805111,103.735077],[31.805019,103.735962],[31.804911,103.736061],[31.80488,103.736153],[31.804291,103.735771],[31.803391,103.735138],[31.802799,103.734863],[31.802441,103.734749],[31.80213,103.73468],[31.801661,103.734596],[31.801189,103.734482],[31.80093,103.734444],[31.80147,103.733681],[31.80092,103.733597],[31.800369,103.733429],[31.79858,103.732971],[31.7983,103.732933],[31.797649,103.732811],[31.79673,103.732826],[31.796431,103.732918],[31.79594,103.733017],[31.79587,103.73307],[31.795811,103.73317],[31.79587,103.733437],[31.796009,103.733582],[31.795839,103.733742],[31.79594,103.73407],[31.79627,103.734894],[31.795931,103.735298],[31.79587,103.735443],[31.79578,103.735764],[31.795811,103.735786],[31.795839,103.735947],[31.795971,103.73629],[31.796049,103.736839],[31.796089,103.737083],[31.796089,103.737518],[31.79598,103.738052],[31.795971,103.738373],[31.795919,103.738823],[31.795839,103.739319],[31.79579,103.739769],[31.79587,103.740547],[31.796141,103.742592],[31.79608,103.742622],[31.79587,103.742081],[31.79582,103.742561],[31.79558,103.742851],[31.79524,103.743011],[31.79487,103.743393],[31.791531,103.753731],[31.790319,103.753754],[31.78965,103.754066],[31.789061,103.754578],[31.7887,103.755051],[31.78842,103.7556],[31.78825,103.755981],[31.787979,103.756798],[31.787901,103.756958],[31.787571,103.757446],[31.787069,103.758057],[31.78665,103.758438],[31.78623,103.758682],[31.786051,103.758743],[31.784121,103.759537],[31.783621,103.759697],[31.78343,103.759697],[31.783079,103.759857],[31.78252,103.760017],[31.78229,103.760429],[31.781969,103.760643],[31.781691,103.760643],[31.781321,103.760651],[31.78089,103.760803],[31.780479,103.760918],[31.78023,103.761017],[31.780081,103.761139],[31.77957,103.761681],[31.77924,103.762138],[31.7792,103.762253],[31.779119,103.762688],[31.77916,103.763138],[31.77915,103.763344],[31.77903,103.763603],[31.778959,103.763962],[31.77894,103.764267],[31.77887,103.764503],[31.77846,103.765358],[31.778111,103.765938],[31.777809,103.766518],[31.777611,103.766853],[31.777361,103.767357],[31.777241,103.767723],[31.77718,103.768112],[31.777109,103.76886],[31.7771,103.769501],[31.777121,103.769859],[31.77721,103.770309],[31.777361,103.771294],[31.77734,103.771584],[31.777189,103.77227],[31.7771,103.773232],[31.77759,103.774353],[31.776859,103.776382],[31.77779,103.777153],[31.777719,103.777412],[31.777571,103.777603],[31.77737,103.777733],[31.776951,103.777908],[31.77623,103.778259],[31.776159,103.778313],[31.77593,103.778969],[31.774679,103.778999],[31.774561,103.779083],[31.774309,103.779404],[31.77387,103.780411],[31.77351,103.781342],[31.773149,103.782097],[31.773479,103.78299],[31.76511,103.789299],[31.76424,103.788803],[31.764059,103.788918],[31.76396,103.789017],[31.76359,103.78933],[31.763201,103.789612],[31.76284,103.790092],[31.76256,103.790787],[31.76247,103.791367],[31.762871,103.792313],[31.7623,103.793083],[31.763201,103.794403],[31.76347,103.794762],[31.764099,103.795464],[31.764521,103.796158],[31.765039,103.797447],[31.765289,103.798141],[31.765409,103.798553],[31.765511,103.799088],[31.76552,103.799751],[31.765471,103.800423],[31.76553,103.801903],[31.765551,103.802116],[31.76556,103.802422],[31.76553,103.80323],[31.765539,103.805206],[31.76553,103.805862],[31.765511,103.805923],[31.765459,103.807419],[31.765499,103.807999],[31.76549,103.808167],[31.765591,103.808479],[31.765671,103.808777],[31.765909,103.809509],[31.766029,103.809807],[31.7661,103.810127],[31.76622,103.810516],[31.766491,103.81205],[31.76668,103.812691],[31.767071,103.813316],[31.76815,103.814392],[31.768391,103.814743],[31.76856,103.815079],[31.76861,103.815353],[31.76865,103.815804],[31.768539,103.816299],[31.76837,103.816772],[31.76803,103.817413],[31.767691,103.817787],[31.76757,103.817833],[31.76709,103.818169],[31.766491,103.818489],[31.765921,103.818359],[31.765209,103.818123],[31.76478,103.818001],[31.76436,103.817917],[31.764151,103.81794],[31.76396,103.818024],[31.7638,103.818176],[31.762899,103.818771],[31.762751,103.818893],[31.762119,103.819878],[31.761869,103.820221],[31.761511,103.820778],[31.761311,103.821159],[31.760889,103.821877],[31.760509,103.822403],[31.760389,103.822533],[31.76022,103.822693],[31.76004,103.822823],[31.75967,103.822952],[31.759541,103.822952],[31.75906,103.822998],[31.758619,103.823097],[31.75794,103.823311],[31.757521,103.823471],[31.75667,103.823486],[31.751591,103.831108],[31.75139,103.831291],[31.75066,103.831802],[31.75094,103.833023],[31.750351,103.833847],[31.750219,103.833977],[31.750019,103.834091],[31.749229,103.834328],[31.74898,103.834503],[31.748501,103.835091],[31.748199,103.835854],[31.748199,103.835838],[31.747869,103.836678],[31.747589,103.837143],[31.747339,103.83744],[31.74721,103.837669],[31.74711,103.837692],[31.74708,103.837738],[31.746849,103.837769],[31.7467,103.837723],[31.746651,103.837738],[31.74621,103.837601],[31.745951,103.837608],[31.74544,103.837784],[31.74523,103.83783],[31.744459,103.83783],[31.74403,103.837967],[31.74374,103.838074],[31.743549,103.838203],[31.74305,103.838676],[31.74268,103.839233],[31.74264,103.839241],[31.74234,103.839577],[31.74229,103.839592],[31.74169,103.840752],[31.741409,103.841141],[31.741159,103.841011],[31.74094,103.841164],[31.740669,103.841454],[31.738171,103.843643],[31.737659,103.844048],[31.737391,103.844177],[31.737169,103.844238],[31.7369,103.844383],[31.73649,103.84449],[31.73601,103.844513],[31.734369,103.844421],[31.734011,103.844353],[31.73353,103.843582],[31.73074,103.845497],[31.722481,103.851181],[31.721781,103.850327],[31.72146,103.850388],[31.721239,103.850449],[31.7208,103.850632],[31.720289,103.850891],[31.719749,103.851257],[31.71924,103.851646],[31.718679,103.852013],[31.71838,103.852097],[31.71792,103.852119],[31.717039,103.852493],[31.7167,103.8526],[31.716,103.853142],[31.71582,103.853348],[31.7155,103.852966],[31.71513,103.853149],[31.714649,103.853256],[31.714319,103.853317],[31.713989,103.853409],[31.713329,103.853523],[31.712799,103.853447],[31.71246,103.853416],[31.71192,103.853363],[31.711491,103.853279],[31.711149,103.853256],[31.710831,103.853287],[31.710279,103.853523],[31.710039,103.853561],[31.709749,103.853569],[31.709419,103.8535],[31.70919,103.853378],[31.709021,103.853363],[31.70867,103.853432],[31.70829,103.853592],[31.707581,103.85379],[31.707319,103.853844],[31.706829,103.853851],[31.70647,103.853882],[31.706051,103.853889],[31.705891,103.853859],[31.704599,103.853119],[31.704229,103.852859],[31.703501,103.851593],[31.70344,103.851463],[31.70225,103.850548],[31.701151,103.84977],[31.7006,103.849579],[31.700199,103.850067],[31.699499,103.850227],[31.69916,103.850357],[31.697941,103.850883],[31.697689,103.850838],[31.697639,103.850853],[31.698191,103.850487],[31.697781,103.850502],[31.697229,103.850662],[31.696899,103.850662],[31.69673,103.850693],[31.696581,103.850632],[31.696159,103.850243],[31.695869,103.849747],[31.69516,103.848351],[31.69486,103.847588],[31.69433,103.846321],[31.69418,103.845993],[31.69404,103.845657],[31.693939,103.845467],[31.69384,103.845367],[31.69348,103.845093],[31.69335,103.844971],[31.69327,103.844948],[31.69294,103.844727],[31.69268,103.844513],[31.69241,103.844414],[31.692181,103.844368],[31.69173,103.844383],[31.691389,103.844437],[31.69006,103.844933],[31.68998,103.844948],[31.689449,103.844887],[31.68928,103.844833],[31.68854,103.844673],[31.686399,103.844727],[31.685869,103.844772],[31.68545,103.844772],[31.68499,103.84481],[31.6845,103.844833],[31.684099,103.844887],[31.68379,103.84491],[31.68375,103.844948],[31.683599,103.844994],[31.68347,103.844978],[31.683081,103.844879],[31.682541,103.844589],[31.682091,103.844261],[31.681471,103.843887],[31.68079,103.84359],[31.67959,103.84343],[31.6793,103.843353],[31.67861,103.842819],[31.677931,103.842216],[31.677271,103.841614],[31.676781,103.841202],[31.67572,103.84024],[31.67477,103.83934],[31.67441,103.83905],[31.67417,103.838814],[31.673901,103.838577],[31.673281,103.83799],[31.67313,103.837891],[31.672689,103.837433],[31.67164,103.836563],[31.6712,103.836143],[31.669941,103.834976],[31.669479,103.834534],[31.66906,103.834213],[31.66855,103.833969],[31.6682,103.833893],[31.66783,103.833763],[31.667379,103.833633],[31.66733,103.833656],[31.666821,103.833366],[31.66638,103.833031],[31.66555,103.832458],[31.664881,103.831863],[31.663839,103.830544],[31.663401,103.829941],[31.662809,103.829079],[31.662411,103.8284],[31.662041,103.827629],[31.66198,103.827469],[31.661921,103.827377],[31.661631,103.826813],[31.66135,103.826134],[31.66128,103.825989],[31.66123,103.825844],[31.661119,103.82563],[31.66086,103.824982],[31.66082,103.824669],[31.660879,103.824387],[31.661119,103.824112],[31.6614,103.8237],[31.66165,103.823158],[31.66206,103.822563],[31.66206,103.822166],[31.66115,103.82093],[31.6605,103.819977],[31.66037,103.819511],[31.6604,103.819298],[31.66054,103.819008],[31.661131,103.818253],[31.662029,103.817177],[31.66238,103.816566],[31.66254,103.816109],[31.66251,103.816078],[31.662821,103.815193],[31.662979,103.814796],[31.663099,103.814362],[31.66312,103.813957],[31.663,103.813606],[31.662861,103.813271],[31.662609,103.812897],[31.662161,103.812553],[31.661501,103.812119],[31.661381,103.812057],[31.66119,103.811897],[31.66066,103.811737],[31.657261,103.811653],[31.656969,103.811607],[31.656799,103.811607],[31.65591,103.811508],[31.65435,103.811256],[31.65407,103.81115],[31.65349,103.810959],[31.65291,103.810699],[31.65218,103.810318],[31.65169,103.810028],[31.651421,103.809837],[31.65086,103.809486],[31.650181,103.809013],[31.64917,103.80835],[31.64901,103.808273],[31.648069,103.80764],[31.64772,103.807457],[31.64661,103.806664],[31.646,103.806282],[31.645321,103.805817],[31.64521,103.805771],[31.644779,103.805473],[31.64201,103.803658],[31.64163,103.803429],[31.641411,103.803261],[31.640711,103.802788],[31.640459,103.80265],[31.640051,103.802353],[31.63879,103.801537],[31.638399,103.801224],[31.63818,103.800911],[31.637899,103.800056],[31.637699,103.799606],[31.63752,103.79937],[31.637421,103.799309],[31.637091,103.799179],[31.636299,103.798683],[31.63612,103.798439],[31.636049,103.79818],[31.63599,103.797836],[31.63596,103.797417],[31.63578,103.796913],[31.63439,103.795692],[31.633631,103.79509],[31.633011,103.794724],[31.63138,103.793823],[31.630911,103.793266],[31.63064,103.792877],[31.630251,103.792221],[31.628441,103.789413],[31.627769,103.788399],[31.62665,103.786667],[31.626141,103.786324],[31.625351,103.786057],[31.624701,103.785873],[31.62455,103.785858],[31.623051,103.786079],[31.62244,103.785873],[31.622271,103.78569],[31.621571,103.784348],[31.620819,103.782867],[31.62027,103.781723],[31.620211,103.781509],[31.62023,103.780823],[31.620359,103.779968],[31.620359,103.779022],[31.62023,103.776962],[31.62007,103.77623],[31.619789,103.775642],[31.61961,103.775467],[31.619471,103.775192],[31.619471,103.775131],[31.61939,103.775017],[31.61923,103.774712],[31.618891,103.77417],[31.618549,103.773529],[31.6182,103.772949],[31.617941,103.772743],[31.6178,103.772667],[31.617611,103.772621],[31.615549,103.772438],[31.615431,103.772453],[31.61515,103.772438],[31.61446,103.772339],[31.6124,103.772141],[31.611521,103.771957],[31.611401,103.771889],[31.61091,103.771347],[31.610479,103.770729],[31.609631,103.769333],[31.609159,103.768631],[31.608749,103.767776],[31.60873,103.767029],[31.60874,103.766586],[31.60874,103.766281],[31.608841,103.765717],[31.60885,103.765213],[31.608801,103.764809],[31.60874,103.764587],[31.6085,103.763832],[31.608351,103.763412],[31.608299,103.763184],[31.60766,103.7612],[31.607519,103.760681],[31.60745,103.760246],[31.60742,103.759247],[31.60746,103.758263],[31.607491,103.758011],[31.607479,103.757538],[31.60751,103.755051],[31.60742,103.754303],[31.60717,103.753563],[31.6071,103.753403],[31.606939,103.753181],[31.606911,103.753014],[31.606859,103.752869],[31.60623,103.751663],[31.606039,103.751427],[31.605419,103.750862],[31.60511,103.750618],[31.604509,103.750183],[31.603661,103.749817],[31.60322,103.749542],[31.602449,103.749207],[31.60186,103.749046],[31.60113,103.748894],[31.600531,103.748779],[31.600149,103.748749],[31.599739,103.74881],[31.599489,103.748947],[31.599791,103.750053],[31.59976,103.750511],[31.59939,103.750511],[31.598949,103.750381],[31.598301,103.749687],[31.597931,103.749947],[31.59779,103.750061],[31.59738,103.750267],[31.597139,103.750298],[31.596889,103.750267],[31.59667,103.750229],[31.595501,103.750107],[31.595249,103.750107],[31.594379,103.750031],[31.593941,103.749969],[31.593651,103.749893],[31.59326,103.749657],[31.59285,103.749336],[31.591949,103.748558],[31.59079,103.74762],[31.589581,103.74659],[31.58902,103.746071],[31.58843,103.745483],[31.587721,103.744789],[31.586809,103.743843],[31.585581,103.742828],[31.585119,103.742523],[31.58432,103.741852],[31.584089,103.741547],[31.583691,103.740662],[31.5835,103.740356],[31.58338,103.74012],[31.583389,103.739594],[31.58337,103.739517],[31.583269,103.73941],[31.58316,103.739052],[31.58317,103.738792],[31.583099,103.738708],[31.582979,103.738319],[31.582911,103.738052],[31.58285,103.737244],[31.583099,103.735764],[31.58333,103.734688],[31.583441,103.733932],[31.583599,103.73304],[31.58354,103.732521],[31.583509,103.732407],[31.583321,103.732109],[31.583139,103.731934],[31.582781,103.731773],[31.58251,103.731468],[31.582439,103.731194],[31.582399,103.730988],[31.58235,103.730873],[31.582319,103.730713],[31.58205,103.730408],[31.581869,103.730232],[31.58148,103.729797],[31.581249,103.729568],[31.57992,103.728477],[31.579309,103.728127],[31.578699,103.727837],[31.57826,103.727676],[31.577909,103.727654],[31.57765,103.727661],[31.577391,103.727859],[31.57725,103.728027],[31.577181,103.728218],[31.577049,103.728989],[31.57687,103.729736],[31.57692,103.729759],[31.576811,103.730118],[31.576521,103.73053],[31.57486,103.731537],[31.574511,103.731621],[31.57411,103.731613],[31.572451,103.731178],[31.572081,103.731049],[31.57181,103.730904],[31.571581,103.730659],[31.57115,103.730003],[31.57091,103.729698],[31.570841,103.729446],[31.570551,103.728958],[31.570419,103.728668],[31.570259,103.727829],[31.570221,103.727303],[31.570259,103.726196],[31.570601,103.725067],[31.571039,103.723846],[31.571091,103.723778],[31.571409,103.723427],[31.571951,103.723061],[31.572781,103.72226],[31.572981,103.721764],[31.573111,103.720444],[31.57321,103.719803],[31.57345,103.717644],[31.57349,103.717079],[31.57333,103.716583],[31.572769,103.715477],[31.57268,103.715317],[31.57251,103.714951],[31.572399,103.714767],[31.572121,103.714607],[31.570459,103.714119],[31.57028,103.714073],[31.56971,103.714188],[31.569071,103.714523],[31.56881,103.71463],[31.56859,103.714638],[31.56839,103.714592],[31.56753,103.714233],[31.567221,103.71405],[31.566891,103.713669],[31.56612,103.712608],[31.56591,103.712273],[31.56567,103.711967],[31.565531,103.7117],[31.565269,103.710907],[31.565241,103.710709],[31.56505,103.708588],[31.564871,103.707779],[31.56448,103.70652],[31.56403,103.7052],[31.563551,103.704109],[31.56237,103.701767],[31.56175,103.70079],[31.561319,103.700592],[31.56106,103.700706],[31.560499,103.701073],[31.560169,103.700996],[31.559509,103.700127],[31.55743,103.697662],[31.557249,103.697479],[31.55703,103.697067],[31.556971,103.696693],[31.556971,103.696404],[31.55706,103.695908],[31.5571,103.695534],[31.55711,103.695259],[31.557211,103.694489],[31.557289,103.693314],[31.55723,103.692993],[31.55699,103.692467],[31.556499,103.691849],[31.555901,103.691437],[31.555229,103.691093],[31.554729,103.690727],[31.553869,103.690033],[31.55308,103.689453],[31.55245,103.689293],[31.55179,103.689331],[31.5515,103.689194],[31.551279,103.688927],[31.551201,103.68882],[31.551069,103.68856],[31.550911,103.688332],[31.55088,103.688263],[31.550791,103.688141],[31.55068,103.687943],[31.550501,103.687691],[31.55039,103.687492],[31.550249,103.687332],[31.550039,103.686989],[31.549721,103.686569],[31.549561,103.686401],[31.54932,103.686073],[31.549061,103.685806],[31.548849,103.685654],[31.548201,103.685471],[31.546721,103.685173],[31.54623,103.685043],[31.545071,103.684883],[31.544661,103.684914],[31.54361,103.685059],[31.542259,103.685219],[31.541861,103.685226],[31.54143,103.68512],[31.54108,103.684959],[31.540331,103.684486],[31.539591,103.684113],[31.539339,103.683937],[31.538879,103.683456],[31.53878,103.683273],[31.538549,103.682693],[31.53841,103.682228],[31.538349,103.682083],[31.53797,103.681633],[31.537781,103.681549],[31.53731,103.681503],[31.536909,103.681633],[31.536739,103.681793],[31.53632,103.682243],[31.535919,103.682571],[31.53581,103.682632],[31.53521,103.682831],[31.5347,103.682961],[31.534069,103.683067],[31.533119,103.683151],[31.532459,103.683151],[31.532169,103.682983],[31.531931,103.682549],[31.53187,103.682388],[31.531691,103.682007],[31.531469,103.681419],[31.531269,103.681068],[31.53096,103.680771],[31.53055,103.680618],[31.53031,103.680397],[31.53005,103.680122],[31.52984,103.679527],[31.529831,103.679237],[31.52985,103.678467],[31.529909,103.678139],[31.529831,103.677742],[31.529591,103.677254],[31.529289,103.676773],[31.52895,103.676277],[31.52866,103.675941],[31.528271,103.675453],[31.527849,103.675003],[31.526911,103.674347],[31.525351,103.67337],[31.5249,103.673058],[31.524019,103.672531],[31.523661,103.672401],[31.52273,103.672012],[31.522129,103.671738],[31.521561,103.671509],[31.521231,103.67131],[31.52075,103.670868],[31.52038,103.670471],[31.520069,103.670227],[31.519911,103.670128],[31.51977,103.670013],[31.518841,103.669434],[31.518539,103.669327],[31.5182,103.669296],[31.516991,103.669312],[31.516451,103.669228],[31.516319,103.669167],[31.51606,103.668999],[31.515751,103.668556],[31.51548,103.668114],[31.515421,103.667801],[31.5154,103.667542],[31.515381,103.666924],[31.515329,103.666283],[31.515261,103.665817],[31.51515,103.665497],[31.51512,103.664787],[31.51515,103.664192],[31.51516,103.66349],[31.51511,103.66272],[31.5149,103.662178],[31.514629,103.661797],[31.514311,103.66124],[31.51392,103.660606],[31.513571,103.660072],[31.51343,103.65992],[31.51298,103.659317],[31.51251,103.658638],[31.512381,103.658386],[31.5123,103.658096],[31.51219,103.657417],[31.5121,103.656967],[31.512091,103.65657],[31.5121,103.656174],[31.51206,103.655632],[31.51227,103.654694],[31.51231,103.653923],[31.51231,103.653488],[31.512251,103.653],[31.51214,103.652657],[31.51195,103.652367],[31.511379,103.651993],[31.51108,103.651909],[31.51009,103.651833],[31.509399,103.651611],[31.509001,103.65139],[31.50861,103.651253],[31.508169,103.651001],[31.50762,103.650551],[31.507179,103.650223],[31.506929,103.650146],[31.506809,103.650017],[31.50654,103.649467],[31.506161,103.648819],[31.505791,103.648247],[31.505501,103.647942],[31.50522,103.647743],[31.50474,103.64743],[31.5044,103.647377],[31.503639,103.647423],[31.50312,103.647408],[31.50276,103.647362],[31.50252,103.647293],[31.502279,103.647186],[31.50178,103.647293],[31.50156,103.647324],[31.501129,103.647163],[31.50087,103.647011],[31.499599,103.646423],[31.499189,103.64592],[31.49877,103.64518],[31.49864,103.644798],[31.498529,103.644257],[31.49844,103.643959],[31.498249,103.643623],[31.49818,103.643509],[31.49803,103.643204],[31.49761,103.642769],[31.49737,103.64241],[31.497351,103.642281],[31.496889,103.641319],[31.49667,103.640373],[31.49663,103.640022],[31.49654,103.639511],[31.49651,103.639214],[31.496559,103.638962],[31.496651,103.638741],[31.496771,103.638527],[31.496889,103.638321],[31.49692,103.638],[31.496679,103.637642],[31.496361,103.637306],[31.49608,103.637123],[31.495819,103.637016],[31.495211,103.636902],[31.495001,103.636887],[31.4946,103.636818],[31.49444,103.636742],[31.49408,103.636436],[31.493879,103.636208],[31.49338,103.635498],[31.493259,103.635101],[31.49325,103.63456],[31.493299,103.634087],[31.49329,103.634064],[31.49328,103.633797],[31.493179,103.633537],[31.49304,103.633362],[31.49292,103.63311],[31.49287,103.632629],[31.492889,103.632347],[31.49287,103.632141],[31.49279,103.631889],[31.49268,103.631683],[31.492519,103.631279],[31.49246,103.631027],[31.49229,103.630524],[31.492279,103.630211],[31.49213,103.629646],[31.49206,103.629494],[31.492041,103.629478],[31.49194,103.629204],[31.49168,103.628479],[31.491529,103.627823],[31.491541,103.627007],[31.491779,103.625931],[31.49194,103.625412],[31.49206,103.625076],[31.49214,103.624893],[31.492161,103.624718],[31.49226,103.624557],[31.49284,103.624184],[31.493641,103.623482],[31.494209,103.622757],[31.49416,103.622543],[31.493589,103.621727],[31.493231,103.621323],[31.492849,103.621063],[31.49229,103.620827],[31.49198,103.62072],[31.491289,103.620644],[31.4911,103.620537],[31.490971,103.62043],[31.49082,103.62014],[31.490959,103.619667],[31.491131,103.619537],[31.49202,103.619431],[31.49262,103.619301],[31.492849,103.619164],[31.493589,103.618568],[31.493971,103.618217],[31.49407,103.618088],[31.49424,103.617722],[31.494249,103.617439],[31.494209,103.61702],[31.49416,103.616814],[31.49394,103.616463],[31.493799,103.616333],[31.49304,103.615288],[31.49287,103.614967],[31.49275,103.614693],[31.49246,103.61438],[31.49251,103.614326],[31.492359,103.614159],[31.4921,103.613907],[31.492029,103.613792],[31.491261,103.612923],[31.49037,103.611641],[31.489941,103.611397],[31.48942,103.611343],[31.489161,103.611237],[31.488001,103.611008],[31.48781,103.611],[31.48749,103.610901],[31.48715,103.610863],[31.48699,103.610863],[31.48642,103.610641],[31.485809,103.610527],[31.485399,103.610321],[31.48514,103.610168],[31.4848,103.609711],[31.48461,103.609352],[31.484529,103.609108],[31.48443,103.608566],[31.484421,103.608223],[31.484249,103.60759],[31.484171,103.60746],[31.484011,103.607246],[31.48378,103.60685],[31.483641,103.606483],[31.48325,103.605629],[31.48311,103.605347],[31.48307,103.605148],[31.48288,103.604584],[31.48271,103.604187],[31.482441,103.603287],[31.482109,103.602463],[31.481991,103.602074],[31.48176,103.601486],[31.481529,103.601044],[31.48126,103.600342],[31.48111,103.60006],[31.480829,103.599457],[31.48035,103.598396],[31.479919,103.597481],[31.479851,103.597382],[31.479401,103.596352],[31.47921,103.596039],[31.47884,103.59549],[31.478701,103.595261],[31.47863,103.59478],[31.478609,103.594254],[31.47863,103.59391],[31.478939,103.591682],[31.47924,103.590721],[31.47921,103.590088],[31.47917,103.589813],[31.479179,103.589661],[31.47929,103.588966],[31.47933,103.588593],[31.479521,103.587677],[31.479679,103.586761],[31.479891,103.585663],[31.47998,103.584953],[31.48003,103.584641],[31.480061,103.584351],[31.480089,103.584023],[31.47991,103.583214],[31.47979,103.58284],[31.47925,103.581673],[31.479031,103.581337],[31.478769,103.580887],[31.478291,103.580223],[31.47813,103.579971],[31.47789,103.579399],[31.477711,103.578911],[31.477579,103.578613],[31.47744,103.57827],[31.477369,103.578049],[31.477171,103.577744],[31.47682,103.577278],[31.476589,103.577057],[31.47645,103.576981],[31.47596,103.576874],[31.475651,103.576843],[31.47522,103.576736],[31.474939,103.576721],[31.474701,103.576691],[31.474701,103.576538],[31.47485,103.57589],[31.47493,103.575394],[31.474899,103.575012],[31.47488,103.574982],[31.474701,103.574913],[31.47438,103.574913],[31.4736,103.574699],[31.47336,103.574677],[31.47287,103.574707],[31.472691,103.574692],[31.472071,103.573463],[31.47057,103.572227],[31.469021,103.570557],[31.467991,103.569771],[31.467079,103.569771],[31.46619,103.570038],[31.46537,103.570297],[31.464979,103.570297],[31.46344,103.569809],[31.46101,103.568909],[31.460279,103.568176],[31.459869,103.566643],[31.459511,103.564423],[31.45912,103.562363],[31.45895,103.561737],[31.45866,103.561172],[31.457279,103.558601],[31.456921,103.557899],[31.45583,103.555847],[31.45546,103.555267],[31.45499,103.554581],[31.454519,103.55394],[31.454309,103.553558],[31.454201,103.552887],[31.454559,103.551971],[31.454941,103.551086],[31.45583,103.549187],[31.45603,103.548561],[31.456051,103.547821],[31.455839,103.54734],[31.45536,103.546867],[31.45483,103.546669],[31.454321,103.546539],[31.45405,103.54644],[31.45322,103.545769],[31.452959,103.545502],[31.45269,103.545273],[31.452419,103.545273],[31.45207,103.545097],[31.45167,103.544968],[31.4515,103.544937],[31.45006,103.544777],[31.449619,103.544678],[31.448759,103.544289],[31.447929,103.543854],[31.446199,103.542969],[31.445761,103.542709],[31.445221,103.542221],[31.44474,103.541649],[31.444201,103.5411],[31.44396,103.540993],[31.44367,103.540916],[31.44301,103.54097],[31.439659,103.541473],[31.43886,103.541656],[31.43778,103.542038],[31.43689,103.542381],[31.436449,103.542473],[31.4356,103.542572],[31.43504,103.542603],[31.43441,103.542709],[31.43392,103.542732],[31.43346,103.542732],[31.433439,103.542702],[31.43302,103.542763],[31.43259,103.542961],[31.42981,103.544456],[31.429331,103.544563],[31.429131,103.54454],[31.428671,103.544243],[31.42819,103.543793],[31.42675,103.542313],[31.42621,103.541862],[31.425631,103.541344],[31.4251,103.540894],[31.42322,103.539574],[31.42255,103.539131],[31.420071,103.537849],[31.419399,103.537537],[31.418791,103.537178],[31.41828,103.536774],[31.41699,103.535599],[31.41613,103.534889],[31.415621,103.534599],[31.415159,103.534439],[31.414471,103.534264],[31.4142,103.534172],[31.4135,103.533989],[31.41247,103.533699],[31.41194,103.533478],[31.4118,103.533379],[31.411671,103.533257],[31.41148,103.533012],[31.411209,103.532547],[31.41111,103.53241],[31.410629,103.531464],[31.41045,103.531174],[31.410061,103.530838],[31.409889,103.530731],[31.40934,103.530617],[31.409149,103.530602],[31.40756,103.530182],[31.405861,103.52977],[31.405149,103.529556],[31.404869,103.529404],[31.40461,103.529167],[31.404289,103.528397],[31.4041,103.527321],[31.403919,103.526123],[31.403549,103.523849],[31.403299,103.523109],[31.403049,103.522797],[31.402411,103.522438],[31.401699,103.522278],[31.4014,103.522232],[31.399179,103.521721],[31.398439,103.52153],[31.39542,103.520851],[31.39481,103.520683],[31.394239,103.520287],[31.39345,103.5196],[31.39155,103.517853],[31.39131,103.517677],[31.38913,103.515678],[31.389139,103.515663],[31.389111,103.515671],[31.38839,103.515022],[31.38792,103.514572],[31.3871,103.513901],[31.386959,103.513748],[31.372419,103.509407],[31.372141,103.509369],[31.37159,103.509079],[31.371031,103.508568],[31.370649,103.508171],[31.370449,103.507912],[31.36974,103.507149],[31.369089,103.506401],[31.36894,103.506187],[31.36865,103.505577],[31.36833,103.5047],[31.36797,103.503563],[31.36692,103.500427],[31.36664,103.499542],[31.366489,103.499138],[31.366409,103.498779],[31.366329,103.49865],[31.366199,103.498291],[31.36598,103.49752],[31.365681,103.49704],[31.364771,103.496407],[31.36245,103.494919],[31.36208,103.494667],[31.361071,103.494041],[31.359541,103.493042],[31.35741,103.491707],[31.35729,103.491661],[31.35708,103.491631],[31.3564,103.4916],[31.355619,103.491638],[31.355021,103.491547],[31.35438,103.491257],[31.35321,103.490623],[31.35268,103.490349],[31.352221,103.490082],[31.35165,103.489799],[31.35129,103.489647],[31.350531,103.489464],[31.34993,103.489326],[31.34919,103.489143],[31.34828,103.488937],[31.347219,103.488564],[31.346821,103.488358],[31.346279,103.488037],[31.34433,103.486763],[31.34374,103.486504],[31.343491,103.486443],[31.342831,103.486427],[31.342421,103.486519],[31.342251,103.486572],[31.34177,103.486649],[31.340799,103.486862],[31.340321,103.486931],[31.339331,103.487167],[31.339029,103.48719],[31.338591,103.487122],[31.33721,103.486099],[31.336519,103.485413],[31.33604,103.484711],[31.33556,103.483917],[31.335421,103.483276],[31.33383,103.480087],[31.333611,103.479721],[31.333361,103.479378],[31.333019,103.479057],[31.332359,103.478569],[31.33135,103.477859],[31.330931,103.477432],[31.33073,103.477013],[31.32996,103.47448],[31.329849,103.474258],[31.32967,103.47403],[31.32946,103.473862],[31.32926,103.473793],[31.328569,103.473801],[31.32366,103.474693],[31.322969,103.474777],[31.322241,103.474907],[31.321489,103.474937],[31.320959,103.47477],[31.320721,103.474617],[31.32004,103.474167],[31.31922,103.473587],[31.31871,103.473312],[31.31826,103.473183],[31.3176,103.473129],[31.31675,103.473099],[31.314791,103.473061],[31.314131,103.472977],[31.313431,103.472839],[31.31291,103.472748],[31.311569,103.472473],[31.31142,103.47245],[31.310841,103.47229],[31.310711,103.472237],[31.31061,103.472168],[31.310511,103.472069],[31.310221,103.471672],[31.30938,103.470322],[31.30928,103.470108],[31.30896,103.469612],[31.30871,103.469307],[31.308189,103.468964],[31.30788,103.468842],[31.30744,103.468697],[31.306231,103.468193],[31.30521,103.467827],[31.303169,103.466942],[31.302691,103.466766],[31.302429,103.46669],[31.301991,103.466507],[31.3016,103.466209],[31.301519,103.466164],[31.3015,103.466057],[31.301161,103.465897],[31.30098,103.465851],[31.300831,103.465759],[31.30061,103.465729],[31.300011,103.465698],[31.299561,103.465477],[31.2994,103.465157],[31.299179,103.464828],[31.29841,103.464378],[31.29821,103.464104],[31.298149,103.463753],[31.29805,103.463463],[31.29759,103.463226],[31.297171,103.462921],[31.295549,103.462402],[31.289801,103.460899],[31.28867,103.461166],[31.280279,103.469017],[31.27939,103.469353],[31.27865,103.470039],[31.277781,103.471283],[31.27607,103.474007],[31.274839,103.474609],[31.273741,103.474922],[31.27346,103.474907],[31.27326,103.474876],[31.273069,103.474823],[31.272539,103.474747],[31.27182,103.475014],[31.271271,103.475098],[31.27033,103.475189],[31.269159,103.475159],[31.26734,103.475319],[31.26685,103.475456],[31.26601,103.475906],[31.26573,103.476089],[31.264391,103.477097],[31.26379,103.477753],[31.26339,103.478279],[31.263041,103.479218],[31.26285,103.479637],[31.26289,103.480217],[31.26284,103.480522],[31.262449,103.481049],[31.261801,103.481667],[31.26133,103.482147],[31.260521,103.482559],[31.25906,103.480049],[31.257441,103.480988],[31.250851,103.486687],[31.249491,103.488113],[31.24909,103.488403],[31.24823,103.488411],[31.2472,103.487907],[31.24691,103.487778],[31.24605,103.487694],[31.231581,103.492683],[31.22551,103.486893],[31.20331,103.497948],[31.17948,103.496834],[31.160801,103.494209],[31.156799,103.491173],[31.148029,103.488243],[31.140209,103.48967],[31.13055,103.494873],[31.122959,103.496063],[31.118771,103.494431],[31.11475,103.489479],[31.11301,103.485519],[31.11005,103.483063],[31.107821,103.481087],[31.10568,103.479523],[31.1042,103.478653],[31.102659,103.478302],[31.1021,103.478157],[31.101521,103.478127],[31.1012,103.478233],[31.10042,103.478691],[31.09967,103.478943],[31.098499,103.479149],[31.098141,103.479118],[31.097481,103.479111],[31.097071,103.479134],[31.096581,103.479263],[31.0959,103.479858],[31.09536,103.480507],[31.09507,103.481194],[31.09473,103.482063],[31.094601,103.482246],[31.09396,103.483131],[31.09333,103.483788],[31.092581,103.484711],[31.091961,103.485336],[31.09182,103.485428],[31.091551,103.485481],[31.09111,103.485313],[31.0909,103.48513],[31.090441,103.484558],[31.09029,103.484444],[31.089769,103.484253],[31.089439,103.484322],[31.089211,103.484489],[31.088739,103.484894],[31.08844,103.485107],[31.08814,103.48526],[31.08798,103.485313],[31.087151,103.485283],[31.08099,103.485023],[31.08004,103.484787],[31.07909,103.484596],[31.07826,103.484528],[31.07803,103.484528],[31.076891,103.484703],[31.076639,103.484787],[31.07621,103.484901],[31.07493,103.485321],[31.07374,103.486191],[31.07304,103.486572],[31.072531,103.4869],[31.072001,103.487381],[31.07168,103.487602],[31.071199,103.487823],[31.07078,103.488029],[31.070181,103.488373],[31.06941,103.488876],[31.06925,103.489197],[31.068439,103.489433],[31.06757,103.489807],[31.06679,103.490547],[31.066259,103.490631],[31.065491,103.490921],[31.06476,103.491257],[31.064449,103.491547],[31.06436,103.491722],[31.064289,103.491898],[31.0641,103.492142],[31.063959,103.492287],[31.06378,103.492561],[31.06341,103.493294],[31.063021,103.494453],[31.04641,103.526978],[31.045561,103.528099],[31.045469,103.528198],[31.044621,103.52887],[31.04331,103.529427],[31.04154,103.529877],[31.03215,103.534622],[31.031231,103.535057],[31.02936,103.535568],[31.028521,103.535843],[31.028061,103.536072],[31.02762,103.536369],[31.0271,103.536819],[31.026369,103.537727],[31.02529,103.539307],[31.024401,103.540733],[31.02223,103.543907],[31.0205,103.546577],[31.01989,103.547508],[31.019421,103.548233],[31.018761,103.549217],[31.01827,103.550056],[31.016239,103.554207],[31,103.586853],[30.998091,103.59005],[30.997681,103.590523],[30.997181,103.590973],[30.996849,103.591232],[30.99613,103.591728],[30.994261,103.592941],[30.99297,103.593803],[30.99185,103.594482],[30.989941,103.594841],[30.988621,103.594322],[30.987591,103.59417],[30.986259,103.593773],[30.98485,103.593773],[30.98218,103.594559],[30.98111,103.594566],[30.979811,103.594269],[30.977461,103.59359],[30.976021,103.5933],[30.975691,103.593277],[30.974489,103.5933],[30.968679,103.594116],[30.964621,103.594727],[30.964001,103.594841],[30.96237,103.595337],[30.96122,103.596024],[30.960211,103.59697],[30.959351,103.598152],[30.958561,103.599762],[30.956551,103.604424],[30.955151,103.607269],[30.95435,103.608627],[30.95089,103.613831],[30.95076,103.614052],[30.950279,103.614952],[30.94981,103.615753],[30.95084,103.615593],[30.95225,103.615532],[30.953581,103.61544],[30.95606,103.615318],[30.95643,103.615288],[30.956989,103.615211],[30.957359,103.615143],[30.957899,103.614998],[30.958441,103.614822],[30.959141,103.614571],[30.959829,103.614304],[30.96102,103.613876],[30.96183,103.613579],[30.962391,103.613373],[30.9631,103.614807],[30.96336,103.615799],[30.963539,103.616302],[30.96368,103.616631],[30.96384,103.616966],[30.965599,103.620323],[30.96623,103.621567],[30.967489,103.624222],[30.9722,103.633148],[30.977289,103.642822],[30.979099,103.645447],[30.978251,103.646347],[30.976589,103.647888],[30.974079,103.650269],[30.97238,103.65197],[30.970909,103.653526],[30.969839,103.654716],[30.968639,103.656143],[30.96751,103.657547],[30.96689,103.658363],[30.96583,103.65979],[30.964109,103.662231],[30.96328,103.663368],[30.962151,103.664833],[30.96097,103.66626],[30.960381,103.667],[30.96023,103.667236],[30.960091,103.667473],[30.95998,103.667747],[30.959789,103.667877],[30.95978,103.667747],[30.959209,103.668411],[30.9589,103.668793],[30.958099,103.669853],[30.957161,103.671143],[30.95595,103.672943],[30.955231,103.674072],[30.952909,103.677902],[30.95179,103.679703],[30.95059,103.681709],[30.949539,103.683418],[30.948919,103.684387],[30.948441,103.685112],[30.946659,103.687637],[30.945499,103.689217],[30.944401,103.690613],[30.94367,103.691513],[30.941299,103.694313],[30.93787,103.698303],[30.9366,103.69986],[30.935209,103.701637],[30.933901,103.703407],[30.933069,103.704597],[30.932249,103.705803],[30.93026,103.708878],[30.92915,103.710564],[30.928301,103.711777],[30.92745,103.712952],[30.926741,103.713837],[30.926001,103.714722],[30.92543,103.715347],[30.924641,103.716148],[30.923651,103.717117],[30.922649,103.718063],[30.92116,103.71936],[30.919451,103.720932],[30.918831,103.721542],[30.91785,103.722572],[30.917471,103.722992],[30.91674,103.723831],[30.91588,103.724892],[30.91522,103.725761],[30.914129,103.727333],[30.913691,103.728027],[30.913139,103.728973],[30.9126,103.729927],[30.912069,103.730949],[30.91169,103.731743],[30.911209,103.732803],[30.91054,103.734383],[30.910151,103.735451],[30.90979,103.736519],[30.907459,103.744202],[30.90659,103.746933],[30.906219,103.747978],[30.90593,103.748749],[30.90542,103.749992],[30.904989,103.750977],[30.904369,103.752274],[30.90366,103.753609],[30.902901,103.754898],[30.902121,103.756119],[30.901489,103.757042],[30.900669,103.758133],[30.900181,103.758751],[30.899691,103.759354],[30.89871,103.760468],[30.897711,103.76152],[30.8972,103.762016],[30.896469,103.762703],[30.895241,103.763748],[30.894569,103.764267],[30.89386,103.764793],[30.892929,103.765442],[30.89245,103.765747],[30.89105,103.766602],[30.888321,103.768097],[30.887011,103.768806],[30.885719,103.769524],[30.884649,103.770149],[30.88401,103.770561],[30.88294,103.771317],[30.88183,103.772202],[30.88139,103.772591],[30.880751,103.773193],[30.87995,103.773979],[30.879379,103.774582],[30.87867,103.775398],[30.87817,103.776016],[30.87768,103.776649],[30.877211,103.777298],[30.87676,103.777946],[30.876011,103.779152],[30.875561,103.779938],[30.875271,103.780487],[30.87471,103.781616],[30.873949,103.783363],[30.873369,103.784813],[30.872669,103.786507],[30.87229,103.787331],[30.871759,103.788399],[30.871731,103.78846],[30.871059,103.789703],[30.87076,103.790207],[30.8703,103.790939],[30.86948,103.792137],[30.869141,103.792603],[30.86861,103.793266],[30.867701,103.794357],[30.867149,103.794991],[30.86639,103.795761],[30.86561,103.796501],[30.864811,103.797203],[30.861601,103.799957],[30.859289,103.80191],[30.858471,103.802628],[30.85726,103.803719],[30.856291,103.804657],[30.85533,103.805634],[30.854509,103.806503],[30.8498,103.811783],[30.848881,103.812798],[30.84778,103.813957],[30.846491,103.815239],[30.84572,103.815941],[30.844299,103.817162],[30.84318,103.818062],[30.842051,103.818932],[30.84137,103.819427],[30.840231,103.820213],[30.8391,103.820953],[30.8354,103.823181],[30.83396,103.824097],[30.833031,103.824722],[30.832359,103.825211],[30.83148,103.825867],[30.83041,103.826736],[30.82938,103.827629],[30.82819,103.828728],[30.8272,103.829712],[30.82618,103.830788],[30.82559,103.831444],[30.824631,103.832573],[30.82229,103.835541],[30.821581,103.836411],[30.82119,103.836853],[30.820379,103.83773],[30.819759,103.838371],[30.81912,103.838989],[30.818251,103.839783],[30.817591,103.840332],[30.81691,103.840874],[30.816,103.841553],[30.81461,103.842506],[30.810249,103.84536],[30.809401,103.845963],[30.808769,103.84642],[30.80835,103.846733],[30.807949,103.847061],[30.807341,103.84758],[30.806721,103.848129],[30.80587,103.848938],[30.80525,103.849564],[30.804661,103.850189],[30.8039,103.851044],[30.80353,103.851471],[30.80266,103.852547],[30.802,103.853439],[30.80117,103.854637],[30.80069,103.8554],[30.79991,103.856697],[30.7966,103.862488],[30.795549,103.864281],[30.79442,103.866318],[30.79245,103.869789],[30.790501,103.873192],[30.78861,103.876472],[30.78834,103.876984],[30.78797,103.877747],[30.7875,103.878838],[30.787291,103.879433],[30.78709,103.88002],[30.786909,103.880638],[30.786751,103.881271],[30.78661,103.881897],[30.786501,103.882553],[30.786409,103.883186],[30.786341,103.883827],[30.786289,103.88446],[30.786261,103.885094],[30.786261,103.886047],[30.78632,103.887306],[30.78647,103.889542],[30.78635,103.891296],[30.78624,103.892967],[30.785839,103.895668],[30.78549,103.897171],[30.78499,103.898582],[30.784599,103.899689],[30.78377,103.901466],[30.783159,103.902473],[30.78298,103.902771],[30.782511,103.903587],[30.78203,103.904282],[30.78134,103.905197],[30.77743,103.910294],[30.773211,103.915771],[30.772129,103.91713],[30.77091,103.91864],[30.769369,103.920647],[30.7686,103.921638],[30.766121,103.924881],[30.7631,103.929024],[30.76078,103.93219],[30.75775,103.936234],[30.757311,103.936577],[30.7565,103.93766],[30.75602,103.938057],[30.755301,103.938583],[30.754761,103.938843],[30.7542,103.939056],[30.75358,103.939201],[30.752729,103.939293],[30.7521,103.939232],[30.75139,103.939072],[30.750839,103.938889],[30.75004,103.938591],[30.748631,103.937691],[30.746429,103.936737],[30.74535,103.936371],[30.74428,103.93605],[30.7437,103.935883],[30.739031,103.934921],[30.736521,103.934418],[30.736271,103.934357],[30.734831,103.934059],[30.73411,103.933907],[30.73082,103.933296],[30.72954,103.933067],[30.729179,103.933006],[30.725719,103.93264],[30.725229,103.932571],[30.72271,103.932442],[30.719419,103.932381],[30.715771,103.932343],[30.712839,103.932167],[30.71044,103.931961],[30.70717,103.931511],[30.702971,103.930763],[30.70075,103.930359],[30.698931,103.930107],[30.6966,103.929947],[30.693951,103.929916],[30.69375,103.929916],[30.69273,103.929947],[30.69128,103.930038],[30.6903,103.930122],[30.685061,103.930573],[30.682341,103.930847],[30.67981,103.931221],[30.676941,103.931831],[30.674351,103.932541],[30.67045,103.93396],[30.66506,103.935852],[30.663919,103.936203],[30.66292,103.936432],[30.66181,103.936653],[30.660431,103.936867],[30.65892,103.936996],[30.65756,103.937042],[30.65484,103.937103],[30.650579,103.93708],[30.648371,103.93718],[30.64661,103.937378],[30.64509,103.937637],[30.64365,103.938019],[30.64196,103.938469],[30.63983,103.939247],[30.63492,103.941093],[30.633631,103.941528],[30.63224,103.941971],[30.630779,103.94239],[30.629311,103.942734],[30.627041,103.943169],[30.62483,103.943512],[30.619511,103.944397],[30.61833,103.944679],[30.616791,103.945107],[30.615311,103.945686],[30.61389,103.946373],[30.61227,103.947456],[30.61113,103.94841],[30.60972,103.949783],[30.60885,103.950798],[30.607639,103.952438],[30.606489,103.954514],[30.605459,103.956711],[30.60393,103.960114],[30.601891,103.964783],[30.60046,103.96785],[30.599171,103.970444],[30.597589,103.973083],[30.59609,103.975372],[30.59486,103.977203],[30.592131,103.981133],[30.591129,103.982712],[30.589991,103.985039],[30.589319,103.986877],[30.58885,103.988724],[30.58856,103.990677],[30.588461,103.992706],[30.58849,103.994728],[30.58868,104.002876],[30.58857,104.005081],[30.588181,104.007187],[30.58745,104.009308],[30.5863,104.011383],[30.584311,104.014137],[30.58374,104.014938],[30.58132,104.018349],[30.5807,104.019234],[30.579081,104.022034],[30.57872,104.02272],[30.578449,104.023232],[30.57793,104.023956],[30.577459,104.024513],[30.57682,104.024979],[30.576241,104.025208],[30.57585,104.025307],[30.575529,104.025391],[30.57468,104.025391],[30.57391,104.025269],[30.57362,104.025162],[30.571671,104.024368],[30.570181,104.023758],[30.56801,104.022743],[30.56468,104.020882],[30.554741,104.014908],[30.55094,104.012497],[30.548651,104.010696],[30.54603,104.008163],[30.54306,104.004494],[30.54019,103.999863],[30.538441,103.997513],[30.536329,103.995216],[30.528799,103.987923],[30.525129,103.984543],[30.522129,103.982224],[30.51981,103.980797],[30.51687,103.979141],[30.51384,103.977158],[30.51082,103.974457],[30.50326,103.967072],[30.50028,103.964706],[30.497601,103.96299],[30.48823,103.958504],[30.482201,103.955002],[30.476259,103.950844],[30.47337,103.948822],[30.470671,103.947304],[30.46776,103.94593],[30.45928,103.942421],[30.455521,103.940567],[30.452351,103.938187],[30.450029,103.935883],[30.44676,103.931976],[30.443501,103.928284],[30.43807,103.92318],[30.42778,103.913887],[30.424299,103.910683],[30.42137,103.908173],[30.418739,103.906342],[30.415751,103.904572],[30.409611,103.900833],[30.408791,103.900307],[30.40811,103.899879],[30.40642,103.89872],[30.406269,103.898613],[30.406139,103.898514],[30.405199,103.897797],[30.404831,103.897507],[30.404539,103.897301],[30.4027,103.895752],[30.402639,103.895714],[30.400829,103.894089],[30.395901,103.889481],[30.38553,103.878517],[30.38382,103.876129],[30.382191,103.873322],[30.381121,103.870064],[30.380699,103.86879],[30.38039,103.867699],[30.379641,103.864769],[30.378071,103.858124],[30.37772,103.856689],[30.376881,103.85466],[30.375919,103.852417],[30.374901,103.850273],[30.3745,103.849602],[30.373409,103.848267],[30.37274,103.847504],[30.371759,103.846527],[30.37007,103.845253],[30.37002,103.845222],[30.36821,103.844131],[30.36706,103.843628],[30.364889,103.842949],[30.362579,103.842438],[30.359209,103.841759],[30.35545,103.841057],[30.351959,103.840683],[30.349331,103.83992],[30.34514,103.838531],[30.342319,103.83725],[30.339621,103.836571],[30.336281,103.835983],[30.332951,103.835632],[30.32992,103.835281],[30.32859,103.835083],[30.3276,103.834839],[30.32691,103.834572],[30.326309,103.834229],[30.325581,103.833733],[30.32482,103.833267],[30.32445,103.833092],[30.324329,103.833061],[30.323629,103.832787],[30.32313,103.832687],[30.322559,103.832611],[30.32193,103.832611],[30.3211,103.83271],[30.32037,103.832901],[30.319811,103.833107],[30.319309,103.833397],[30.318569,103.8339],[30.318041,103.834328],[30.317631,103.834663],[30.31662,103.835457],[30.31559,103.835968],[30.3148,103.836304],[30.31304,103.83699],[30.311819,103.837433],[30.305599,103.839798],[30.303049,103.840767],[30.302441,103.841011],[30.301571,103.841316],[30.300711,103.841667],[30.300541,103.841743],[30.29854,103.842484],[30.29718,103.842903],[30.29463,103.843719],[30.293159,103.843903],[30.29126,103.844063],[30.28908,103.844002],[30.28517,103.843407],[30.279461,103.842461],[30.274309,103.84182],[30.272249,103.841682],[30.26882,103.841507],[30.263081,103.841637],[30.260481,103.841827],[30.25771,103.842117],[30.254551,103.842537],[30.252159,103.842957],[30.244909,103.844063],[30.238979,103.844971],[30.2346,103.845627],[30.228121,103.846626],[30.223459,103.847366],[30.21862,103.847878],[30.21557,103.848358],[30.21253,103.848862],[30.21196,103.848938],[30.21122,103.849037],[30.211149,103.849052],[30.21056,103.849129],[30.20863,103.849457],[30.206671,103.849739],[30.206619,103.849747],[30.20463,103.850037],[30.20118,103.850723],[30.19952,103.850739],[30.19763,103.850632],[30.195299,103.850273],[30.193661,103.849907],[30.192101,103.849403],[30.18655,103.847427],[30.18231,103.845909],[30.17621,103.843719],[30.170601,103.841721],[30.166719,103.840317],[30.161591,103.838501],[30.156549,103.83667],[30.15312,103.835442],[30.149229,103.83403],[30.14525,103.832611],[30.142139,103.831398],[30.139771,103.83033],[30.134809,103.827782],[30.13142,103.825974],[30.12595,103.82296],[30.12237,103.821037],[30.12002,103.819763],[30.11664,103.817947],[30.11326,103.816017],[30.111601,103.815163],[30.10816,103.813248],[30.1056,103.811852],[30.102711,103.810066],[30.099331,103.808411],[30.095301,103.806702],[30.09252,103.805687],[30.086599,103.80368],[30.08601,103.803482],[30.085569,103.803329],[30.08502,103.803139],[30.08182,103.80204],[30.081141,103.801811],[30.079639,103.8013],[30.07716,103.800453],[30.07605,103.800056],[30.074249,103.799438],[30.07411,103.799393],[30.07151,103.798538],[30.06843,103.797859],[30.06653,103.797302],[30.06459,103.796806],[30.062309,103.796303],[30.055731,103.795067],[30.050871,103.794098],[30.04826,103.793358],[30.046261,103.792587],[30.0441,103.791458],[30.042601,103.790527],[30.036551,103.786591],[30.03101,103.782967],[30.029051,103.781616],[30.024891,103.778503],[30.021879,103.775917],[30.0187,103.77298],[30.01498,103.769363],[30.013029,103.767441],[30.011021,103.765747],[30.009581,103.764793],[30.00824,103.764023],[30.00703,103.763443],[30.00528,103.762733],[30.004009,103.762444],[30.0023,103.762123],[30.00091,103.762047],[29.99885,103.762077],[29.996031,103.762238],[29.98945,103.762657],[29.98629,103.762863],[29.985081,103.762993],[29.983101,103.763489],[29.98243,103.763687],[29.9806,103.764481],[29.977921,103.765984],[29.97703,103.766487],[29.97328,103.768593],[29.97217,103.769096],[29.969801,103.769981],[29.969139,103.770142],[29.968201,103.770332],[29.965611,103.770554],[29.96287,103.770348],[29.96159,103.770027],[29.9582,103.769203],[29.956301,103.768723],[29.95241,103.767761],[29.94582,103.766167],[29.941891,103.764954],[29.938259,103.763428],[29.93232,103.760307],[29.9265,103.757187],[29.92123,103.754211],[29.9186,103.752403],[29.916189,103.75061],[29.9119,103.747131],[29.90592,103.742203],[29.90304,103.740356],[29.902201,103.739906],[29.90093,103.739372],[29.89822,103.738579],[29.89192,103.737061],[29.888399,103.735947],[29.886129,103.735092],[29.884081,103.734154],[29.88076,103.732521],[29.877239,103.730759],[29.87343,103.729156],[29.872789,103.728912],[29.86729,103.727081],[29.861521,103.725227],[29.8587,103.724289],[29.856159,103.723618],[29.854139,103.723183],[29.847811,103.72216],[29.84544,103.721687],[29.843941,103.72123],[29.842291,103.720627],[29.841141,103.720047],[29.839939,103.719368],[29.83886,103.718597],[29.834391,103.714973],[29.82803,103.709839],[29.824579,103.706779],[29.82353,103.705704],[29.818701,103.700737],[29.816549,103.699013],[29.81579,103.698471],[29.81492,103.69799],[29.81385,103.697479],[29.81284,103.697067],[29.81114,103.696518],[29.804569,103.694901],[29.801861,103.694099],[29.800591,103.693657],[29.79631,103.691856],[29.79286,103.690376],[29.78804,103.688293],[29.78281,103.686028],[29.7794,103.684883],[29.77482,103.683647],[29.771151,103.68325],[29.76623,103.682564],[29.7612,103.681862],[29.75733,103.680702],[29.752661,103.678726],[29.741501,103.673637],[29.735689,103.670433],[29.730261,103.667122],[29.728109,103.665894],[29.725889,103.665009],[29.723049,103.664223],[29.719179,103.663467],[29.71279,103.661957],[29.70635,103.660027],[29.70294,103.659363],[29.70014,103.659142],[29.68815,103.659363],[29.68462,103.659538],[29.68202,103.660202],[29.67861,103.661789],[29.669941,103.667168],[29.667179,103.669067],[29.66548,103.670013],[29.66226,103.671219],[29.65731,103.672684],[29.654421,103.673882],[29.651899,103.675377],[29.64912,103.677238],[29.64385,103.680489],[29.639219,103.682854],[29.63732,103.683731],[29.63269,103.685913],[29.629339,103.687523],[29.626249,103.68943],[29.62406,103.690987],[29.618151,103.695602],[29.61622,103.696747],[29.61463,103.697456],[29.61256,103.69812],[29.611,103.698418],[29.60833,103.698517],[29.59409,103.697853],[29.59317,103.697777],[29.59227,103.697708],[29.590639,103.697578],[29.589661,103.697533],[29.588791,103.697472],[29.588249,103.697449],[29.57856,103.697304],[29.5669,103.703148],[29.545259,103.705719],[29.533911,103.709663],[29.5194,103.710701],[29.50877,103.719643],[29.49684,103.726669],[29.47427,103.734573],[29.463039,103.741623],[29.456329,103.746758],[29.44392,103.752083],[29.435089,103.758949],[29.42598,103.763763],[29.41267,103.773537],[29.407921,103.7761],[29.388491,103.777473],[29.381571,103.779373],[29.375561,103.784538],[29.367929,103.790733],[29.359091,103.80069],[29.352209,103.809097],[29.335911,103.826767],[29.318411,103.840843],[29.305571,103.847687],[29.294029,103.850273],[29.289061,103.853722],[29.285049,103.858421],[29.28236,103.861847],[29.278641,103.865082],[29.27508,103.866959],[29.27075,103.867813],[29.266239,103.869019],[29.262159,103.871269],[29.25914,103.875252],[29.256281,103.880081],[29.254311,103.88562],[29.25462,103.892014],[29.25462,103.896103],[29.25388,103.89949],[29.25211,103.902519],[29.24992,103.903862],[29.24637,103.904198],[29.239189,103.902817],[29.2363,103.903],[29.2334,103.904572],[29.22904,103.90992],[29.22484,103.915077],[29.22064,103.922813],[29.217951,103.927429],[29.21423,103.930832],[29.210199,103.933403],[29.20557,103.936142],[29.201851,103.936989],[29.19854,103.937851],[29.19643,103.938721],[29.192829,103.940613],[29.18956,103.942139],[29.18597,103.942307],[29.18281,103.943001],[29.178619,103.944717],[29.171591,103.945229],[29.16573,103.945923],[29.161699,103.947372],[29.160009,103.947983],[29.158831,103.948608],[29.15626,103.949867],[29.152901,103.951424],[29.149111,103.953827],[29.1474,103.955566],[29.146151,103.957626],[29.145109,103.960457],[29.142111,103.970154],[29.14106,103.973381],[29.139879,103.975868],[29.13899,103.976921],[29.136841,103.97908],[29.134291,103.981583],[29.13253,103.984039],[29.13093,103.986557],[29.12966,103.987846],[29.12866,103.988503],[29.127199,103.98938],[29.125521,103.990341],[29.124041,103.991127],[29.119749,103.993317],[29.11607,103.995277],[29.11408,103.996292],[29.112249,103.997368],[29.11076,103.998611],[29.10943,104.000572],[29.108459,104.002899],[29.107861,104.005363],[29.107149,104.009163],[29.106421,104.012009],[29.10582,104.014008],[29.104271,104.017776],[29.103621,104.019836],[29.10293,104.023308],[29.102461,104.025742],[29.10177,104.027687],[29.100349,104.030693],[29.099409,104.032883],[29.098749,104.034416],[29.09796,104.036942],[29.097639,104.038231],[29.097269,104.039864],[29.09687,104.041733],[29.096081,104.043922],[29.09543,104.044937],[29.094481,104.04641],[29.093491,104.047684],[29.092251,104.049271],[29.09111,104.051208],[29.090521,104.053123],[29.09025,104.054497],[29.090191,104.055412],[29.09095,104.06636],[29.08976,104.070282],[29.086451,104.075089],[29.084789,104.082336],[29.08194,104.09523],[29.08194,104.100754],[29.083441,104.1138],[29.083441,104.123207],[29.08194,104.130234],[29.081051,104.137589],[29.078979,104.141144],[29.074051,104.144547],[29.07147,104.146637],[29.069349,104.150803],[29.0674,104.15818],[29.06502,104.162086],[29.06082,104.166382],[29.057659,104.171707],[29.053459,104.177032],[29.050289,104.182549],[29.04789,104.189774],[29.044889,104.195938],[29.042179,104.201973],[29.03993,104.212639],[29.03933,104.220207],[29.03903,104.228256],[29.03784,104.231812],[29.03484,104.236618],[29.028379,104.253113],[29.026449,104.257019],[29.021049,104.261993],[29.01655,104.268517],[29.01055,104.274857],[29.00544,104.280022],[29.00108,104.287064],[28.99402,104.295143],[28.98967,104.302856],[28.98292,104.309708],[28.97978,104.313469],[28.970779,104.318787],[28.95965,104.328072],[28.95751,104.330688],[28.9533,104.345627],[28.949699,104.352333],[28.94536,104.363281],[28.933331,104.374786],[28.93166,104.380173],[28.93046,104.396652],[28.928961,104.401611],[28.92506,104.414322],[28.92205,104.426697],[28.92115,104.433708],[28.91231,104.449966],[28.905689,104.457191],[28.902519,104.467171],[28.89502,104.482246],[28.8881,104.49015],[28.88599,104.496696],[28.88163,104.504936],[28.88027,104.513527],[28.873369,104.529999],[28.870211,104.537712],[28.86569,104.545631],[28.864491,104.554916],[28.860729,104.567627],[28.859831,104.576729],[28.857719,104.585152],[28.85787,104.598732],[28.857719,104.609558],[28.859831,104.621941],[28.861771,104.631523],[28.86043,104.638496],[28.857889,104.644302],[28.85685,104.64566],[28.856409,104.645889],[28.855829,104.645912],[28.85532,104.645851],[28.8547,104.645592],[28.854259,104.645401],[28.85355,104.644783],[28.85206,104.6436],[28.85038,104.642418],[28.84877,104.641296],[28.847361,104.64032],[28.84576,104.639198],[28.84403,104.637993],[28.84247,104.636917],[28.84119,104.636147],[28.839411,104.63517],[28.838369,104.634666],[28.83795,104.634483],[28.83754,104.634277],[28.83667,104.633926],[28.836451,104.633842],[28.83535,104.6334],[28.83428,104.63295],[28.833019,104.632332],[28.832069,104.631706],[28.83111,104.630867],[28.830311,104.629936],[28.830179,104.629784],[28.829399,104.628593],[28.82859,104.627098],[28.82773,104.625526],[28.82724,104.624779],[28.826429,104.623734],[28.82542,104.622673],[28.823549,104.621033],[28.82159,104.619324],[28.820299,104.618202],[28.81879,104.61689],[28.8176,104.615837],[28.816589,104.61496],[28.81525,104.6138],[28.81423,104.612862],[28.81304,104.611588],[28.811781,104.610023],[28.81085,104.608841],[28.809839,104.607529],[28.80899,104.606438],[28.80829,104.605591],[28.80397,104.599716],[28.79163,104.60006],[28.77869,104.590103],[28.768459,104.583923],[28.764999,104.582039],[28.75341,104.570534],[28.7498,104.564194],[28.741831,104.551826],[28.73023,104.546158],[28.723009,104.535347],[28.71352,104.533112],[28.71097,104.53157],[28.70705,104.521606],[28.703291,104.519379],[28.69832,104.519897],[28.68597,104.524361],[28.68507,104.523331],[28.682211,104.520752],[28.672421,104.509598],[28.66684,104.501183],[28.664129,104.500328],[28.65494,104.501701],[28.651779,104.500839],[28.63928,104.496384],[28.635811,104.493629],[28.62888,104.483849],[28.62285,104.476982],[28.61788,104.467537],[28.608089,104.457916],[28.599489,104.44368],[28.599649,104.435951],[28.59844,104.429077],[28.600401,104.421021],[28.601,104.411232],[28.603109,104.394073],[28.603109,104.384453],[28.59889,104.372437],[28.587891,104.364723],[28.56769,104.354424],[28.563009,104.348747],[28.56241,104.339653],[28.564819,104.332947],[28.564671,104.32798],[28.558189,104.323517],[28.549589,104.320587],[28.543711,104.312363],[28.544621,104.305489],[28.544769,104.295532],[28.53949,104.285919],[28.53919,104.276817],[28.542509,104.26532],[28.551399,104.260002],[28.55744,104.260857],[28.561199,104.257263],[28.563009,104.246437],[28.562111,104.240433],[28.555321,104.22876],[28.55216,104.226868],[28.5511,104.22155],[28.54492,104.213654],[28.54055,104.20919],[28.536169,104.200607],[28.536631,104.192368],[28.532709,104.189102],[28.52652,104.187729],[28.523661,104.184471],[28.51038,104.181381],[28.502541,104.186867],[28.49575,104.186363],[28.49379,104.184471],[28.491529,104.186012],[28.48896,104.190483],[28.484739,104.192879],[28.48217,104.192368],[28.47765,104.190987],[28.472059,104.191681],[28.46904,104.193222],[28.46467,104.192879],[28.45742,104.191849],[28.45561,104.192711],[28.45335,104.195969],[28.44837,104.196136],[28.446711,104.195107],[28.45335,104.187393],[28.45471,104.190132],[28.45335,104.192543],[28.451691,104.194427],[28.449881,104.194427],[28.44656,104.192711],[28.445049,104.187393],[28.44293,104.185837],[28.438709,104.184982],[28.436899,104.183441],[28.435989,104.179657],[28.43478,104.178802],[28.43207,104.179657],[28.430401,104.178978],[28.429199,104.177429],[28.427691,104.176743],[28.42573,104.176918],[28.41984,104.175369],[28.39855,104.157013],[28.39492,104.150993],[28.3916,104.147049],[28.38798,104.147217],[28.384649,104.147392],[28.38254,104.149452],[28.37635,104.150139],[28.372419,104.15168],[28.36698,104.152367],[28.35928,104.149803],[28.35656,104.14756],[28.350519,104.14035],[28.34553,104.13829],[28.340851,104.133324],[28.33481,104.132797],[28.328911,104.13623],[28.323021,104.135033],[28.318029,104.135536],[28.31501,104.134506],[28.3067,104.136063],[28.30216,104.138474],[28.298389,104.13726],[28.2943,104.138809],[28.2875,104.144302],[28.27949,104.143784],[28.27541,104.145683],[28.268,104.153397],[28.26059,104.152367],[28.254551,104.144989],[28.24925,104.141899],[28.24729,104.140869],[28.244869,104.137444],[28.228689,104.140869],[28.205839,104.139839],[28.204781,104.134506],[28.201611,104.131599],[28.202209,104.124557],[28.200399,104.118378],[28.19994,104.111],[28.188601,104.103104],[28.184361,104.1007],[28.17906,104.096581],[28.17725,104.092461],[28.17165,104.093658],[28.165291,104.094002],[28.16151,104.092796],[28.15213,104.084389],[28.14592,104.083191],[28.141991,104.082672],[28.13608,104.072548],[28.132151,104.072723],[28.1273,104.073227],[28.1273,104.079758],[28.1273,104.082848],[28.12488,104.083878],[28.119579,104.080788],[28.11731,104.081642],[28.114429,104.086792],[28.11458,104.090569],[28.09354,104.131943],[28.09066,104.134003],[28.08672,104.133141],[28.0846,104.133827],[28.074301,104.141899],[28.06855,104.141899],[28.063551,104.144989],[28.05961,104.144653],[28.053101,104.145844],[28.046881,104.143784],[28.04492,104.142593],[28.040979,104.132111],[28.03643,104.125237],[28.03734,104.121811],[28.03931,104.119408],[28.04492,104.104134],[28.04295,104.097778],[28.039459,104.089882],[28.036131,104.079582],[28.027639,104.075638],[28.023701,104.076317],[28.01643,104.066193],[28.01552,104.052979],[28.01749,104.047653],[28.02037,104.036842],[28.01128,104.010918],[28.00491,104.006973],[28.00279,104.00251],[27.992331,103.988777],[27.99157,103.974182],[27.97747,103.962509],[27.97505,103.953934],[27.966101,103.948952],[27.96595,103.941223],[27.963221,103.935913],[27.95549,103.935043],[27.94791,103.919937],[27.93684,103.917374],[27.928499,103.916679],[27.916361,103.915131],[27.904831,103.913254],[27.89315,103.909286],[27.89012,103.912041],[27.884649,103.910843],[27.874941,103.906197],[27.86569,103.89917],[27.861441,103.897621],[27.854151,103.889557],[27.85294,103.88784],[27.853701,103.88475],[27.8496,103.876343],[27.846411,103.875481],[27.84565,103.873253],[27.843229,103.872223],[27.840639,103.867073],[27.83503,103.867409],[27.831989,103.864151],[27.828501,103.863121],[27.824551,103.857109],[27.821369,103.855049],[27.817869,103.855217],[27.81332,103.856941],[27.81135,103.859512],[27.80846,103.858139],[27.804661,103.861923],[27.799959,103.863289],[27.797831,103.864838],[27.79814,103.868271],[27.787661,103.878403],[27.7869,103.880966],[27.77627,103.880287],[27.7749,103.883202],[27.7708,103.883202],[27.76852,103.88681],[27.75865,103.886978],[27.7547,103.88475],[27.749531,103.884918],[27.74634,103.887154],[27.74361,103.887321],[27.73844,103.891273],[27.73601,103.89299],[27.73358,103.895218],[27.732059,103.89196],[27.72872,103.892303],[27.725531,103.896927],[27.715651,103.891441],[27.712761,103.89196],[27.70896,103.889214],[27.703951,103.88681],[27.701361,103.887497],[27.698931,103.886467],[27.696199,103.886292],[27.69376,103.884918],[27.689659,103.884064],[27.686621,103.880463],[27.684799,103.879768],[27.682671,103.877876],[27.680389,103.877022],[27.67902,103.875481],[27.67598,103.874786],[27.67066,103.866722],[27.667311,103.865181],[27.66564,103.856598],[27.66412,103.852303],[27.65789,103.848183],[27.652719,103.846123],[27.65028,103.843552],[27.64694,103.843552],[27.64283,103.842857],[27.63949,103.839943],[27.63797,103.837029],[27.631729,103.83239],[27.628229,103.831017],[27.626101,103.827583],[27.623819,103.826393],[27.623671,103.82209],[27.621849,103.820717],[27.62261,103.816772],[27.61956,103.815567],[27.618191,103.811279],[27.61515,103.806824],[27.61059,103.80407],[27.605419,103.801147],[27.59964,103.800461],[27.59507,103.800461],[27.593861,103.801491],[27.592939,103.803207],[27.590811,103.804916],[27.588989,103.808357],[27.587311,103.807671],[27.588989,103.805267],[27.59005,103.80304],[27.59157,103.801826],[27.59157,103.798576],[27.592939,103.798576],[27.5931,103.795998],[27.587009,103.785873],[27.586399,103.783813],[27.58518,103.783813],[27.58518,103.781921],[27.582291,103.777107],[27.580311,103.774544],[27.57818,103.773682],[27.57773,103.771797],[27.57362,103.770416],[27.573931,103.768883],[27.57469,103.768021],[27.57453,103.765099],[27.57453,103.763039],[27.57469,103.761841],[27.57316,103.759781],[27.57073,103.758583],[27.56982,103.756172],[27.566931,103.756172],[27.56312,103.753937],[27.56053,103.754967],[27.55475,103.754112],[27.54973,103.752571],[27.54668,103.752739],[27.53923,103.748962],[27.53344,103.747589],[27.530701,103.746902],[27.52355,103.739182],[27.51639,103.736778],[27.51137,103.739182],[27.506189,103.740211],[27.50436,103.739349],[27.50071,103.734718],[27.49873,103.730423],[27.495081,103.729393],[27.494619,103.726646],[27.493549,103.726822],[27.491421,103.728203],[27.476191,103.728706],[27.454559,103.719437],[27.44207,103.725273],[27.41617,103.733856],[27.3988,103.720993],[27.38965,103.717033],[27.36128,103.693459],[27.35232,103.692528],[27.351521,103.692436],[27.34355,103.691467],[27.31587,103.685341],[27.29833,103.681534],[27.29615,103.68148],[27.294399,103.681831],[27.28997,103.683388],[27.2887,103.683456],[27.28771,103.683289],[27.269011,103.676178],[27.268061,103.67598],[27.25794,103.676392],[27.25091,103.676598],[27.24836,103.676224],[27.217649,103.667976],[27.210899,103.667221],[27.20487,103.667038],[27.200251,103.666199],[27.196159,103.664726],[27.19311,103.663017],[27.191919,103.662132],[27.182261,103.651466],[27.179991,103.649803],[27.1779,103.648628],[27.175831,103.647827],[27.17329,103.647232],[27.17054,103.647072],[27.167339,103.647293],[27.164,103.647942],[27.15872,103.649628],[27.154169,103.651733],[27.152031,103.652283],[27.147369,103.652802],[27.143101,103.653908],[27.14143,103.653961],[27.14053,103.65387],[27.131121,103.650887],[27.129351,103.650627],[27.127211,103.650993],[27.12598,103.651718],[27.125299,103.65181],[27.124319,103.651947],[27.12398,103.651947],[27.12299,103.651672],[27.12096,103.651001],[27.113211,103.649933],[27.11253,103.649673],[27.110041,103.648109],[27.10898,103.647667],[27.108009,103.647499],[27.104919,103.647614],[27.103239,103.647346],[27.10194,103.646919],[27.09943,103.645592],[27.09831,103.645218],[27.09693,103.645073],[27.095551,103.645157],[27.09359,103.64563],[27.091999,103.646187],[27.088079,103.647491],[27.08704,103.647629],[27.086451,103.647598],[27.08568,103.647453],[27.084551,103.646973],[27.083851,103.6465],[27.083,103.645699],[27.08264,103.645157],[27.082161,103.644569],[27.080271,103.641853],[27.07803,103.639061],[27.07766,103.63871],[27.077499,103.638573],[27.075359,103.636833],[27.07407,103.636208],[27.07329,103.636017],[27.072309,103.636047],[27.071739,103.636208],[27.07119,103.636482],[27.070351,103.637131],[27.0693,103.638069],[27.06863,103.638474],[27.068081,103.638657],[27.066259,103.638893],[27.065479,103.639137],[27.06492,103.639473],[27.064301,103.640038],[27.06389,103.640556],[27.06365,103.640984],[27.06341,103.641617],[27.063271,103.642319],[27.063351,103.645111],[27.06321,103.646027],[27.06299,103.646698],[27.06267,103.647324],[27.06238,103.647667],[27.06175,103.648239],[27.060841,103.64872],[27.06019,103.648888],[27.059589,103.648903],[27.058981,103.648804],[27.05514,103.647217],[27.05409,103.647003],[27.052629,103.647003],[27.051451,103.647293],[27.05052,103.647758],[27.04999,103.648079],[27.047319,103.650131],[27.045959,103.650383],[27.04484,103.650269],[27.043961,103.649933],[27.04318,103.649384],[27.04158,103.647636],[27.040319,103.646759],[27.039061,103.646202],[27.03179,103.644981],[27.0299,103.644348],[27.02809,103.643211],[27.027651,103.64283],[27.026739,103.641541],[27.02565,103.63929],[27.02478,103.638153],[27.023161,103.636528],[27.022461,103.635483],[27.02191,103.634117],[27.0217,103.632423],[27.02203,103.623558],[27.021061,103.613472],[27.02072,103.612587],[27.02059,103.612259],[27.020491,103.612167],[27.020229,103.61161],[27.01918,103.610069],[27.018311,103.6092],[27.01779,103.60881],[27.017229,103.608498],[27.015921,103.607979],[27.01515,103.607826],[27.0135,103.607803],[27.01181,103.608093],[27.011709,103.608093],[27.010019,103.608276],[27.00703,103.607964],[27.005871,103.608063],[27.00322,103.608597],[27.002371,103.60862],[27.00173,103.608582],[27.0007,103.608337],[26.999479,103.607758],[26.99892,103.607384],[26.99749,103.605911],[26.996691,103.604797],[26.99585,103.603188],[26.995411,103.601929],[26.99506,103.599991],[26.994711,103.594978],[26.994341,103.593391],[26.99378,103.592201],[26.990351,103.588181],[26.98736,103.583832],[26.98568,103.582413],[26.984591,103.581718],[26.98411,103.581467],[26.98325,103.581146],[26.98291,103.5811],[26.982059,103.58091],[26.977859,103.581146],[26.976681,103.580917],[26.97571,103.580482],[26.97448,103.579628],[26.97374,103.578789],[26.972731,103.577187],[26.97262,103.577072],[26.96594,103.565643],[26.965549,103.564171],[26.965549,103.561852],[26.96533,103.560837],[26.964781,103.559708],[26.9634,103.55764],[26.96254,103.556923],[26.96184,103.556503],[26.96139,103.556374],[26.951269,103.55677],[26.949631,103.55658],[26.94891,103.556358],[26.94841,103.556068],[26.947809,103.55555],[26.947411,103.555054],[26.94702,103.554291],[26.946119,103.5513],[26.945709,103.550461],[26.94334,103.547234],[26.94191,103.544724],[26.94112,103.543762],[26.94002,103.542824],[26.93877,103.542023],[26.93788,103.541611],[26.937149,103.541367],[26.93611,103.541443],[26.934299,103.541588],[26.933229,103.541473],[26.932819,103.541367],[26.932211,103.541054],[26.93066,103.539978],[26.93,103.539673],[26.92931,103.539543],[26.928841,103.539528],[26.928129,103.539642],[26.926069,103.540443],[26.925381,103.540588],[26.9245,103.540611],[26.923599,103.540489],[26.92186,103.539993],[26.92103,103.539917],[26.92061,103.539963],[26.919809,103.540237],[26.919241,103.540558],[26.9184,103.541283],[26.91699,103.542778],[26.915291,103.544022],[26.914021,103.544777],[26.91256,103.545868],[26.91078,103.547691],[26.907909,103.551788],[26.90708,103.552597],[26.9065,103.552979],[26.90564,103.553337],[26.904961,103.553467],[26.903021,103.553612],[26.90229,103.55378],[26.901381,103.554176],[26.90003,103.554817],[26.899111,103.555107],[26.898161,103.555237],[26.89669,103.555199],[26.89435,103.554764],[26.89176,103.553963],[26.89102,103.553658],[26.890181,103.553383],[26.888451,103.552727],[26.888281,103.552612],[26.882441,103.549599],[26.8783,103.547081],[26.87499,103.545753],[26.873461,103.545357],[26.870871,103.544884],[26.86898,103.544853],[26.866899,103.54525],[26.86474,103.545937],[26.863489,103.546127],[26.86207,103.546089],[26.86063,103.545738],[26.85984,103.545372],[26.85869,103.544601],[26.85038,103.53727],[26.84799,103.535637],[26.846399,103.534782],[26.84396,103.533813],[26.83536,103.531258],[26.8347,103.530968],[26.83407,103.530586],[26.83326,103.530037],[26.832041,103.528839],[26.83091,103.527328],[26.83005,103.525391],[26.82686,103.516579],[26.82457,103.512283],[26.821711,103.508636],[26.820379,103.507294],[26.81715,103.504631],[26.814951,103.502937],[26.812519,103.500366],[26.810841,103.498398],[26.809139,103.496788],[26.80666,103.495071],[26.80418,103.493851],[26.801371,103.493073],[26.79701,103.492371],[26.795879,103.492073],[26.79248,103.490677],[26.79015,103.489326],[26.78669,103.48716],[26.783381,103.485764],[26.78071,103.485107],[26.77058,103.482986],[26.766041,103.481598],[26.76531,103.481339],[26.76446,103.480957],[26.763821,103.480339],[26.76302,103.479523],[26.762051,103.478531],[26.761669,103.478287],[26.76128,103.478104],[26.76041,103.477943],[26.759781,103.477966],[26.759159,103.478119],[26.75857,103.478416],[26.757839,103.478989],[26.75737,103.479553],[26.75712,103.479958],[26.75683,103.480637],[26.756651,103.481377],[26.75659,103.482094],[26.756491,103.483223],[26.75629,103.483994],[26.756069,103.484467],[26.755079,103.486023],[26.753731,103.487671],[26.751841,103.489517],[26.75123,103.489983],[26.750151,103.490578],[26.74922,103.490883],[26.74822,103.491028],[26.747219,103.490982],[26.746269,103.490784],[26.744961,103.490211],[26.743071,103.489067],[26.742649,103.488876],[26.74197,103.488708],[26.74106,103.48864],[26.737221,103.488533],[26.737341,103.487473],[26.736679,103.486862],[26.736601,103.486687],[26.735531,103.485252],[26.734989,103.484703],[26.73424,103.484253],[26.732981,103.483849],[26.732,103.483582],[26.731449,103.483307],[26.7311,103.483078],[26.730499,103.482452],[26.730009,103.481682],[26.729321,103.480247],[26.728939,103.479683],[26.728479,103.479187],[26.728121,103.478951],[26.726521,103.478203],[26.72613,103.477951],[26.72559,103.477501],[26.725121,103.476929],[26.723829,103.474678],[26.72327,103.474121],[26.72208,103.473419],[26.721121,103.472977],[26.72057,103.472603],[26.71909,103.471123],[26.718109,103.470413],[26.716681,103.469528],[26.715919,103.468903],[26.71526,103.468147],[26.710609,103.461243],[26.708389,103.458847],[26.70776,103.457916],[26.70702,103.456749],[26.70652,103.456177],[26.705839,103.455643],[26.704889,103.455193],[26.70277,103.45462],[26.701481,103.454048],[26.691151,103.446541],[26.68638,103.443703],[26.685579,103.443001],[26.68322,103.440132],[26.67824,103.435547],[26.677401,103.43454],[26.67481,103.430267],[26.674141,103.429466],[26.67314,103.428673],[26.670521,103.426804],[26.669189,103.425629],[26.6684,103.424561],[26.668381,103.424461],[26.666929,103.423126],[26.666401,103.422836],[26.66445,103.420998],[26.663811,103.420197],[26.663759,103.41996],[26.66337,103.419403],[26.660549,103.416901],[26.65888,103.414871],[26.65806,103.414238],[26.654551,103.412773],[26.65377,103.41227],[26.65312,103.411682],[26.65242,103.410744],[26.650511,103.407066],[26.65012,103.406532],[26.64963,103.406036],[26.64196,103.400917],[26.638769,103.399353],[26.636061,103.398041],[26.634979,103.397331],[26.63376,103.396317],[26.63225,103.394592],[26.627741,103.389038],[26.62705,103.387947],[26.624969,103.382874],[26.62381,103.379868],[26.623381,103.379211],[26.622931,103.37886],[26.622601,103.378677],[26.62208,103.37851],[26.62118,103.378342],[26.620661,103.378143],[26.620199,103.3778],[26.618971,103.376579],[26.61879,103.376266],[26.6173,103.374977],[26.616819,103.374672],[26.61614,103.374443],[26.615271,103.374283],[26.614929,103.374153],[26.614441,103.373901],[26.613911,103.373398],[26.613041,103.372147],[26.612579,103.37178],[26.61199,103.371429],[26.610559,103.37085],[26.609949,103.370407],[26.60861,103.368393],[26.608141,103.367996],[26.60759,103.36776],[26.607281,103.367691],[26.60648,103.367706],[26.604321,103.368393],[26.603701,103.368401],[26.60276,103.368134],[26.602051,103.367638],[26.600719,103.3666],[26.600389,103.366402],[26.599649,103.366127],[26.594931,103.365623],[26.59449,103.365494],[26.59387,103.365181],[26.59334,103.364754],[26.593019,103.364357],[26.59199,103.363037],[26.58865,103.358833],[26.588079,103.358269],[26.587099,103.357651],[26.586571,103.357437],[26.585621,103.357277],[26.584681,103.357353],[26.58441,103.357368],[26.58337,103.357529],[26.582121,103.357491],[26.58202,103.35746],[26.57988,103.35688],[26.57847,103.356453],[26.576639,103.356483],[26.57616,103.356628],[26.57501,103.357262],[26.573641,103.358566],[26.572889,103.360184],[26.57221,103.361847],[26.57144,103.362839],[26.570829,103.363373],[26.570009,103.363831],[26.56896,103.36412],[26.56839,103.364113],[26.56765,103.364037],[26.56732,103.363983],[26.56605,103.36335],[26.565611,103.363037],[26.561211,103.358841],[26.56068,103.358238],[26.55739,103.352203],[26.55625,103.350777],[26.555281,103.349998],[26.551029,103.347748],[26.54763,103.345238],[26.543949,103.342262],[26.54328,103.341537],[26.54122,103.338219],[26.5352,103.32708],[26.5343,103.326233],[26.53418,103.326141],[26.5306,103.324722],[26.53013,103.324417],[26.52984,103.324158],[26.529591,103.323853],[26.52923,103.323128],[26.529131,103.322723],[26.529091,103.321892],[26.52928,103.32029],[26.529249,103.319679],[26.529091,103.319107],[26.52883,103.318604],[26.5261,103.315666],[26.5256,103.315247],[26.52487,103.314781],[26.52132,103.313271],[26.520399,103.313087],[26.51967,103.313087],[26.513321,103.313911],[26.512739,103.313904],[26.51181,103.31369],[26.511129,103.313377],[26.51038,103.312759],[26.5098,103.312019],[26.50769,103.307098],[26.506969,103.306129],[26.5065,103.305687],[26.505831,103.305313],[26.504841,103.305023],[26.499769,103.305023],[26.49926,103.304916],[26.49859,103.304657],[26.49827,103.304459],[26.49769,103.303886],[26.496719,103.302559],[26.49597,103.301826],[26.49544,103.301514],[26.494869,103.301292],[26.494061,103.301193],[26.49346,103.301247],[26.49209,103.301643],[26.487391,103.30336],[26.484831,103.303802],[26.484209,103.303802],[26.483999,103.303772],[26.482771,103.303909],[26.481871,103.304153],[26.480391,103.304916],[26.47942,103.305557],[26.4783,103.306091],[26.47756,103.306236],[26.477131,103.306213],[26.476629,103.306061],[26.476021,103.305687],[26.474951,103.304581],[26.473909,103.303993],[26.47316,103.30378],[26.472469,103.303741],[26.471979,103.303833],[26.47183,103.303886],[26.47172,103.304001],[26.471331,103.304131],[26.470421,103.304176],[26.46986,103.304047],[26.46932,103.303772],[26.468941,103.303452],[26.468309,103.302727],[26.466181,103.299278],[26.46574,103.298576],[26.46533,103.29808],[26.46483,103.297737],[26.464491,103.297577],[26.463921,103.297493],[26.46352,103.297531],[26.462311,103.297974],[26.460239,103.298714],[26.459629,103.298843],[26.459009,103.298889],[26.45858,103.298851],[26.457951,103.298683],[26.456949,103.298157],[26.456591,103.297897],[26.456091,103.297447],[26.455721,103.296959],[26.45507,103.295624],[26.453449,103.290291],[26.4531,103.289574],[26.45273,103.28907],[26.452141,103.288483],[26.447451,103.285461],[26.447041,103.285057],[26.44672,103.284607],[26.44651,103.284088],[26.44643,103.283531],[26.44644,103.282013],[26.44626,103.281258],[26.44591,103.280571],[26.442511,103.276314],[26.44105,103.274773],[26.42713,103.267792],[26.42532,103.266891],[26.424749,103.266602],[26.424561,103.266487],[26.393221,103.250977],[26.391689,103.250366],[26.391001,103.250252],[26.390511,103.250252],[26.38979,103.250359],[26.389311,103.250511],[26.388599,103.250839],[26.38796,103.251289],[26.387421,103.251831],[26.38199,103.258743],[26.380569,103.260162],[26.3787,103.261597],[26.37796,103.262077],[26.376129,103.262993],[26.374269,103.263718],[26.37236,103.264168],[26.36668,103.265137],[26.36566,103.26519],[26.36433,103.265091],[26.36381,103.264969],[26.36306,103.264641],[26.36236,103.264252],[26.359619,103.262039],[26.358789,103.261551],[26.35813,103.261337],[26.35747,103.261276],[26.355379,103.261307],[26.354601,103.261162],[26.34967,103.258942],[26.348619,103.25872],[26.34795,103.258759],[26.34745,103.258904],[26.34697,103.259163],[26.346371,103.259651],[26.34589,103.260277],[26.34553,103.261009],[26.34346,103.267906],[26.3433,103.269096],[26.343361,103.269836],[26.34374,103.271461],[26.3438,103.272087],[26.34333,103.27475],[26.34334,103.27597],[26.343531,103.277008],[26.34387,103.278038],[26.34478,103.280586],[26.344999,103.281326],[26.34659,103.285301],[26.346701,103.285789],[26.346741,103.28656],[26.346519,103.288887],[26.346769,103.292091],[26.34671,103.29287],[26.34654,103.29332],[26.344839,103.296158],[26.344681,103.296356],[26.34429,103.296669],[26.343599,103.296982],[26.34197,103.297363],[26.34129,103.297623],[26.3395,103.298767],[26.338619,103.299133],[26.334459,103.300262],[26.333811,103.300591],[26.333441,103.30088],[26.332121,103.302429],[26.328951,103.30632],[26.328211,103.307053],[26.327579,103.307518],[26.32666,103.307922],[26.32531,103.308357],[26.32243,103.309929],[26.32165,103.310471],[26.31884,103.314163],[26.31797,103.315041],[26.31698,103.315773],[26.315729,103.316521],[26.315001,103.317123],[26.31403,103.318253],[26.312361,103.320862],[26.31218,103.321312],[26.311239,103.325974],[26.31101,103.326736],[26.309771,103.329491],[26.309549,103.330276],[26.30946,103.330818],[26.30946,103.332451],[26.309401,103.332977],[26.309179,103.33374],[26.30858,103.334938],[26.3076,103.336472],[26.30689,103.338226],[26.30661,103.339333],[26.30633,103.340973],[26.30619,103.341461],[26.305849,103.342163],[26.305531,103.342537],[26.30406,103.343918],[26.30307,103.344681],[26.30007,103.347366],[26.298969,103.348038],[26.29743,103.348663],[26.294941,103.349159],[26.294559,103.349297],[26.29011,103.352043],[26.28854,103.353416],[26.287861,103.354118],[26.287491,103.354378],[26.286869,103.354637],[26.28377,103.355232],[26.283331,103.355377],[26.28273,103.355713],[26.280279,103.358047],[26.279699,103.358467],[26.277109,103.359993],[26.2764,103.360291],[26.27462,103.360687],[26.273331,103.36097],[26.27282,103.361153],[26.27235,103.361397],[26.27169,103.361893],[26.26902,103.364273],[26.26837,103.36467],[26.2679,103.364868],[26.267389,103.36499],[26.266621,103.36499],[26.26524,103.364647],[26.26186,103.363678],[26.261129,103.363548],[26.260429,103.363541],[26.26001,103.363602],[26.25942,103.363823],[26.257891,103.364769],[26.257271,103.365021],[26.256359,103.365173],[26.253691,103.365349],[26.25301,103.365479],[26.24645,103.367821],[26.244711,103.368767],[26.24288,103.370148],[26.238939,103.373947],[26.2377,103.375526],[26.236839,103.377007],[26.235729,103.379669],[26.235359,103.38105],[26.234341,103.389236],[26.23395,103.390549],[26.23344,103.39151],[26.233101,103.391953],[26.23229,103.392693],[26.23144,103.393372],[26.230499,103.394333],[26.229891,103.395218],[26.22916,103.396698],[26.22888,103.397476],[26.228121,103.400261],[26.227501,103.40213],[26.227301,103.402931],[26.227091,103.403427],[26.226641,103.404121],[26.22611,103.404709],[26.22547,103.405182],[26.224661,103.405533],[26.221069,103.406113],[26.219521,103.406143],[26.218451,103.40596],[26.21789,103.405693],[26.215919,103.404037],[26.21559,103.403633],[26.21291,103.401031],[26.21072,103.399094],[26.207279,103.39798],[26.203951,103.398811],[26.2036,103.399063],[26.203199,103.3992],[26.202829,103.399406],[26.20146,103.399971],[26.200609,103.400146],[26.19997,103.400192],[26.19912,103.400063],[26.19795,103.399513],[26.196461,103.398643],[26.195471,103.398148],[26.19492,103.397797],[26.194241,103.397324],[26.194031,103.397247],[26.19183,103.396027],[26.190729,103.39579],[26.189899,103.395866],[26.188931,103.396301],[26.18684,103.397659],[26.1859,103.39827],[26.18556,103.398376],[26.183399,103.398598],[26.18268,103.398857],[26.181829,103.399399],[26.18091,103.400352],[26.178711,103.403313],[26.17831,103.403709],[26.177891,103.403923],[26.177549,103.403999],[26.177019,103.403893],[26.176781,103.403763],[26.176559,103.403557],[26.176319,103.403137],[26.17622,103.402802],[26.17618,103.402283],[26.176229,103.401787],[26.176371,103.4011],[26.17642,103.400589],[26.17622,103.398972],[26.17621,103.397568],[26.17647,103.39576],[26.176189,103.393623],[26.175739,103.391579],[26.175739,103.391418],[26.17531,103.390739],[26.174931,103.390457],[26.174641,103.390373],[26.174351,103.390373],[26.17407,103.390442],[26.173679,103.390701],[26.173361,103.391098],[26.173,103.391907],[26.172779,103.392677],[26.172409,103.393379],[26.17231,103.393494],[26.17207,103.393646],[26.171659,103.393723],[26.168779,103.393097],[26.168171,103.392822],[26.16744,103.392273],[26.167351,103.392174],[26.166031,103.391159],[26.16197,103.38813],[26.160919,103.387016],[26.160311,103.386307],[26.15793,103.384117],[26.157539,103.383659],[26.155451,103.380707],[26.154449,103.379318],[26.153799,103.377769],[26.153231,103.375031],[26.153231,103.374878],[26.15317,103.374748],[26.15295,103.374046],[26.152229,103.373108],[26.151541,103.372322],[26.15114,103.371468],[26.1509,103.370163],[26.150761,103.369881],[26.15069,103.36956],[26.15045,103.369148],[26.14999,103.368767],[26.149561,103.368652],[26.14912,103.368683],[26.1486,103.368927],[26.147631,103.369682],[26.147181,103.369873],[26.14687,103.369904],[26.146391,103.369827],[26.14535,103.369431],[26.14488,103.36937],[26.144581,103.369408],[26.144341,103.36953],[26.14411,103.369728],[26.14381,103.370247],[26.143709,103.370888],[26.143721,103.372162],[26.1436,103.372597],[26.143379,103.373001],[26.1432,103.373222],[26.142719,103.373543],[26.14189,103.373787],[26.137711,103.373772],[26.136459,103.373596],[26.135691,103.373672],[26.13501,103.373833],[26.12385,103.377121],[26.122641,103.377708],[26.11801,103.381523],[26.116779,103.382263],[26.1161,103.38253],[26.11503,103.382759],[26.113741,103.382843],[26.111959,103.382561],[26.11124,103.382233],[26.110331,103.381683],[26.110001,103.381363],[26.108641,103.379333],[26.10817,103.378563],[26.107849,103.377998],[26.107479,103.377693],[26.10696,103.377563],[26.10442,103.377533],[26.10367,103.377296],[26.102921,103.376793],[26.102301,103.376068],[26.100321,103.372772],[26.099701,103.371986],[26.099489,103.371803],[26.09893,103.371521],[26.098669,103.371498],[26.098049,103.371613],[26.097521,103.371902],[26.096581,103.372757],[26.095949,103.373337],[26.09532,103.373833],[26.09458,103.3741],[26.09387,103.374077],[26.09329,103.373894],[26.090401,103.372589],[26.083139,103.368111],[26.082951,103.368011],[26.07933,103.364166],[26.078779,103.363388],[26.078369,103.362213],[26.078131,103.361214],[26.07766,103.360123],[26.07703,103.359161],[26.07538,103.356583],[26.07522,103.356468],[26.07472,103.356041],[26.074341,103.355797],[26.07395,103.355652],[26.07341,103.355598],[26.07279,103.35569],[26.066151,103.35788],[26.06604,103.357964],[26.06423,103.358704],[26.054621,103.363274],[26.05266,103.3638],[26.05201,103.364159],[26.051319,103.364777],[26.05094,103.365219],[26.050579,103.365707],[26.050171,103.366112],[26.049669,103.366417],[26.04929,103.366547],[26.048889,103.366623],[26.04748,103.36657],[26.04694,103.366669],[26.04641,103.36689],[26.045811,103.367363],[26.043739,103.369476],[26.042669,103.370308],[26.037701,103.373703],[26.03702,103.373978],[26.036551,103.374069],[26.035601,103.374107],[26.03249,103.37413],[26.030939,103.374496],[26.027519,103.375816],[26.02634,103.376213],[26.025709,103.376297],[26.02487,103.376244],[26.02202,103.375542],[26.015551,103.374832],[26.014351,103.374496],[26.01321,103.374023],[26.0124,103.373756],[26.011789,103.373688],[26.007721,103.373962],[26.00436,103.373741],[26.00349,103.37384],[26.000931,103.374496],[26.00028,103.374527],[25.99984,103.374474],[25.99917,103.374283],[25.99048,103.369667],[25.98843,103.368462],[25.987419,103.367493],[25.98374,103.362061],[25.98126,103.359642],[25.974859,103.354439],[25.97471,103.354286],[25.968161,103.348991],[25.967581,103.348373],[25.967051,103.347679],[25.96632,103.346207],[25.966,103.34536],[25.965891,103.344963],[25.965139,103.343102],[25.96468,103.3423],[25.96401,103.341583],[25.96048,103.339149],[25.95989,103.338921],[25.95927,103.33886],[25.95841,103.338966],[25.95583,103.339653],[25.954,103.339706],[25.95211,103.339279],[25.95129,103.339073],[25.95068,103.339043],[25.950279,103.339081],[25.949671,103.339279],[25.94873,103.339767],[25.94838,103.340057],[25.946369,103.342346],[25.945511,103.343246],[25.945009,103.343643],[25.944611,103.343849],[25.944201,103.343979],[25.943991,103.344009],[25.943371,103.343933],[25.942789,103.343681],[25.94227,103.343277],[25.941629,103.34256],[25.937929,103.337509],[25.93656,103.335693],[25.935539,103.334587],[25.934219,103.33329],[25.933281,103.33181],[25.93195,103.32885],[25.93116,103.327721],[25.93108,103.327606],[25.930941,103.327522],[25.93082,103.32737],[25.93,103.326981],[25.928551,103.326042],[25.92778,103.325394],[25.926069,103.323463],[25.925529,103.323059],[25.924589,103.322632],[25.92318,103.322243],[25.922449,103.3218],[25.921789,103.321243],[25.920389,103.319901],[25.920111,103.319733],[25.919769,103.319641],[25.91926,103.319649],[25.915279,103.321182],[25.9137,103.321838],[25.91114,103.321938],[25.91078,103.319809],[25.91044,103.316429],[25.910641,103.316177],[25.910789,103.315857],[25.911779,103.314079],[25.912121,103.313232],[25.912319,103.312576],[25.9126,103.310478],[25.913059,103.308723],[25.913099,103.308289],[25.912689,103.306068],[25.91288,103.303902],[25.912809,103.303436],[25.912411,103.302567],[25.91205,103.302177],[25.911591,103.301903],[25.91148,103.301888],[25.910851,103.301537],[25.910299,103.301361],[25.908951,103.300728],[25.9088,103.300598],[25.906731,103.299622],[25.905649,103.299858],[25.905439,103.300003],[25.905359,103.299957],[25.904671,103.300102],[25.903919,103.300034],[25.903509,103.299767],[25.90321,103.299316],[25.902201,103.295471],[25.90147,103.293877],[25.90085,103.293854],[25.90065,103.293762],[25.90052,103.293427],[25.900061,103.292648],[25.89992,103.291634],[25.899891,103.291107],[25.899771,103.290756],[25.899521,103.290352],[25.89922,103.290131],[25.899059,103.290092],[25.89883,103.290108],[25.89856,103.290039],[25.897209,103.290359],[25.8962,103.290253],[25.895651,103.289963],[25.89509,103.289436],[25.894699,103.288834],[25.894199,103.287666],[25.893629,103.287033],[25.893419,103.28688],[25.89274,103.286728],[25.89192,103.286789],[25.890381,103.287148],[25.8895,103.287239],[25.887739,103.286926],[25.88566,103.286507],[25.88493,103.286583],[25.883249,103.287277],[25.88265,103.287369],[25.881981,103.287216],[25.879101,103.28566],[25.87722,103.284523],[25.876011,103.284119],[25.871019,103.283287],[25.86895,103.283157],[25.86727,103.282509],[25.86611,103.281937],[25.865749,103.28183],[25.86347,103.281464],[25.86125,103.280663],[25.85948,103.280479],[25.856489,103.280434],[25.854349,103.280251],[25.8536,103.279984],[25.853001,103.279556],[25.852051,103.278236],[25.850981,103.276466],[25.850651,103.276039],[25.8494,103.275017],[25.849079,103.274834],[25.84857,103.274673],[25.848049,103.274628],[25.847309,103.274696],[25.84659,103.274849],[25.845449,103.274872],[25.84498,103.274757],[25.844231,103.274399],[25.843599,103.274246],[25.84259,103.274292],[25.838961,103.274857],[25.837351,103.274857],[25.83423,103.273956],[25.833731,103.273933],[25.833059,103.274109],[25.832451,103.27446],[25.8311,103.275482],[25.83045,103.275703],[25.829679,103.275757],[25.827801,103.275658],[25.82725,103.275711],[25.826559,103.275932],[25.82596,103.27626],[25.82546,103.276657],[25.82526,103.276878],[25.8204,103.277748],[25.8202,103.277733],[25.820049,103.277649],[25.81978,103.277359],[25.81876,103.276527],[25.8181,103.276207],[25.817751,103.276108],[25.816999,103.276108],[25.81418,103.276428],[25.81275,103.276459],[25.810659,103.276108],[25.80863,103.276161],[25.803711,103.276512],[25.799,103.275848],[25.797159,103.275597],[25.796749,103.275597],[25.796009,103.275749],[25.7952,103.276108],[25.79451,103.276657],[25.79405,103.277161],[25.793079,103.278763],[25.79258,103.279327],[25.79213,103.279648],[25.791451,103.279907],[25.790899,103.279999],[25.790331,103.279953],[25.789801,103.279778],[25.78635,103.277962],[25.78553,103.277649],[25.784929,103.277496],[25.784149,103.277458],[25.78261,103.277557],[25.78163,103.277496],[25.78021,103.277199],[25.77636,103.276031],[25.771879,103.274979],[25.77083,103.274529],[25.769979,103.274109],[25.769329,103.273857],[25.76755,103.273407],[25.76668,103.273247],[25.76523,103.272781],[25.76408,103.272308],[25.763359,103.272102],[25.762831,103.272057],[25.762381,103.272133],[25.76111,103.27253],[25.7603,103.272797],[25.75943,103.272858],[25.759081,103.272781],[25.7582,103.272346],[25.75625,103.271156],[25.755899,103.271004],[25.75555,103.270882],[25.75481,103.27076],[25.75461,103.27076],[25.75441,103.270798],[25.75098,103.27066],[25.74658,103.27095],[25.745951,103.270882],[25.74535,103.270699],[25.741751,103.269157],[25.740379,103.268951],[25.727909,103.269653],[25.72686,103.269577],[25.72611,103.269402],[25.72541,103.269096],[25.723101,103.267998],[25.722099,103.267677],[25.721081,103.267548],[25.72028,103.267563],[25.719259,103.267677],[25.7166,103.267754],[25.714849,103.267647],[25.71176,103.267097],[25.709009,103.26635],[25.708229,103.266197],[25.70643,103.266159],[25.703899,103.266403],[25.70166,103.266502],[25.695101,103.266151],[25.69413,103.26593],[25.69368,103.265709],[25.692631,103.26506],[25.69173,103.264702],[25.69101,103.26458],[25.6898,103.264664],[25.68721,103.265106],[25.685909,103.265381],[25.6849,103.265511],[25.68416,103.26548],[25.683701,103.265358],[25.681999,103.264557],[25.68136,103.264351],[25.68075,103.264259],[25.67716,103.265152],[25.676611,103.265182],[25.67605,103.265083],[25.67461,103.264557],[25.67281,103.263763],[25.67136,103.26326],[25.668329,103.262451],[25.667351,103.261978],[25.665979,103.261162],[25.665279,103.260902],[25.664801,103.260811],[25.664061,103.260811],[25.661209,103.261253],[25.66028,103.261253],[25.65893,103.261002],[25.65873,103.260933],[25.657881,103.26078],[25.65686,103.260857],[25.65041,103.263283],[25.64731,103.264412],[25.64706,103.264481],[25.646259,103.264603],[25.645109,103.264549],[25.64435,103.264412],[25.63361,103.261147],[25.63203,103.260757],[25.63093,103.260399],[25.62985,103.259933],[25.628759,103.259354],[25.62656,103.257698],[25.62546,103.256607],[25.62421,103.254982],[25.62351,103.25383],[25.62183,103.250664],[25.620859,103.249229],[25.61961,103.247726],[25.607679,103.235161],[25.599199,103.226303],[25.597651,103.224983],[25.595449,103.223511],[25.5819,103.217506],[25.5807,103.217133],[25.57921,103.216927],[25.578711,103.216911],[25.577959,103.216927],[25.57568,103.216881],[25.574659,103.216698],[25.566509,103.214333],[25.5655,103.213852],[25.5634,103.212646],[25.5632,103.212509],[25.55838,103.209663],[25.556431,103.208527],[25.55505,103.207977],[25.553829,103.20768],[25.550329,103.207092],[25.54949,103.206947],[25.549971,103.207581],[25.55011,103.207863],[25.55036,103.208107],[25.550711,103.208153],[25.551161,103.208252],[25.551571,103.208557],[25.55184,103.206657],[25.55212,103.2062],[25.552441,103.206009],[25.55271,103.205597],[25.552811,103.204437],[25.55295,103.201317],[25.55307,103.197433],[25.553141,103.196373],[25.553471,103.191902],[25.55352,103.191704],[25.55443,103.188454],[25.55512,103.185707],[25.55559,103.183983],[25.556129,103.182167],[25.556459,103.181473],[25.556829,103.180923],[25.557421,103.18029],[25.557961,103.179893],[25.558849,103.179443],[25.56251,103.177856],[25.56278,103.177696],[25.563021,103.177513],[25.56337,103.176979],[25.56349,103.176689],[25.56361,103.176163],[25.5637,103.175423],[25.56385,103.174667],[25.566589,103.167618],[25.56706,103.166313],[25.56739,103.165588],[25.568171,103.164452],[25.568741,103.163582],[25.569189,103.163292],[25.57011,103.16304],[25.57065,103.162827],[25.57196,103.16214],[25.572519,103.161873],[25.573351,103.16143],[25.573721,103.161507],[25.5742,103.161903],[25.57464,103.161949],[25.574829,103.161812],[25.57535,103.161179],[25.57547,103.160851],[25.575331,103.160667],[25.57497,103.160606],[25.57469,103.160347],[25.574699,103.15976],[25.5748,103.159492],[25.57592,103.158859],[25.57621,103.158661],[25.576571,103.158234],[25.57695,103.157837],[25.57728,103.157677],[25.57756,103.157677],[25.577869,103.1576],[25.578381,103.15728],[25.578501,103.157158],[25.578569,103.156998],[25.578751,103.156227],[25.57889,103.155884],[25.578951,103.155617],[25.578899,103.155373],[25.57851,103.154999],[25.578341,103.154762],[25.5783,103.154556],[25.578291,103.153717],[25.578421,103.153511],[25.578581,103.153572],[25.578779,103.153908],[25.57897,103.154114],[25.579531,103.154411],[25.5797,103.154297],[25.579691,103.154083],[25.57925,103.153549],[25.579029,103.153137],[25.57893,103.152763],[25.57901,103.152313],[25.579121,103.152031],[25.57951,103.151489],[25.57963,103.15123],[25.57971,103.150513],[25.57984,103.15023],[25.580021,103.15023],[25.58012,103.150337],[25.580151,103.150909],[25.58033,103.151741],[25.580509,103.15197],[25.580709,103.152061],[25.58091,103.152077],[25.58124,103.151878],[25.582331,103.149551],[25.583521,103.147102],[25.58371,103.146568],[25.583759,103.14608],[25.58305,103.142853],[25.582661,103.141586],[25.582661,103.141121],[25.583111,103.139793],[25.58313,103.139458],[25.58235,103.136772],[25.581261,103.134132],[25.58086,103.133087],[25.580469,103.132187],[25.58016,103.131752],[25.57819,103.130074],[25.57766,103.129532],[25.577579,103.129402],[25.57732,103.128807],[25.576981,103.127869],[25.57686,103.127609],[25.576509,103.127213],[25.57601,103.126793],[25.575859,103.126587],[25.57546,103.125763],[25.575029,103.125343],[25.574381,103.125191],[25.57383,103.125221],[25.573139,103.125366],[25.572701,103.125343],[25.572411,103.12513],[25.572041,103.124657],[25.57058,103.12236],[25.570129,103.121719],[25.56999,103.121452],[25.56992,103.12104],[25.570089,103.120644],[25.57011,103.120171],[25.569851,103.119743],[25.569521,103.119537],[25.567829,103.119141],[25.567499,103.11882],[25.567249,103.118172],[25.566469,103.117126],[25.566259,103.116653],[25.566311,103.116257],[25.56665,103.115494],[25.566719,103.114906],[25.5667,103.11467],[25.566521,103.114182],[25.56608,103.113403],[25.56568,103.112846],[25.565281,103.112373],[25.56498,103.112122],[25.563419,103.111099],[25.55805,103.107399],[25.55769,103.107231],[25.5539,103.105881],[25.5509,103.104362],[25.54928,103.103989],[25.54875,103.103996],[25.548,103.10421],[25.547489,103.104179],[25.546881,103.103958],[25.546,103.103523],[25.54587,103.103317],[25.5459,103.103203],[25.546021,103.102921],[25.54619,103.10276],[25.546551,103.102676],[25.547609,103.102509],[25.54808,103.102531],[25.548491,103.102364],[25.548651,103.102249],[25.548809,103.101883],[25.54903,103.101791],[25.549311,103.102112],[25.549601,103.102226],[25.55043,103.102081],[25.55094,103.101936],[25.55117,103.101807],[25.55135,103.101593],[25.551689,103.101341],[25.55188,103.101341],[25.55261,103.101448],[25.552971,103.101334],[25.553209,103.101028],[25.55323,103.100754],[25.552891,103.099854],[25.55262,103.099663],[25.55237,103.099602],[25.55221,103.099319],[25.552,103.098473],[25.551741,103.097923],[25.55172,103.097511],[25.55191,103.097099],[25.552271,103.096809],[25.5527,103.09684],[25.552879,103.096947],[25.553631,103.097603],[25.554001,103.097733],[25.555149,103.097931],[25.555559,103.098129],[25.55596,103.098267],[25.55673,103.097969],[25.55715,103.097763],[25.557779,103.097687],[25.558451,103.097481],[25.559259,103.096878],[25.559469,103.096367],[25.55983,103.096092],[25.55995,103.09584],[25.559891,103.095459],[25.55999,103.095337],[25.56019,103.095222],[25.56027,103.094994],[25.560261,103.09491],[25.56045,103.094612],[25.56053,103.094597],[25.560789,103.094353],[25.56094,103.093941],[25.561159,103.093773],[25.56131,103.093964],[25.56152,103.094498],[25.561859,103.094933],[25.562401,103.095062],[25.562771,103.095047],[25.563141,103.09494],[25.56348,103.094719],[25.564951,103.093613],[25.565281,103.093552],[25.56558,103.093719],[25.56576,103.093781],[25.566071,103.093773],[25.56847,103.093002],[25.568859,103.09269],[25.570089,103.091476],[25.570459,103.091301],[25.570709,103.091263],[25.571011,103.09111],[25.571091,103.090919],[25.571091,103.090347],[25.57073,103.089706],[25.570801,103.089394],[25.57111,103.089249],[25.571381,103.08902],[25.57136,103.088783],[25.570959,103.088074],[25.57095,103.087837],[25.571119,103.087791],[25.57139,103.087784],[25.572081,103.087608],[25.57238,103.08741],[25.57251,103.087021],[25.572309,103.083817],[25.57247,103.082024],[25.572451,103.081833],[25.572371,103.081642],[25.571899,103.080872],[25.57159,103.080421],[25.571381,103.08004],[25.57136,103.079712],[25.571541,103.079498],[25.571911,103.079277],[25.572201,103.078949],[25.57238,103.078491],[25.572651,103.078102],[25.573219,103.077606],[25.57412,103.076927],[25.57445,103.076408],[25.57472,103.075829],[25.57514,103.07444],[25.57538,103.073853],[25.576191,103.072327],[25.576509,103.071617],[25.576969,103.070282],[25.57692,103.069893],[25.57634,103.068428],[25.576241,103.068283],[25.57583,103.067947],[25.575491,103.067886],[25.57477,103.067917],[25.57431,103.067993],[25.573549,103.068024],[25.573231,103.067886],[25.573071,103.067589],[25.572729,103.06546],[25.572651,103.065163],[25.572309,103.064743],[25.571779,103.064262],[25.571659,103.063957],[25.57176,103.063797],[25.573151,103.062553],[25.57329,103.062248],[25.57332,103.058449],[25.57328,103.057503],[25.573191,103.056824],[25.572861,103.05513],[25.57259,103.054642],[25.5718,103.053482],[25.57119,103.052803],[25.57078,103.052467],[25.5707,103.052429],[25.5704,103.052116],[25.57029,103.051788],[25.570129,103.051514],[25.56991,103.051277],[25.569401,103.051086],[25.56897,103.051041],[25.568569,103.050858],[25.568251,103.050484],[25.56826,103.050209],[25.568439,103.050117],[25.56875,103.050163],[25.56941,103.050034],[25.56971,103.049828],[25.570129,103.049744],[25.57021,103.049751],[25.57085,103.049637],[25.57099,103.049553],[25.571159,103.049057],[25.571171,103.048843],[25.5711,103.048607],[25.57073,103.047859],[25.57004,103.046677],[25.56974,103.046463],[25.56904,103.04615],[25.56856,103.04583],[25.56805,103.045403],[25.56785,103.045097],[25.567631,103.044533],[25.567249,103.044243],[25.566759,103.044067],[25.56636,103.044167],[25.56559,103.044731],[25.56531,103.044678],[25.565241,103.043938],[25.56517,103.043663],[25.565241,103.043167],[25.565371,103.042923],[25.56538,103.042542],[25.565269,103.042374],[25.56428,103.041054],[25.563749,103.040413],[25.562929,103.039612],[25.562571,103.03894],[25.56245,103.038544],[25.562031,103.037956],[25.561899,103.037437],[25.561741,103.037323],[25.561319,103.037193],[25.56114,103.037109],[25.56098,103.036812],[25.561119,103.036598],[25.56152,103.036247],[25.56159,103.036003],[25.56147,103.035896],[25.561171,103.035744],[25.56093,103.035667],[25.56032,103.035713],[25.56004,103.035538],[25.55975,103.035011],[25.55949,103.034401],[25.55925,103.034157],[25.55895,103.033997],[25.55879,103.033691],[25.558889,103.033432],[25.55932,103.032944],[25.559469,103.032471],[25.55938,103.032204],[25.55883,103.031616],[25.55821,103.031197],[25.55794,103.030731],[25.55785,103.030411],[25.5576,103.030113],[25.556141,103.029617],[25.555771,103.029457],[25.555401,103.02948],[25.555309,103.029533],[25.554899,103.029587],[25.55475,103.029381],[25.554729,103.028687],[25.554689,103.028503],[25.554489,103.028358],[25.55349,103.028343],[25.55323,103.028152],[25.55324,103.027718],[25.55316,103.027229],[25.55294,103.026657],[25.5527,103.026413],[25.55253,103.026337],[25.552259,103.025993],[25.552361,103.025703],[25.552589,103.025459],[25.55295,103.025337],[25.55312,103.025436],[25.553419,103.025757],[25.55369,103.025909],[25.555309,103.025841],[25.55563,103.025673],[25.55615,103.025169],[25.556259,103.024849],[25.55616,103.024689],[25.55513,103.023552],[25.555019,103.023193],[25.55521,103.023087],[25.555559,103.023102],[25.556179,103.022926],[25.556749,103.02269],[25.55724,103.022552],[25.55743,103.022537],[25.557711,103.022598],[25.55817,103.022781],[25.559549,103.023666],[25.56052,103.024246],[25.561411,103.024841],[25.562189,103.025307],[25.56303,103.025551],[25.56348,103.025864],[25.563971,103.025993],[25.56423,103.026016],[25.564751,103.025917],[25.565861,103.025681],[25.566389,103.025398],[25.566771,103.025307],[25.567551,103.025284],[25.567841,103.025299],[25.56811,103.025513],[25.568371,103.02594],[25.568729,103.026199],[25.568899,103.026283],[25.569241,103.026222],[25.569469,103.026047],[25.569651,103.025772],[25.569889,103.0252],[25.569969,103.024673],[25.57015,103.024231],[25.570391,103.023933],[25.57065,103.023376],[25.57066,103.022972],[25.570589,103.022568],[25.57069,103.022057],[25.57078,103.021828],[25.570761,103.021362],[25.570669,103.021133],[25.570669,103.020638],[25.570841,103.019882],[25.570829,103.019081],[25.570971,103.018578],[25.57155,103.017769],[25.572029,103.017174],[25.572241,103.016777],[25.573,103.014839],[25.573151,103.01416],[25.573271,103.013031],[25.573271,103.012833],[25.57338,103.012459],[25.573601,103.012138],[25.5737,103.011833],[25.57345,103.011597],[25.57276,103.011101],[25.572639,103.010773],[25.57287,103.010193],[25.57291,103.009628],[25.5728,103.008873],[25.572901,103.008636],[25.573071,103.00869],[25.574011,103.009239],[25.57431,103.009277],[25.574421,103.009071],[25.574459,103.00782],[25.574369,103.007431],[25.574089,103.00692],[25.57399,103.006683],[25.57394,103.006271],[25.573971,103.005928],[25.5744,103.004807],[25.574659,103.003403],[25.574949,103.002617],[25.575359,103.001923],[25.5756,103.001801],[25.5758,103.001961],[25.576151,103.002373],[25.5765,103.002541],[25.57749,103.001961],[25.577869,103.0019],[25.578369,103.001999],[25.57873,103.001869],[25.57901,103.001549],[25.579069,103.001289],[25.577009,102.99852],[25.57688,102.998253],[25.57686,102.997772],[25.577089,102.996407],[25.57708,102.996094],[25.57691,102.995811],[25.5767,102.995773],[25.576521,102.995819],[25.575609,102.996269],[25.575411,102.99617],[25.57548,102.996048],[25.5763,102.995232],[25.57654,102.995064],[25.57675,102.995033],[25.57715,102.995049],[25.577591,102.99514],[25.57785,102.995064],[25.57794,102.99482],[25.57836,102.993217],[25.578449,102.992981],[25.578621,102.992683],[25.578791,102.992439],[25.579309,102.991913],[25.5812,102.990082],[25.58205,102.989059],[25.582279,102.988907],[25.58251,102.988792],[25.58301,102.988663],[25.583771,102.988411],[25.58437,102.988167],[25.5846,102.988037],[25.585039,102.987671],[25.58606,102.98629],[25.58633,102.986267],[25.586519,102.986343],[25.58758,102.986969],[25.587811,102.987312],[25.587959,102.987717],[25.58802,102.988091],[25.588169,102.988327],[25.588539,102.988564],[25.58975,102.988907],[25.590191,102.988777],[25.590389,102.988503],[25.590839,102.987663],[25.59111,102.987282],[25.591299,102.987152],[25.591869,102.987137],[25.592039,102.986992],[25.59201,102.986649],[25.59215,102.986328],[25.592461,102.986252],[25.5931,102.986252],[25.59341,102.986153],[25.593769,102.985893],[25.594481,102.985092],[25.59498,102.984711],[25.595209,102.984337],[25.595329,102.98391],[25.59564,102.983597],[25.59643,102.983238],[25.59668,102.983063],[25.597679,102.981483],[25.59775,102.98114],[25.597561,102.980873],[25.59642,102.979721],[25.59584,102.979057],[25.59581,102.978737],[25.59623,102.977921],[25.596569,102.977707],[25.597219,102.977814],[25.59786,102.978073],[25.59832,102.978287],[25.599661,102.9786],[25.599911,102.978561],[25.60006,102.97834],[25.6001,102.977921],[25.599991,102.977463],[25.599779,102.976967],[25.5998,102.976639],[25.600031,102.976479],[25.60071,102.976173],[25.60117,102.975754],[25.60154,102.975067],[25.601641,102.974602],[25.601561,102.974007],[25.60165,102.973717],[25.60182,102.973747],[25.602051,102.974007],[25.60243,102.97509],[25.6024,102.975471],[25.60183,102.976227],[25.60181,102.976547],[25.602011,102.976547],[25.603609,102.975906],[25.603821,102.975647],[25.603769,102.97541],[25.603359,102.974609],[25.603331,102.974472],[25.60346,102.974319],[25.604481,102.974373],[25.604771,102.974297],[25.60491,102.974197],[25.605009,102.973938],[25.60498,102.973549],[25.60494,102.973457],[25.604691,102.973167],[25.604469,102.973106],[25.60416,102.973312],[25.603689,102.973396],[25.603491,102.973343],[25.60321,102.973167],[25.60293,102.972801],[25.60251,102.972412],[25.60206,102.972237],[25.601959,102.97213],[25.601971,102.971931],[25.602171,102.971863],[25.602819,102.971992],[25.60317,102.972214],[25.60331,102.972351],[25.603649,102.972473],[25.60388,102.972321],[25.60404,102.972183],[25.60442,102.972023],[25.60486,102.972092],[25.60602,102.972649],[25.60634,102.972748],[25.606899,102.97274],[25.60745,102.972878],[25.607981,102.972961],[25.608231,102.972862],[25.60829,102.972633],[25.608471,102.972298],[25.60874,102.972343],[25.608879,102.972397],[25.60988,102.972366],[25.610029,102.972321],[25.610189,102.972076],[25.61021,102.971901],[25.610331,102.971603],[25.61055,102.971573],[25.61134,102.971786],[25.61194,102.972267],[25.612289,102.972359],[25.613131,102.972153],[25.613319,102.972054],[25.61364,102.971764],[25.613831,102.971558],[25.614111,102.971474],[25.614429,102.97155],[25.615049,102.971512],[25.615311,102.971291],[25.6154,102.971161],[25.61553,102.971077],[25.615829,102.971008],[25.615959,102.970932],[25.616211,102.970627],[25.616461,102.970528],[25.616739,102.970497],[25.617399,102.969994],[25.61771,102.969803],[25.617941,102.969498],[25.61805,102.969223],[25.618219,102.969032],[25.61842,102.969048],[25.618561,102.969223],[25.618561,102.969383],[25.618481,102.970016],[25.618481,102.970551],[25.618549,102.971062],[25.618759,102.971489],[25.618971,102.971657],[25.619221,102.97171],[25.61978,102.971733],[25.62006,102.971626],[25.620211,102.971413],[25.62038,102.970863],[25.620449,102.970512],[25.620649,102.970238],[25.62126,102.969719],[25.62174,102.969093],[25.6222,102.968323],[25.622499,102.968132],[25.62294,102.96814],[25.6234,102.968117],[25.62351,102.968178],[25.623699,102.968407],[25.623911,102.96859],[25.625469,102.967621],[25.627781,102.966187],[25.627621,102.965813],[25.627621,102.965477],[25.627859,102.96505],[25.6283,102.964462],[25.628889,102.963753],[25.629,102.963387],[25.629089,102.962563],[25.62904,102.962257],[25.628839,102.961777],[25.62862,102.961403],[25.62833,102.961143],[25.62796,102.960907],[25.627819,102.960747],[25.62731,102.959862],[25.62722,102.959396],[25.62723,102.959007],[25.627291,102.958633],[25.627211,102.958298],[25.62694,102.95784],[25.62648,102.957329],[25.62628,102.956963],[25.62595,102.956596],[25.625601,102.956352],[25.62553,102.956039],[25.62541,102.955711],[25.62524,102.955406],[25.62499,102.955162],[25.62484,102.955063],[25.623581,102.954483],[25.62315,102.954224],[25.622629,102.953583],[25.62224,102.953362],[25.62196,102.953468],[25.62182,102.953552],[25.621469,102.953529],[25.620239,102.952423],[25.61982,102.951881],[25.61858,102.950859],[25.61842,102.95076],[25.618259,102.9505],[25.61829,102.950073],[25.61845,102.949753],[25.618719,102.949577],[25.61883,102.949387],[25.618811,102.949226],[25.618719,102.948967],[25.618641,102.948402],[25.618441,102.947952],[25.61828,102.94735],[25.618179,102.946892],[25.61812,102.94632],[25.617769,102.945633],[25.61768,102.945137],[25.61776,102.94471],[25.617649,102.944382],[25.617491,102.944077],[25.61746,102.943748],[25.617781,102.942963],[25.617809,102.942078],[25.61795,102.941742],[25.61797,102.941528],[25.617781,102.94117],[25.61776,102.940407],[25.617861,102.939972],[25.617901,102.939339],[25.6178,102.938782],[25.61771,102.938461],[25.61768,102.937958],[25.617781,102.937714],[25.617821,102.937241],[25.618,102.936813],[25.61805,102.936348],[25.618099,102.935249],[25.617941,102.934036],[25.61797,102.933632],[25.617861,102.932953],[25.617729,102.932457],[25.617479,102.932083],[25.617371,102.931808],[25.617081,102.931541],[25.616779,102.931427],[25.61676,102.931282],[25.61688,102.931107],[25.61673,102.930267],[25.616631,102.929993],[25.616199,102.929237],[25.615931,102.928963],[25.614639,102.928253],[25.61445,102.928078],[25.613991,102.927422],[25.613489,102.927032],[25.6127,102.92659],[25.61248,102.926521],[25.61199,102.926628],[25.61153,102.926666],[25.611259,102.926537],[25.61105,102.925926],[25.610781,102.925697],[25.610479,102.925613],[25.6103,102.925392],[25.610371,102.924728],[25.610371,102.924301],[25.61043,102.923973],[25.610491,102.923828],[25.610439,102.9235],[25.610201,102.923363],[25.609949,102.923264],[25.609461,102.923233],[25.60914,102.923157],[25.6084,102.922737],[25.60824,102.922859],[25.608191,102.923111],[25.608259,102.923241],[25.608219,102.923508],[25.60812,102.923492],[25.607941,102.923561],[25.607849,102.923927],[25.607771,102.924011],[25.60762,102.92395],[25.60759,102.923622],[25.607691,102.922592],[25.60787,102.922256],[25.60795,102.921982],[25.607821,102.921707],[25.607491,102.921211],[25.60722,102.921173],[25.607071,102.921188],[25.60692,102.921127],[25.60644,102.92083],[25.606291,102.920807],[25.606211,102.920982],[25.606159,102.921494],[25.606091,102.921577],[25.605961,102.921516],[25.60586,102.921082],[25.60568,102.92099],[25.605619,102.920792],[25.60569,102.920547],[25.60565,102.92009],[25.60545,102.919838],[25.604271,102.91967],[25.60396,102.91951],[25.60379,102.919617],[25.60364,102.919807],[25.603559,102.920151],[25.603359,102.920151],[25.602989,102.919861],[25.60272,102.919739],[25.602579,102.919456],[25.60223,102.919037],[25.60183,102.918709],[25.60136,102.918083],[25.601191,102.917763],[25.600969,102.917557],[25.60087,102.917397],[25.600599,102.917236],[25.6003,102.917297],[25.600161,102.917664],[25.600241,102.918022],[25.60009,102.918243],[25.599541,102.918098],[25.59934,102.918182],[25.599211,102.918518],[25.599051,102.918556],[25.5989,102.918793],[25.59885,102.918968],[25.59865,102.919121],[25.59852,102.918968],[25.598511,102.918709],[25.59864,102.918373],[25.59866,102.918228],[25.598579,102.918022],[25.598511,102.917908],[25.598511,102.917587],[25.598379,102.917328],[25.598351,102.917107],[25.59819,102.916779],[25.59796,102.916611],[25.59761,102.916496],[25.59729,102.916458],[25.596769,102.916283],[25.59659,102.916077],[25.59671,102.915573],[25.596649,102.914948],[25.596519,102.914742],[25.596359,102.914711],[25.59586,102.914703],[25.59573,102.914757],[25.5954,102.915154],[25.59506,102.91571],[25.59487,102.915878],[25.59474,102.915932],[25.594431,102.915878],[25.59407,102.915756],[25.593691,102.915382],[25.593519,102.914993],[25.592871,102.914192],[25.592609,102.913803],[25.59234,102.913513],[25.59211,102.912987],[25.59197,102.912491],[25.591669,102.911789],[25.59071,102.91037],[25.590469,102.91021],[25.590071,102.910103],[25.58975,102.90995],[25.58959,102.909912],[25.589211,102.909927],[25.58868,102.910004],[25.5884,102.909897],[25.588261,102.909798],[25.58798,102.909813],[25.58782,102.909859],[25.5875,102.909882],[25.58699,102.90976],[25.585819,102.909187],[25.585449,102.908943],[25.58544,102.908699],[25.5858,102.908569],[25.586081,102.908386],[25.586241,102.908234],[25.586269,102.908043],[25.58604,102.907837],[25.585581,102.90773],[25.584961,102.907799],[25.584629,102.907753],[25.58371,102.907288],[25.583099,102.906822],[25.58275,102.906807],[25.582661,102.906822],[25.58205,102.906647],[25.58185,102.90641],[25.58164,102.905609],[25.581699,102.905273],[25.58185,102.905029],[25.581779,102.904793],[25.58152,102.904533],[25.58119,102.904556],[25.58087,102.904472],[25.580669,102.904457],[25.5804,102.904388],[25.580099,102.904373],[25.580009,102.904198],[25.58032,102.903831],[25.58083,102.903282],[25.580879,102.903183],[25.580811,102.903053],[25.580469,102.902924],[25.57958,102.902191],[25.57937,102.901939],[25.57925,102.901649],[25.57921,102.901337],[25.5791,102.901031],[25.57893,102.901062],[25.578751,102.90136],[25.578501,102.901573],[25.578369,102.901543],[25.57807,102.90139],[25.57753,102.900818],[25.577379,102.900467],[25.577169,102.899788],[25.57715,102.899384],[25.5774,102.899071],[25.57745,102.898804],[25.577271,102.898483],[25.577089,102.898247],[25.57703,102.897957],[25.577141,102.897652],[25.577379,102.897438],[25.577539,102.897362],[25.577721,102.897148],[25.577629,102.897003],[25.57741,102.896973],[25.577209,102.897003],[25.576229,102.897469],[25.57593,102.897659],[25.5756,102.897598],[25.57543,102.897522],[25.57514,102.897453],[25.57485,102.897209],[25.57473,102.896812],[25.57469,102.896591],[25.57452,102.896301],[25.57415,102.896103],[25.573811,102.896027],[25.572241,102.896133],[25.572001,102.896263],[25.57193,102.896683],[25.57172,102.896973],[25.57151,102.897011],[25.57128,102.896873],[25.571131,102.896721],[25.57074,102.896187],[25.570379,102.89521],[25.57044,102.89476],[25.57066,102.894417],[25.57089,102.894234],[25.57114,102.894127],[25.57148,102.894119],[25.571859,102.893997],[25.572029,102.893837],[25.571951,102.893669],[25.571739,102.893547],[25.57148,102.893463],[25.57128,102.893227],[25.57128,102.89296],[25.5714,102.892723],[25.571951,102.892273],[25.57198,102.892021],[25.57176,102.891647],[25.57155,102.891586],[25.571421,102.891663],[25.571011,102.891693],[25.570869,102.891327],[25.57057,102.891052],[25.57011,102.890793],[25.569719,102.890694],[25.569361,102.89035],[25.568489,102.889229],[25.567909,102.887688],[25.56793,102.88752],[25.567909,102.886253],[25.567949,102.885918],[25.56806,102.885567],[25.568069,102.885399],[25.56794,102.885048],[25.56743,102.884483],[25.567261,102.884377],[25.567141,102.884232],[25.566931,102.883827],[25.56671,102.883163],[25.566589,102.882423],[25.56633,102.881477],[25.56632,102.881042],[25.56641,102.880409],[25.56662,102.880058],[25.56691,102.879951],[25.5672,102.879997],[25.567471,102.880219],[25.567591,102.88018],[25.56765,102.878922],[25.567579,102.878487],[25.56748,102.878326],[25.5672,102.87812],[25.56711,102.877892],[25.56727,102.877777],[25.567751,102.877922],[25.56814,102.878143],[25.56839,102.878052],[25.568529,102.877747],[25.56867,102.877533],[25.568661,102.877319],[25.56848,102.877167],[25.56822,102.876717],[25.567921,102.875954],[25.56743,102.875412],[25.567089,102.874863],[25.56694,102.874687],[25.566811,102.874443],[25.56683,102.873787],[25.566799,102.873581],[25.566589,102.873062],[25.566509,102.872383],[25.566549,102.872101],[25.56629,102.871712],[25.56604,102.871521],[25.565519,102.871399],[25.565491,102.871338],[25.56555,102.87114],[25.56568,102.871109],[25.566219,102.871094],[25.566681,102.871117],[25.566839,102.871063],[25.56694,102.870743],[25.567181,102.870689],[25.567419,102.870743],[25.56765,102.870598],[25.5679,102.870247],[25.56834,102.87001],[25.56852,102.869949],[25.56879,102.869957],[25.568951,102.869881],[25.568781,102.86982],[25.56852,102.869843],[25.568211,102.869904],[25.56769,102.870216],[25.56748,102.870209],[25.567341,102.870003],[25.567181,102.869881],[25.56711,102.869911],[25.566959,102.869873],[25.56674,102.869568],[25.566549,102.869568],[25.5662,102.869759],[25.565901,102.869751],[25.565769,102.869553],[25.565639,102.869141],[25.565439,102.868973],[25.565161,102.86927],[25.56481,102.869278],[25.564409,102.869057],[25.56431,102.868896],[25.564449,102.868843],[25.564699,102.869011],[25.56496,102.868927],[25.56514,102.868698],[25.565149,102.86824],[25.565331,102.867973],[25.56554,102.867981],[25.565651,102.868149],[25.56567,102.868233],[25.56596,102.868752],[25.566059,102.86882],[25.56624,102.868729],[25.56636,102.8685],[25.56641,102.868118],[25.566561,102.867844],[25.566719,102.867844],[25.56735,102.867981],[25.56756,102.868156],[25.567579,102.868401],[25.56781,102.868553],[25.568159,102.86853],[25.568399,102.868423],[25.56855,102.868217],[25.568529,102.867973],[25.568211,102.867592],[25.568029,102.867249],[25.56786,102.867027],[25.567881,102.866783],[25.568911,102.866707],[25.569241,102.866783],[25.570761,102.86763],[25.57093,102.867523],[25.570921,102.867348],[25.57099,102.867012],[25.571159,102.86647],[25.57136,102.866241],[25.57143,102.866257],[25.571569,102.866379],[25.57169,102.866524],[25.57197,102.866653],[25.572149,102.866577],[25.572069,102.866501],[25.57164,102.866364],[25.57136,102.866058],[25.571199,102.865608],[25.571171,102.864967],[25.57122,102.864708],[25.57115,102.864471],[25.570881,102.864357],[25.570511,102.864471],[25.57025,102.864342],[25.57019,102.864197],[25.569851,102.863907],[25.569229,102.86396],[25.568859,102.863937],[25.568781,102.863853],[25.56867,102.863609],[25.568251,102.863373],[25.56687,102.86322],[25.56637,102.86319],[25.566031,102.863022],[25.565651,102.862617],[25.56531,102.862083],[25.56517,102.861656],[25.56525,102.86129],[25.565519,102.860847],[25.565741,102.860687],[25.56608,102.860863],[25.56629,102.860771],[25.566311,102.860611],[25.566139,102.860527],[25.565479,102.860512],[25.565109,102.860558],[25.56468,102.860573],[25.564329,102.860741],[25.56365,102.861557],[25.563601,102.861717],[25.563629,102.861923],[25.563789,102.862122],[25.563881,102.862328],[25.563761,102.862427],[25.563601,102.862373],[25.56307,102.861832],[25.562429,102.861343],[25.561569,102.860893],[25.561119,102.860367],[25.560459,102.859528],[25.56015,102.859093],[25.56003,102.85833],[25.559959,102.857964],[25.559919,102.857437],[25.559719,102.856163],[25.55953,102.855972],[25.55942,102.855942],[25.55896,102.855942],[25.55772,102.856003],[25.55703,102.855904],[25.55681,102.855904],[25.55654,102.855782],[25.55633,102.855614],[25.55617,102.855263],[25.55599,102.855133],[25.555901,102.855164],[25.555651,102.855431],[25.555321,102.855392],[25.55456,102.85511],[25.554291,102.855057],[25.553921,102.855179],[25.553591,102.855324],[25.553341,102.855362],[25.55294,102.855301],[25.552679,102.855202],[25.55188,102.855217],[25.55147,102.855087],[25.550859,102.854698],[25.54953,102.853508],[25.54875,102.852898],[25.548559,102.852814],[25.54796,102.852661],[25.547449,102.852577],[25.546801,102.852379],[25.546551,102.852379],[25.54578,102.852631],[25.54534,102.85257],[25.544741,102.852402],[25.544359,102.852173],[25.543779,102.85141],[25.543341,102.850937],[25.542999,102.850693],[25.54266,102.850594],[25.54203,102.850563],[25.54142,102.850288],[25.54101,102.849953],[25.540751,102.849663],[25.540251,102.849312],[25.53968,102.849091],[25.539049,102.8489],[25.53875,102.848778],[25.53825,102.848732],[25.537319,102.848907],[25.53697,102.848846],[25.53651,102.848648],[25.53606,102.848587],[25.53561,102.848587],[25.53496,102.84845],[25.53355,102.848106],[25.53294,102.847832],[25.532459,102.847412],[25.53199,102.846916],[25.53117,102.846443],[25.53091,102.846397],[25.530769,102.846527],[25.530701,102.846657],[25.530491,102.846817],[25.52914,102.847054],[25.52866,102.846939],[25.528021,102.846474],[25.526331,102.84597],[25.525669,102.845963],[25.52438,102.845863],[25.5235,102.845863],[25.521919,102.845772],[25.521441,102.845711],[25.520981,102.845543],[25.520729,102.845329],[25.520269,102.84507],[25.519991,102.844971],[25.51977,102.84494],[25.51848,102.845047],[25.51799,102.845009],[25.517521,102.844788],[25.51539,102.843437],[25.515289,102.843292],[25.51527,102.84272],[25.51557,102.841843],[25.51557,102.841537],[25.5149,102.840942],[25.514481,102.840714],[25.514111,102.840759],[25.513929,102.840874],[25.513559,102.841217],[25.513269,102.841309],[25.513109,102.841232],[25.51281,102.841003],[25.512461,102.8405],[25.51214,102.840179],[25.51178,102.839981],[25.511009,102.840279],[25.50868,102.841408],[25.507601,102.841782],[25.5072,102.841812],[25.50643,102.841499],[25.505911,102.841209],[25.50576,102.84108],[25.50568,102.840912],[25.50565,102.840752],[25.505659,102.840363],[25.50563,102.840202],[25.505501,102.840057],[25.50535,102.839996],[25.504881,102.840202],[25.50456,102.840401],[25.50433,102.840698],[25.50415,102.841026],[25.504129,102.841652],[25.504061,102.84185],[25.50346,102.842682],[25.503401,102.84285],[25.50321,102.843002],[25.50305,102.84301],[25.502899,102.842857],[25.5028,102.842712],[25.50263,102.842163],[25.502251,102.841728],[25.50206,102.841614],[25.501881,102.84156],[25.50173,102.841629],[25.50161,102.841751],[25.501551,102.841911],[25.50153,102.842102],[25.501699,102.842911],[25.50173,102.843353],[25.5016,102.843964],[25.501631,102.844162],[25.501949,102.844704],[25.502001,102.844856],[25.50201,102.845062],[25.501961,102.845253],[25.501881,102.845398],[25.50091,102.845932],[25.500811,102.846062],[25.50058,102.846848],[25.50036,102.84716],[25.500231,102.84726],[25.50005,102.847298],[25.499531,102.847183],[25.498911,102.846977],[25.498529,102.846832],[25.498199,102.846657],[25.497431,102.846008],[25.49725,102.846008],[25.497061,102.846153],[25.496731,102.846649],[25.49658,102.846779],[25.496401,102.846878],[25.49621,102.846901],[25.49605,102.846802],[25.49593,102.846649],[25.495649,102.8461],[25.49518,102.845451],[25.495001,102.845131],[25.494949,102.844948],[25.494949,102.844711],[25.495131,102.844299],[25.495461,102.84388],[25.495529,102.843681],[25.49548,102.843483],[25.495279,102.843407],[25.49511,102.843452],[25.494909,102.843552],[25.494711,102.843559],[25.49456,102.843483],[25.494431,102.843353],[25.494129,102.842613],[25.493851,102.842361],[25.49333,102.842079],[25.492979,102.842056],[25.492781,102.842102],[25.491449,102.842697],[25.491261,102.842728],[25.49066,102.842682],[25.49048,102.842712],[25.490351,102.84285],[25.49028,102.843033],[25.49025,102.843262],[25.490259,102.843498],[25.49033,102.843758],[25.49045,102.843979],[25.49118,102.844856],[25.491461,102.845497],[25.491579,102.84568],[25.492001,102.846497],[25.492149,102.846931],[25.492149,102.847107],[25.49206,102.847298],[25.491211,102.848328],[25.491131,102.84848],[25.4911,102.848663],[25.49118,102.848877],[25.492599,102.849213],[25.492929,102.849411],[25.49305,102.849602],[25.493059,102.849762],[25.492979,102.849998],[25.49276,102.850098],[25.4921,102.850159],[25.49176,102.850311],[25.491449,102.850578],[25.491261,102.850861],[25.49118,102.851227],[25.491199,102.851608],[25.491501,102.853897],[25.491631,102.854309],[25.492001,102.854851],[25.492149,102.854958],[25.492611,102.855202],[25.493151,102.855362],[25.49333,102.855461],[25.49346,102.855598],[25.493629,102.855713],[25.49371,102.855827],[25.493759,102.856033],[25.49371,102.856232],[25.49328,102.857147],[25.493151,102.857277],[25.49301,102.857353],[25.492701,102.857353],[25.49131,102.857033],[25.49065,102.856781],[25.490499,102.856781],[25.49036,102.85688],[25.49025,102.857033],[25.49,102.857529],[25.489611,102.858009],[25.48958,102.8582],[25.489651,102.858528],[25.48966,102.858711],[25.48963,102.858963],[25.489429,102.859299],[25.489309,102.859428],[25.488501,102.860626],[25.48835,102.860809],[25.48811,102.861008],[25.4869,102.861458],[25.486309,102.861809],[25.48605,102.862099],[25.485649,102.8629],[25.485399,102.863228],[25.48378,102.864662],[25.48358,102.864731],[25.4834,102.864632],[25.48321,102.864349],[25.48316,102.864159],[25.48311,102.863579],[25.482929,102.863258],[25.482731,102.863152],[25.482559,102.863007],[25.482531,102.862801],[25.48255,102.862549],[25.482599,102.862381],[25.482599,102.862183],[25.48255,102.861961],[25.48246,102.861801],[25.48225,102.861702],[25.4821,102.861763],[25.481661,102.862099],[25.48148,102.862152],[25.48131,102.862099],[25.48101,102.8619],[25.48085,102.861847],[25.4807,102.861847],[25.479509,102.862251],[25.479111,102.862358],[25.478609,102.86235],[25.478559,102.862152],[25.47875,102.861504],[25.478649,102.860329],[25.4786,102.86013],[25.47851,102.859947],[25.478331,102.859802],[25.47753,102.859261],[25.47735,102.859261],[25.477261,102.859413],[25.477261,102.860153],[25.477501,102.860397],[25.477831,102.860603],[25.47805,102.860832],[25.47806,102.861],[25.478029,102.861183],[25.477949,102.861351],[25.47761,102.861801],[25.47753,102.861977],[25.47748,102.862228],[25.47735,102.86261],[25.47736,102.862808],[25.477409,102.862999],[25.47806,102.863533],[25.478251,102.863564],[25.47891,102.863503],[25.47913,102.863411],[25.47933,102.863403],[25.47953,102.863449],[25.47961,102.863663],[25.4795,102.864311],[25.479259,102.864883],[25.47893,102.865448],[25.478809,102.865578],[25.478661,102.865662],[25.47813,102.865753],[25.4769,102.865433],[25.476549,102.86541],[25.47576,102.865562],[25.47558,102.86573],[25.47566,102.865913],[25.4758,102.866051],[25.476049,102.866379],[25.47608,102.866547],[25.476049,102.866707],[25.47596,102.866882],[25.47571,102.867126],[25.4744,102.868561],[25.47431,102.868759],[25.474331,102.868927],[25.4744,102.86911],[25.47456,102.869263],[25.47488,102.869331],[25.47506,102.869476],[25.47513,102.869713],[25.475109,102.869904],[25.47493,102.870232],[25.47411,102.87101],[25.47381,102.871529],[25.47368,102.871658],[25.473551,102.871712],[25.473181,102.871696],[25.473,102.871727],[25.47283,102.871803],[25.472731,102.871948],[25.47266,102.87236],[25.472759,102.87291],[25.4729,102.8731],[25.47308,102.873131],[25.47341,102.873062],[25.473579,102.873062],[25.473749,102.873207],[25.473881,102.873734],[25.47385,102.874153],[25.47378,102.874352],[25.473499,102.874611],[25.4734,102.874748],[25.473249,102.875282],[25.473129,102.875481],[25.473,102.875557],[25.472799,102.875633],[25.47246,102.875664],[25.47233,102.875732],[25.472231,102.875908],[25.47226,102.876083],[25.472349,102.876228],[25.472509,102.876381],[25.47296,102.87661],[25.47303,102.876762],[25.473,102.876953],[25.47278,102.87735],[25.472811,102.877548],[25.47291,102.877747],[25.473249,102.878059],[25.47333,102.878258],[25.473351,102.878433],[25.473301,102.878609],[25.4732,102.878761],[25.47295,102.878998],[25.47263,102.879112],[25.472281,102.879128],[25.471979,102.879333],[25.471901,102.879501],[25.471861,102.879677],[25.471951,102.879913],[25.47208,102.880051],[25.472361,102.880257],[25.47258,102.8806],[25.472731,102.880707],[25.473961,102.881401],[25.47415,102.881332],[25.474279,102.881203],[25.47476,102.880508],[25.474899,102.880402],[25.4751,102.880333],[25.475281,102.880432],[25.475349,102.880653],[25.47525,102.881012],[25.474911,102.881432],[25.47423,102.881828],[25.473909,102.882057],[25.473749,102.882133],[25.47356,102.882149],[25.47341,102.882103],[25.471951,102.881058],[25.47163,102.880852],[25.47106,102.880859],[25.470329,102.881081],[25.470011,102.881081],[25.46986,102.881012],[25.469761,102.880852],[25.469761,102.880661],[25.469931,102.88031],[25.47015,102.879349],[25.47028,102.879181],[25.470631,102.879051],[25.470831,102.878906],[25.47093,102.8787],[25.470949,102.878532],[25.470751,102.877808],[25.470659,102.877632],[25.47053,102.87751],[25.469311,102.876862],[25.46911,102.876801],[25.46891,102.876778],[25.46871,102.876831],[25.468081,102.877312],[25.467911,102.877861],[25.46788,102.878082],[25.467779,102.87825],[25.466949,102.879158],[25.466749,102.879227],[25.466579,102.87925],[25.46641,102.879211],[25.466129,102.87896],[25.46583,102.878448],[25.4657,102.878326],[25.465549,102.878258],[25.465401,102.87825],[25.46493,102.878311],[25.46476,102.87825],[25.464649,102.878113],[25.4646,102.87793],[25.4646,102.877731],[25.464531,102.87735],[25.464411,102.877251],[25.46426,102.877182],[25.46298,102.877258],[25.462259,102.876953],[25.461411,102.876801],[25.46125,102.87661],[25.461229,102.87645],[25.461309,102.876297],[25.46216,102.875549],[25.462311,102.875381],[25.462811,102.874962],[25.46335,102.874832],[25.463511,102.874763],[25.463631,102.874657],[25.46373,102.874512],[25.46385,102.87413],[25.46406,102.873802],[25.464211,102.873779],[25.46493,102.873901],[25.465111,102.873863],[25.465231,102.873749],[25.4653,102.87355],[25.46533,102.873352],[25.4652,102.873161],[25.464729,102.873001],[25.464581,102.87291],[25.46446,102.87278],[25.46406,102.872147],[25.463909,102.872002],[25.46356,102.87178],[25.462851,102.871513],[25.4627,102.871407],[25.46258,102.871277],[25.462379,102.870979],[25.461849,102.870407],[25.46151,102.870262],[25.4608,102.870033],[25.460461,102.869881],[25.460329,102.869759],[25.45993,102.869049],[25.45923,102.868309],[25.4587,102.868134],[25.45853,102.868027],[25.458401,102.867897],[25.45816,102.867561],[25.45788,102.866852],[25.457781,102.866699],[25.4575,102.866402],[25.457411,102.866226],[25.457399,102.866051],[25.457451,102.865463],[25.45743,102.864883],[25.457199,102.864357],[25.4571,102.863602],[25.45698,102.863449],[25.45653,102.863258],[25.456181,102.863258],[25.45583,102.863129],[25.455709,102.862984],[25.455629,102.862801],[25.45566,102.86261],[25.455851,102.862129],[25.455851,102.861954],[25.455759,102.861763],[25.455231,102.86145],[25.454981,102.861061],[25.454651,102.86071],[25.454359,102.860558],[25.45381,102.86013],[25.453501,102.859932],[25.452881,102.859734],[25.45211,102.859901],[25.45195,102.859978],[25.45178,102.860107],[25.45166,102.86026],[25.45155,102.860611],[25.4515,102.861214],[25.45145,102.861382],[25.451361,102.861526],[25.451031,102.861748],[25.450661,102.861877],[25.44981,102.862411],[25.44965,102.862556],[25.44873,102.863228],[25.447849,102.863831],[25.44751,102.863998],[25.44698,102.864159],[25.44636,102.864182],[25.44566,102.864281],[25.445311,102.86425],[25.44516,102.864159],[25.44491,102.863899],[25.44475,102.863808],[25.444401,102.863762],[25.44418,102.863808],[25.44401,102.863899],[25.44385,102.864029],[25.44346,102.864449],[25.44326,102.864563],[25.44306,102.864609],[25.44265,102.864632],[25.44243,102.864609],[25.44228,102.864563],[25.441481,102.864502],[25.441059,102.864502],[25.440861,102.864548],[25.440359,102.864807],[25.440201,102.864799],[25.440029,102.864708],[25.439581,102.864227],[25.43918,102.863983],[25.438959,102.86393],[25.438749,102.863953],[25.43853,102.864014],[25.43811,102.864197],[25.437929,102.86425],[25.4377,102.864258],[25.43751,102.864357],[25.437229,102.864754],[25.436661,102.866081],[25.43648,102.86618],[25.4363,102.86618],[25.436131,102.866081],[25.436029,102.865898],[25.435961,102.865677],[25.43586,102.865013],[25.435961,102.864311],[25.435949,102.863708],[25.436001,102.86351],[25.436279,102.862808],[25.436279,102.862633],[25.43618,102.862511],[25.436029,102.862427],[25.435881,102.862396],[25.43536,102.862381],[25.43516,102.862297],[25.435011,102.86216],[25.43471,102.861603],[25.434561,102.861427],[25.433929,102.861099],[25.43343,102.860611],[25.43306,102.860382],[25.43128,102.859863],[25.430349,102.859657],[25.43,102.85968],[25.429359,102.859863],[25.42898,102.859833],[25.4284,102.859848],[25.428209,102.859909],[25.42803,102.860031],[25.427879,102.860184],[25.427759,102.860359],[25.427731,102.86058],[25.427759,102.860802],[25.42828,102.862396],[25.42823,102.862579],[25.428101,102.862701],[25.42786,102.862709],[25.42775,102.862633],[25.427629,102.86248],[25.427481,102.862106],[25.427361,102.861931],[25.427151,102.861351],[25.427059,102.861183],[25.426809,102.860878],[25.426611,102.860558],[25.426359,102.860352],[25.4258,102.859497],[25.42568,102.859001],[25.425659,102.858482],[25.4256,102.858261],[25.425501,102.858101],[25.42535,102.857964],[25.42518,102.857857],[25.424311,102.857552],[25.42363,102.85733],[25.423401,102.8573],[25.423161,102.857307],[25.422029,102.857483],[25.42161,102.857384],[25.42083,102.857002],[25.420059,102.856499],[25.419701,102.856201],[25.4195,102.856079],[25.419081,102.855957],[25.41791,102.855911],[25.41675,102.855782],[25.416531,102.855698],[25.416349,102.855583],[25.41605,102.855278],[25.41556,102.854599],[25.41531,102.853363],[25.41511,102.852951],[25.414961,102.852783],[25.414631,102.852531],[25.413759,102.85218],[25.413309,102.851929],[25.41258,102.851334],[25.412251,102.850998],[25.411699,102.850212],[25.41028,102.848152],[25.409849,102.847504],[25.409679,102.847298],[25.409401,102.846863],[25.4091,102.846481],[25.408279,102.84568],[25.40801,102.845253],[25.407801,102.84481],[25.40765,102.84465],[25.40731,102.844383],[25.4069,102.844254],[25.406731,102.844162],[25.406561,102.844002],[25.40645,102.843811],[25.406099,102.842812],[25.40543,102.841782],[25.40526,102.841614],[25.4046,102.84108],[25.4042,102.841011],[25.404011,102.841026],[25.403851,102.840958],[25.403749,102.840828],[25.4037,102.84063],[25.403629,102.839958],[25.403549,102.839752],[25.403231,102.839432],[25.403049,102.839333],[25.402849,102.839302],[25.402651,102.83931],[25.40205,102.8395],[25.401831,102.839478],[25.401649,102.839378],[25.401461,102.839211],[25.40118,102.838852],[25.400949,102.838432],[25.400551,102.83786],[25.40011,102.83741],[25.399799,102.837196],[25.399509,102.837151],[25.399111,102.837181],[25.39893,102.83725],[25.3983,102.83741],[25.3981,102.83741],[25.397079,102.837151],[25.39666,102.837158],[25.396259,102.83725],[25.395309,102.837646],[25.394609,102.838028],[25.394279,102.838058],[25.39415,102.838013],[25.39385,102.837807],[25.39315,102.837379],[25.39286,102.837112],[25.392679,102.836731],[25.39233,102.836159],[25.392151,102.835747],[25.39205,102.835327],[25.391781,102.834534],[25.3915,102.83416],[25.388599,102.83271],[25.38818,102.832428],[25.387711,102.831909],[25.38728,102.830551],[25.38706,102.830101],[25.386909,102.829613],[25.386909,102.829399],[25.38703,102.828911],[25.38703,102.828697],[25.38698,102.828499],[25.38686,102.828346],[25.386101,102.827682],[25.3855,102.826782],[25.38496,102.825996],[25.38435,102.824959],[25.384211,102.824753],[25.38353,102.823349],[25.38341,102.823128],[25.38328,102.823029],[25.38295,102.822678],[25.382799,102.822433],[25.38241,102.821632],[25.38208,102.821159],[25.38188,102.820961],[25.381451,102.82061],[25.3806,102.82],[25.380381,102.819878],[25.37966,102.819252],[25.37941,102.81913],[25.378929,102.819061],[25.37793,102.81913],[25.37746,102.81926],[25.3766,102.81971],[25.375759,102.820084],[25.375549,102.820213],[25.375311,102.820297],[25.37466,102.820213],[25.373779,102.819809],[25.373329,102.819809],[25.371929,102.820152],[25.371679,102.820259],[25.37105,102.820633],[25.370449,102.82106],[25.369749,102.8218],[25.368879,102.822632],[25.368311,102.82296],[25.368111,102.823013],[25.36688,102.823463],[25.36648,102.823509],[25.365629,102.823448],[25.365499,102.823311],[25.365379,102.823112],[25.365179,102.822479],[25.36491,102.8218],[25.36458,102.820801],[25.36446,102.820549],[25.36393,102.819061],[25.3638,102.818878],[25.363649,102.818581],[25.36335,102.817749],[25.36265,102.816528],[25.36178,102.814552],[25.361549,102.813408],[25.36161,102.81295],[25.361879,102.811958],[25.36203,102.811501],[25.362061,102.811028],[25.3619,102.809761],[25.3619,102.809196],[25.36198,102.808327],[25.362181,102.805733],[25.36215,102.805511],[25.36198,102.805099],[25.36161,102.804459],[25.36153,102.804001],[25.361549,102.803726],[25.361429,102.803261],[25.3612,102.802811],[25.36083,102.801811],[25.36063,102.800056],[25.360531,102.79985],[25.36006,102.799309],[25.35881,102.798058],[25.35746,102.795761],[25.357,102.795113],[25.356331,102.79451],[25.35531,102.793701],[25.35508,102.793411],[25.355009,102.793198],[25.355009,102.792198],[25.35533,102.790901],[25.35535,102.790398],[25.355129,102.78878],[25.355181,102.786247],[25.35511,102.785751],[25.3549,102.785332],[25.354759,102.785133],[25.354259,102.78418],[25.35335,102.782707],[25.353201,102.782562],[25.35285,102.782303],[25.352551,102.781883],[25.352051,102.781357],[25.35166,102.781197],[25.35148,102.781181],[25.35108,102.78125],[25.350901,102.781258],[25.3507,102.781197],[25.35051,102.781097],[25.350361,102.78093],[25.3501,102.780533],[25.349751,102.780312],[25.349609,102.780159],[25.349449,102.779877],[25.3491,102.779411],[25.348579,102.779114],[25.34816,102.77903],[25.347561,102.779129],[25.34738,102.779251],[25.347231,102.779411],[25.347,102.779846],[25.346861,102.780006],[25.34668,102.780128],[25.345711,102.78035],[25.344999,102.780563],[25.3444,102.780884],[25.343981,102.781029],[25.3438,102.781128],[25.343451,102.781433],[25.342911,102.782227],[25.342751,102.782303],[25.34256,102.782303],[25.342381,102.782249],[25.341379,102.781799],[25.340401,102.780952],[25.339411,102.779709],[25.33926,102.779549],[25.339149,102.779358],[25.3389,102.779053],[25.338699,102.7789],[25.338511,102.778847],[25.33835,102.778862],[25.33798,102.77906],[25.337681,102.779182],[25.33713,102.779282],[25.33671,102.779228],[25.335751,102.778976],[25.334999,102.778748],[25.33411,102.778229],[25.33375,102.778152],[25.3332,102.778198],[25.332109,102.778458],[25.33078,102.77903],[25.329651,102.779747],[25.329109,102.780182],[25.328581,102.78038],[25.328159,102.780403],[25.32778,102.780296],[25.327459,102.780029],[25.327101,102.779297],[25.3269,102.778999],[25.326759,102.778877],[25.32641,102.778709],[25.32626,102.778709],[25.32546,102.778847],[25.32505,102.778862],[25.32481,102.778809],[25.324249,102.778603],[25.32403,102.77858],[25.32296,102.778801],[25.32276,102.778801],[25.32201,102.778458],[25.320801,102.778099],[25.3204,102.777901],[25.31953,102.777107],[25.31885,102.7761],[25.318029,102.775299],[25.3179,102.775131],[25.317801,102.774902],[25.317751,102.774658],[25.317711,102.774178],[25.317579,102.773697],[25.31743,102.773514],[25.317101,102.773201],[25.31636,102.772697],[25.31525,102.771652],[25.314301,102.770958],[25.313709,102.770607],[25.313061,102.770683],[25.312851,102.77066],[25.311979,102.770409],[25.311359,102.770302],[25.30946,102.769798],[25.30933,102.769707],[25.30883,102.769157],[25.30838,102.768501],[25.308109,102.767357],[25.308149,102.765984],[25.30813,102.76503],[25.307949,102.764412],[25.307699,102.764076],[25.30756,102.763977],[25.306709,102.762749],[25.3062,102.762283],[25.305599,102.761902],[25.30525,102.761581],[25.305149,102.761383],[25.30501,102.76091],[25.30493,102.760429],[25.3048,102.760231],[25.304609,102.760078],[25.303801,102.759712],[25.3027,102.759331],[25.30253,102.759209],[25.30241,102.759048],[25.30233,102.758827],[25.30221,102.758148],[25.3022,102.757431],[25.30213,102.75721],[25.301979,102.757057],[25.301611,102.756882],[25.301479,102.756729],[25.301081,102.755898],[25.300461,102.754181],[25.3002,102.753799],[25.300011,102.753632],[25.299101,102.752998],[25.298161,102.752251],[25.297831,102.75193],[25.29756,102.751534],[25.296909,102.750809],[25.29673,102.750702],[25.29631,102.750633],[25.295959,102.750458],[25.295811,102.750313],[25.295549,102.749947],[25.29483,102.749382],[25.29401,102.749008],[25.293579,102.748901],[25.29213,102.748711],[25.2918,102.748528],[25.289631,102.747597],[25.288031,102.7472],[25.286249,102.746384],[25.285561,102.746201],[25.28441,102.745758],[25.28348,102.745483],[25.282261,102.745361],[25.282009,102.7453],[25.281601,102.745148],[25.28043,102.744957],[25.279409,102.745033],[25.27891,102.744911],[25.27791,102.744728],[25.2775,102.744583],[25.277309,102.744453],[25.276699,102.743713],[25.276501,102.743584],[25.276331,102.74353],[25.27615,102.743553],[25.27533,102.743752],[25.27416,102.74411],[25.27375,102.744377],[25.27355,102.744476],[25.273331,102.74453],[25.272881,102.744461],[25.27243,102.744431],[25.27141,102.744263],[25.27063,102.744202],[25.26993,102.7444],[25.26943,102.744408],[25.268709,102.744331],[25.26803,102.744263],[25.26738,102.744247],[25.267179,102.744308],[25.26638,102.744659],[25.266159,102.744682],[25.26573,102.744553],[25.2649,102.74408],[25.264681,102.744034],[25.2642,102.74398],[25.263729,102.743797],[25.26333,102.74353],[25.262911,102.742996],[25.26273,102.742607],[25.26263,102.742012],[25.26255,102.741852],[25.26235,102.74176],[25.26218,102.741882],[25.261999,102.74221],[25.261829,102.74231],[25.2614,102.742279],[25.261181,102.742302],[25.260981,102.742363],[25.260799,102.742477],[25.260611,102.742554],[25.26041,102.742531],[25.260031,102.742348],[25.25985,102.742203],[25.25935,102.741982],[25.25881,102.741859],[25.25831,102.741814],[25.25808,102.74173],[25.257111,102.741249],[25.25668,102.740982],[25.256451,102.740898],[25.256201,102.740883],[25.25573,102.740952],[25.25548,102.740959],[25.254749,102.741096],[25.254511,102.741096],[25.253901,102.740807],[25.25366,102.740761],[25.252911,102.740898],[25.252159,102.740959],[25.25168,102.740883],[25.251129,102.740631],[25.250759,102.740601],[25.250111,102.740707],[25.2498,102.740646],[25.249359,102.740402],[25.249201,102.740356],[25.24901,102.740356],[25.24855,102.740601],[25.24818,102.740631],[25.24753,102.740608],[25.24736,102.740646],[25.247129,102.740578],[25.246811,102.740402],[25.24625,102.739906],[25.24605,102.739777],[25.245609,102.739662],[25.24523,102.739449],[25.245001,102.739197],[25.244551,102.7388],[25.24441,102.738731],[25.2442,102.738747],[25.243811,102.738899],[25.24361,102.738876],[25.2435,102.738777],[25.243299,102.73851],[25.24305,102.738281],[25.24271,102.738129],[25.24238,102.73806],[25.241579,102.738113],[25.241211,102.738159],[25.24103,102.738129],[25.2409,102.738029],[25.24078,102.737862],[25.24066,102.737747],[25.240179,102.737511],[25.240009,102.73748],[25.239229,102.73745],[25.238729,102.737282],[25.23835,102.737251],[25.237881,102.737297],[25.237221,102.737343],[25.235609,102.736977],[25.234329,102.736778],[25.2339,102.736633],[25.233561,102.73645],[25.23329,102.736298],[25.23288,102.736214],[25.23233,102.73616],[25.230209,102.736107],[25.229759,102.736511],[25.229549,102.736862],[25.22921,102.737083],[25.22872,102.737267],[25.228609,102.737549],[25.2286,102.737953],[25.228479,102.738281],[25.2283,102.738564],[25.2281,102.738861],[25.228081,102.739014],[25.22818,102.739159],[25.228359,102.739212],[25.22863,102.739128],[25.229,102.738701],[25.229481,102.738197],[25.229851,102.738068],[25.230709,102.738083],[25.231279,102.738281],[25.231649,102.738281],[25.231859,102.738297],[25.2321,102.738564],[25.23221,102.738762],[25.23258,102.738907],[25.232929,102.738853],[25.233179,102.739014],[25.23344,102.739212],[25.233629,102.739616],[25.23385,102.739777],[25.23403,102.73983],[25.23436,102.739761],[25.234619,102.739822],[25.235109,102.740349],[25.23571,102.740593],[25.23596,102.740913],[25.235979,102.74115],[25.235941,102.74144],[25.23563,102.741623],[25.235201,102.741631],[25.23461,102.741753],[25.234079,102.742081],[25.233801,102.742172],[25.233379,102.742126],[25.23267,102.742027],[25.2323,102.742172],[25.232019,102.742378],[25.23185,102.742706],[25.231701,102.74308],[25.231529,102.743401],[25.231359,102.743507],[25.2311,102.743477],[25.230749,102.74321],[25.230709,102.742867],[25.230579,102.742317],[25.230129,102.742027],[25.229601,102.741783],[25.22872,102.741814],[25.227989,102.741661],[25.227409,102.741661],[25.22665,102.741447],[25.226259,102.741127],[25.225981,102.74073],[25.225731,102.740448],[25.225559,102.740402],[25.22541,102.74041],[25.22529,102.740593],[25.225189,102.74073],[25.224751,102.741013],[25.22418,102.741211],[25.223949,102.741653],[25.22373,102.741837],[25.22183,102.742447],[25.219999,102.742653],[25.21899,102.742851],[25.21788,102.742699],[25.2171,102.742561],[25.215811,102.742683],[25.214781,102.742683],[25.21406,102.742882],[25.21328,102.742981],[25.21253,102.742828],[25.212231,102.743088],[25.211861,102.743858],[25.21159,102.744217],[25.211161,102.744347],[25.211029,102.744209],[25.210899,102.743446],[25.210871,102.742729],[25.21055,102.742264],[25.21018,102.74202],[25.20965,102.741982],[25.20941,102.742279],[25.209459,102.742699],[25.209351,102.742912],[25.20911,102.742943],[25.207479,102.742851],[25.205999,102.742462],[25.20532,102.742371],[25.204309,102.741959],[25.20381,102.741859],[25.203341,102.741959],[25.202749,102.741966],[25.20096,102.741631],[25.19952,102.741211],[25.19906,102.74118],[25.19445,102.741096],[25.192699,102.740768],[25.192181,102.7407],[25.191839,102.740784],[25.19108,102.741158],[25.19055,102.741158],[25.189501,102.741226],[25.18906,102.741074],[25.18828,102.740822],[25.187519,102.740784],[25.186279,102.740784],[25.185511,102.740677],[25.18507,102.740356],[25.184259,102.739868],[25.182449,102.73896],[25.180901,102.738281],[25.17981,102.737999],[25.17901,102.737846],[25.178101,102.737534],[25.177349,102.737221],[25.17658,102.736443],[25.176279,102.736061],[25.17568,102.73568],[25.17518,102.735573],[25.174761,102.735382],[25.17448,102.73513],[25.174141,102.734596],[25.174101,102.734512],[25.174061,102.734062],[25.17408,102.733528],[25.17395,102.733047],[25.173759,102.732803],[25.173281,102.732712],[25.171709,102.733147],[25.17136,102.733078],[25.170719,102.732887],[25.17041,102.73288],[25.17008,102.733032],[25.16971,102.733414],[25.169359,102.733856],[25.169081,102.734032],[25.16876,102.734001],[25.167959,102.733429],[25.166889,102.73288],[25.16662,102.732826],[25.166071,102.732826],[25.165831,102.73275],[25.16568,102.73243],[25.165621,102.732117],[25.165449,102.731796],[25.165211,102.731827],[25.16507,102.732018],[25.16501,102.732109],[25.16511,102.732559],[25.1654,102.733002],[25.16581,102.733147],[25.16637,102.733238],[25.1667,102.733253],[25.166901,102.733482],[25.16687,102.73362],[25.16671,102.733849],[25.166439,102.733757],[25.165951,102.73349],[25.165461,102.733429],[25.165001,102.733307],[25.16473,102.733078],[25.164579,102.73278],[25.164591,102.732483],[25.164579,102.732147],[25.164551,102.731758],[25.16436,102.731583],[25.16415,102.731651],[25.16408,102.731979],[25.1642,102.732529],[25.16419,102.732811],[25.164301,102.733307],[25.16448,102.733551],[25.164829,102.733658],[25.16518,102.733711],[25.165421,102.733833],[25.16543,102.734154],[25.1653,102.734283],[25.165001,102.734253],[25.16433,102.73391],[25.16366,102.733597],[25.1635,102.73317],[25.16338,102.732651],[25.163231,102.732201],[25.16297,102.731949],[25.162689,102.73188],[25.162411,102.732079],[25.16213,102.73278],[25.16194,102.733513],[25.161711,102.733711],[25.160521,102.734306],[25.1602,102.734238],[25.15971,102.733849],[25.15906,102.733299],[25.158609,102.73307],[25.158409,102.733078],[25.158159,102.732979],[25.157909,102.732857],[25.157761,102.732536],[25.157579,102.732353],[25.157471,102.732361],[25.157301,102.732452],[25.15723,102.732613],[25.1572,102.732948],[25.15723,102.733299],[25.157459,102.733528],[25.15806,102.733688],[25.15843,102.733833],[25.158751,102.734261],[25.15893,102.734871],[25.15921,102.735603],[25.15962,102.735992],[25.160009,102.736122],[25.160339,102.736259],[25.1609,102.736732],[25.161659,102.737053],[25.16231,102.737183],[25.162661,102.73716],[25.162769,102.737213],[25.162979,102.73735],[25.163139,102.73777],[25.1632,102.737846],[25.1633,102.738113],[25.16328,102.73838],[25.163059,102.738678],[25.162661,102.739052],[25.16227,102.739311],[25.161751,102.739433],[25.16147,102.739403],[25.16116,102.739403],[25.161051,102.739372],[25.160629,102.73925],[25.160061,102.739029],[25.15967,102.738876],[25.15741,102.738419],[25.156481,102.738129],[25.15554,102.737587],[25.153151,102.736588],[25.150579,102.735527],[25.149429,102.735031],[25.148701,102.734787],[25.14473,102.733528],[25.143021,102.73275],[25.141371,102.732208],[25.136999,102.730568],[25.130501,102.728256],[25.12912,102.727676],[25.12747,102.726837],[25.12598,102.725861],[25.12476,102.72522],[25.123051,102.724701],[25.121719,102.72422],[25.119909,102.72393],[25.118311,102.723679],[25.117149,102.723381],[25.11606,102.723129],[25.11553,102.723099],[25.115311,102.723259],[25.11496,102.724297],[25.114599,102.725632],[25.114111,102.72641],[25.11356,102.727448],[25.1129,102.728729],[25.108379,102.726807],[25.10449,102.725151],[25.101049,102.723686],[25.10005,102.72654],[25.09898,102.729637],[25.09713,102.73497],[25.096161,102.737579],[25.09581,102.737534],[25.09334,102.736557],[25.09148,102.735909],[25.09123,102.735817],[25.0889,102.73497],[25.08815,102.734673],[25.087391,102.734383],[25.085621,102.732613],[25.0839,102.730911],[25.081699,102.733963],[25.08021,102.736153],[25.07494,102.743919],[25.074869,102.744019],[25.071899,102.74762],[25.07069,102.749336],[25.07015,102.751411],[25.067841,102.750389],[25.066681,102.749413],[25.065109,102.747681],[25.063669,102.746552],[25.06233,102.745644],[25.060631,102.744438],[25.060289,102.744202],[25.057619,102.742691],[25.057409,102.742462],[25.05604,102.742752],[25.051701,102.742897],[25.049891,102.742989],[25.04567,102.743103],[25.04431,102.743134],[25.0413,102.743263],[25.03709,102.743469],[25.035601,102.743599],[25.033911,102.743767],[25.03154,102.74382],[25.030161,102.74353],[25.02953,102.743271],[25.02825,102.742767],[25.026091,102.741898],[25.025089,102.741814],[25.0238,102.74205],[25.0231,102.742233],[25.022341,102.742371],[25.02179,102.742477],[25.021219,102.742592],[25.01985,102.742943],[25.01964,102.743042],[25.019501,102.743187],[25.019449,102.743347],[25.01948,102.743477],[25.01955,102.74366],[25.0198,102.74395],[25.01992,102.744102],[25.02,102.744362],[25.020029,102.744621],[25.01989,102.745796],[25.01976,102.746368],[25.01919,102.749313],[25.01759,102.755577],[25.017191,102.756592],[25.01643,102.757927],[25.01516,102.759399],[25.01408,102.760368],[25.00745,102.764168],[25.005659,102.76519],[25.004789,102.765747],[25.004169,102.766327],[25.00341,102.767403],[25.00296,102.768417],[25.00198,102.770973],[25.00152,102.771751],[25.0009,102.772476],[24.9932,102.778389],[24.992041,102.779327],[24.99118,102.779999],[24.990601,102.780243],[24.98991,102.780342],[24.98925,102.780243],[24.98415,102.778168],[24.982491,102.777603],[24.98114,102.777588],[24.978029,102.777863],[24.973841,102.778633],[24.973101,102.778778],[24.972031,102.779068],[24.971201,102.779381],[24.96909,102.780296],[24.967541,102.781143],[24.966209,102.781967],[24.957451,102.787659],[24.956369,102.788292],[24.955509,102.788712],[24.95487,102.788963],[24.95372,102.78936],[24.951731,102.789703],[24.95056,102.78978],[24.93424,102.789619],[24.926109,102.788887],[24.924629,102.788948],[24.923161,102.789169],[24.92104,102.789757],[24.919081,102.79068],[24.917391,102.791763],[24.904909,102.800919],[24.90271,102.802032],[24.900499,102.802696],[24.898359,102.802963],[24.89703,102.80323],[24.895639,102.803741],[24.894461,102.804321],[24.89431,102.804398],[24.89344,102.804947],[24.89315,102.805153],[24.891251,102.806808],[24.88316,102.814201],[24.880819,102.815666],[24.878929,102.816467],[24.876221,102.817123],[24.874001,102.817291],[24.84852,102.817581],[24.84655,102.81736],[24.84318,102.816437],[24.839991,102.814957],[24.830021,102.808449],[24.828449,102.807693],[24.82411,102.806129],[24.822969,102.805481],[24.819901,102.802963],[24.817209,102.801666],[24.81572,102.801048],[24.814489,102.800247],[24.81016,102.795677],[24.8069,102.793289],[24.8011,102.787453],[24.800039,102.78669],[24.79859,102.785896],[24.79657,102.785118],[24.795799,102.784828],[24.785509,102.780983],[24.784889,102.780609],[24.784161,102.780037],[24.783541,102.779297],[24.78186,102.776398],[24.779381,102.77179],[24.77845,102.770477],[24.77702,102.76889],[24.776011,102.768021],[24.77453,102.766991],[24.77227,102.765877],[24.770599,102.765327],[24.76366,102.764069],[24.734501,102.754677],[24.732719,102.753777],[24.73086,102.752457],[24.72957,102.751198],[24.709591,102.725899],[24.69681,102.713463],[24.696119,102.712807],[24.694839,102.710548],[24.69313,102.706947],[24.69272,102.706306],[24.69241,102.705963],[24.691811,102.705513],[24.69121,102.70517],[24.68935,102.704407],[24.688761,102.704002],[24.68825,102.703491],[24.68782,102.702888],[24.68749,102.70192],[24.685551,102.695763],[24.678829,102.681763],[24.67807,102.680649],[24.67717,102.67971],[24.67095,102.675392],[24.670059,102.674568],[24.669491,102.67379],[24.668909,102.672684],[24.668631,102.671654],[24.664829,102.653343],[24.66445,102.65229],[24.66386,102.651253],[24.66073,102.647186],[24.65988,102.646393],[24.6506,102.638947],[24.643311,102.630211],[24.64097,102.628479],[24.627899,102.623543],[24.627211,102.623138],[24.626381,102.622452],[24.62466,102.620277],[24.623949,102.619698],[24.617371,102.616913],[24.61204,102.614761],[24.605829,102.610237],[24.601089,102.607674],[24.599501,102.606468],[24.597919,102.604881],[24.58987,102.595268],[24.579691,102.585068],[24.57741,102.583359],[24.57579,102.58242],[24.56934,102.579987],[24.55953,102.577469],[24.555241,102.575607],[24.554131,102.57534],[24.549549,102.575256],[24.54882,102.575157],[24.54788,102.574913],[24.542219,102.572319],[24.541121,102.571609],[24.54015,102.570663],[24.53915,102.569366],[24.53838,102.568626],[24.537069,102.567719],[24.53651,102.567162],[24.536051,102.566528],[24.53557,102.565552],[24.535021,102.56356],[24.5345,102.56234],[24.53392,102.56147],[24.533079,102.560638],[24.53204,102.55999],[24.53105,102.559647],[24.52458,102.558792],[24.523661,102.558517],[24.522989,102.558189],[24.52256,102.557877],[24.519461,102.555054],[24.51862,102.554459],[24.517719,102.554039],[24.516569,102.553757],[24.515289,102.553772],[24.514521,102.55397],[24.50947,102.556023],[24.50729,102.556717],[24.50609,102.557312],[24.500919,102.560722],[24.5002,102.561043],[24.494989,102.561996],[24.493891,102.562347],[24.49102,102.563553],[24.489889,102.563797],[24.488701,102.563843],[24.487949,102.563721],[24.487209,102.563522],[24.485359,102.562782],[24.484381,102.562553],[24.481859,102.562187],[24.481131,102.561974],[24.48068,102.561729],[24.47967,102.560867],[24.47547,102.556763],[24.471451,102.554123],[24.470181,102.55291],[24.468599,102.550987],[24.467661,102.550163],[24.466789,102.549622],[24.466089,102.549316],[24.46512,102.549049],[24.41419,102.541649],[24.40333,102.539558],[24.399929,102.53891],[24.398029,102.538544],[24.391729,102.537331],[24.390289,102.537117],[24.37652,102.535439],[24.37458,102.534958],[24.370319,102.533524],[24.359261,102.530693],[24.3577,102.530441],[24.35693,102.530312],[24.355539,102.53009],[24.353239,102.529762],[24.350981,102.529442],[24.349449,102.529114],[24.34881,102.528976],[24.33872,102.52536],[24.335779,102.523987],[24.331289,102.521278],[24.328819,102.519768],[24.32793,102.519234],[24.324511,102.517273],[24.32218,102.516609],[24.317949,102.515617],[24.316759,102.515068],[24.31604,102.514557],[24.315069,102.513573],[24.3137,102.511871],[24.312799,102.511147],[24.31176,102.510597],[24.30479,102.508911],[24.3043,102.508743],[24.30143,102.507187],[24.291599,102.50116],[24.290791,102.500458],[24.29007,102.499619],[24.28937,102.498367],[24.288759,102.497108],[24.288271,102.496353],[24.2878,102.495827],[24.28723,102.495407],[24.286591,102.495087],[24.285919,102.494888],[24.28525,102.494797],[24.282829,102.494797],[24.282221,102.494743],[24.28142,102.494476],[24.280569,102.493973],[24.2794,102.492844],[24.276489,102.4879],[24.27578,102.487053],[24.274691,102.486198],[24.273609,102.485657],[24.272449,102.485382],[24.26977,102.485046],[24.268471,102.48465],[24.26585,102.483528],[24.26474,102.483238],[24.26259,102.483109],[24.25843,102.483162],[24.25771,102.483017],[24.25713,102.482857],[24.25701,102.482826],[24.25679,102.48275],[24.256611,102.482689],[24.256069,102.482513],[24.25515,102.482117],[24.253349,102.48143],[24.25172,102.480797],[24.250879,102.480476],[24.25012,102.480263],[24.248831,102.480049],[24.247219,102.480019],[24.23737,102.481071],[24.235371,102.480927],[24.224079,102.478661],[24.212351,102.474663],[24.210661,102.473763],[24.20948,102.472878],[24.20829,102.471649],[24.204809,102.466621],[24.203409,102.46524],[24.20174,102.464043],[24.196659,102.461678],[24.19556,102.460876],[24.194941,102.460243],[24.19416,102.459106],[24.193331,102.457581],[24.191719,102.455399],[24.191389,102.454742],[24.191139,102.454033],[24.19101,102.45327],[24.19099,102.452591],[24.19091,102.45002],[24.190901,102.449692],[24.19076,102.444458],[24.19109,102.441818],[24.191771,102.437843],[24.19174,102.436836],[24.191641,102.436348],[24.19136,102.435623],[24.191099,102.435181],[24.18651,102.43042],[24.185989,102.429581],[24.185711,102.428879],[24.184311,102.419518],[24.183969,102.418533],[24.183371,102.417389],[24.182409,102.415947],[24.181881,102.414803],[24.18154,102.413551],[24.1812,102.403793],[24.180929,102.402191],[24.18042,102.400688],[24.177509,102.395042],[24.176331,102.392754],[24.17631,102.392723],[24.176149,102.392403],[24.17314,102.386574],[24.172701,102.385933],[24.170879,102.384216],[24.17062,102.383812],[24.17046,102.383347],[24.170179,102.381378],[24.16997,102.380669],[24.169609,102.380043],[24.169121,102.379478],[24.16855,102.379021],[24.16753,102.378349],[24.167021,102.377808],[24.166389,102.377007],[24.166019,102.376701],[24.165569,102.376472],[24.16416,102.376099],[24.16374,102.3759],[24.163389,102.375603],[24.163139,102.375191],[24.162661,102.374092],[24.162411,102.373703],[24.162251,102.37352],[24.16185,102.373238],[24.161409,102.373077],[24.15999,102.37294],[24.15954,102.372833],[24.159321,102.372726],[24.158939,102.372467],[24.15859,102.372147],[24.158319,102.371773],[24.15811,102.37133],[24.15798,102.37085],[24.157841,102.369583],[24.15766,102.368828],[24.157379,102.368118],[24.15666,102.367088],[24.156179,102.366371],[24.155479,102.364662],[24.15521,102.364029],[24.154329,102.363487],[24.153721,102.363167],[24.152889,102.362442],[24.15229,102.361687],[24.15196,102.361397],[24.15155,102.361153],[24.15045,102.360817],[24.149799,102.360527],[24.149441,102.360222],[24.149151,102.35984],[24.14892,102.359413],[24.14876,102.358917],[24.148399,102.356651],[24.148041,102.355782],[24.14629,102.353394],[24.14595,102.35276],[24.145611,102.35183],[24.14521,102.350128],[24.145029,102.349693],[24.14465,102.349068],[24.14324,102.347618],[24.142731,102.346786],[24.1418,102.344177],[24.14126,102.343384],[24.140659,102.342873],[24.140129,102.342621],[24.13954,102.342499],[24.138929,102.342506],[24.136841,102.342957],[24.1362,102.343002],[24.135571,102.342903],[24.13516,102.342743],[24.132589,102.340973],[24.13216,102.340759],[24.131701,102.340622],[24.130989,102.340523],[24.127661,102.340523],[24.12628,102.340202],[24.124981,102.339577],[24.12085,102.33638],[24.117701,102.334648],[24.11706,102.334412],[24.11635,102.334328],[24.11565,102.334381],[24.114941,102.334572],[24.114281,102.334923],[24.113449,102.33548],[24.11302,102.335693],[24.11256,102.335808],[24.11208,102.335823],[24.11161,102.335716],[24.111179,102.335503],[24.10861,102.333557],[24.106741,102.33268],[24.10528,102.331383],[24.10442,102.330612],[24.102909,102.329628],[24.10244,102.329132],[24.102039,102.328522],[24.101669,102.327477],[24.101049,102.32486],[24.10013,102.319603],[24.09733,102.308762],[24.097191,102.307899],[24.096939,102.306992],[24.09639,102.305817],[24.09561,102.304764],[24.094851,102.304039],[24.093651,102.30307],[24.093321,102.302711],[24.09306,102.302307],[24.092791,102.301651],[24.092609,102.300667],[24.092541,102.29995],[24.092421,102.29953],[24.092239,102.299141],[24.091841,102.298592],[24.09063,102.297256],[24.0902,102.296577],[24.08963,102.295433],[24.08935,102.295059],[24.08901,102.294746],[24.0886,102.294563],[24.088381,102.29451],[24.087959,102.294518],[24.087219,102.29483],[24.08667,102.295097],[24.08625,102.295174],[24.08585,102.295242],[24.082951,102.296356],[24.082621,102.296516],[24.08209,102.296532],[24.0816,102.296417],[24.081181,102.296318],[24.08079,102.296112],[24.08042,102.295807],[24.08012,102.295441],[24.07991,102.295013],[24.07976,102.29454],[24.079679,102.294022],[24.0797,102.293243],[24.0802,102.290543],[24.08024,102.290009],[24.08013,102.28923],[24.079941,102.288757],[24.07933,102.287903],[24.077909,102.28611],[24.0777,102.285744],[24.0776,102.285332],[24.07761,102.284912],[24.077709,102.2845],[24.077909,102.284126],[24.078409,102.283669],[24.078991,102.283257],[24.079321,102.282921],[24.07955,102.282509],[24.07966,102.282051],[24.07967,102.281578],[24.07852,102.277153],[24.07806,102.276161],[24.075491,102.272011],[24.075199,102.271309],[24.0748,102.269821],[24.074591,102.269386],[24.074459,102.269173],[24.073931,102.2686],[24.07037,102.266113],[24.069981,102.265747],[24.06966,102.26532],[24.06941,102.264839],[24.069151,102.264069],[24.06813,102.258057],[24.067631,102.25647],[24.063391,102.248207],[24.063089,102.247742],[24.06238,102.246918],[24.06155,102.246246],[24.059299,102.244904],[24.057791,102.243858],[24.057039,102.243134],[24.05673,102.242722],[24.05632,102.242027],[24.05582,102.240761],[24.054319,102.236038],[24.05357,102.234596],[24.05155,102.231468],[24.050631,102.22953],[24.04875,102.224281],[24.048401,102.223633],[24.04619,102.221077],[24.04599,102.220711],[24.045799,102.220093],[24.045759,102.219177],[24.045759,102.21759],[24.045759,102.217461],[24.04575,102.214523],[24.04575,102.213913],[24.045691,102.207733],[24.045561,102.206467],[24.045349,102.205673],[24.04513,102.205132],[24.04483,102.204391],[24.044189,102.203178],[24.037531,102.195297],[24.036949,102.194763],[24.03628,102.194359],[24.031691,102.192528],[24.03071,102.192322],[24.029181,102.192192],[24.02747,102.192032],[24.026331,102.191757],[24.02446,102.191139],[24.023439,102.190964],[24.014271,102.191002],[24.01329,102.190872],[24.0121,102.190483],[24.0112,102.189987],[24.010401,102.189377],[24.00802,102.186996],[24.007721,102.186577],[24.00737,102.18586],[24.006901,102.18457],[24.00667,102.18409],[24.006371,102.183662],[24.005791,102.183144],[24.005569,102.182983],[24.00429,102.182053],[24.004009,102.181839],[24.00309,102.181152],[24.002621,102.180801],[23.999161,102.178482],[23.99815,102.178101],[23.997219,102.177979],[23.993441,102.17823],[23.991911,102.17807],[23.98851,102.17717],[23.987881,102.177116],[23.98723,102.17717],[23.986589,102.17733],[23.98562,102.177834],[23.98452,102.178513],[23.983761,102.178818],[23.982731,102.178993],[23.981871,102.178902],[23.98102,102.178642],[23.979971,102.178177],[23.979059,102.177948],[23.9765,102.177856],[23.975559,102.177658],[23.97468,102.177238],[23.974079,102.176819],[23.971951,102.174683],[23.97135,102.174232],[23.96685,102.171967],[23.96616,102.171738],[23.965191,102.171669],[23.96447,102.171761],[23.963039,102.172127],[23.962561,102.172188],[23.96209,102.172127],[23.96162,102.171944],[23.96122,102.171661],[23.958651,102.168922],[23.95356,102.16555],[23.953131,102.16507],[23.952921,102.164711],[23.952669,102.163879],[23.95248,102.162537],[23.952339,102.162109],[23.952101,102.161728],[23.95179,102.161423],[23.946501,102.158653],[23.94496,102.157494],[23.942419,102.154846],[23.9419,102.154488],[23.941311,102.154297],[23.94047,102.154228],[23.93947,102.154266],[23.939091,102.154243],[23.93854,102.154083],[23.937599,102.153488],[23.93655,102.152649],[23.935699,102.152184],[23.93387,102.15155],[23.933331,102.151237],[23.932699,102.150703],[23.932409,102.150391],[23.931231,102.148399],[23.93082,102.14798],[23.93018,102.147568],[23.929529,102.147186],[23.92911,102.146828],[23.92877,102.146393],[23.928169,102.145157],[23.92758,102.144363],[23.926809,102.14373],[23.92609,102.143349],[23.91666,102.14122],[23.914061,102.140831],[23.913349,102.140778],[23.908159,102.14093],[23.90766,102.140877],[23.897499,102.139458],[23.89678,102.139381],[23.896061,102.139252],[23.89463,102.13871],[23.89208,102.137512],[23.890499,102.136703],[23.88798,102.134712],[23.887449,102.134132],[23.88703,102.133453],[23.88681,102.132957],[23.886379,102.13176],[23.885281,102.129013],[23.877159,102.123848],[23.876949,102.123734],[23.87628,102.123627],[23.874849,102.12368],[23.874399,102.12365],[23.87398,102.123482],[23.87368,102.123154],[23.873461,102.12278],[23.872881,102.121277],[23.872459,102.120659],[23.87211,102.1203],[23.870911,102.119453],[23.87038,102.118896],[23.87023,102.118698],[23.86998,102.118233],[23.86936,102.116547],[23.86911,102.11615],[23.86895,102.115959],[23.868561,102.115646],[23.86725,102.114952],[23.865561,102.113297],[23.864361,102.11203],[23.86401,102.11145],[23.863859,102.110832],[23.86388,102.110413],[23.864111,102.10981],[23.864361,102.109459],[23.86471,102.109177],[23.86515,102.109001],[23.867279,102.108498],[23.86791,102.108231],[23.868099,102.108109],[23.868401,102.107727],[23.86895,102.106552],[23.869209,102.10611],[23.869551,102.105713],[23.869949,102.105431],[23.870399,102.105209],[23.87126,102.104851],[23.871599,102.104584],[23.871849,102.104279],[23.871929,102.104057],[23.87195,102.103851],[23.87188,102.103378],[23.87175,102.103012],[23.871481,102.102699],[23.871111,102.102448],[23.870911,102.102364],[23.870501,102.102333],[23.87026,102.102379],[23.86981,102.1026],[23.86916,102.102798],[23.86871,102.102829],[23.8685,102.102814],[23.867149,102.102249],[23.86648,102.10183],[23.865879,102.101303],[23.86536,102.100647],[23.86388,102.098213],[23.86368,102.09761],[23.863661,102.097412],[23.8638,102.096764],[23.864031,102.096359],[23.86445,102.095848],[23.864981,102.095001],[23.865299,102.094254],[23.865681,102.093201],[23.86581,102.092934],[23.866131,102.092484],[23.86668,102.091904],[23.867149,102.091263],[23.867399,102.090759],[23.86763,102.089981],[23.867781,102.088951],[23.86775,102.088509],[23.867701,102.088303],[23.867479,102.087929],[23.867149,102.087646],[23.8666,102.087448],[23.8664,102.087448],[23.86618,102.087509],[23.865761,102.087761],[23.86545,102.088081],[23.865259,102.088478],[23.865049,102.0896],[23.864811,102.090233],[23.864599,102.090599],[23.864059,102.091103],[23.861059,102.092583],[23.86046,102.092957],[23.860161,102.093208],[23.85955,102.094032],[23.85935,102.094452],[23.859079,102.09481],[23.85873,102.095154],[23.857849,102.095581],[23.85738,102.095703],[23.857161,102.095711],[23.85676,102.095901],[23.856409,102.096161],[23.85626,102.096313],[23.856159,102.096497],[23.85605,102.096626],[23.85606,102.0989],[23.85601,102.099152],[23.855801,102.099579],[23.855511,102.099983],[23.85516,102.100304],[23.85471,102.100906],[23.854309,102.101929],[23.854,102.102547],[23.853701,102.102913],[23.853161,102.10331],[23.852949,102.103401],[23.85203,102.10363],[23.85128,102.103683],[23.85055,102.1036],[23.84981,102.103409],[23.84853,102.10321],[23.84803,102.103027],[23.847799,102.102913],[23.847401,102.102577],[23.846701,102.101784],[23.84593,102.101196],[23.84486,102.100601],[23.84428,102.100159],[23.843531,102.099258],[23.84318,102.09893],[23.842779,102.098663],[23.841961,102.098312],[23.84136,102.097954],[23.841181,102.097809],[23.84103,102.097633],[23.8407,102.096977],[23.84058,102.096527],[23.8403,102.095161],[23.840151,102.094727],[23.84005,102.094551],[23.83938,102.093979],[23.839199,102.093857],[23.837481,102.093353],[23.83728,102.093262],[23.835831,102.092857],[23.835409,102.092659],[23.835011,102.092377],[23.834681,102.092049],[23.83445,102.091698],[23.834129,102.090881],[23.8332,102.088898],[23.83288,102.08831],[23.830799,102.084099],[23.83016,102.083054],[23.829861,102.08271],[23.82933,102.082359],[23.828329,102.081863],[23.822161,102.078331],[23.82205,102.078178],[23.82181,102.077698],[23.821199,102.076813],[23.82086,102.076462],[23.8188,102.074661],[23.818331,102.074333],[23.817829,102.074112],[23.817329,102.074013],[23.81706,102.074051],[23.81608,102.073959],[23.81583,102.073883],[23.815359,102.073601],[23.81246,102.070953],[23.811911,102.070358],[23.810949,102.069153],[23.810579,102.068832],[23.81036,102.06871],[23.809879,102.068527],[23.809629,102.068497],[23.80913,102.06855],[23.808661,102.068703],[23.80765,102.069527],[23.80718,102.069809],[23.806931,102.069908],[23.806431,102.069977],[23.805929,102.069809],[23.8057,102.069702],[23.805111,102.069206],[23.804449,102.068359],[23.804079,102.067978],[23.80345,102.067581],[23.80213,102.067047],[23.80155,102.066658],[23.801029,102.0662],[23.79903,102.064003],[23.798861,102.06385],[23.79821,102.063148],[23.797501,102.062531],[23.79648,102.061852],[23.795851,102.061501],[23.79565,102.061363],[23.79418,102.060448],[23.792999,102.059502],[23.791599,102.058357],[23.79055,102.057701],[23.78875,102.056847],[23.78598,102.056],[23.78591,102.055946],[23.785601,102.055771],[23.785271,102.05555],[23.78495,102.055313],[23.784639,102.055054],[23.78433,102.054779],[23.783991,102.054497],[23.78377,102.054321],[23.783541,102.054138],[23.7833,102.053963],[23.78306,102.05378],[23.78281,102.053612],[23.78229,102.053284],[23.782021,102.053123],[23.78175,102.052963],[23.781481,102.052818],[23.7812,102.052673],[23.780661,102.052353],[23.78039,102.052193],[23.780121,102.05204],[23.77984,102.05188],[23.77957,102.05172],[23.779301,102.051559],[23.77903,102.051399],[23.77877,102.051224],[23.778509,102.051064],[23.778259,102.05088],[23.778009,102.05069],[23.777769,102.050507],[23.77754,102.050323],[23.777309,102.050117],[23.777081,102.049919],[23.776859,102.049721],[23.77664,102.049507],[23.77643,102.049316],[23.77622,102.049118],[23.77602,102.04892],[23.77581,102.048721],[23.775511,102.048431],[23.7752,102.048141],[23.7749,102.047859],[23.77459,102.047569],[23.77438,102.047371],[23.774179,102.04718],[23.773979,102.046982],[23.77376,102.046783],[23.77355,102.046593],[23.77322,102.046303],[23.772989,102.046112],[23.77276,102.045937],[23.77252,102.045761],[23.77227,102.045593],[23.77202,102.045433],[23.77178,102.045273],[23.771521,102.04512],[23.771271,102.044983],[23.771021,102.04483],[23.770769,102.044693],[23.77051,102.04454],[23.77026,102.044403],[23.77002,102.044243],[23.76977,102.044098],[23.76952,102.043953],[23.76927,102.043793],[23.76902,102.043663],[23.76878,102.04351],[23.76853,102.043373],[23.76829,102.043221],[23.76804,102.043083],[23.767799,102.042938],[23.76755,102.042801],[23.767309,102.042664],[23.767071,102.042503],[23.76683,102.042351],[23.7666,102.042198],[23.766371,102.042038],[23.766041,102.041786],[23.76582,102.041618],[23.76549,102.041344],[23.76528,102.041161],[23.76507,102.04097],[23.76486,102.040771],[23.76465,102.040573],[23.764441,102.040367],[23.764231,102.040161],[23.76403,102.039963],[23.763821,102.039757],[23.76362,102.039551],[23.76321,102.039162],[23.76289,102.038918],[23.76255,102.038696],[23.762199,102.038513],[23.76182,102.038368],[23.761419,102.038277],[23.761141,102.038239],[23.76086,102.038223],[23.760571,102.038193],[23.760269,102.038147],[23.759979,102.038116],[23.759689,102.038078],[23.757641,102.03775],[23.757311,102.037598],[23.756981,102.03743],[23.756651,102.037262],[23.756321,102.037079],[23.755989,102.036888],[23.755011,102.036324],[23.754681,102.036102],[23.75433,102.035889],[23.753969,102.03569],[23.753599,102.035492],[23.753241,102.035309],[23.752871,102.035103],[23.75251,102.034882],[23.75218,102.034607],[23.7519,102.034271],[23.751671,102.033897],[23.751459,102.033508],[23.75127,102.033119],[23.75107,102.032738],[23.750851,102.032372],[23.750629,102.032013],[23.75038,102.031677],[23.75012,102.031349],[23.749861,102.031029],[23.74958,102.030724],[23.7493,102.030403],[23.74902,102.030083],[23.748791,102.029701],[23.74864,102.029289],[23.748581,102.028877],[23.748619,102.028458],[23.74872,102.028053],[23.74893,102.027687],[23.74921,102.02739],[23.74954,102.027168],[23.749901,102.027031],[23.750259,102.026939],[23.750629,102.026894],[23.750999,102.026817],[23.75135,102.026718],[23.751659,102.026527],[23.751909,102.026268],[23.75206,102.025917],[23.752131,102.025558],[23.752119,102.025169],[23.75209,102.024773],[23.75205,102.024353],[23.752041,102.023933],[23.752081,102.023499],[23.75218,102.023071],[23.7523,102.022659],[23.752541,102.021828],[23.75256,102.021408],[23.752501,102.021004],[23.75231,102.020653],[23.75205,102.020363],[23.75172,102.02021],[23.751369,102.020126],[23.75102,102.020172],[23.750681,102.020287],[23.75042,102.020561],[23.75021,102.020889],[23.75001,102.02124],[23.74964,102.021957],[23.749451,102.022324],[23.74926,102.022667],[23.749041,102.023003],[23.748739,102.023247],[23.748409,102.02343],[23.74807,102.023537],[23.747721,102.023613],[23.74737,102.023666],[23.74703,102.023781],[23.746719,102.023956],[23.74645,102.024193],[23.74621,102.024467],[23.745991,102.024773],[23.74575,102.02507],[23.74552,102.02536],[23.74523,102.025597],[23.74489,102.025787],[23.74453,102.025871],[23.744169,102.02581],[23.74382,102.025681],[23.74349,102.02549],[23.743179,102.025299],[23.74287,102.025101],[23.742559,102.024902],[23.74225,102.024696],[23.74193,102.024513],[23.74161,102.024307],[23.741289,102.024109],[23.74095,102.023911],[23.740601,102.02372],[23.740259,102.023529],[23.73991,102.023338],[23.739571,102.023163],[23.739229,102.022987],[23.738899,102.022812],[23.73856,102.022629],[23.738239,102.022461],[23.737909,102.022293],[23.737579,102.022118],[23.737261,102.021942],[23.736931,102.021767],[23.736589,102.021599],[23.73625,102.021431],[23.73591,102.021248],[23.735571,102.021057],[23.735241,102.020844],[23.73493,102.020592],[23.734631,102.020317],[23.73436,102.020027],[23.734131,102.019699],[23.73391,102.019363],[23.733709,102.019028],[23.73349,102.0187],[23.733231,102.018402],[23.73295,102.01815],[23.73263,102.01799],[23.732281,102.017921],[23.73192,102.01796],[23.731581,102.018059],[23.73127,102.018257],[23.73101,102.018532],[23.73082,102.01886],[23.730709,102.019241],[23.730671,102.019638],[23.73073,102.020042],[23.73086,102.020432],[23.731039,102.020798],[23.73127,102.021141],[23.731501,102.021477],[23.73172,102.021843],[23.731939,102.022202],[23.73214,102.02256],[23.73234,102.022926],[23.73254,102.023277],[23.732731,102.023651],[23.732901,102.024033],[23.73307,102.024406],[23.733231,102.024803],[23.733379,102.0252],[23.73353,102.025597],[23.733681,102.026009],[23.73382,102.026413],[23.733959,102.02681],[23.73411,102.027206],[23.734249,102.027611],[23.73439,102.028023],[23.734541,102.028419],[23.734699,102.028816],[23.73485,102.029213],[23.735001,102.02961],[23.73514,102.030022],[23.735229,102.030441],[23.73527,102.030884],[23.73526,102.031319],[23.73522,102.031761],[23.73513,102.032173],[23.734989,102.03257],[23.7348,102.032944],[23.734591,102.033287],[23.734341,102.033592],[23.734051,102.033867],[23.733749,102.034103],[23.733419,102.034286],[23.73308,102.034439],[23.732719,102.034561],[23.732349,102.034653],[23.731979,102.034683],[23.7316,102.034668],[23.731199,102.034607],[23.730789,102.034538],[23.73037,102.034447],[23.729919,102.03437],[23.729469,102.034286],[23.72901,102.034233],[23.728559,102.03418],[23.728109,102.034126],[23.727659,102.034103],[23.7272,102.03405],[23.726749,102.033997],[23.726311,102.033928],[23.72587,102.033821],[23.725451,102.033691],[23.725031,102.033539],[23.724621,102.033371],[23.724211,102.033188],[23.723789,102.03302],[23.723351,102.032913],[23.7229,102.032883],[23.72246,102.032944],[23.72204,102.033089],[23.721649,102.03331],[23.721291,102.033546],[23.72093,102.033798],[23.72056,102.034027],[23.7202,102.034264],[23.71983,102.034462],[23.71946,102.034668],[23.71908,102.034866],[23.71871,102.035072],[23.71833,102.035263],[23.717951,102.035461],[23.71756,102.035637],[23.717171,102.035828],[23.716789,102.036011],[23.716419,102.036209],[23.71603,102.036308],[23.71563,102.036346],[23.71525,102.036301],[23.714899,102.036148],[23.714581,102.035927],[23.714291,102.035683],[23.71402,102.035408],[23.71372,102.035156],[23.713409,102.03492],[23.713079,102.034714],[23.712721,102.034538],[23.71236,102.034393],[23.711981,102.034264],[23.711599,102.034103],[23.711229,102.033951],[23.710871,102.033783],[23.71052,102.033577],[23.71019,102.033363],[23.709869,102.033119],[23.70957,102.032867],[23.709261,102.032623],[23.708941,102.032402],[23.708611,102.032211],[23.70826,102.032066],[23.707911,102.03196],[23.70755,102.031891],[23.70718,102.031853],[23.70681,102.031837],[23.70644,102.031822],[23.70606,102.031792],[23.7057,102.031723],[23.705351,102.031593],[23.705009,102.031433],[23.704691,102.031227],[23.704399,102.030983],[23.704121,102.030693],[23.703871,102.03038],[23.70363,102.030052],[23.703381,102.029716],[23.703119,102.029404],[23.70257,102.028763],[23.70228,102.02845],[23.701969,102.028137],[23.70167,102.027847],[23.701361,102.02755],[23.70105,102.02726],[23.700741,102.026993],[23.70059,102.026863],[23.70014,102.026466],[23.699841,102.02623],[23.699539,102.025978],[23.699261,102.025703],[23.698999,102.025414],[23.698771,102.025078],[23.69857,102.024727],[23.698389,102.024361],[23.69825,102.023987],[23.698139,102.023598],[23.698071,102.023209],[23.698021,102.022812],[23.698009,102.022423],[23.698021,102.022034],[23.698021,102.021652],[23.69804,102.021271],[23.69805,102.020889],[23.698059,102.020493],[23.698071,102.020103],[23.69809,102.019676],[23.698099,102.019257],[23.698099,102.018837],[23.698099,102.018417],[23.69808,102.017982],[23.69805,102.017548],[23.698009,102.017113],[23.69796,102.01667],[23.697889,102.016228],[23.697809,102.015793],[23.697729,102.01535],[23.69763,102.014923],[23.697531,102.014503],[23.69742,102.014076],[23.697321,102.01368],[23.69721,102.013283],[23.697109,102.012894],[23.69701,102.012489],[23.696911,102.012093],[23.6968,102.011703],[23.696699,102.011307],[23.69659,102.01091],[23.696489,102.010513],[23.69639,102.010117],[23.696289,102.009727],[23.69619,102.009331],[23.696079,102.008942],[23.69598,102.008537],[23.695869,102.008148],[23.69577,102.007751],[23.695669,102.007362],[23.69557,102.006973],[23.695471,102.006577],[23.69537,102.006203],[23.695271,102.005829],[23.695169,102.005463],[23.69507,102.005089],[23.694969,102.004723],[23.69488,102.004356],[23.69478,102.00399],[23.694679,102.003616],[23.69458,102.003242],[23.694481,102.002869],[23.694389,102.002487],[23.69429,102.002121],[23.694189,102.001747],[23.69409,102.001373],[23.693991,102.000999],[23.693899,102.000633],[23.6938,102.000259],[23.693701,101.999893],[23.693609,101.999542],[23.69352,101.999191],[23.693411,101.998848],[23.693279,101.998497],[23.69315,101.998154],[23.69301,101.997803],[23.692869,101.997437],[23.692711,101.99707],[23.692539,101.996696],[23.692381,101.996323],[23.6922,101.995949],[23.692011,101.995567],[23.69183,101.995193],[23.691641,101.994797],[23.691441,101.994423],[23.69125,101.994034],[23.69105,101.993637],[23.690861,101.993248],[23.69066,101.992859],[23.69047,101.992462],[23.690281,101.992073],[23.6901,101.991653],[23.689939,101.991241],[23.689791,101.990822],[23.68964,101.990387],[23.689501,101.989967],[23.689369,101.989563],[23.689251,101.989128],[23.68915,101.988708],[23.689051,101.988281],[23.688971,101.987862],[23.68889,101.987442],[23.68882,101.987022],[23.688761,101.986603],[23.688721,101.986183],[23.688681,101.985764],[23.68865,101.985352],[23.688629,101.98494],[23.68861,101.984528],[23.688589,101.984123],[23.68858,101.983711],[23.68856,101.983307],[23.688551,101.98291],[23.68852,101.982513],[23.68849,101.982101],[23.68845,101.981697],[23.688391,101.981293],[23.688311,101.980888],[23.688219,101.980492],[23.68811,101.980087],[23.68799,101.979691],[23.687851,101.979301],[23.687691,101.978912],[23.687531,101.978523],[23.68737,101.978127],[23.68722,101.977753],[23.687059,101.977364],[23.686899,101.976967],[23.686741,101.976593],[23.68659,101.976212],[23.68643,101.97583],[23.686279,101.975456],[23.686131,101.975098],[23.685961,101.974747],[23.68578,101.974442],[23.685579,101.974136],[23.68536,101.973877],[23.68512,101.973633],[23.684879,101.973412],[23.684629,101.973221],[23.68438,101.973053],[23.684151,101.9729],[23.68383,101.972603],[23.683571,101.972458],[23.68306,101.972168],[23.682819,101.971977],[23.682501,101.971779],[23.682249,101.971626],[23.681971,101.971443],[23.681641,101.971237],[23.681391,101.971077],[23.68115,101.970932],[23.680889,101.970779],[23.68063,101.970627],[23.680349,101.970459],[23.680071,101.970284],[23.679779,101.970108],[23.679489,101.969933],[23.67918,101.969757],[23.678881,101.969597],[23.67857,101.969452],[23.678261,101.96933],[23.67794,101.969223],[23.67762,101.969131],[23.677299,101.969063],[23.67697,101.969009],[23.67663,101.968971],[23.676291,101.968933],[23.675949,101.968887],[23.6756,101.968826],[23.67527,101.968727],[23.67462,101.968483],[23.67432,101.968277],[23.67403,101.968079],[23.67374,101.967857],[23.67345,101.967644],[23.673161,101.96743],[23.672859,101.967239],[23.67255,101.967056],[23.672239,101.966927],[23.67193,101.96682],[23.671619,101.966743],[23.67131,101.966667],[23.671021,101.966621],[23.67075,101.966614],[23.670349,101.966614],[23.66995,101.966637],[23.66091,101.97168],[23.660431,101.971909],[23.66013,101.972076],[23.659809,101.972214],[23.659479,101.972313],[23.65914,101.972366],[23.658791,101.972412],[23.658449,101.97242],[23.65773,101.972427],[23.65737,101.97242],[23.657,101.972412],[23.65662,101.972397],[23.65624,101.972389],[23.655849,101.972366],[23.65547,101.972298],[23.6551,101.97216],[23.654751,101.97197],[23.65443,101.971764],[23.65411,101.971542],[23.65379,101.971336],[23.65346,101.971184],[23.65312,101.971046],[23.652769,101.970978],[23.652399,101.970947],[23.65204,101.970963],[23.651661,101.970993],[23.65127,101.971024],[23.650909,101.971001],[23.65053,101.970917],[23.650181,101.970757],[23.649851,101.970558],[23.649561,101.970299],[23.649281,101.970032],[23.64901,101.969772],[23.64875,101.969513],[23.648491,101.969261],[23.64823,101.969002],[23.64797,101.96875],[23.647699,101.968491],[23.64743,101.968231],[23.64716,101.967957],[23.646891,101.967682],[23.646641,101.967377],[23.64642,101.967056],[23.64624,101.966698],[23.646099,101.966316],[23.645969,101.965927],[23.64583,101.965553],[23.6457,101.965149],[23.645559,101.964767],[23.645399,101.964409],[23.64522,101.964088],[23.644991,101.963814],[23.644739,101.963562],[23.64447,101.963341],[23.643101,101.962318],[23.64275,101.96209],[23.64241,101.961853],[23.642071,101.961632],[23.641741,101.961411],[23.641399,101.961182],[23.641069,101.96096],[23.640751,101.960716],[23.64043,101.96048],[23.640141,101.96022],[23.63987,101.959953],[23.63962,101.959686],[23.638901,101.958862],[23.63866,101.958588],[23.638479,101.958397],[23.63728,101.957024],[23.63489,101.954277],[23.63361,101.952621],[23.633329,101.951576],[23.63299,101.948517],[23.632059,101.946426],[23.63175,101.945503],[23.632021,101.944267],[23.63216,101.943573],[23.632389,101.942902],[23.63249,101.942574],[23.632521,101.942223],[23.632259,101.93898],[23.632299,101.938667],[23.632351,101.938339],[23.63238,101.938011],[23.632401,101.937683],[23.632401,101.937332],[23.63241,101.936653],[23.632389,101.936287],[23.63237,101.935944],[23.632351,101.935593],[23.632339,101.935226],[23.63236,101.934883],[23.63245,101.934517],[23.632561,101.934174],[23.63269,101.93383],[23.63283,101.933472],[23.63298,101.933113],[23.633129,101.932747],[23.633289,101.932404],[23.633591,101.931664],[23.63368,101.931267],[23.633711,101.930862],[23.63368,101.930473],[23.633631,101.930069],[23.63357,101.929688],[23.633459,101.929329],[23.633369,101.92897],[23.63332,101.928612],[23.63331,101.928253],[23.633329,101.927528],[23.63336,101.927162],[23.633511,101.926819],[23.633711,101.926514],[23.63435,101.925613],[23.635139,101.924377],[23.635309,101.923653],[23.63538,101.923286],[23.635441,101.92292],[23.6355,101.922546],[23.635559,101.922188],[23.63562,101.921806],[23.635691,101.921448],[23.635771,101.921082],[23.635851,101.920723],[23.63595,101.920349],[23.636061,101.919983],[23.636169,101.919609],[23.63629,101.919243],[23.63641,101.918869],[23.63653,101.918503],[23.636641,101.918121],[23.636761,101.917747],[23.636869,101.917374],[23.63698,101.917],[23.63711,101.916634],[23.637251,101.916267],[23.637409,101.915909],[23.637581,101.915573],[23.637791,101.915253],[23.63802,101.914963],[23.63826,101.914673],[23.638519,101.914398],[23.638809,101.914162],[23.63909,101.913933],[23.639971,101.913269],[23.640249,101.913033],[23.640499,101.912773],[23.640751,101.912514],[23.64097,101.912216],[23.641159,101.911926],[23.641331,101.911613],[23.64147,101.911301],[23.641581,101.91098],[23.64167,101.91066],[23.641729,101.910339],[23.641781,101.910027],[23.64183,101.909714],[23.64188,101.909401],[23.64193,101.909103],[23.641979,101.908813],[23.64201,101.908386],[23.642031,101.90799],[23.64205,101.9076],[23.642071,101.907204],[23.64213,101.906799],[23.642191,101.906387],[23.64225,101.905983],[23.6423,101.905571],[23.64238,101.905151],[23.642521,101.904739],[23.642651,101.904472],[23.642799,101.904221],[23.642969,101.903976],[23.64316,101.903763],[23.64337,101.903542],[23.643591,101.903343],[23.64382,101.903152],[23.644039,101.902946],[23.64427,101.90274],[23.64447,101.902519],[23.644661,101.902283],[23.644831,101.902023],[23.645029,101.901604],[23.64513,101.901299],[23.64521,101.900993],[23.645281,101.900658],[23.64535,101.900337],[23.64542,101.900009],[23.6455,101.899681],[23.645611,101.899353],[23.645729,101.89904],[23.64588,101.898743],[23.646061,101.898438],[23.646259,101.898163],[23.646469,101.897881],[23.646681,101.897598],[23.646891,101.897301],[23.647091,101.897003],[23.647261,101.896683],[23.647421,101.896362],[23.647539,101.896019],[23.64765,101.895683],[23.64773,101.895317],[23.647791,101.894958],[23.647829,101.894592],[23.647881,101.894234],[23.647921,101.893852],[23.647961,101.893494],[23.64802,101.89312],[23.6481,101.892761],[23.648199,101.892403],[23.648319,101.892067],[23.648451,101.891739],[23.6486,101.891434],[23.64876,101.891121],[23.64893,101.890831],[23.64909,101.890533],[23.64922,101.890244],[23.649361,101.889954],[23.64949,101.889671],[23.649639,101.889397],[23.649771,101.889122],[23.64991,101.888847],[23.650049,101.888573],[23.65019,101.888298],[23.65033,101.888023],[23.650471,101.887733],[23.65062,101.887428],[23.65077,101.887123],[23.650921,101.88681],[23.65107,101.886497],[23.65123,101.886177],[23.65139,101.885849],[23.65156,101.885521],[23.65172,101.885178],[23.65189,101.884842],[23.65204,101.884499],[23.65221,101.884163],[23.65237,101.88382],[23.65254,101.883492],[23.6527,101.883179],[23.652849,101.882874],[23.653009,101.882584],[23.653151,101.882294],[23.653299,101.882019],[23.653521,101.88163],[23.65366,101.881378],[23.653799,101.881149],[23.6539,101.880768],[23.6546,101.878288],[23.65497,101.877052],[23.65519,101.876587],[23.65564,101.875954],[23.657261,101.874313],[23.657681,101.873672],[23.657881,101.873199],[23.65803,101.8722],[23.658001,101.868111],[23.65777,101.867126],[23.657431,101.866409],[23.656799,101.865631],[23.65568,101.864571],[23.65534,101.864098],[23.655069,101.863403],[23.654449,101.860573],[23.653891,101.859253],[23.65309,101.857887],[23.652849,101.857109],[23.6527,101.855202],[23.652519,101.854607],[23.652201,101.854088],[23.65103,101.852982],[23.650789,101.852661],[23.650499,101.851913],[23.65053,101.851082],[23.650631,101.85022],[23.6506,101.849571],[23.650471,101.849152],[23.650129,101.848633],[23.649679,101.848213],[23.647881,101.847023],[23.64748,101.846626],[23.647169,101.846169],[23.64691,101.845627],[23.64591,101.842331],[23.64588,101.841537],[23.646021,101.840973],[23.646509,101.839737],[23.64658,101.839371],[23.646561,101.838982],[23.646391,101.838463],[23.6462,101.838158],[23.645679,101.837677],[23.644739,101.836983],[23.64422,101.836113],[23.643431,101.833298],[23.643379,101.832687],[23.643419,101.832283],[23.643539,101.831909],[23.64373,101.831596],[23.64398,101.831306],[23.644661,101.830681],[23.645029,101.830032],[23.64509,101.829674],[23.645069,101.829277],[23.644979,101.828918],[23.64468,101.82843],[23.64443,101.828194],[23.64377,101.827888],[23.64187,101.827499],[23.641439,101.827347],[23.641121,101.827271],[23.64064,101.827003],[23.64023,101.82666],[23.6397,101.825867],[23.638741,101.824013],[23.63851,101.823723],[23.63822,101.823479],[23.63772,101.823273],[23.634621,101.822853],[23.63373,101.822456],[23.633289,101.822166],[23.63265,101.821503],[23.632271,101.820862],[23.63167,101.819717],[23.631189,101.819206],[23.630751,101.818939],[23.63028,101.818771],[23.629459,101.818718],[23.628241,101.818901],[23.627939,101.818893],[23.62748,101.818764],[23.62705,101.818542],[23.626699,101.818192],[23.62628,101.817398],[23.625401,101.815086],[23.625311,101.814537],[23.62536,101.813812],[23.62553,101.813271],[23.62578,101.812782],[23.627951,101.810028],[23.628139,101.809547],[23.628189,101.809029],[23.62818,101.808868],[23.627979,101.808357],[23.627661,101.807938],[23.627119,101.807632],[23.62405,101.80632],[23.625191,101.808884],[23.62512,101.809036],[23.625,101.80941],[23.624729,101.809753],[23.624331,101.8106],[23.623581,101.811707],[23.623159,101.811996],[23.622641,101.812172],[23.62188,101.81218],[23.619591,101.811241],[23.618839,101.811234],[23.61693,101.811867],[23.616489,101.81189],[23.616039,101.811752],[23.61566,101.81147],[23.615379,101.811073],[23.615351,101.810913],[23.615259,101.810677],[23.61528,101.810501],[23.61525,101.810333],[23.6154,101.809113],[23.61533,101.808052],[23.615101,101.807381],[23.61482,101.806931],[23.61384,101.805931],[23.61338,101.804947],[23.612089,101.804108],[23.606489,101.800911],[23.60602,101.800377],[23.605721,101.79985],[23.60515,101.798477],[23.60471,101.798012],[23.603531,101.797302],[23.602871,101.79673],[23.601749,101.795517],[23.601049,101.794998],[23.600031,101.794533],[23.59981,101.794533],[23.597759,101.793373],[23.59746,101.793297],[23.59713,101.79306],[23.596479,101.792343],[23.59548,101.790649],[23.59395,101.787376],[23.593281,101.787666],[23.593069,101.787567],[23.59271,101.787483],[23.59218,101.787453],[23.591379,101.787331],[23.591049,101.787209],[23.59067,101.786911],[23.588079,101.784103],[23.58736,101.783546],[23.583599,101.781487],[23.58288,101.780853],[23.58206,101.779671],[23.581341,101.77845],[23.579889,101.77681],[23.57777,101.773178],[23.57704,101.772392],[23.57626,101.771942],[23.574301,101.771294],[23.57362,101.770897],[23.569811,101.767776],[23.568859,101.767281],[23.56444,101.765839],[23.563801,101.765472],[23.56325,101.764969],[23.56292,101.764526],[23.56076,101.761436],[23.56049,101.761147],[23.560011,101.760841],[23.559481,101.760651],[23.55802,101.760628],[23.557501,101.760529],[23.55702,101.760277],[23.556749,101.760063],[23.556431,101.759598],[23.55628,101.759247],[23.55587,101.756828],[23.555571,101.756027],[23.55514,101.75531],[23.554581,101.754723],[23.55154,101.752617],[23.55105,101.752113],[23.55064,101.751312],[23.549629,101.747353],[23.5494,101.746819],[23.54907,101.746384],[23.54847,101.745941],[23.547041,101.74514],[23.54565,101.743851],[23.540291,101.738487],[23.52383,101.719322],[23.52364,101.719063],[23.523529,101.718758],[23.523479,101.718697],[23.52347,101.718613],[23.523279,101.718323],[23.522591,101.716637],[23.521999,101.715767],[23.52058,101.714523],[23.52,101.713913],[23.519779,101.713562],[23.51964,101.71315],[23.5196,101.712479],[23.519739,101.711777],[23.521111,101.707848],[23.52124,101.70697],[23.521231,101.706749],[23.52112,101.706306],[23.520889,101.705887],[23.52058,101.705521],[23.520399,101.70536],[23.51824,101.70433],[23.51787,101.704071],[23.51755,101.703743],[23.51734,101.703331],[23.51722,101.702873],[23.51722,101.7024],[23.517321,101.701958],[23.518999,101.698547],[23.51775,101.698097],[23.51767,101.6978],[23.517309,101.697159],[23.51687,101.69648],[23.516701,101.695976],[23.516529,101.69442],[23.51643,101.693939],[23.516211,101.693497],[23.515921,101.693123],[23.515539,101.692818],[23.515129,101.692596],[23.51243,101.691757],[23.51194,101.691704],[23.51141,101.691719],[23.51091,101.691818],[23.50996,101.692207],[23.507971,101.693314],[23.507601,101.693588],[23.50729,101.693932],[23.507059,101.694366],[23.50691,101.694847],[23.506861,101.695351],[23.507,101.696098],[23.50742,101.697243],[23.5075,101.697701],[23.507481,101.698158],[23.507339,101.698608],[23.507099,101.699013],[23.506781,101.699333],[23.506161,101.699654],[23.50526,101.700027],[23.504829,101.700287],[23.504471,101.700638],[23.50415,101.701057],[23.503901,101.701538],[23.503441,101.703049],[23.503309,101.703537],[23.50313,101.703979],[23.50301,101.704163],[23.50268,101.704491],[23.502291,101.70472],[23.501909,101.704857],[23.501499,101.704849],[23.50091,101.704697],[23.50058,101.704491],[23.500111,101.704033],[23.49843,101.701653],[23.498051,101.700943],[23.49762,101.699638],[23.497089,101.697792],[23.49687,101.697281],[23.496441,101.696579],[23.49609,101.696167],[23.493389,101.694],[23.492741,101.693573],[23.49201,101.69326],[23.491501,101.693169],[23.49099,101.693161],[23.49048,101.693253],[23.49,101.69342],[23.482491,101.698227],[23.481791,101.698517],[23.481319,101.698624],[23.47983,101.698692],[23.47933,101.698769],[23.478849,101.698921],[23.47797,101.699402],[23.476339,101.700623],[23.47547,101.701134],[23.474991,101.701286],[23.47427,101.701363],[23.473539,101.701248],[23.47261,101.70092],[23.471729,101.700432],[23.470921,101.699806],[23.4702,101.699051],[23.469601,101.698143],[23.467279,101.693512],[23.4664,101.692177],[23.46524,101.690804],[23.46394,101.689568],[23.462299,101.688393],[23.45648,101.68544],[23.45483,101.684227],[23.451571,101.679291],[23.45013,101.677612],[23.44994,101.67746],[23.449751,101.677254],[23.44949,101.677063],[23.44916,101.676651],[23.44833,101.676033],[23.44721,101.675468],[23.446461,101.675232],[23.445459,101.675049],[23.444201,101.675041],[23.44323,101.675217],[23.43902,101.67688],[23.43664,101.677452],[23.432159,101.677811],[23.43161,101.677773],[23.431431,101.677727],[23.431009,101.677711],[23.43075,101.677757],[23.430719,101.677887],[23.43041,101.678017],[23.42782,101.678543],[23.42403,101.680153],[23.423691,101.680183],[23.42275,101.680458],[23.422331,101.68055],[23.42065,101.680603],[23.41925,101.680367],[23.41754,101.679703],[23.416361,101.679008],[23.41523,101.678017],[23.41408,101.67662],[23.409769,101.67025],[23.409281,101.66922],[23.408991,101.667892],[23.408939,101.666992],[23.40909,101.665619],[23.409439,101.664513],[23.410669,101.661987],[23.4111,101.660606],[23.41157,101.658386],[23.4119,101.657417],[23.41876,101.645554],[23.422489,101.637756],[23.4282,101.62957],[23.42873,101.628517],[23.429131,101.626556],[23.42959,101.622337],[23.42943,101.621048],[23.42898,101.619904],[23.42824,101.618896],[23.427191,101.618149],[23.42573,101.617706],[23.424709,101.617783],[23.42399,101.617973],[23.421801,101.619003],[23.42082,101.619186],[23.41987,101.61908],[23.4189,101.618713],[23.418091,101.617973],[23.417589,101.617203],[23.417191,101.615929],[23.41724,101.6147],[23.41798,101.611702],[23.41794,101.610687],[23.417459,101.60936],[23.417101,101.608871],[23.416019,101.608063],[23.41116,101.606781],[23.410561,101.606598],[23.409781,101.606407],[23.408819,101.605873],[23.40723,101.604347],[23.40661,101.603989],[23.40645,101.603943],[23.40589,101.603752],[23.40432,101.603638],[23.403259,101.603188],[23.40159,101.602028],[23.393909,101.58802],[23.392799,101.586533],[23.392191,101.585709],[23.391319,101.584778],[23.390221,101.583527],[23.38945,101.582977],[23.38868,101.582642],[23.383381,101.580978],[23.382919,101.580917],[23.376631,101.581413],[23.37141,101.58181],[23.370029,101.581902],[23.365709,101.581863],[23.364161,101.581528],[23.36342,101.580582],[23.36319,101.579971],[23.363119,101.57975],[23.36302,101.578888],[23.363171,101.577911],[23.36417,101.574783],[23.36421,101.57399],[23.36409,101.572906],[23.36302,101.568893],[23.362671,101.566399],[23.36252,101.565987],[23.36227,101.565643],[23.36195,101.565338],[23.360991,101.564751],[23.36055,101.564323],[23.36034,101.563942],[23.36025,101.563507],[23.360241,101.563011],[23.36146,101.555557],[23.361481,101.555077],[23.36145,101.554817],[23.3613,101.554359],[23.361059,101.553932],[23.35988,101.552742],[23.359739,101.552559],[23.359541,101.552139],[23.35944,101.551666],[23.359461,101.551193],[23.3596,101.550743],[23.35985,101.550331],[23.360359,101.549797],[23.3624,101.548019],[23.36273,101.547653],[23.363001,101.547234],[23.363171,101.546722],[23.36323,101.546188],[23.363171,101.545624],[23.362129,101.542778],[23.36191,101.542297],[23.361429,101.541649],[23.36083,101.54113],[23.356621,101.539139],[23.355459,101.538544],[23.35391,101.537888],[23.353291,101.53775],[23.35309,101.53775],[23.35268,101.537857],[23.35231,101.538101],[23.352011,101.538452],[23.35129,101.539688],[23.351,101.539993],[23.35067,101.540222],[23.350281,101.540352],[23.349859,101.540367],[23.349211,101.54026],[23.34816,101.539841],[23.347811,101.539619],[23.34753,101.53933],[23.34734,101.538963],[23.34724,101.538513],[23.347269,101.537819],[23.347429,101.53669],[23.34742,101.536232],[23.347321,101.535797],[23.346979,101.535103],[23.346121,101.533829],[23.34573,101.533813],[23.344851,101.533127],[23.344709,101.532967],[23.34454,101.532593],[23.344469,101.532181],[23.344481,101.531754],[23.344749,101.531113],[23.345341,101.530067],[23.34547,101.52964],[23.34549,101.529419],[23.34544,101.528961],[23.345369,101.528732],[23.34515,101.528313],[23.344681,101.527786],[23.343719,101.526917],[23.34347,101.526573],[23.343281,101.526154],[23.34318,101.525703],[23.34318,101.525223],[23.343321,101.52449],[23.343639,101.523193],[23.34362,101.522339],[23.34285,101.519333],[23.34116,101.5177],[23.34013,101.517014],[23.33942,101.516563],[23.33905,101.51619],[23.335939,101.511429],[23.335501,101.510902],[23.335039,101.510536],[23.333469,101.510399],[23.3328,101.510399],[23.332359,101.510406],[23.331421,101.510529],[23.33069,101.510742],[23.33045,101.510841],[23.32917,101.511803],[23.32873,101.512032],[23.328251,101.512169],[23.327749,101.51223],[23.327009,101.512154],[23.323721,101.511398],[23.32324,101.511223],[23.322809,101.510941],[23.322451,101.510597],[23.322161,101.510147],[23.320351,101.505699],[23.32012,101.505348],[23.319851,101.505074],[23.316191,101.503098],[23.316031,101.50293],[23.315781,101.502434],[23.315651,101.501892],[23.315639,101.501511],[23.31591,101.500183],[23.31591,101.499603],[23.31584,101.499207],[23.31547,101.498512],[23.31509,101.4981],[23.313749,101.497139],[23.313049,101.4963],[23.311449,101.493736],[23.310949,101.49324],[23.310511,101.49295],[23.309811,101.492706],[23.309259,101.49263],[23.308701,101.492653],[23.30798,101.492867],[23.307329,101.493263],[23.30624,101.494263],[23.30578,101.494499],[23.30526,101.494598],[23.30475,101.494522],[23.30443,101.494408],[23.304001,101.494133],[23.30332,101.493523],[23.302679,101.493134],[23.302151,101.492973],[23.300329,101.492828],[23.29982,101.492691],[23.29936,101.492416],[23.29896,101.492058],[23.298651,101.49157],[23.29851,101.491203],[23.29841,101.490593],[23.298441,101.489937],[23.29887,101.488731],[23.29994,101.486298],[23.30003,101.485863],[23.300039,101.485397],[23.299959,101.484947],[23.29982,101.484512],[23.29916,101.483093],[23.29899,101.48246],[23.298941,101.479362],[23.29888,101.478943],[23.29845,101.477783],[23.29397,101.471352],[23.293539,101.470367],[23.293381,101.469688],[23.29336,101.469353],[23.293779,101.464844],[23.2936,101.460899],[23.29335,101.459717],[23.29188,101.454727],[23.29196,101.453789],[23.292139,101.453323],[23.29254,101.452782],[23.293091,101.452377],[23.29735,101.450317],[23.29784,101.450218],[23.298019,101.450157],[23.29837,101.45005],[23.300659,101.448982],[23.301109,101.448647],[23.301611,101.448097],[23.30344,101.445053],[23.303631,101.44455],[23.30373,101.44381],[23.303711,101.443443],[23.302691,101.440353],[23.30262,101.439346],[23.303419,101.434143],[23.30341,101.433594],[23.30246,101.428864],[23.30212,101.426933],[23.30205,101.425301],[23.30209,101.423752],[23.30225,101.423042],[23.302509,101.422371],[23.30275,101.421272],[23.30324,101.419991],[23.30357,101.418121],[23.304411,101.41581],[23.30448,101.414879],[23.3043,101.414093],[23.303921,101.412971],[23.30341,101.411713],[23.303289,101.411186],[23.302959,101.410378],[23.302151,101.407608],[23.302019,101.403557],[23.30205,101.399788],[23.301559,101.398216],[23.299601,101.394699],[23.29941,101.394173],[23.298491,101.388153],[23.29851,101.387039],[23.299,101.381798],[23.299179,101.379967],[23.299601,101.375473],[23.29952,101.37381],[23.29854,101.368073],[23.298491,101.367287],[23.298559,101.366814],[23.29862,101.366577],[23.29883,101.366158],[23.298969,101.365967],[23.299129,101.365807],[23.29973,101.365448],[23.30014,101.365318],[23.300591,101.365318],[23.300791,101.365372],[23.301411,101.365631],[23.302679,101.366463],[23.30315,101.366669],[23.305269,101.367111],[23.308611,101.368553],[23.30908,101.368668],[23.309549,101.368683],[23.30978,101.368637],[23.310221,101.368462],[23.31061,101.368179],[23.310921,101.367813],[23.311159,101.367348],[23.311291,101.366852],[23.31131,101.3666],[23.31126,101.366089],[23.31119,101.365829],[23.310949,101.365372],[23.310631,101.36496],[23.31044,101.364777],[23.308399,101.363472],[23.30801,101.363098],[23.30773,101.362648],[23.307541,101.362137],[23.30748,101.361893],[23.30747,101.361351],[23.307541,101.360817],[23.30772,101.360313],[23.30801,101.359863],[23.30838,101.359489],[23.30883,101.3592],[23.309771,101.358704],[23.310181,101.358353],[23.31049,101.357941],[23.31069,101.357468],[23.31078,101.356972],[23.310459,101.352417],[23.31035,101.351883],[23.310141,101.351357],[23.30983,101.350891],[23.309111,101.350021],[23.308661,101.349297],[23.30788,101.347549],[23.3076,101.347076],[23.30723,101.346687],[23.305611,101.345879],[23.305229,101.345596],[23.304939,101.345253],[23.30475,101.344803],[23.304661,101.344322],[23.30468,101.343826],[23.304729,101.343597],[23.30492,101.343163],[23.305201,101.342789],[23.30537,101.342644],[23.306009,101.34227],[23.308861,101.341087],[23.309299,101.340843],[23.309669,101.3405],[23.309959,101.340073],[23.310141,101.3396],[23.31019,101.339104],[23.310141,101.338593],[23.30998,101.338097],[23.309719,101.337692],[23.309549,101.337517],[23.30913,101.337242],[23.308649,101.337067],[23.30817,101.337013],[23.30768,101.337082],[23.30719,101.337273],[23.305771,101.33799],[23.301991,101.340103],[23.30154,101.340286],[23.30106,101.340393],[23.30057,101.34037],[23.29932,101.340088],[23.29855,101.34005],[23.297001,101.340271],[23.29649,101.34024],[23.29598,101.340118],[23.293831,101.339027],[23.293381,101.338768],[23.29261,101.338577],[23.29154,101.338562],[23.288971,101.338783],[23.288191,101.338737],[23.287689,101.338608],[23.287201,101.338387],[23.28404,101.335876],[23.283569,101.335587],[23.283079,101.335388],[23.28257,101.335274],[23.282049,101.335251],[23.281521,101.33532],[23.28101,101.335487],[23.28054,101.335732],[23.27841,101.337212],[23.277769,101.337517],[23.277321,101.337593],[23.27689,101.337547],[23.27648,101.33741],[23.2761,101.337143],[23.27562,101.336594],[23.27515,101.335983],[23.27478,101.335617],[23.274361,101.335373],[23.274139,101.335289],[23.273899,101.335243],[23.273439,101.335251],[23.272051,101.335579],[23.27157,101.335564],[23.27112,101.335403],[23.27072,101.335167],[23.27021,101.334663],[23.26919,101.333076],[23.269051,101.332809],[23.26845,101.332222],[23.267771,101.331757],[23.267241,101.331573],[23.266479,101.33149],[23.265961,101.331558],[23.265221,101.331787],[23.263969,101.332336],[23.263201,101.332497],[23.261641,101.332603],[23.261129,101.332733],[23.260651,101.332947],[23.260201,101.333229],[23.26,101.333397],[23.259661,101.333832],[23.259109,101.334793],[23.259041,101.334999],[23.257879,101.336838],[23.25754,101.337242],[23.256929,101.337769],[23.25646,101.33802],[23.25596,101.338181],[23.255699,101.338219],[23.255159,101.338188],[23.25489,101.338142],[23.24906,101.335602],[23.248369,101.335197],[23.24132,101.329826],[23.24147,101.328873],[23.24135,101.32872],[23.24053,101.327087],[23.24011,101.326118],[23.2397,101.325417],[23.239361,101.325027],[23.23761,101.323486],[23.23728,101.323082],[23.23691,101.322357],[23.236731,101.321823],[23.236641,101.321274],[23.236641,101.320442],[23.23761,101.314987],[23.23786,101.314232],[23.238091,101.313751],[23.23838,101.313309],[23.238939,101.312729],[23.239361,101.312393],[23.240049,101.312019],[23.24082,101.311768],[23.241579,101.311661],[23.24288,101.311569],[23.24366,101.311401],[23.244169,101.311203],[23.24485,101.310791],[23.24724,101.308578],[23.249371,101.306458],[23.25046,101.305717],[23.2514,101.305183],[23.252029,101.304672],[23.25238,101.30426],[23.253401,101.302597],[23.25375,101.3022],[23.254169,101.301857],[23.25576,101.300957],[23.256809,101.300117],[23.25803,101.298683],[23.259621,101.296432],[23.26001,101.295692],[23.260309,101.294907],[23.260509,101.293823],[23.260599,101.28904],[23.260759,101.28791],[23.26182,101.283836],[23.26189,101.283279],[23.261841,101.282417],[23.26166,101.281563],[23.2612,101.280502],[23.25816,101.275703],[23.25787,101.27494],[23.25729,101.272781],[23.25692,101.271729],[23.256861,101.271446],[23.25684,101.270866],[23.25701,101.269768],[23.2575,101.267838],[23.257601,101.266983],[23.257561,101.265312],[23.25761,101.264763],[23.25774,101.264198],[23.25815,101.263153],[23.258499,101.261742],[23.259399,101.259422],[23.26021,101.255463],[23.2605,101.254677],[23.261391,101.253326],[23.26161,101.252808],[23.261709,101.252228],[23.26173,101.251953],[23.26165,101.251404],[23.26148,101.2509],[23.261221,101.25042],[23.257629,101.245293],[23.25453,101.24102],[23.25424,101.240463],[23.25411,101.240051],[23.25407,101.239372],[23.254141,101.238907],[23.25489,101.237106],[23.255079,101.236382],[23.255131,101.235603],[23.25507,101.234787],[23.25494,101.234009],[23.254641,101.232986],[23.253679,101.230522],[23.253099,101.228249],[23.25218,101.224899],[23.252119,101.224251],[23.252159,101.223793],[23.25227,101.223343],[23.25267,101.222473],[23.255369,101.21814],[23.25563,101.217392],[23.255819,101.216293],[23.255989,101.211189],[23.25593,101.210632],[23.255699,101.209801],[23.25515,101.208397],[23.255079,101.207947],[23.255119,101.207291],[23.25556,101.205559],[23.25559,101.204849],[23.255541,101.204369],[23.253651,101.197647],[23.25321,101.190193],[23.253139,101.189636],[23.252899,101.18885],[23.25223,101.187347],[23.252081,101.186821],[23.252029,101.186028],[23.252029,101.184959],[23.251909,101.184181],[23.251471,101.182693],[23.251419,101.182167],[23.251471,101.181671],[23.251711,101.180946],[23.25214,101.179993],[23.252359,101.179207],[23.25268,101.176117],[23.253679,101.172638],[23.253969,101.17189],[23.25404,101.171608],[23.25423,101.17112],[23.25482,101.170181],[23.255159,101.169746],[23.259211,101.165756],[23.259529,101.165337],[23.25967,101.165108],[23.2598,101.164597],[23.25979,101.164093],[23.258751,101.160049],[23.25845,101.159592],[23.258369,101.15921],[23.258289,101.158447],[23.258169,101.158096],[23.257179,101.156563],[23.25629,101.155159],[23.255951,101.154793],[23.255541,101.154503],[23.25308,101.15316],[23.24979,101.150223],[23.247089,101.148514],[23.246321,101.147751],[23.244961,101.146111],[23.244539,101.145798],[23.244101,101.145569],[23.243641,101.145447],[23.243139,101.145439],[23.237881,101.146713],[23.23527,101.146896],[23.23027,101.148399],[23.227171,101.148933],[23.226601,101.149139],[23.226101,101.149513],[23.225031,101.150719],[23.22471,101.150948],[23.22401,101.151237],[23.223459,101.151314],[23.2229,101.151283],[23.21833,101.149529],[23.217529,101.149437],[23.21492,101.150093],[23.214319,101.150146],[23.21393,101.150101],[23.213551,101.149986],[23.212259,101.149292],[23.211651,101.149101],[23.20582,101.149193],[23.20516,101.149101],[23.20451,101.148857],[23.20013,101.146408],[23.197161,101.144211],[23.196699,101.14399],[23.196171,101.143883],[23.19566,101.143867],[23.18998,101.145264],[23.18713,101.146263],[23.182751,101.14782],[23.18214,101.147957],[23.18144,101.147972],[23.17918,101.148079],[23.176701,101.148148],[23.176439,101.148087],[23.1756,101.147591],[23.173691,101.145157],[23.173109,101.144783],[23.17226,101.144508],[23.17214,101.144493],[23.171379,101.144051],[23.17091,101.143517],[23.17028,101.14193],[23.17,101.14164],[23.16972,101.141602],[23.169439,101.141708],[23.168489,101.142616],[23.168249,101.142776],[23.167931,101.142853],[23.16761,101.14283],[23.167219,101.142616],[23.166941,101.142342],[23.165541,101.140137],[23.165371,101.139969],[23.165131,101.139893],[23.1649,101.1399],[23.16469,101.140007],[23.164539,101.140213],[23.16445,101.14048],[23.16448,101.140793],[23.16538,101.143227],[23.16543,101.14357],[23.16539,101.143867],[23.165239,101.144112],[23.16502,101.14431],[23.16489,101.144363],[23.16461,101.144333],[23.16432,101.144157],[23.163019,101.142433],[23.16272,101.142174],[23.162319,101.142067],[23.16206,101.142113],[23.16169,101.142326],[23.16151,101.142563],[23.16139,101.143013],[23.161699,101.14537],[23.161659,101.145683],[23.161551,101.14595],[23.16135,101.146149],[23.16123,101.146217],[23.161091,101.14624],[23.16082,101.146202],[23.16057,101.146072],[23.160259,101.145714],[23.159731,101.144867],[23.159531,101.144707],[23.159149,101.144577],[23.157949,101.144608],[23.157829,101.144577],[23.15764,101.144417],[23.15748,101.144173],[23.15741,101.14389],[23.15745,101.143623],[23.157551,101.143349],[23.159639,101.140259],[23.159769,101.139923],[23.15979,101.139557],[23.159719,101.139076],[23.159531,101.138649],[23.15921,101.138329],[23.156639,101.137047],[23.156389,101.136993],[23.156059,101.137062],[23.1558,101.137283],[23.155689,101.137459],[23.1556,101.137772],[23.155609,101.138649],[23.155491,101.139977],[23.15535,101.140266],[23.15517,101.140411],[23.154699,101.140518],[23.153589,101.140503],[23.15336,101.140556],[23.153191,101.140694],[23.15309,101.140862],[23.152969,101.14135],[23.15296,101.141541],[23.152849,101.141853],[23.152651,101.142036],[23.15243,101.142143],[23.15204,101.142143],[23.15184,101.142113],[23.151449,101.142242],[23.1513,101.14238],[23.15011,101.145851],[23.149879,101.146141],[23.149561,101.146332],[23.149179,101.146339],[23.148781,101.146133],[23.14868,101.146019],[23.14852,101.145737],[23.148199,101.14447],[23.14818,101.144096],[23.148239,101.143761],[23.148491,101.14312],[23.148529,101.142517],[23.14846,101.142067],[23.147579,101.140503],[23.14716,101.139427],[23.146629,101.138603],[23.1465,101.13829],[23.146351,101.137589],[23.146191,101.137383],[23.1458,101.137131],[23.1457,101.137131],[23.14535,101.136864],[23.145149,101.136597],[23.14497,101.136078],[23.145,101.135048],[23.144831,101.134483],[23.144569,101.134003],[23.14341,101.13269],[23.14303,101.131958],[23.14296,101.131317],[23.142981,101.130791],[23.143021,101.13031],[23.14278,101.12957],[23.142031,101.128441],[23.14192,101.12812],[23.14188,101.127731],[23.14192,101.127457],[23.14204,101.12693],[23.141991,101.126511],[23.141701,101.125992],[23.140921,101.124786],[23.140791,101.124329],[23.140751,101.123627],[23.140591,101.123238],[23.13983,101.122459],[23.139219,101.122047],[23.13895,101.121941],[23.13866,101.12191],[23.137951,101.122078],[23.13674,101.122704],[23.135241,101.123283],[23.13401,101.123489],[23.133511,101.123459],[23.13283,101.123253],[23.13246,101.123253],[23.130779,101.123734],[23.130409,101.123901],[23.12991,101.124283],[23.12949,101.124657],[23.129351,101.124763],[23.128851,101.12487],[23.12851,101.124863],[23.126789,101.12442],[23.126419,101.124367],[23.12533,101.124573],[23.12499,101.124588],[23.12468,101.124496],[23.124411,101.124329],[23.124189,101.124077],[23.123911,101.123688],[23.123671,101.123543],[23.1227,101.12326],[23.12211,101.122917],[23.120399,101.121613],[23.119591,101.120728],[23.11902,101.120232],[23.117861,101.119186],[23.11676,101.118294],[23.11643,101.117828],[23.11591,101.116852],[23.115431,101.116112],[23.113951,101.11451],[23.113501,101.114166],[23.112789,101.11393],[23.112261,101.113762],[23.11195,101.113548],[23.111401,101.112953],[23.111071,101.112709],[23.110701,101.112541],[23.110331,101.112419],[23.11002,101.112228],[23.10965,101.111816],[23.10878,101.110573],[23.107849,101.109497],[23.107559,101.1091],[23.10708,101.108177],[23.10644,101.106758],[23.10614,101.105141],[23.106171,101.104942],[23.106541,101.103653],[23.10606,101.099571],[23.10594,101.099129],[23.105619,101.098534],[23.102871,101.095078],[23.102421,101.094269],[23.10216,101.093369],[23.10181,101.091087],[23.10194,101.087334],[23.101749,101.084717],[23.101681,101.084343],[23.10136,101.08358],[23.095289,101.071663],[23.092871,101.062553],[23.09272,101.062317],[23.092489,101.062149],[23.088921,101.061073],[23.08243,101.056297],[23.0809,101.055191],[23.080441,101.055038],[23.078341,101.055092],[23.07649,101.055237],[23.07522,101.055809],[23.074841,101.05587],[23.074341,101.055779],[23.073879,101.055496],[23.073151,101.054863],[23.07061,101.053688],[23.070391,101.053497],[23.07021,101.053238],[23.069651,101.050728],[23.069481,101.050293],[23.06922,101.050041],[23.06679,101.048531],[23.066,101.048271],[23.06559,101.048264],[23.065319,101.048363],[23.0651,101.048523],[23.06461,101.048958],[23.06423,101.049133],[23.063789,101.049156],[23.063459,101.049057],[23.062389,101.048508],[23.059759,101.048233],[23.058189,101.048424],[23.057249,101.048233],[23.05648,101.047813],[23.055799,101.047012],[23.05534,101.046501],[23.055099,101.046356],[23.05422,101.046242],[23.04863,101.048233],[23.04837,101.04837],[23.047871,101.048431],[23.02458,101.048302],[23.024071,101.048157],[23.02363,101.047836],[23.02182,101.045883],[23.01825,101.044289],[23.017651,101.044228],[23.010521,101.045853],[23.01018,101.045998],[23.009899,101.046257],[23.009689,101.0466],[23.00923,101.047546],[23.00905,101.047729],[23.008829,101.047852],[23.008591,101.047897],[23.008221,101.047829],[23.0072,101.047447],[23.00699,101.04744],[23.00671,101.047546],[23.00486,101.049133],[23.004459,101.049347],[23.004141,101.049469],[23.003429,101.049538],[23.002609,101.049538],[23.001209,101.0495],[22.99102,101.050056],[22.990601,101.050232],[22.988979,101.051308],[22.986931,101.052177],[22.983101,101.053596],[22.98258,101.053596],[22.98111,101.053093],[22.980881,101.052917],[22.98064,101.052544],[22.98027,101.051727],[22.980181,101.051598],[22.979851,101.051323],[22.977791,101.050697],[22.977329,101.050682],[22.97683,101.050743],[22.97641,101.05069],[22.976101,101.050507],[22.97517,101.049477],[22.975031,101.049393],[22.97488,101.049339],[22.97471,101.049347],[22.97455,101.049408],[22.974409,101.049507],[22.974291,101.049789],[22.974131,101.051559],[22.973989,101.051819],[22.9736,101.052063],[22.97324,101.052071],[22.97154,101.051743],[22.97117,101.05188],[22.97064,101.052979],[22.9704,101.053261],[22.9699,101.053467],[22.969589,101.053482],[22.96904,101.053253],[22.967541,101.051788],[22.96735,101.051491],[22.967199,101.050926],[22.96707,101.050056],[22.966869,101.04985],[22.96673,101.049789],[22.966591,101.049767],[22.966249,101.049873],[22.96386,101.051697],[22.9636,101.05175],[22.963301,101.051643],[22.959089,101.045609],[22.956141,101.043243],[22.95582,101.042763],[22.95554,101.041786],[22.955561,101.041611],[22.955469,101.041199],[22.95533,101.040993],[22.955111,101.040871],[22.95499,101.04084],[22.95459,101.040916],[22.95439,101.041054],[22.95409,101.041618],[22.95377,101.042618],[22.953621,101.0429],[22.9533,101.043198],[22.95293,101.043343],[22.952551,101.043373],[22.95105,101.043114],[22.94944,101.042679],[22.94734,101.042618],[22.945259,101.041969],[22.943899,101.041206],[22.9433,101.0411],[22.94108,101.041023],[22.940371,101.040817],[22.93914,101.040337],[22.938881,101.040291],[22.937981,101.040459],[22.937111,101.040733],[22.936819,101.040688],[22.93659,101.040581],[22.9363,101.040291],[22.935471,101.038452],[22.934389,101.037483],[22.93408,101.036903],[22.933861,101.03627],[22.93358,101.035828],[22.930759,101.033897],[22.928329,101.0327],[22.92807,101.032654],[22.92779,101.032707],[22.925079,101.034653],[22.923201,101.035942],[22.92071,101.03714],[22.91906,101.038437],[22.918779,101.038589],[22.91832,101.038673],[22.913601,101.038834],[22.90958,101.038292],[22.909451,101.0383],[22.907591,101.039146],[22.90667,101.039864],[22.906139,101.040077],[22.903391,101.040199],[22.9011,101.039917],[22.899839,101.04007],[22.898951,101.040367],[22.894341,101.042671],[22.892481,101.043266],[22.89069,101.044769],[22.890381,101.04493],[22.89023,101.044968],[22.89006,101.044968],[22.88994,101.044899],[22.88973,101.04493],[22.885571,101.044243],[22.885229,101.044144],[22.884729,101.044144],[22.883869,101.044243],[22.882971,101.044228],[22.88155,101.043968],[22.879829,101.044067],[22.87952,101.044228],[22.87929,101.044434],[22.879181,101.044807],[22.87919,101.045258],[22.87907,101.045502],[22.878929,101.045624],[22.878759,101.045647],[22.87855,101.045624],[22.87825,101.045418],[22.87788,101.044594],[22.877769,101.044441],[22.87748,101.044289],[22.87735,101.044273],[22.87706,101.044327],[22.87561,101.045067],[22.87435,101.045563],[22.874069,101.045738],[22.873659,101.046143],[22.87348,101.046463],[22.873461,101.046783],[22.87372,101.047661],[22.873671,101.048126],[22.873381,101.048607],[22.8731,101.049057],[22.87294,101.049553],[22.872959,101.049843],[22.87299,101.051071],[22.873091,101.051468],[22.87307,101.051727],[22.872841,101.052048],[22.87248,101.052231],[22.872129,101.052238],[22.871901,101.052139],[22.871731,101.05201],[22.87158,101.051781],[22.87137,101.051331],[22.870871,101.050537],[22.87031,101.050301],[22.87015,101.050247],[22.86977,101.050247],[22.868971,101.05014],[22.868629,101.050194],[22.86834,101.050377],[22.86783,101.051132],[22.867571,101.051727],[22.86725,101.052254],[22.86702,101.052406],[22.866871,101.052437],[22.86664,101.052406],[22.8664,101.052299],[22.86628,101.0522],[22.86537,101.051041],[22.864679,101.049889],[22.864491,101.049759],[22.86417,101.04966],[22.863911,101.049744],[22.863689,101.049896],[22.86302,101.050751],[22.862921,101.050842],[22.8627,101.050903],[22.862459,101.050858],[22.862341,101.050789],[22.862141,101.050583],[22.86179,101.049911],[22.86162,101.049759],[22.861549,101.049652],[22.861429,101.049568],[22.861179,101.04953],[22.860901,101.049637],[22.86054,101.050079],[22.860201,101.050247],[22.85998,101.050201],[22.859751,101.050087],[22.85951,101.049782],[22.85891,101.049133],[22.858801,101.048973],[22.85874,101.048752],[22.85858,101.04847],[22.85841,101.047997],[22.858,101.047462],[22.857731,101.047256],[22.85655,101.046967],[22.8563,101.046959],[22.855829,101.046768],[22.85537,101.04673],[22.854799,101.046623],[22.85006,101.045921],[22.845831,101.044746],[22.84557,101.044601],[22.84523,101.044167],[22.84511,101.043877],[22.845091,101.043388],[22.845209,101.042717],[22.84556,101.04084],[22.84547,101.039772],[22.84502,101.038681],[22.84433,101.037338],[22.844259,101.03698],[22.84441,101.03569],[22.84409,101.032707],[22.843941,101.032372],[22.84374,101.032219],[22.843361,101.032143],[22.84267,101.032249],[22.842449,101.032204],[22.84227,101.032082],[22.84207,101.03154],[22.84198,101.029114],[22.842051,101.028877],[22.842239,101.02861],[22.84289,101.028084],[22.843069,101.027802],[22.843121,101.027473],[22.842661,101.025063],[22.84259,101.023514],[22.8423,101.022087],[22.842039,101.021744],[22.841921,101.021637],[22.840469,101.021187],[22.83992,101.020882],[22.839251,101.020699],[22.83877,101.020607],[22.83643,101.020943],[22.83602,101.020882],[22.83543,101.020538],[22.835251,101.02018],[22.835159,101.019417],[22.835239,101.019051],[22.835609,101.018333],[22.835791,101.017487],[22.83559,101.016022],[22.835461,101.015701],[22.835409,101.015404],[22.83482,101.014267],[22.83457,101.014038],[22.83433,101.013992],[22.833139,101.014503],[22.83259,101.014458],[22.831869,101.014343],[22.83053,101.014374],[22.830259,101.014282],[22.83005,101.014122],[22.82991,101.013893],[22.82984,101.013634],[22.829969,101.011917],[22.829901,101.011574],[22.829679,101.011261],[22.82835,101.010513],[22.82818,101.01033],[22.82806,101.010017],[22.828091,101.009712],[22.82819,101.009499],[22.828621,101.008827],[22.82872,101.008507],[22.828699,101.008148],[22.828489,101.007767],[22.828329,101.007561],[22.828199,101.007271],[22.82818,101.006958],[22.828251,101.006508],[22.82892,101.004562],[22.828939,101.004387],[22.82892,101.004211],[22.82877,101.003937],[22.828609,101.00386],[22.82851,101.003838],[22.827129,101.004417],[22.82692,101.004593],[22.8267,101.004982],[22.82649,101.006523],[22.82633,101.00679],[22.82616,101.006943],[22.82592,101.007004],[22.825689,101.006958],[22.82403,101.006088],[22.823681,101.00605],[22.82346,101.006119],[22.82337,101.006187],[22.82324,101.006432],[22.823219,101.006813],[22.82399,101.008453],[22.82399,101.008774],[22.823879,101.008957],[22.823681,101.009087],[22.82329,101.009109],[22.822479,101.008789],[22.8221,101.00872],[22.82177,101.008583],[22.821529,101.008583],[22.820789,101.008713],[22.81996,101.008583],[22.81974,101.008629],[22.81953,101.008781],[22.81933,101.009148],[22.819201,101.009819],[22.818939,101.010223],[22.81875,101.01033],[22.81855,101.010323],[22.81834,101.010223],[22.81811,101.009933],[22.81785,101.008659],[22.817579,101.008057],[22.817181,101.007607],[22.81698,101.007149],[22.816971,101.006393],[22.817101,101.005531],[22.81698,101.004761],[22.81669,101.004066],[22.81662,101.003967],[22.816351,101.003433],[22.816111,101.00322],[22.8158,101.003128],[22.815439,101.003159],[22.81422,101.003883],[22.813881,101.003998],[22.81366,101.004013],[22.813259,101.003754],[22.81312,101.00354],[22.813089,101.003281],[22.813181,101.002853],[22.813629,101.002243],[22.81424,101.001587],[22.814421,101.00119],[22.81451,100.999588],[22.81435,100.99884],[22.813931,100.997803],[22.81389,100.997131],[22.8141,100.995453],[22.81406,100.995247],[22.813869,100.99498],[22.81354,100.994713],[22.812071,100.994713],[22.811621,100.994812],[22.811399,100.994797],[22.811131,100.994667],[22.811001,100.994537],[22.810301,100.993599],[22.810169,100.99321],[22.809681,100.992577],[22.808121,100.991653],[22.80743,100.990997],[22.80442,100.986687],[22.803289,100.985558],[22.800989,100.9842],[22.79668,100.982613],[22.79608,100.982559],[22.795641,100.98262],[22.79413,100.983139],[22.79402,100.983147],[22.78949,100.984673],[22.78833,100.984734],[22.78718,100.984337],[22.786381,100.98378],[22.785009,100.982468],[22.783701,100.981873],[22.78307,100.981773],[22.778049,100.982323],[22.775881,100.981888],[22.773491,100.98156],[22.77161,100.981628],[22.770651,100.981438],[22.76981,100.98101],[22.769211,100.980476],[22.76837,100.979477],[22.76026,100.960899],[22.757999,100.955803],[22.757441,100.955391],[22.75708,100.955048],[22.75721,100.954697],[22.757549,100.954514],[22.75704,100.954567],[22.755301,100.954819],[22.75485,100.955139],[22.7547,100.95517],[22.75456,100.955002],[22.75416,100.954086],[22.7537,100.952957],[22.75363,100.952232],[22.753639,100.951859],[22.753731,100.95031],[22.75379,100.949226],[22.75386,100.948143],[22.753901,100.947762],[22.754181,100.947342],[22.754499,100.947273],[22.75466,100.947357],[22.75481,100.947609],[22.754841,100.947906],[22.754721,100.948082],[22.75465,100.948151],[22.75444,100.948288],[22.75411,100.948311],[22.753559,100.948311],[22.751921,100.947998],[22.75135,100.947693],[22.74992,100.946747],[22.74894,100.945709],[22.74827,100.944641],[22.74794,100.943817],[22.747869,100.943604],[22.747629,100.942703],[22.74728,100.940529],[22.747,100.939323],[22.746799,100.938171],[22.74645,100.937271],[22.74609,100.936653],[22.74593,100.936523],[22.74559,100.936256],[22.745041,100.935921],[22.744431,100.935699],[22.743589,100.935547],[22.74295,100.935478],[22.742531,100.935432],[22.742319,100.93541],[22.74148,100.935318],[22.740669,100.935219],[22.73987,100.935173],[22.73967,100.935181],[22.738371,100.935532],[22.737089,100.935951],[22.737221,100.937561],[22.736879,100.938103],[22.736759,100.93824],[22.736469,100.938568],[22.735411,100.939491],[22.735109,100.939758],[22.73385,100.938789],[22.73255,100.937866],[22.73188,100.937424],[22.7313,100.937263],[22.73031,100.937019],[22.72901,100.936897],[22.72834,100.93692],[22.727659,100.936996],[22.726971,100.937157],[22.72587,100.937553],[22.725189,100.937759],[22.72473,100.937843],[22.72377,100.937927],[22.723061,100.937889],[22.72282,100.937859],[22.72212,100.937721],[22.721439,100.937607],[22.72052,100.937538],[22.71982,100.937569],[22.718861,100.937721],[22.71837,100.937798],[22.71788,100.937851],[22.71763,100.937859],[22.716881,100.937851],[22.716391,100.937813],[22.715691,100.937683],[22.714161,100.937149],[22.71335,100.936859],[22.70923,100.935532],[22.706129,100.935272],[22.7059,100.935303],[22.70228,100.935913],[22.698429,100.936508],[22.697969,100.936501],[22.695841,100.935799],[22.69434,100.934319],[22.693859,100.933487],[22.692881,100.931847],[22.692579,100.931488],[22.69058,100.929947],[22.688129,100.929352],[22.687429,100.929367],[22.686251,100.929581],[22.68441,100.93026],[22.684179,100.930351],[22.6835,100.930618],[22.68281,100.93087],[22.681641,100.931152],[22.680941,100.93116],[22.68004,100.930992],[22.678801,100.930367],[22.67804,100.92984],[22.677851,100.92971],[22.675659,100.928902],[22.67326,100.929527],[22.673059,100.929657],[22.672211,100.930489],[22.671471,100.931808],[22.67083,100.933502],[22.67029,100.934967],[22.66975,100.936409],[22.669571,100.936882],[22.668791,100.938911],[22.668209,100.940453],[22.667789,100.941566],[22.667259,100.942947],[22.666759,100.944099],[22.666229,100.944946],[22.66468,100.94651],[22.664499,100.946678],[22.663601,100.9478],[22.6632,100.94841],[22.66169,100.949921],[22.661079,100.950256],[22.65884,100.951897],[22.65867,100.952042],[22.65498,100.95533],[22.652889,100.957962],[22.650261,100.962303],[22.649429,100.963142],[22.646749,100.965019],[22.64267,100.968117],[22.637991,100.972588],[22.635099,100.975403],[22.634501,100.975807],[22.63336,100.976723],[22.632851,100.977272],[22.63204,100.97821],[22.630671,100.979149],[22.62907,100.979347],[22.626699,100.979889],[22.62571,100.98082],[22.625561,100.981003],[22.625271,100.981339],[22.624451,100.982117],[22.621981,100.983459],[22.621571,100.983727],[22.62063,100.984596],[22.62031,100.985008],[22.619671,100.986153],[22.619551,100.986382],[22.61792,100.989319],[22.617081,100.990868],[22.616619,100.99173],[22.615801,100.99321],[22.615339,100.994034],[22.613991,100.99749],[22.61388,100.99794],[22.613501,101.000053],[22.613371,101.000763],[22.612659,101.004387],[22.612049,101.00573],[22.611759,101.006104],[22.610201,101.00721],[22.609751,101.007362],[22.607679,101.007797],[22.606541,101.008034],[22.605619,101.008209],[22.604639,101.006989],[22.60265,101.008003],[22.602079,101.008499],[22.601891,101.008682],[22.600941,101.009567],[22.60054,101.009903],[22.599701,101.010483],[22.599489,101.010628],[22.598221,101.011467],[22.59697,101.012291],[22.595961,101.013023],[22.5944,101.014282],[22.5931,101.015518],[22.59235,101.016289],[22.591801,101.016899],[22.591261,101.017517],[22.590919,101.01796],[22.59057,101.018387],[22.59005,101.01902],[22.589531,101.019653],[22.58902,101.020264],[22.58886,101.020462],[22.58802,101.021461],[22.58716,101.0224],[22.5863,101.023323],[22.5856,101.024063],[22.58543,101.024239],[22.58489,101.024803],[22.583969,101.025703],[22.583059,101.026604],[22.582319,101.027351],[22.58213,101.027542],[22.58135,101.02832],[22.580959,101.028717],[22.58037,101.029327],[22.579769,101.02993],[22.579161,101.03051],[22.578529,101.031021],[22.577629,101.031601],[22.576929,101.031967],[22.57407,101.032806],[22.57268,101.033127],[22.569481,101.033974],[22.566851,101.035629],[22.564631,101.038254],[22.562571,101.04084],[22.561569,101.042],[22.56105,101.042549],[22.55653,101.046677],[22.551979,101.050056],[22.549089,101.051498],[22.54871,101.051857],[22.547211,101.054031],[22.545851,101.055611],[22.54336,101.057426],[22.538851,101.060677],[22.536671,101.062241],[22.535339,101.063202],[22.53406,101.064117],[22.53334,101.064636],[22.533159,101.064774],[22.532261,101.065422],[22.530951,101.066353],[22.53075,101.06649],[22.52914,101.067642],[22.527901,101.068542],[22.52706,101.069153],[22.525999,101.069908],[22.52557,101.070213],[22.524731,101.070824],[22.523899,101.071411],[22.523279,101.071854],[22.52087,101.073593],[22.519039,101.074821],[22.515511,101.076576],[22.51333,101.077263],[22.51284,101.077393],[22.507811,101.078346],[22.502991,101.079971],[22.4993,101.081062],[22.49831,101.081284],[22.497311,101.081467],[22.49608,101.081688],[22.4951,101.081871],[22.49365,101.082123],[22.49098,101.082588],[22.49074,101.082626],[22.48781,101.08316],[22.48311,101.084023],[22.479179,101.084732],[22.47846,101.084869],[22.47751,101.085037],[22.47727,101.085091],[22.474871,101.085403],[22.472151,101.084801],[22.47193,101.084686],[22.469971,101.083214],[22.46851,101.081123],[22.46838,101.080887],[22.46525,101.076134],[22.46405,101.075218],[22.46118,101.073936],[22.46097,101.07383],[22.46055,101.073578],[22.46015,101.073303],[22.45813,101.071114],[22.454941,101.066788],[22.45241,101.063629],[22.451441,101.062912],[22.450809,101.062576],[22.450399,101.062378],[22.449249,101.061684],[22.44907,101.061531],[22.448311,101.060661],[22.44747,101.058617],[22.44726,101.057877],[22.447041,101.057114],[22.446621,101.055618],[22.44656,101.055382],[22.44626,101.054199],[22.446159,101.053268],[22.44618,101.052567],[22.446199,101.052338],[22.44644,101.051201],[22.44669,101.050537],[22.446791,101.050323],[22.44743,101.049301],[22.44944,101.047501],[22.45256,101.045052],[22.45421,101.043716],[22.45508,101.042671],[22.455469,101.041603],[22.45558,101.040413],[22.455441,101.039482],[22.455299,101.039047],[22.454571,101.037857],[22.453421,101.036743],[22.452419,101.035797],[22.451059,101.034531],[22.44902,101.032204],[22.448139,101.03109],[22.448,101.030907],[22.447321,101.030052],[22.446791,101.029404],[22.446239,101.028793],[22.445601,101.028267],[22.445089,101.027977],[22.44455,101.027733],[22.44379,101.027473],[22.442869,101.027039],[22.44202,101.026077],[22.441919,101.025887],[22.440689,101.022301],[22.439899,101.018692],[22.43993,101.01844],[22.44076,101.016403],[22.441521,101.014671],[22.441589,101.013519],[22.441429,101.012611],[22.441191,101.011757],[22.440969,101.010933],[22.44091,101.010727],[22.440741,101.010117],[22.44063,101.009697],[22.44046,101.009087],[22.440399,101.008888],[22.44026,101.008293],[22.43997,101.007103],[22.43926,101.005013],[22.438971,101.004204],[22.43878,101.003777],[22.43825,101.003036],[22.43762,101.002419],[22.437071,101.002037],[22.435881,101.001503],[22.43569,101.001411],[22.43453,101.000877],[22.432699,101.00032],[22.431379,100.999817],[22.429871,100.999237],[22.429649,100.999161],[22.42835,100.998688],[22.42729,100.998253],[22.425751,100.997887],[22.425079,100.997864],[22.424191,100.99781],[22.422859,100.997726],[22.42264,100.997711],[22.42198,100.997673],[22.42152,100.996429],[22.421169,100.995857],[22.420839,100.995033],[22.420691,100.994614],[22.420389,100.993767],[22.42004,100.992973],[22.41968,100.992416],[22.41955,100.992264],[22.41909,100.991814],[22.418539,100.991493],[22.41814,100.991341],[22.417721,100.991249],[22.416821,100.99128],[22.41659,100.991333],[22.414579,100.991943],[22.413879,100.992104],[22.41272,100.992363],[22.412491,100.992409],[22.412029,100.992523],[22.411489,100.99173],[22.410629,100.991402],[22.409349,100.990982],[22.408449,100.990921],[22.40686,100.991699],[22.406151,100.992973],[22.406,100.993713],[22.40591,100.994217],[22.40572,100.995506],[22.405109,100.997917],[22.40416,100.998901],[22.403561,100.999229],[22.40292,100.999512],[22.40205,100.999962],[22.40163,101.000214],[22.401421,101.000351],[22.400829,101.000778],[22.40065,101.000923],[22.399929,101.001457],[22.398781,101.001991],[22.39797,101.001999],[22.39777,101.001953],[22.39657,101.001633],[22.396379,101.001579],[22.39558,101.001373],[22.39538,101.001312],[22.39526,100.999611],[22.394581,100.999031],[22.39352,100.99868],[22.39287,100.998627],[22.39201,100.998672],[22.391159,100.998779],[22.390329,100.998871],[22.389509,100.99894],[22.38932,100.998947],[22.38833,100.999069],[22.38817,100.999077],[22.38769,100.999107],[22.386909,100.999184],[22.386049,100.999191],[22.385309,100.99913],[22.38492,100.999077],[22.384109,100.998894],[22.38331,100.998627],[22.38269,100.998428],[22.382271,100.998299],[22.38162,100.9981],[22.381399,100.998016],[22.379789,100.997589],[22.37746,100.997719],[22.37701,100.997803],[22.37565,100.99794],[22.374069,100.997757],[22.371149,100.996773],[22.36879,100.996872],[22.36677,100.998077],[22.36544,100.998917],[22.363939,100.999222],[22.36371,100.999207],[22.361771,100.998497],[22.361561,100.998383],[22.36068,100.997917],[22.35667,100.996277],[22.355659,100.996132],[22.35545,100.996094],[22.3552,100.996048],[22.35351,100.995506],[22.352989,100.995354],[22.35206,100.994911],[22.351191,100.9944],[22.350361,100.99382],[22.349239,100.992828],[22.3489,100.992477],[22.347679,100.990936],[22.34753,100.990723],[22.347231,100.990303],[22.3466,100.989418],[22.346451,100.989197],[22.345881,100.988319],[22.3456,100.987877],[22.344879,100.987053],[22.34469,100.986832],[22.3444,100.986397],[22.343929,100.985764],[22.34325,100.984917],[22.342899,100.98452],[22.34236,100.983963],[22.341551,100.983261],[22.341339,100.983093],[22.340931,100.982758],[22.340309,100.982277],[22.33968,100.98185],[22.33882,100.981354],[22.337931,100.980911],[22.337259,100.980621],[22.33658,100.980331],[22.335899,100.980011],[22.335011,100.979507],[22.334351,100.979088],[22.333929,100.978783],[22.333309,100.978302],[22.33271,100.977814],[22.332319,100.97747],[22.33115,100.976021],[22.33066,100.975357],[22.33033,100.974922],[22.32984,100.974281],[22.32935,100.97364],[22.328871,100.973007],[22.328541,100.972603],[22.328211,100.972168],[22.327511,100.971367],[22.32696,100.970787],[22.32638,100.970261],[22.325781,100.969727],[22.32449,100.968719],[22.323839,100.968231],[22.322981,100.967537],[22.32235,100.966988],[22.32173,100.966423],[22.32111,100.965813],[22.320511,100.965157],[22.31974,100.964256],[22.319361,100.963791],[22.319,100.963318],[22.31883,100.963081],[22.318489,100.962601],[22.318001,100.961853],[22.317539,100.961113],[22.31683,100.959846],[22.3167,100.959587],[22.316441,100.959053],[22.31583,100.95768],[22.315411,100.956596],[22.31521,100.956093],[22.314989,100.955597],[22.314751,100.955116],[22.31435,100.954437],[22.31389,100.953796],[22.31356,100.953377],[22.3132,100.953003],[22.313021,100.952812],[22.312639,100.952461],[22.312241,100.952141],[22.31143,100.951508],[22.310619,100.950844],[22.309799,100.950172],[22.30938,100.949837],[22.30875,100.949333],[22.30834,100.948967],[22.30776,100.948433],[22.307011,100.947678],[22.30665,100.947304],[22.30629,100.94693],[22.305771,100.946358],[22.30448,100.944847],[22.302361,100.942863],[22.30135,100.942192],[22.300039,100.941544],[22.29891,100.941139],[22.298679,100.941078],[22.29401,100.939636],[22.29364,100.939407],[22.29315,100.939018],[22.292601,100.938454],[22.292191,100.937828],[22.291941,100.937363],[22.29166,100.936699],[22.29142,100.936028],[22.291241,100.935516],[22.291,100.934837],[22.290689,100.933968],[22.29043,100.933243],[22.290171,100.932518],[22.289909,100.931793],[22.28965,100.931053],[22.28944,100.930489],[22.289181,100.929733],[22.288919,100.92897],[22.288719,100.928398],[22.288429,100.927658],[22.288191,100.927109],[22.28772,100.926224],[22.28751,100.925888],[22.28701,100.925056],[22.286711,100.924561],[22.286501,100.924217],[22.2857,100.922897],[22.283091,100.922768],[22.2829,100.922638],[22.282551,100.92234],[22.282061,100.921547],[22.28171,100.920723],[22.281401,100.919838],[22.28109,100.919243],[22.280649,100.918709],[22.280479,100.918556],[22.279711,100.918083],[22.27906,100.917793],[22.27845,100.917397],[22.27788,100.916908],[22.27706,100.91597],[22.276711,100.915627],[22.27635,100.915314],[22.275961,100.915047],[22.275339,100.914749],[22.274691,100.91449],[22.27426,100.914291],[22.273479,100.913727],[22.27298,100.913193],[22.27249,100.912582],[22.271811,100.911751],[22.271299,100.911133],[22.2708,100.9105],[22.270121,100.909691],[22.269621,100.909081],[22.26911,100.908478],[22.2686,100.907867],[22.267941,100.907059],[22.26745,100.906471],[22.26729,100.906281],[22.266529,100.905327],[22.26638,100.905159],[22.266109,100.904793],[22.265181,100.903084],[22.26512,100.902878],[22.26486,100.901817],[22.264759,100.901176],[22.264681,100.900543],[22.26461,100.900162],[22.264441,100.899437],[22.264219,100.898758],[22.264151,100.89859],[22.263769,100.897781],[22.262951,100.896568],[22.26133,100.89476],[22.25939,100.892632],[22.257799,100.890877],[22.25618,100.889526],[22.254049,100.888847],[22.252899,100.888924],[22.249889,100.889832],[22.24725,100.890663],[22.24247,100.892181],[22.24225,100.89225],[22.241619,100.892464],[22.240801,100.892723],[22.240601,100.892776],[22.239651,100.893082],[22.23909,100.89325],[22.237379,100.893532],[22.23546,100.892883],[22.233191,100.891357],[22.23279,100.891243],[22.229931,100.891037],[22.227671,100.891037],[22.22744,100.891037],[22.22624,100.890999],[22.226,100.890961],[22.22529,100.890846],[22.224819,100.890739],[22.222071,100.889473],[22.221689,100.889198],[22.220579,100.88842],[22.217211,100.886803],[22.216749,100.886673],[22.21537,100.886177],[22.215151,100.88607],[22.213539,100.884918],[22.21335,100.884743],[22.21269,100.883972],[22.211559,100.88224],[22.21076,100.881287],[22.209181,100.880188],[22.20785,100.879623],[22.20566,100.878441],[22.20363,100.876953],[22.20343,100.876793],[22.20179,100.875679],[22.20072,100.875061],[22.199169,100.874298],[22.19618,100.873253],[22.19453,100.872864],[22.192659,100.872551],[22.191271,100.872337],[22.189659,100.872108],[22.18873,100.872002],[22.18466,100.871529],[22.184441,100.871552],[22.18379,100.871658],[22.18276,100.872009],[22.18195,100.872292],[22.181749,100.872353],[22.18115,100.872498],[22.18075,100.872551],[22.17971,100.872528],[22.1782,100.872253],[22.17522,100.871643],[22.17458,100.871513],[22.1733,100.871239],[22.172661,100.871101],[22.17029,100.87149],[22.168579,100.872566],[22.16478,100.875488],[22.164101,100.877136],[22.164101,100.878738],[22.16431,100.880547],[22.163891,100.882553],[22.162741,100.884567],[22.16111,100.888344],[22.15967,100.889977],[22.15947,100.890106],[22.15798,100.8908],[22.156429,100.891068],[22.154831,100.890587],[22.15423,100.890297],[22.15365,100.889992],[22.15346,100.889893],[22.15308,100.889687],[22.1521,100.889374],[22.1511,100.889267],[22.1509,100.889297],[22.15032,100.889381],[22.149731,100.889503],[22.1486,100.889763],[22.147829,100.889931],[22.146811,100.890137],[22.146601,100.890182],[22.1453,100.890213],[22.1434,100.889481],[22.141661,100.88871],[22.14024,100.888573],[22.13888,100.88858],[22.13842,100.888573],[22.136339,100.888329],[22.13586,100.888229],[22.13463,100.888077],[22.133619,100.88813],[22.133141,100.88826],[22.132429,100.888542],[22.13179,100.888947],[22.13122,100.889442],[22.13084,100.889793],[22.130289,100.890343],[22.13011,100.890518],[22.129749,100.890877],[22.12937,100.891243],[22.12919,100.891434],[22.128811,100.891777],[22.128059,100.892509],[22.12748,100.893066],[22.127279,100.893272],[22.12668,100.893837],[22.125839,100.894562],[22.125389,100.894897],[22.124491,100.895523],[22.12426,100.895668],[22.123569,100.896049],[22.12311,100.896271],[22.122881,100.896378],[22.121969,100.896767],[22.12151,100.896927],[22.121059,100.897087],[22.120359,100.897293],[22.1199,100.8974],[22.119209,100.897537],[22.118031,100.897697],[22.117319,100.897758],[22.117081,100.897774],[22.116381,100.897797],[22.115919,100.897781],[22.115219,100.897751],[22.114771,100.897697],[22.11454,100.897667],[22.113411,100.897438],[22.113171,100.897377],[22.112221,100.897087],[22.1113,100.896767],[22.109541,100.896072],[22.109329,100.896004],[22.108931,100.895844],[22.107821,100.895363],[22.10671,100.894867],[22.1063,100.894707],[22.105659,100.894447],[22.104509,100.894028],[22.10401,100.893913],[22.102751,100.893784],[22.102249,100.893806],[22.10034,100.894386],[22.09577,100.896683],[22.09535,100.896889],[22.09514,100.897003],[22.091,100.899063],[22.09016,100.899467],[22.08934,100.899872],[22.0875,100.90078],[22.086281,100.901398],[22.086069,100.901497],[22.084459,100.90229],[22.082359,100.903587],[22.08218,100.90374],[22.080879,100.904747],[22.08029,100.905144],[22.079691,100.905487],[22.07802,100.906349],[22.076559,100.907097],[22.074671,100.908073],[22.074459,100.90818],[22.07284,100.909088],[22.072651,100.909233],[22.071779,100.910347],[22.07155,100.911049],[22.07114,100.91275],[22.07007,100.914352],[22.06971,100.914612],[22.06798,100.915222],[22.06732,100.915314],[22.06707,100.915398],[22.067011,100.915398],[22.066839,100.915367],[22.06671,100.915428],[22.06671,100.915428],[22.066191,100.915527],[22.065809,100.915627],[22.065701,100.915657],[22.0648,100.915863],[22.064171,100.915993],[22.06389,100.916054],[22.063181,100.916206],[22.06303,100.916252],[22.06241,100.916389],[22.06175,100.916527],[22.061239,100.916649],[22.059919,100.916832],[22.05904,100.916962],[22.05825,100.916946],[22.05735,100.916603],[22.05529,100.916061],[22.052691,100.91539],[22.043591,100.899223],[22.04199,100.896301],[22.040911,100.894302],[22.04068,100.893753],[22.04048,100.893158],[22.040251,100.892387],[22.04018,100.892197],[22.03977,100.891548],[22.039471,100.891258],[22.03857,100.890778],[22.03838,100.890678],[22.037889,100.890312],[22.037439,100.889587],[22.037371,100.889359],[22.03727,100.888687],[22.03849,100.887321],[22.038231,100.886932],[22.03797,100.886543],[22.03784,100.886353],[22.037319,100.885567],[22.03694,100.884987],[22.0368,100.884804],[22.03665,100.884613],[22.03618,100.885109],[22.035931,100.885269],[22.03573,100.885452],[22.035629,100.886169],[22.035851,100.886627],[22.036329,100.887131],[22.03694,100.887589],[22.037371,100.887947],[22.037769,100.888542],[22.038059,100.889397],[22.038601,100.890022],[22.038759,100.890091],[22.03908,100.890213],[22.039551,100.890381],[22.039709,100.890427],[22.040171,100.890617],[22.04055,100.890907],[22.04085,100.891487],[22.04088,100.891983],[22.040859,100.892303],[22.041019,100.893082],[22.04133,100.893448],[22.04187,100.893829],[22.042009,100.893929],[22.04236,100.894287],[22.042669,100.894897],[22.042761,100.895416],[22.04281,100.89608],[22.04302,100.896843],[22.043171,100.8974],[22.043329,100.897919],[22.04336,100.898033],[22.04343,100.898308],[22.043329,100.898941],[22.043221,100.899231],[22.04311,100.89959],[22.04307,100.899696],[22.042959,100.900017],[22.042801,100.900459],[22.04266,100.901329],[22.04273,100.901848],[22.042891,100.902496],[22.043011,100.903023],[22.04307,100.90329],[22.0431,100.903831],[22.04306,100.904114],[22.04298,100.904373],[22.042709,100.904846],[22.0425,100.905212],[22.042471,100.90583],[22.042601,100.906067],[22.042801,100.906258],[22.043329,100.906708],[22.04343,100.906807],[22.0436,100.907654],[22.04347,100.907928],[22.0432,100.908363],[22.042931,100.908813],[22.042509,100.909538],[22.042471,100.910461],[22.0427,100.910889],[22.042801,100.911018],[22.04372,100.911949],[22.043859,100.912079],[22.044359,100.912582],[22.04472,100.913528],[22.04451,100.913986],[22.04413,100.91433],[22.043119,100.915154],[22.04287,100.915573],[22.04269,100.916199],[22.04266,100.916359],[22.042521,100.917137],[22.04232,100.917717],[22.042139,100.918114],[22.04208,100.918228],[22.041771,100.919312],[22.041821,100.920036],[22.041901,100.920273],[22.04212,100.920998],[22.041929,100.921722],[22.041439,100.922592],[22.04129,100.924171],[22.04126,100.92466],[22.04137,100.925926],[22.041439,100.926308],[22.0415,100.928253],[22.041519,100.929138],[22.04121,100.929947],[22.0408,100.930191],[22.038839,100.931381],[22.03824,100.932617],[22.03816,100.932838],[22.03783,100.933723],[22.0376,100.93438],[22.03727,100.935242],[22.037001,100.935867],[22.03648,100.936867],[22.035589,100.938187],[22.03503,100.938904],[22.03474,100.939247],[22.03359,100.940689],[22.03301,100.941406],[22.032301,100.942299],[22.031099,100.943787],[22.03026,100.94487],[22.029539,100.945839],[22.029261,100.946281],[22.029091,100.946602],[22.02861,100.94767],[22.028391,100.948227],[22.02833,100.948433],[22.02803,100.949387],[22.02774,100.950394],[22.027679,100.950592],[22.02737,100.95163],[22.027,100.952888],[22.026939,100.953102],[22.0266,100.954163],[22.026011,100.955406],[22.02549,100.956146],[22.02519,100.956497],[22.02504,100.956673],[22.02302,100.958931],[22.02248,100.959717],[22.02177,100.960983],[22.021351,100.961884],[22.021231,100.962097],[22.020651,100.963203],[22.019051,100.965302],[22.01857,100.965767],[22.017229,100.967117],[22.016939,100.967453],[22.01679,100.967613],[22.016109,100.968483],[22.01552,100.96946],[22.015409,100.969658],[22.015011,100.970444],[22.01482,100.970802],[22.014271,100.971931],[22.014071,100.972328],[22.013821,100.972816],[22.013639,100.97316],[22.01335,100.973732],[22.01317,100.974136],[22.01281,100.974823],[22.011311,100.976913],[22.011169,100.977074],[22.010731,100.977562],[22.01045,100.97789],[22.010059,100.978409],[22.00983,100.978767],[22.00942,100.979523],[22.00905,100.980263],[22.0086,100.981056],[22.008369,100.981331],[22.00786,100.981812],[22.007601,100.982002],[22.007469,100.982094],[22.00699,100.982437],[22.006559,100.982841],[22.00647,100.982948],[22.005951,100.983681],[22.005751,100.9841],[22.005449,100.985153],[22.005381,100.985611],[22.00523,100.986397],[22.0049,100.987267],[22.00474,100.987556],[22.00428,100.98819],[22.00396,100.988487],[22.003151,100.989082],[22.00243,100.989517],[22.001011,100.990921],[22.000919,100.991051],[22.000191,100.992073],[21.99983,100.992554],[21.99975,100.992683],[21.999149,100.993523],[21.99906,100.993629],[21.998871,100.993843],[21.99811,100.994507],[21.99707,100.995071],[21.99651,100.995293],[21.995951,100.995506],[21.995399,100.995743],[21.99486,100.995956],[21.99436,100.996239],[21.992809,100.99765],[21.992701,100.99781],[21.99198,100.998779],[21.99185,100.998947],[21.99131,100.999641],[21.99102,100.999992],[21.990459,101.000717],[21.9888,101.00293],[21.98838,101.003487],[21.98786,101.003998],[21.987049,101.004883],[21.98671,101.005211],[21.986349,101.005539],[21.986179,101.005699],[21.98562,101.006172],[21.98525,101.006493],[21.984249,101.007271],[21.983841,101.007568],[21.98321,101.008003],[21.98258,101.008438],[21.98197,101.008873],[21.98177,101.009018],[21.98078,101.009811],[21.97967,101.010818],[21.976709,101.013283],[21.97607,101.013962],[21.975679,101.014252],[21.97489,101.014801],[21.97427,101.015198],[21.973869,101.015503],[21.973471,101.015793],[21.973101,101.016113],[21.97262,101.016701],[21.97249,101.016899],[21.97216,101.017563],[21.972071,101.017776],[21.971621,101.01918],[21.97146,101.019653],[21.971149,101.020576],[21.970921,101.021278],[21.97084,101.021507],[21.9706,101.022209],[21.97053,101.022453],[21.970289,101.02314],[21.970209,101.023376],[21.96982,101.024544],[21.969509,101.025467],[21.96785,101.026176],[21.967251,101.026573],[21.96661,101.026871],[21.966169,101.027061],[21.965309,101.027412],[21.96509,101.027496],[21.96422,101.027847],[21.964001,101.027946],[21.96335,101.028214],[21.9627,101.028503],[21.96207,101.028816],[21.961081,101.02951],[21.959749,101.030479],[21.95956,101.030617],[21.95937,101.031616],[21.95859,101.033081],[21.95812,101.034248],[21.95792,101.034698],[21.957279,101.035843],[21.956381,101.037048],[21.95595,101.037666],[21.95558,101.038307],[21.955469,101.038544],[21.955259,101.038979],[21.95509,101.039436],[21.954941,101.039902],[21.954729,101.040619],[21.95439,101.041817],[21.95418,101.042542],[21.95396,101.043243],[21.953409,101.044312],[21.953291,101.04451],[21.95188,101.046097],[21.95171,101.046272],[21.950581,101.047478],[21.95042,101.047653],[21.94935,101.048798],[21.94685,101.05146],[21.946529,101.051804],[21.94636,101.051964],[21.94483,101.053726],[21.94429,101.054443],[21.943529,101.055481],[21.943279,101.055817],[21.942329,101.057137],[21.942209,101.057312],[21.941851,101.0578],[21.941481,101.058273],[21.94095,101.058861],[21.940399,101.059402],[21.940269,101.05954],[21.939581,101.060219],[21.93902,101.060753],[21.93784,101.061127],[21.936701,101.061577],[21.93651,101.061684],[21.935301,101.062218],[21.933491,101.063057],[21.933109,101.063278],[21.930639,101.065109],[21.929501,101.066231],[21.92934,101.066391],[21.92901,101.066727],[21.92783,101.067917],[21.926649,101.069092],[21.925051,101.07045],[21.923241,101.071693],[21.921989,101.072533],[21.92062,101.073593],[21.92009,101.074112],[21.919189,101.075279],[21.917681,101.078453],[21.91642,101.081444],[21.916321,101.081673],[21.91571,101.083008],[21.915051,101.084587],[21.914379,101.087097],[21.914391,101.08876],[21.91444,101.089287],[21.914471,101.089722],[21.91452,101.090286],[21.914539,101.090439],[21.914579,101.091003],[21.914721,101.092216],[21.91493,101.095016],[21.91506,101.097748],[21.915051,101.103523],[21.914909,101.107643],[21.9149,101.107872],[21.914909,101.109596],[21.91526,101.113564],[21.91547,101.115044],[21.915751,101.11705],[21.915939,101.118347],[21.915991,101.118874],[21.916019,101.119141],[21.916071,101.119949],[21.91601,101.121269],[21.9158,101.122299],[21.915449,101.123268],[21.91511,101.123947],[21.914339,101.125504],[21.913811,101.127823],[21.91431,101.129951],[21.9146,101.13063],[21.91634,101.134247],[21.91654,101.134712],[21.91663,101.134933],[21.91839,101.139374],[21.918449,101.139603],[21.918631,101.140579],[21.91876,101.14238],[21.918859,101.14476],[21.9189,101.145813],[21.91894,101.146584],[21.918949,101.147102],[21.91897,101.147614],[21.91897,101.147873],[21.918949,101.148628],[21.91885,101.149399],[21.91869,101.150139],[21.918539,101.150879],[21.918449,101.151123],[21.91787,101.151672],[21.91713,101.152397],[21.914841,101.154327],[21.914499,101.154694],[21.914339,101.154877],[21.91366,101.155952],[21.913231,101.156891],[21.912741,101.158127],[21.91255,101.158638],[21.912081,101.159897],[21.911791,101.160652],[21.911501,101.1614],[21.911221,101.16214],[21.910749,101.163353],[21.910561,101.163811],[21.91011,101.164993],[21.909559,101.166382],[21.90947,101.166618],[21.90922,101.167343],[21.908661,101.170502],[21.908001,101.175049],[21.90786,101.175529],[21.907351,101.177269],[21.9072,101.177757],[21.90691,101.178757],[21.90649,101.180817],[21.906509,101.182121],[21.906549,101.182381],[21.90708,101.184097],[21.90826,101.186363],[21.90966,101.189034],[21.909769,101.189247],[21.911289,101.191254],[21.91147,101.191406],[21.912081,101.191833],[21.91445,101.193123],[21.91466,101.193253],[21.91526,101.193687],[21.916121,101.194618],[21.91687,101.195992],[21.91704,101.196457],[21.91711,101.196709],[21.91733,101.197769],[21.9175,101.198914],[21.917601,101.199783],[21.91777,101.200951],[21.91785,101.201508],[21.917971,101.202339],[21.918619,101.205002],[21.918949,101.20575],[21.92004,101.207611],[21.92045,101.208313],[21.920891,101.209213],[21.92137,101.210838],[21.92153,101.212631],[21.92156,101.213158],[21.921659,101.215263],[21.922371,101.219688],[21.922689,101.220886],[21.922979,101.221992],[21.92321,101.222763],[21.92333,101.223259],[21.923441,101.223701],[21.92392,101.226082],[21.92395,101.22644],[21.923969,101.226624],[21.923981,101.227013],[21.923981,101.227837],[21.923941,101.228706],[21.92392,101.228943],[21.9238,101.23037],[21.92371,101.231903],[21.923519,101.233963],[21.92304,101.239906],[21.92206,101.242363],[21.920389,101.244179],[21.920219,101.24437],[21.91906,101.246536],[21.918921,101.247253],[21.918831,101.249329],[21.918831,101.250221],[21.91881,101.250877],[21.91881,101.251099],[21.91873,101.252403],[21.918659,101.252838],[21.917749,101.255157],[21.91548,101.257736],[21.9149,101.258217],[21.9147,101.258377],[21.913401,101.259087],[21.912701,101.259354],[21.91222,101.259483],[21.910749,101.259811],[21.909769,101.26001],[21.90855,101.260277],[21.904751,101.261467],[21.904381,101.261726],[21.90402,101.262016],[21.902321,101.264214],[21.90143,101.265541],[21.90106,101.26609],[21.90019,101.267357],[21.89957,101.26825],[21.899309,101.26857],[21.898569,101.269302],[21.897261,101.269974],[21.89506,101.26992],[21.89484,101.269852],[21.89373,101.269432],[21.89328,101.269257],[21.89189,101.268799],[21.889059,101.268402],[21.88468,101.268173],[21.88446,101.26815],[21.880329,101.268433],[21.87883,101.269524],[21.87771,101.271393],[21.87731,101.273888],[21.87648,101.276787],[21.874929,101.278214],[21.8743,101.278458],[21.87303,101.278679],[21.872,101.278687],[21.871189,101.278717],[21.870171,101.278763],[21.868931,101.278839],[21.868509,101.278893],[21.86767,101.279099],[21.86746,101.279167],[21.86684,101.279404],[21.866631,101.279488],[21.864929,101.280167],[21.86426,101.280296],[21.86335,101.280312],[21.86289,101.280228],[21.86204,101.279892],[21.861469,101.279503],[21.860571,101.278488],[21.85997,101.277496],[21.85952,101.276718],[21.859289,101.276337],[21.85895,101.275749],[21.858391,101.274803],[21.85804,101.274223],[21.857809,101.273827],[21.857309,101.273087],[21.85689,101.272568],[21.856409,101.272102],[21.855659,101.271606],[21.855261,101.271423],[21.85461,101.271233],[21.854389,101.271179],[21.853291,101.271133],[21.852421,101.27121],[21.851561,101.271378],[21.851351,101.271423],[21.85051,101.271637],[21.849689,101.27195],[21.84889,101.272293],[21.8487,101.272392],[21.848129,101.272713],[21.847771,101.272957],[21.847429,101.273247],[21.84683,101.273911],[21.84646,101.274467],[21.846029,101.275543],[21.84589,101.276451],[21.845881,101.276939],[21.845921,101.277412],[21.84621,101.278847],[21.84626,101.279083],[21.846439,101.280022],[21.846581,101.280724],[21.84668,101.281174],[21.846979,101.282547],[21.847031,101.282784],[21.84713,101.283241],[21.847349,101.284653],[21.847349,101.285362],[21.8473,101.285828],[21.847019,101.286682],[21.84655,101.287537],[21.846081,101.288116],[21.84572,101.288437],[21.844709,101.288986],[21.844259,101.28907],[21.84314,101.2892],[21.842449,101.289177],[21.84178,101.289192],[21.840891,101.289299],[21.840441,101.289413],[21.83959,101.289742],[21.838961,101.290031],[21.838329,101.290314],[21.83728,101.290787],[21.83707,101.290894],[21.836439,101.291168],[21.83539,101.291641],[21.83518,101.291733],[21.837179,101.294617],[21.83725,101.295601],[21.837299,101.296066],[21.837339,101.296532],[21.83736,101.296997],[21.837311,101.297943],[21.83708,101.298828],[21.836729,101.299622],[21.836349,101.300133],[21.835699,101.300697],[21.83474,101.301224],[21.833679,101.301613],[21.832809,101.301918],[21.832371,101.302078],[21.83148,101.302383],[21.83082,101.302612],[21.829941,101.302917],[21.82951,101.303078],[21.82864,101.303383],[21.82777,101.303688],[21.827339,101.303841],[21.827129,101.303917],[21.82626,101.304222],[21.825411,101.304497],[21.82457,101.304688],[21.82436,101.304718],[21.823521,101.304771],[21.822651,101.304733],[21.822201,101.30468],[21.821079,101.304573],[21.82085,101.304527],[21.819771,101.304443],[21.81955,101.304428],[21.81811,101.304497],[21.81752,101.30468],[21.816549,101.305153],[21.81568,101.305801],[21.815121,101.306473],[21.81469,101.307243],[21.81444,101.307861],[21.81424,101.308502],[21.81418,101.308723],[21.81395,101.309578],[21.8139,101.309792],[21.81373,101.310448],[21.81356,101.311096],[21.81325,101.31218],[21.81319,101.312401],[21.81284,101.313881],[21.81263,101.31456],[21.8123,101.315376],[21.81167,101.316238],[21.81151,101.316383],[21.81098,101.31675],[21.810591,101.316917],[21.80978,101.317047],[21.808729,101.316933],[21.808331,101.316833],[21.80751,101.316612],[21.80731,101.316551],[21.806709,101.316383],[21.806101,101.316223],[21.8053,101.316002],[21.804489,101.315781],[21.804079,101.315666],[21.80308,101.315407],[21.802679,101.315308],[21.80188,101.315117],[21.801279,101.31498],[21.80068,101.314873],[21.79945,101.314781],[21.79841,101.314857],[21.798201,101.314888],[21.797569,101.315033],[21.795139,101.316109],[21.793831,101.316849],[21.792339,101.317703],[21.79178,101.318008],[21.789539,101.319283],[21.78265,101.342934],[21.78219,101.344131],[21.781931,101.34478],[21.781851,101.344978],[21.781731,101.345337],[21.781601,101.345802],[21.781321,101.347321],[21.781321,101.348717],[21.78134,101.348991],[21.78142,101.349808],[21.781549,101.350937],[21.78159,101.351227],[21.781731,101.352409],[21.78182,101.353279],[21.781839,101.353569],[21.781839,101.354141],[21.781771,101.35498],[21.78137,101.356293],[21.78125,101.356529],[21.780661,101.357407],[21.780331,101.357803],[21.780149,101.357986],[21.779631,101.35849],[21.77928,101.35881],[21.778761,101.359261],[21.778431,101.359573],[21.77767,101.360451],[21.77689,101.361717],[21.77639,101.362892],[21.776091,101.363632],[21.7756,101.364861],[21.77527,101.365578],[21.77515,101.365807],[21.774731,101.366463],[21.77421,101.367027],[21.77383,101.36734],[21.773621,101.36747],[21.77272,101.367897],[21.77083,101.368332],[21.770361,101.368439],[21.768511,101.368843],[21.76614,101.369759],[21.765829,101.370018],[21.765699,101.370163],[21.7647,101.371513],[21.764299,101.372093],[21.763041,101.37394],[21.76263,101.374557],[21.762211,101.375183],[21.76193,101.375603],[21.7612,101.375648],[21.75919,101.376251],[21.757509,101.376091],[21.7568,101.375893],[21.75511,101.375412],[21.754869,101.375359],[21.75362,101.375191],[21.752081,101.375168],[21.75131,101.375191],[21.750299,101.375198],[21.749281,101.375198],[21.748529,101.375168],[21.74777,101.37513],[21.74675,101.375053],[21.745741,101.374924],[21.745489,101.374878],[21.744989,101.374809],[21.74449,101.374741],[21.74399,101.37468],[21.74349,101.374619],[21.74324,101.374588],[21.74173,101.374428],[21.74098,101.374313],[21.73995,101.374153],[21.738661,101.373993],[21.73815,101.373947],[21.737619,101.373917],[21.736851,101.373947],[21.73633,101.374008],[21.735069,101.374283],[21.73406,101.37468],[21.73381,101.374786],[21.73307,101.375107],[21.73283,101.375229],[21.73185,101.375648],[21.7311,101.375923],[21.730591,101.376083],[21.7293,101.376266],[21.728769,101.376282],[21.727711,101.376221],[21.72718,101.37619],[21.72665,101.376152],[21.72613,101.376167],[21.725349,101.376213],[21.724819,101.376312],[21.72456,101.376373],[21.72378,101.376556],[21.723,101.376747],[21.72221,101.3769],[21.720619,101.37709],[21.71957,101.377083],[21.718781,101.377083],[21.718,101.37706],[21.71748,101.377029],[21.71697,101.377022],[21.715139,101.376961],[21.71434,101.37693],[21.713289,101.376907],[21.712761,101.376877],[21.712231,101.376862],[21.71196,101.376839],[21.71143,101.376793],[21.71064,101.376678],[21.710131,101.376579],[21.709869,101.376511],[21.708151,101.375938],[21.707439,101.375671],[21.70673,101.375397],[21.70648,101.375298],[21.705759,101.375038],[21.70479,101.374771],[21.70454,101.374733],[21.703791,101.374649],[21.703541,101.374641],[21.70084,101.374786],[21.699369,101.374687],[21.696461,101.374207],[21.69548,101.374046],[21.694759,101.373917],[21.69404,101.373779],[21.692101,101.373558],[21.68832,101.373627],[21.68716,101.373703],[21.68671,101.373718],[21.68626,101.373734],[21.68581,101.373756],[21.684259,101.373848],[21.68294,101.373917],[21.68227,101.373962],[21.68181,101.373993],[21.677691,101.374207],[21.6772,101.374252],[21.67627,101.37429],[21.67564,101.374329],[21.675261,101.374352],[21.674931,101.374367],[21.674431,101.374397],[21.674231,101.374382],[21.67403,101.374367],[21.673719,101.374367],[21.67363,101.374397],[21.67362,101.374397],[21.673281,101.374443],[21.672291,101.374519],[21.672041,101.374527],[21.669769,101.374817],[21.668909,101.374962],[21.66818,101.375053],[21.667589,101.375069],[21.66655,101.374992],[21.66567,101.37484],[21.66522,101.374733],[21.66452,101.374573],[21.66358,101.374336],[21.662609,101.374107],[21.660681,101.37365],[21.66044,101.373596],[21.65901,101.37326],[21.658279,101.373192],[21.65803,101.373199],[21.65778,101.37323],[21.65707,101.373413],[21.656429,101.373741],[21.65411,101.375397],[21.65262,101.376442],[21.651871,101.376961],[21.651131,101.37748],[21.649639,101.378517],[21.64854,101.379333],[21.648359,101.379478],[21.647209,101.38092],[21.64658,101.382469],[21.646481,101.382919],[21.646391,101.383598],[21.64636,101.384529],[21.64633,101.385681],[21.646311,101.386139],[21.646299,101.386581],[21.64628,101.387253],[21.64625,101.388138],[21.64624,101.38858],[21.646231,101.389023],[21.646259,101.389893],[21.646299,101.390961],[21.64636,101.391586],[21.646391,101.392227],[21.64641,101.392662],[21.646429,101.392883],[21.646481,101.394188],[21.646429,101.395058],[21.646339,101.395477],[21.646061,101.396561],[21.645821,101.3974],[21.64576,101.397614],[21.645651,101.398033],[21.64547,101.398666],[21.64535,101.399094],[21.64529,101.3993],[21.645109,101.399933],[21.64506,101.400139],[21.643129,101.399544],[21.64254,101.399788],[21.6415,101.400208],[21.640881,101.400436],[21.639811,101.400787],[21.639601,101.400864],[21.639179,101.400993],[21.638599,101.401253],[21.63805,101.401588],[21.637421,101.402153],[21.63689,101.402802],[21.636669,101.403191],[21.63641,101.40377],[21.63624,101.404167],[21.63607,101.404556],[21.63582,101.405159],[21.635731,101.405357],[21.635389,101.406151],[21.635139,101.406754],[21.6348,101.407539],[21.63463,101.407944],[21.63438,101.408531],[21.634041,101.409317],[21.633869,101.409721],[21.638929,101.41069],[21.6392,101.411049],[21.63945,101.411423],[21.639811,101.411957],[21.64032,101.412682],[21.64068,101.413223],[21.641041,101.41375],[21.641399,101.414284],[21.641649,101.414627],[21.641899,101.414993],[21.64266,101.416107],[21.643089,101.416939],[21.64325,101.417381],[21.643419,101.418068],[21.643499,101.418533],[21.6436,101.419006],[21.64378,101.41996],[21.64397,101.420914],[21.64411,101.421623],[21.644251,101.42234],[21.64114,101.423126],[21.640671,101.423347],[21.64003,101.423569],[21.63954,101.423698],[21.63903,101.423843],[21.6387,101.423912],[21.638,101.424049],[21.6373,101.424187],[21.63678,101.424309],[21.63625,101.424438],[21.634991,101.424744],[21.63446,101.424873],[21.63378,101.425079],[21.63345,101.425209],[21.632799,101.425537],[21.632339,101.42585],[21.631901,101.426201],[21.63147,101.426613],[21.631081,101.42704],[21.630831,101.427322],[21.630569,101.427612],[21.63015,101.427834],[21.62956,101.42836],[21.62854,101.429283],[21.628099,101.42968],[21.62752,101.430206],[21.62678,101.430862],[21.618349,101.454582],[21.618311,101.454857],[21.61771,101.456886],[21.616671,101.45816],[21.61628,101.458443],[21.615459,101.458977],[21.61483,101.459373],[21.613991,101.459908],[21.61311,101.46048],[21.61268,101.460747],[21.61224,101.460999],[21.61179,101.461197],[21.610849,101.461502],[21.6096,101.461723],[21.60911,101.4618],[21.60862,101.461884],[21.60788,101.462013],[21.606421,101.462273],[21.6057,101.462334],[21.60523,101.462303],[21.60499,101.46225],[21.604521,101.46212],[21.60429,101.462029],[21.603821,101.461838],[21.60358,101.461731],[21.6031,101.461517],[21.60235,101.461327],[21.601851,101.461273],[21.601089,101.461357],[21.599911,101.461807],[21.59948,101.462097],[21.598249,101.463051],[21.597851,101.463371],[21.597231,101.463837],[21.597031,101.463997],[21.596621,101.46431],[21.59622,101.464577],[21.595289,101.465027],[21.594259,101.465149],[21.593731,101.465141],[21.592951,101.46508],[21.59244,101.465012],[21.59144,101.464943],[21.59119,101.464928],[21.5907,101.464928],[21.59045,101.464943],[21.588699,101.465279],[21.58823,101.465553],[21.58778,101.465813],[21.586901,101.466393],[21.585779,101.467117],[21.5851,101.467484],[21.58486,101.46759],[21.58313,101.467796],[21.581961,101.467537],[21.58009,101.467323],[21.57918,101.467537],[21.57896,101.467628],[21.578751,101.467743],[21.57708,101.469528],[21.57564,101.471237],[21.573721,101.47213],[21.57185,101.47226],[21.571609,101.472267],[21.570921,101.47242],[21.5707,101.472504],[21.56967,101.473106],[21.56683,101.474373],[21.56468,101.474983],[21.564091,101.475304],[21.563181,101.47596],[21.562389,101.476761],[21.56115,101.478378],[21.561001,101.478561],[21.55938,101.480637],[21.559231,101.480827],[21.55831,101.481956],[21.5578,101.482483],[21.55722,101.48291],[21.556589,101.483231],[21.556141,101.483383],[21.554979,101.483566],[21.55451,101.483582],[21.554279,101.483589],[21.552191,101.48365],[21.551279,101.483681],[21.55061,101.483704],[21.548849,101.483757],[21.547979,101.483788],[21.54689,101.483841],[21.546671,101.483856],[21.546049,101.483971],[21.54414,101.484978],[21.54397,101.48513],[21.54348,101.485657],[21.542891,101.48642],[21.54274,101.48661],[21.542,101.487556],[21.541861,101.487747],[21.540859,101.489021],[21.54043,101.48954],[21.540291,101.489708],[21.539841,101.490173],[21.5392,101.4907],[21.53886,101.490921],[21.538691,101.49102],[21.538151,101.491287],[21.537781,101.491432],[21.537041,101.491669],[21.536671,101.491783],[21.5347,101.492409],[21.53422,101.492554],[21.533739,101.492706],[21.533421,101.492813],[21.53117,101.493507],[21.52005,101.497276],[21.51823,101.497932],[21.516729,101.498421],[21.516121,101.498749],[21.515369,101.499313],[21.51487,101.499863],[21.5142,101.500954],[21.51395,101.501404],[21.51309,101.502617],[21.512489,101.50341],[21.5119,101.504204],[21.51145,101.504799],[21.51115,101.505203],[21.509859,101.505867],[21.50952,101.506233],[21.508989,101.506767],[21.508471,101.507317],[21.508301,101.5075],[21.50812,101.507683],[21.50765,101.508568],[21.50758,101.508743],[21.50746,101.509407],[21.507481,101.510117],[21.507641,101.511124],[21.50786,101.512627],[21.507959,101.513397],[21.507151,101.514633],[21.50692,101.515289],[21.506491,101.516243],[21.5063,101.516731],[21.506149,101.517258],[21.506001,101.518044],[21.50596,101.518547],[21.50596,101.518784],[21.50597,101.518982],[21.505989,101.519333],[21.506029,101.519653],[21.506069,101.519997],[21.50596,101.522263],[21.50559,101.523567],[21.50539,101.524117],[21.505199,101.524643],[21.50493,101.525421],[21.504669,101.526169],[21.504499,101.526657],[21.50436,101.527168],[21.50421,101.527679],[21.50399,101.528442],[21.503691,101.529457],[21.50388,101.531113],[21.503839,101.531891],[21.50375,101.532417],[21.503469,101.53344],[21.503189,101.534187],[21.502741,101.535393],[21.502649,101.535629],[21.50247,101.536118],[21.50219,101.53685],[21.502001,101.537354],[21.50169,101.538101],[21.50135,101.539108],[21.50128,101.540138],[21.50182,101.541763],[21.502119,101.54213],[21.502279,101.542297],[21.502819,101.542686],[21.50433,101.543671],[21.505131,101.544182],[21.50856,101.546333],[21.50975,101.547249],[21.51009,101.547607],[21.51037,101.548019],[21.510691,101.548714],[21.51091,101.549713],[21.51087,101.550743],[21.510019,101.552643],[21.50943,101.553497],[21.507971,101.555656],[21.507099,101.556976],[21.50695,101.55722],[21.506689,101.557663],[21.50597,101.558723],[21.5054,101.55957],[21.50499,101.560188],[21.504021,101.561607],[21.50321,101.562866],[21.501711,101.565132],[21.500299,101.567253],[21.49931,101.568764],[21.498329,101.570236],[21.496941,101.572327],[21.49625,101.573372],[21.49472,101.575684],[21.491819,101.579353],[21.48933,101.58075],[21.48888,101.580887],[21.486139,101.581078],[21.48407,101.580566],[21.481621,101.579582],[21.481171,101.579399],[21.480721,101.579224],[21.47644,101.57753],[21.474199,101.57666],[21.47193,101.57579],[21.467951,101.574188],[21.46373,101.572517],[21.46306,101.572258],[21.46283,101.572166],[21.461531,101.571663],[21.45727,101.570129],[21.45557,101.56974],[21.450569,101.568871],[21.450121,101.568939],[21.449129,101.569443],[21.448389,101.570358],[21.447821,101.571732],[21.44714,101.573059],[21.447001,101.573257],[21.44635,101.573936],[21.44599,101.574226],[21.44524,101.574738],[21.44451,101.575249],[21.44367,101.576317],[21.443371,101.57695],[21.44311,101.577583],[21.44302,101.577797],[21.44268,101.578644],[21.442419,101.579277],[21.442169,101.579933],[21.442089,101.580139],[21.441589,101.581169],[21.441469,101.581367],[21.439939,101.583168],[21.43919,101.583748],[21.43844,101.584328],[21.43825,101.584473],[21.43788,101.584763],[21.437309,101.58519],[21.43712,101.585327],[21.43615,101.584167],[21.43479,101.583832],[21.4333,101.582962],[21.43273,101.582451],[21.432541,101.582253],[21.431669,101.581284],[21.430969,101.580513],[21.430269,101.57975],[21.43008,101.579567],[21.429501,101.579071],[21.428391,101.578491],[21.427919,101.578346],[21.427429,101.578247],[21.425461,101.578407],[21.424049,101.579048],[21.420389,101.581108],[21.419979,101.581337],[21.41571,101.583321],[21.41457,101.583511],[21.41366,101.583542],[21.41206,101.583427],[21.408621,101.583557],[21.40716,101.584686],[21.4049,101.588074],[21.403959,101.589478],[21.40303,101.590919],[21.402679,101.592781],[21.403009,101.593674],[21.40378,101.594841],[21.40402,101.595253],[21.40432,101.595886],[21.404461,101.596336],[21.404591,101.597549],[21.40451,101.598282],[21.40427,101.599258],[21.404169,101.599762],[21.40451,101.601669],[21.406111,101.604439],[21.40613,101.605873],[21.4058,101.606552],[21.404699,101.607536],[21.404261,101.607697],[21.403339,101.607971],[21.402929,101.608177],[21.402559,101.608459],[21.401739,101.610237],[21.401871,101.611267],[21.40221,101.612251],[21.402809,101.613823],[21.40299,101.614487],[21.40303,101.614967],[21.40284,101.616112],[21.401939,101.618828],[21.40192,101.619072],[21.40217,101.620598],[21.40247,101.621201],[21.40373,101.623901],[21.40465,101.626793],[21.40407,101.628906],[21.40324,101.63076],[21.403139,101.630989],[21.40155,101.634537],[21.40093,101.636017],[21.40012,101.637909],[21.399981,101.638763],[21.400181,101.639793],[21.400709,101.640717],[21.40102,101.641144],[21.401131,101.641296],[21.40196,101.642464],[21.402081,101.642639],[21.402981,101.643921],[21.404921,101.645638],[21.40534,101.645882],[21.406879,101.646599],[21.407089,101.646721],[21.40806,101.647476],[21.40929,101.649406],[21.40995,101.651413],[21.410191,101.652168],[21.412201,101.65831],[21.412661,101.659714],[21.413031,101.660873],[21.41342,101.661987],[21.413731,101.66288],[21.414021,101.663788],[21.4142,101.664726],[21.4142,101.665672],[21.414061,101.666344],[21.41399,101.66655],[21.41383,101.666992],[21.413389,101.66777],[21.41296,101.668297],[21.41247,101.668762],[21.411989,101.669197],[21.411329,101.669762],[21.410851,101.670174],[21.409861,101.671089],[21.409519,101.671387],[21.40654,101.674118],[21.40633,101.674179],[21.405331,101.675163],[21.40472,101.675667],[21.403,101.676773],[21.402309,101.677094],[21.402069,101.677193],[21.401581,101.677368],[21.40037,101.677727],[21.39938,101.678017],[21.397619,101.678543],[21.39686,101.678772],[21.39661,101.678848],[21.39558,101.679153],[21.393749,101.679703],[21.39349,101.679787],[21.39068,101.680634],[21.3897,101.680923],[21.388531,101.681267],[21.3883,101.681343],[21.38497,101.681824],[21.38472,101.681793],[21.38423,101.681709],[21.383301,101.681473],[21.38283,101.681328],[21.381849,101.681137],[21.3811,101.681099],[21.37989,101.681252],[21.374399,101.682503],[21.371639,101.683113],[21.37097,101.683243],[21.370119,101.683434],[21.369711,101.683517],[21.36779,101.683937],[21.366369,101.684273],[21.363689,101.684883],[21.358419,101.68605],[21.355499,101.686691],[21.35397,101.687172],[21.351471,101.688713],[21.34923,101.689758],[21.34716,101.689621],[21.346491,101.689499],[21.34627,101.689461],[21.3445,101.68914],[21.34428,101.68911],[21.34269,101.688812],[21.340111,101.68895],[21.33828,101.689888],[21.337641,101.690331],[21.334961,101.692108],[21.332781,101.692627],[21.3321,101.692612],[21.331181,101.692581],[21.330429,101.692551],[21.330179,101.692528],[21.326281,101.692917],[21.324341,101.693268],[21.324089,101.693314],[21.32147,101.693352],[21.31986,101.693321],[21.317921,101.694153],[21.317711,101.69426],[21.31728,101.694427],[21.316139,101.69445],[21.314119,101.693893],[21.3139,101.693832],[21.31188,101.693459],[21.30991,101.693947],[21.308069,101.69548],[21.30736,101.696136],[21.306259,101.697166],[21.30348,101.699059],[21.30176,101.699493],[21.29907,101.699257],[21.293909,101.698067],[21.292749,101.697807],[21.289789,101.697159],[21.289129,101.697006],[21.28742,101.696632],[21.286369,101.696388],[21.28471,101.696053],[21.28323,101.696136],[21.281811,101.696793],[21.28023,101.698433],[21.27973,101.699074],[21.279221,101.699722],[21.27784,101.701424],[21.27766,101.70163],[21.276819,101.70269],[21.276661,101.702904],[21.275181,101.70472],[21.27319,101.706131],[21.271839,101.706734],[21.271469,101.707047],[21.270941,101.70787],[21.26981,101.711739],[21.26972,101.711983],[21.2689,101.713188],[21.2665,101.715477],[21.26597,101.715958],[21.265369,101.716316],[21.26404,101.716522],[21.263161,101.716293],[21.260771,101.714844],[21.25922,101.713852],[21.257099,101.712517],[21.25647,101.712128],[21.256081,101.711884],[21.255791,101.711723],[21.25561,101.711571],[21.25526,101.711327],[21.25515,101.711273],[21.2542,101.710693],[21.253139,101.710037],[21.253019,101.709969],[21.252831,101.709846],[21.251011,101.708702],[21.250351,101.708321],[21.249781,101.70813],[21.24929,101.707947],[21.24873,101.70787],[21.24799,101.707802],[21.246639,101.707718],[21.24645,101.707703],[21.24424,101.707573],[21.24391,101.707512],[21.24243,101.707199],[21.23983,101.706123],[21.237459,101.705139],[21.232361,101.703072],[21.232071,101.702988],[21.229389,101.702309],[21.229059,101.702217],[21.22883,101.702263],[21.22781,101.702744],[21.227631,101.702858],[21.226589,101.703712],[21.22473,101.704857],[21.22368,101.705063],[21.221531,101.704613],[21.22003,101.704063],[21.217899,101.703362],[21.21722,101.703201],[21.21579,101.703049],[21.21278,101.70285],[21.209311,101.702278],[21.207649,101.701683],[21.20392,101.700203],[21.202351,101.699127],[21.200911,101.696533],[21.1991,101.693657],[21.19673,101.692017],[21.194309,101.690483],[21.19376,101.690102],[21.193081,101.689651],[21.1917,101.688637],[21.190769,101.687233],[21.19038,101.68663],[21.190069,101.686272],[21.189859,101.686096],[21.18948,101.685799],[21.188499,101.68512],[21.18718,101.684097],[21.18701,101.683723],[21.186689,101.683517],[21.186279,101.683693],[21.18615,101.683632],[21.185841,101.683296],[21.18573,101.682793],[21.18601,101.681519],[21.18609,101.680992],[21.18647,101.680603],[21.186871,101.680237],[21.187,101.679932],[21.18693,101.678787],[21.18714,101.678131],[21.187559,101.677711],[21.18775,101.677139],[21.18775,101.676033],[21.187361,101.675491],[21.18634,101.67466],[21.186001,101.674156],[21.185749,101.673912],[21.18507,101.673508],[21.184771,101.673378],[21.184389,101.673187],[21.18375,101.672913],[21.182159,101.67215],[21.180889,101.671158],[21.179991,101.670067],[21.17861,101.669197],[21.17667,101.668991],[21.17417,101.668457],[21.173349,101.668541],[21.17028,101.669739],[21.16925,101.670959],[21.1682,101.672523],[21.16785,101.672813],[21.166189,101.673027],[21.16534,101.672256],[21.16515,101.671768],[21.16436,101.671318],[21.164221,101.671341],[21.162239,101.671417],[21.15913,101.672249],[21.158449,101.672173],[21.157101,101.671822],[21.156509,101.671494],[21.15626,101.671288],[21.155239,101.671181],[21.15383,101.6716],[21.153191,101.672234],[21.15299,101.67263],[21.152439,101.67305],[21.151421,101.673592],[21.150631,101.67337],[21.15029,101.672989],[21.15037,101.672081],[21.150669,101.671257],[21.150391,101.670158],[21.15033,101.670067],[21.14954,101.669273],[21.14859,101.668411],[21.14756,101.668449],[21.14698,101.668678],[21.145809,101.668266],[21.14555,101.667824],[21.14522,101.666992],[21.14439,101.666809],[21.14426,101.666893],[21.14325,101.666779],[21.141621,101.665131],[21.140881,101.664749],[21.139521,101.664429],[21.138849,101.664528],[21.13736,101.665062],[21.1367,101.665047],[21.133381,101.664391],[21.13324,101.66433],[21.132509,101.663429],[21.13204,101.662064],[21.13155,101.661484],[21.12817,101.657883],[21.12644,101.656097],[21.124781,101.654663],[21.123831,101.654449],[21.122801,101.654503],[21.121611,101.653748],[21.12063,101.65239],[21.119909,101.652184],[21.119591,101.652199],[21.118719,101.651787],[21.116011,101.64978],[21.114189,101.648827],[21.11272,101.647827],[21.11216,101.647171],[21.11198,101.646858],[21.110399,101.645432],[21.10799,101.643784],[21.1066,101.642517],[21.105141,101.642128],[21.10467,101.642021],[21.10405,101.641533],[21.10235,101.639343],[21.10084,101.638039],[21.10059,101.637817],[21.099581,101.637688],[21.098789,101.637917],[21.097651,101.637497],[21.09745,101.636864],[21.097389,101.636368],[21.0968,101.635696],[21.09623,101.635429],[21.095579,101.635422],[21.094721,101.635567],[21.093611,101.635033],[21.0937,101.634087],[21.093571,101.633324],[21.093201,101.633339],[21.09173,101.633362],[21.091311,101.634033],[21.091339,101.634407],[21.090811,101.634972],[21.090679,101.634956],[21.090429,101.634933],[21.09004,101.63427],[21.090031,101.633827],[21.08955,101.633232],[21.08824,101.63266],[21.08761,101.631882],[21.08699,101.629753],[21.086281,101.629288],[21.085979,101.629883],[21.085951,101.630363],[21.085409,101.631233],[21.08371,101.633232],[21.08346,101.633499],[21.08213,101.634163],[21.081591,101.634033],[21.08135,101.633919],[21.08079,101.63427],[21.08078,101.634552],[21.080839,101.635437],[21.08036,101.63588],[21.08003,101.635902],[21.07967,101.636673],[21.079691,101.638252],[21.079399,101.639343],[21.078541,101.639977],[21.077511,101.640182],[21.07645,101.639679],[21.076229,101.639442],[21.075251,101.639282],[21.0749,101.639587],[21.074249,101.640633],[21.0742,101.641724],[21.074301,101.642326],[21.073811,101.642967],[21.07135,101.643784],[21.06925,101.644409],[21.06815,101.643997],[21.06529,101.641731],[21.06399,101.64122],[21.063589,101.640419],[21.06303,101.6399],[21.062799,101.640053],[21.06217,101.640602],[21.061819,101.641602],[21.061831,101.641678],[21.061939,101.64257],[21.061939,101.643494],[21.06189,101.64373],[21.06179,101.644058],[21.061331,101.644096],[21.060949,101.644112],[21.060551,101.64415],[21.058901,101.644211],[21.05814,101.644142],[21.057421,101.643707],[21.0557,101.641777],[21.054649,101.639397],[21.054371,101.637123],[21.05472,101.636192],[21.05496,101.635902],[21.055201,101.634933],[21.05521,101.633789],[21.05562,101.633133],[21.056,101.632858],[21.056259,101.632507],[21.056231,101.631889],[21.056009,101.631126],[21.056009,101.63031],[21.055611,101.629601],[21.05542,101.629463],[21.055229,101.629066],[21.05549,101.628708],[21.055759,101.628609],[21.056959,101.628326],[21.05728,101.628036],[21.057211,101.627663],[21.05706,101.627472],[21.056881,101.627289],[21.056749,101.626503],[21.056881,101.625992],[21.056391,101.625427],[21.056259,101.62542],[21.055861,101.625381],[21.055531,101.624649],[21.05567,101.624107],[21.05521,101.623482],[21.055071,101.623451],[21.054529,101.623337],[21.053841,101.623421],[21.05345,101.623573],[21.05257,101.623238],[21.052481,101.623108],[21.05212,101.622597],[21.05159,101.622292],[21.05098,101.622124],[21.05027,101.621071],[21.04999,101.617973],[21.050171,101.617203],[21.0518,101.614067],[21.053329,101.611893],[21.05361,101.610832],[21.054119,101.609283],[21.05393,101.608627],[21.05303,101.606812],[21.05307,101.605743],[21.053431,101.604851],[21.05352,101.60408],[21.05327,101.602287],[21.05216,101.599876],[21.052219,101.598587],[21.052691,101.596916],[21.052589,101.596092],[21.051649,101.59243],[21.05213,101.591179],[21.054859,101.588188],[21.055071,101.586418],[21.055019,101.58622],[21.053671,101.583351],[21.053471,101.583023],[21.05316,101.581673],[21.05213,101.580551],[21.05195,101.580467],[21.048651,101.579102],[21.047661,101.577583],[21.047159,101.575447],[21.04752,101.574654],[21.047939,101.574249],[21.047831,101.573502],[21.04771,101.573387],[21.045891,101.571762],[21.04542,101.57132],[21.044941,101.570572],[21.043739,101.569817],[21.043119,101.569893],[21.040911,101.57045],[21.039921,101.570267],[21.03924,101.569939],[21.038771,101.569153],[21.038679,101.568779],[21.03887,101.567871],[21.03911,101.56739],[21.038759,101.56649],[21.03618,101.56472],[21.034491,101.564079],[21.03421,101.563957],[21.033649,101.563393],[21.033291,101.562782],[21.03249,101.562347],[21.03064,101.561867],[21.02869,101.56057],[21.027941,101.558998],[21.028431,101.557823],[21.02883,101.557358],[21.0292,101.556396],[21.02948,101.554993],[21.03001,101.553947],[21.030121,101.553062],[21.03009,101.55275],[21.02957,101.552261],[21.0285,101.551842],[21.02776,101.551918],[21.02747,101.551987],[21.02669,101.551743],[21.025669,101.550957],[21.02426,101.549026],[21.024151,101.548843],[21.02359,101.546783],[21.022961,101.546013],[21.022449,101.545723],[21.02191,101.545181],[21.02103,101.544579],[21.01865,101.544144],[21.01754,101.543259],[21.017481,101.543068],[21.01631,101.540771],[21.01417,101.53756],[21.01343,101.536171],[21.01198,101.534866],[21.01107,101.533409],[21.01088,101.532593],[21.01087,101.53167],[21.01041,101.530777],[21.00898,101.529266],[21.00782,101.526787],[21.00745,101.525253],[21.00626,101.522858],[21.00585,101.522148],[21.005159,101.521637],[21.0049,101.521523],[21.004641,101.520668],[21.00502,101.518944],[21.00486,101.518288],[21.004499,101.517731],[21.003889,101.517303],[21.003651,101.517212],[21.003281,101.516609],[21.00312,101.515732],[21.002621,101.515251],[21.001989,101.514832],[21.00145,101.514183],[21.000019,101.513237],[20.99921,101.513107],[20.99798,101.513229],[20.997299,101.513573],[20.995371,101.514557],[20.99423,101.514267],[20.99411,101.514107],[20.993151,101.51326],[20.99276,101.512451],[20.99169,101.509193],[20.99136,101.508392],[20.99144,101.507004],[20.99139,101.506577],[20.99114,101.505531],[20.990749,101.504936],[20.990391,101.50457],[20.9893,101.504051],[20.988171,101.503937],[20.987301,101.503036],[20.986629,101.502098],[20.986059,101.501862],[20.98563,101.501823],[20.985189,101.501129],[20.98535,101.5009],[20.98554,101.500671],[20.985479,101.499657],[20.985201,101.499428],[20.984381,101.498848],[20.9841,101.4981],[20.98411,101.497597],[20.983919,101.496964],[20.982651,101.493713],[20.982571,101.49353],[20.98209,101.492943],[20.98139,101.492027],[20.98027,101.491493],[20.979931,101.491463],[20.97905,101.490608],[20.978979,101.490211],[20.97872,101.486893],[20.97826,101.484161],[20.977501,101.481491],[20.977671,101.480797],[20.97838,101.479523],[20.978571,101.478737],[20.97826,101.477966],[20.97625,101.475441],[20.975889,101.474953],[20.97571,101.474243],[20.97571,101.473801],[20.975189,101.473083],[20.974569,101.472763],[20.971781,101.472397],[20.971319,101.472343],[20.97085,101.471573],[20.9708,101.470627],[20.970989,101.469879],[20.97171,101.468323],[20.9718,101.46756],[20.97176,101.466614],[20.97085,101.464706],[20.96999,101.464142],[20.96937,101.463982],[20.968889,101.463127],[20.969021,101.462761],[20.96921,101.462219],[20.969311,101.459877],[20.96875,101.458588],[20.96818,101.458328],[20.967899,101.458344],[20.96715,101.457619],[20.966829,101.456596],[20.96603,101.456177],[20.964979,101.456093],[20.964399,101.455673],[20.96394,101.455139],[20.96306,101.454193],[20.96171,101.452744],[20.96068,101.451591],[20.956091,101.446877],[20.95311,101.443123],[20.94928,101.435982],[20.947901,101.432739],[20.947109,101.430893],[20.944679,101.423531],[20.94459,101.423302],[20.94437,101.422813],[20.94393,101.422318],[20.94335,101.421989],[20.940571,101.421303],[20.937679,101.420601],[20.93697,101.42028],[20.934799,101.41803],[20.934759,101.417976],[20.933929,101.41713],[20.931311,101.414238],[20.930401,101.411774],[20.928591,101.406677],[20.92713,101.402611],[20.926319,101.400558],[20.9261,101.400032],[20.92557,101.399147],[20.924749,101.397987],[20.92362,101.397202],[20.92201,101.396652],[20.919701,101.396263],[20.916941,101.396027],[20.91567,101.396103],[20.91518,101.396057],[20.91395,101.395683],[20.912701,101.395607],[20.912001,101.395248],[20.91086,101.393898],[20.91008,101.392738],[20.90941,101.39241],[20.908859,101.392418],[20.908319,101.392258],[20.907619,101.391838],[20.90641,101.391373],[20.90514,101.390343],[20.90481,101.390007],[20.90452,101.389236],[20.904369,101.387253],[20.90424,101.386543],[20.90419,101.385681],[20.904249,101.385193],[20.903959,101.384361],[20.902889,101.383614],[20.902361,101.382896],[20.901699,101.381378],[20.901421,101.38102],[20.90081,101.380478],[20.900419,101.379936],[20.89982,101.378464],[20.89942,101.377693],[20.89913,101.376877],[20.898861,101.375717],[20.89913,101.374657],[20.899389,101.373901],[20.899771,101.373192],[20.900129,101.372658],[20.900181,101.371742],[20.89929,101.370667],[20.899111,101.369743],[20.89933,101.36908],[20.89933,101.368187],[20.89893,101.366798],[20.898621,101.365959],[20.897791,101.364807],[20.89596,101.363327],[20.89566,101.363159],[20.894501,101.362846],[20.893221,101.362282],[20.89233,101.362289],[20.891911,101.362503],[20.89109,101.362419],[20.890869,101.361862],[20.890989,101.361412],[20.891991,101.359993],[20.892191,101.359543],[20.892321,101.359039],[20.892361,101.357803],[20.891979,101.356918],[20.89134,101.356422],[20.89098,101.355713],[20.89085,101.354797],[20.890739,101.354477],[20.890169,101.353882],[20.88908,101.35334],[20.887831,101.352203],[20.887449,101.351532],[20.887051,101.350227],[20.886459,101.347748],[20.88616,101.345627],[20.885771,101.344566],[20.885139,101.343468],[20.88505,101.342644],[20.885099,101.342339],[20.884859,101.341637],[20.88353,101.339973],[20.882351,101.338768],[20.880859,101.3377],[20.87953,101.335678],[20.878099,101.334183],[20.87734,101.333168],[20.876961,101.332138],[20.87657,101.331589],[20.87565,101.330719],[20.875271,101.329689],[20.875191,101.328537],[20.874901,101.327873],[20.87468,101.327583],[20.874399,101.326897],[20.87429,101.325577],[20.87417,101.325081],[20.87361,101.324387],[20.87336,101.323647],[20.87372,101.323196],[20.8745,101.322937],[20.87533,101.322411],[20.876341,101.321587],[20.87653,101.320892],[20.876419,101.320633],[20.87587,101.319832],[20.8755,101.319199],[20.874941,101.31871],[20.8743,101.318604],[20.87339,101.318153],[20.87311,101.317917],[20.872601,101.317039],[20.87215,101.316429],[20.87092,101.316002],[20.87092,101.315643],[20.87122,101.314941],[20.871281,101.314583],[20.871241,101.314484],[20.87109,101.314323],[20.870701,101.314133],[20.87014,101.313477],[20.869671,101.313187],[20.869301,101.312759],[20.86846,101.312218],[20.86771,101.311951],[20.8671,101.311447],[20.86688,101.311409],[20.866301,101.3116],[20.86607,101.311523],[20.865959,101.311409],[20.865801,101.310837],[20.86561,101.31041],[20.865049,101.309357],[20.86484,101.309067],[20.86454,101.308907],[20.86376,101.309387],[20.86334,101.309227],[20.86293,101.308487],[20.862379,101.308144],[20.86187,101.308067],[20.86134,101.307678],[20.86109,101.307343],[20.86058,101.307114],[20.859579,101.306999],[20.859261,101.307022],[20.858521,101.306557],[20.85837,101.306557],[20.85812,101.306839],[20.857849,101.307281],[20.85762,101.307373],[20.85746,101.307266],[20.85737,101.306808],[20.85758,101.304932],[20.85774,101.304482],[20.857809,101.303909],[20.85762,101.303467],[20.857031,101.302849],[20.85684,101.302551],[20.856741,101.301697],[20.85685,101.301376],[20.857031,101.301117],[20.857401,101.300873],[20.8578,101.300407],[20.857809,101.299911],[20.85775,101.299751],[20.85659,101.298553],[20.85626,101.298347],[20.85582,101.297791],[20.8554,101.297028],[20.8552,101.296783],[20.85458,101.296593],[20.854441,101.296631],[20.85359,101.296577],[20.85334,101.296173],[20.853201,101.295738],[20.852631,101.295326],[20.85215,101.295288],[20.85099,101.294746],[20.849661,101.293571],[20.84874,101.292473],[20.84767,101.291672],[20.845869,101.291008],[20.845289,101.290916],[20.84473,101.290749],[20.8437,101.289886],[20.84339,101.289398],[20.842211,101.288437],[20.842039,101.288353],[20.84111,101.288147],[20.839911,101.287758],[20.839411,101.287682],[20.837811,101.286537],[20.836929,101.2864],[20.83576,101.286842],[20.83511,101.28685],[20.834379,101.286758],[20.83363,101.286812],[20.83313,101.286972],[20.832451,101.28698],[20.83209,101.286903],[20.83136,101.286858],[20.8307,101.286659],[20.82987,101.286171],[20.827419,101.284218],[20.82687,101.283821],[20.826639,101.2836],[20.826469,101.282822],[20.827129,101.280853],[20.827259,101.280098],[20.827181,101.279358],[20.827009,101.278397],[20.82641,101.276901],[20.82559,101.276009],[20.823879,101.273521],[20.823151,101.272568],[20.82159,101.269386],[20.82069,101.2687],[20.81974,101.268578],[20.81888,101.268013],[20.818501,101.26712],[20.818159,101.266602],[20.81764,101.265961],[20.8174,101.265213],[20.817101,101.263397],[20.81666,101.26268],[20.81521,101.260689],[20.81455,101.2593],[20.81427,101.257919],[20.813629,101.256981],[20.812321,101.256058],[20.81144,101.255783],[20.81056,101.255829],[20.80987,101.255524],[20.809561,101.254936],[20.809259,101.254532],[20.808781,101.25428],[20.80657,101.253616],[20.8057,101.252892],[20.805111,101.25174],[20.804529,101.251251],[20.804199,101.25116],[20.80361,101.250793],[20.803249,101.25042],[20.802361,101.250076],[20.80204,101.250076],[20.80131,101.249603],[20.801081,101.248833],[20.800421,101.248154],[20.799601,101.24794],[20.79903,101.247581],[20.79871,101.247009],[20.79841,101.246651],[20.798059,101.246368],[20.797729,101.245918],[20.79738,101.245552],[20.796869,101.245453],[20.796061,101.245071],[20.795691,101.244034],[20.79571,101.24337],[20.79591,101.242928],[20.79604,101.242363],[20.79582,101.242012],[20.79541,101.241859],[20.79455,101.241829],[20.79377,101.241577],[20.79318,101.241508],[20.792471,101.241676],[20.791559,101.241417],[20.79118,101.241043],[20.79059,101.240044],[20.79001,101.239571],[20.78912,101.239166],[20.788349,101.238457],[20.78746,101.23822],[20.787109,101.238312],[20.7859,101.238449],[20.78516,101.238167],[20.784611,101.237091],[20.78401,101.236816],[20.783689,101.236809],[20.78311,101.236382],[20.782841,101.235779],[20.78194,101.234947],[20.78125,101.234741],[20.780479,101.234016],[20.780319,101.233017],[20.7799,101.232117],[20.77844,101.230377],[20.778259,101.229301],[20.778521,101.22863],[20.778641,101.228104],[20.77836,101.227226],[20.77755,101.225906],[20.77619,101.222702],[20.775499,101.221542],[20.775351,101.220627],[20.775431,101.219948],[20.775299,101.21936],[20.774981,101.219063],[20.774429,101.218277],[20.77429,101.217552],[20.774059,101.21685],[20.77401,101.21595],[20.7736,101.214958],[20.77289,101.214157],[20.772711,101.213707],[20.77206,101.213028],[20.77157,101.212852],[20.77067,101.212082],[20.769079,101.211403],[20.76856,101.210831],[20.7684,101.210358],[20.76782,101.209717],[20.766581,101.208923],[20.766041,101.208389],[20.76475,101.206596],[20.7642,101.20533],[20.763359,101.204628],[20.76206,101.204338],[20.76133,101.203827],[20.760889,101.203232],[20.76026,101.202133],[20.75979,101.201714],[20.75909,101.201591],[20.758789,101.201103],[20.758659,101.200577],[20.758289,101.199913],[20.756969,101.198578],[20.75625,101.197777],[20.75568,101.197388],[20.754919,101.196739],[20.754379,101.196007],[20.753799,101.194603],[20.753019,101.193871],[20.752131,101.193619],[20.75107,101.192886],[20.75004,101.191017],[20.749201,101.190369],[20.74798,101.190247],[20.747049,101.189789],[20.746679,101.189377],[20.74592,101.18782],[20.744631,101.186089],[20.744249,101.185173],[20.743811,101.18457],[20.742531,101.18351],[20.74172,101.181969],[20.740219,101.179893],[20.739519,101.178558],[20.73938,101.178192],[20.73859,101.177406],[20.73609,101.17572],[20.735571,101.175194],[20.735161,101.174278],[20.734949,101.173271],[20.73436,101.171417],[20.73366,101.16983],[20.733391,101.168877],[20.73332,101.167488],[20.73292,101.166161],[20.732599,101.165382],[20.7318,101.164146],[20.730471,101.162468],[20.729731,101.161346],[20.728519,101.158813],[20.727631,101.157448],[20.727249,101.156227],[20.72673,101.155281],[20.72649,101.154922],[20.72521,101.153793],[20.72459,101.152687],[20.724159,101.150543],[20.723579,101.148811],[20.722309,101.14669],[20.721519,101.145203],[20.72089,101.142311],[20.72014,101.139526],[20.719931,101.138321],[20.71986,101.13755],[20.71986,101.135567],[20.71977,101.135147],[20.71953,101.134521],[20.719139,101.133034],[20.719021,101.131973],[20.71859,101.131027],[20.716841,101.128883],[20.715891,101.127151],[20.71361,101.123306],[20.713131,101.122078],[20.71228,101.120903],[20.71139,101.119331],[20.71073,101.116898],[20.71067,101.116501],[20.71023,101.115593],[20.70933,101.11425],[20.70879,101.112427],[20.70808,101.111382],[20.70723,101.10994],[20.70668,101.108551],[20.706181,101.106972],[20.70561,101.10614],[20.70388,101.104538],[20.70244,101.102783],[20.70118,101.09993],[20.70072,101.09906],[20.6994,101.097847],[20.69784,101.095589],[20.69607,101.093971],[20.69558,101.093132],[20.69499,101.0914],[20.69352,101.089119],[20.689859,101.084457],[20.68833,101.082237],[20.68816,101.081863],[20.68788,101.079727],[20.68796,101.077667],[20.688219,101.076057],[20.688129,101.075287],[20.68651,101.071457],[20.686211,101.070671],[20.68609,101.069862],[20.68597,101.068253],[20.685909,101.066559],[20.68614,101.0644],[20.686119,101.062973],[20.686029,101.062637],[20.685539,101.061783],[20.68491,101.061203],[20.68383,101.060493],[20.68259,101.059792],[20.68153,101.059624],[20.68082,101.059608],[20.67993,101.059982],[20.67845,101.061462],[20.67696,101.063042],[20.676001,101.063911],[20.67528,101.064041],[20.67485,101.063957],[20.674549,101.06398],[20.67375,101.06414],[20.672791,101.063828],[20.67153,101.063164],[20.67119,101.063087],[20.670349,101.06321],[20.66991,101.063431],[20.669331,101.063477],[20.66877,101.063271],[20.66786,101.063087],[20.667271,101.062637],[20.66712,101.06237],[20.666519,101.061897],[20.666201,101.061867],[20.664379,101.061996],[20.663731,101.062233],[20.6633,101.0625],[20.66238,101.0625],[20.662001,101.061981],[20.661909,101.061668],[20.661579,101.061172],[20.66132,101.061043],[20.660379,101.060806],[20.659349,101.060799],[20.658239,101.06041],[20.657511,101.060318],[20.656771,101.060303],[20.656139,101.060768],[20.65538,101.064034],[20.654011,101.066132],[20.653879,101.06678],[20.65395,101.067062],[20.653839,101.067787],[20.65346,101.068527],[20.65251,101.069458],[20.65188,101.069992],[20.65143,101.070847],[20.651449,101.073021],[20.65098,101.073807],[20.650551,101.073967],[20.647909,101.074493],[20.647511,101.07473],[20.647209,101.075127],[20.647039,101.076431],[20.64661,101.077271],[20.646231,101.07766],[20.645269,101.078148],[20.64476,101.078644],[20.644279,101.07943],[20.64299,101.080406],[20.64089,101.081017],[20.640221,101.081093],[20.639441,101.081612],[20.638889,101.082474],[20.63821,101.082863],[20.63739,101.082977],[20.63587,101.08374],[20.63508,101.083847],[20.633369,101.083763],[20.63271,101.083946],[20.632099,101.084244],[20.631451,101.084351],[20.629339,101.083977],[20.628559,101.083351],[20.628071,101.082176],[20.62792,101.081711],[20.627359,101.080887],[20.626101,101.079613],[20.62479,101.078598],[20.622829,101.077782],[20.62022,101.076309],[20.61867,101.07502],[20.617029,101.073868],[20.616859,101.073776],[20.615549,101.073547],[20.614929,101.073242],[20.61466,101.072731],[20.61433,101.071564],[20.61392,101.070877],[20.61338,101.069649],[20.612909,101.069092],[20.611031,101.068062],[20.6094,101.067436],[20.608749,101.067139],[20.607571,101.066399],[20.60638,101.065758],[20.605659,101.065567],[20.604589,101.065857],[20.60412,101.066147],[20.6033,101.0662],[20.602989,101.066032],[20.60177,101.064842],[20.601231,101.064377],[20.60047,101.063942],[20.59808,101.063057],[20.597231,101.062599],[20.596189,101.06221],[20.59548,101.061638],[20.59498,101.060852],[20.59428,101.060387],[20.59376,101.060303],[20.593109,101.059952],[20.591631,101.058723],[20.59132,101.058113],[20.590731,101.055931],[20.589729,101.053772],[20.58914,101.051903],[20.588221,101.050682],[20.586269,101.048897],[20.585609,101.048561],[20.584181,101.048302],[20.58263,101.048203],[20.58144,101.047684],[20.579809,101.047829],[20.578791,101.046982],[20.578609,101.046478],[20.578621,101.045578],[20.578329,101.045082],[20.57781,101.04483],[20.576771,101.043968],[20.575359,101.04261],[20.57526,101.042007],[20.57534,101.041771],[20.5756,101.041321],[20.57601,101.040932],[20.57641,101.04068],[20.57692,101.040031],[20.57786,101.038063],[20.57855,101.037613],[20.57943,101.037949],[20.579651,101.0382],[20.580391,101.039436],[20.58083,101.039673],[20.58103,101.039307],[20.58106,101.03894],[20.58148,101.0383],[20.581739,101.038254],[20.582291,101.037956],[20.58223,101.037659],[20.582001,101.03701],[20.582211,101.036247],[20.582529,101.036034],[20.58309,101.035378],[20.583151,101.034973],[20.58288,101.034416],[20.582211,101.03434],[20.581659,101.03476],[20.58082,101.034737],[20.58021,101.033791],[20.58004,101.033241],[20.58007,101.032333],[20.579781,101.031731],[20.577749,101.029953],[20.57756,101.029602],[20.577141,101.029343],[20.57696,101.029427],[20.57642,101.029877],[20.57612,101.02993],[20.575781,101.0299],[20.57556,101.029831],[20.57505,101.028816],[20.574751,101.028816],[20.57456,101.028908],[20.57383,101.028847],[20.572729,101.028511],[20.57069,101.028091],[20.5688,101.027817],[20.56827,101.027237],[20.568291,101.026779],[20.568439,101.026031],[20.56822,101.025513],[20.567841,101.025352],[20.567329,101.02552],[20.566971,101.025757],[20.56641,101.025757],[20.564489,101.024986],[20.564039,101.02459],[20.56389,101.024231],[20.563801,101.02388],[20.563551,101.023453],[20.563129,101.023178],[20.562531,101.023003],[20.562229,101.022728],[20.56225,101.02198],[20.56193,101.021362],[20.561541,101.021072],[20.56139,101.020493],[20.561449,101.020393],[20.56163,101.019592],[20.561159,101.019112],[20.560499,101.018959],[20.55938,101.019341],[20.558701,101.01915],[20.55862,101.019051],[20.55801,101.018784],[20.5574,101.01857],[20.55698,101.01754],[20.556499,101.01696],[20.55608,101.016747],[20.555599,101.016113],[20.55518,101.014618],[20.554899,101.013847],[20.55479,101.012917],[20.555,101.012421],[20.555349,101.011757],[20.555389,101.011497],[20.55579,101.011002],[20.55604,101.01088],[20.55661,101.01004],[20.556971,101.008743],[20.557289,101.008118],[20.557541,101.007347],[20.55731,101.006798],[20.55694,101.006767],[20.556709,101.006798],[20.55617,101.006683],[20.555639,101.006241],[20.55555,101.005898],[20.555599,101.005508],[20.555901,101.004578],[20.555861,101.00415],[20.555599,101.003983],[20.55525,101.003532],[20.555149,101.003014],[20.55477,101.002808],[20.554411,101.002403],[20.554399,101.002052],[20.55467,101.000832],[20.55497,101.000343],[20.555241,101.000122],[20.5555,100.999748],[20.555519,100.99926],[20.555429,100.996834],[20.554729,100.995697],[20.55479,100.995163],[20.55497,100.994797],[20.55489,100.994133],[20.55426,100.993599],[20.55397,100.993568],[20.55353,100.993156],[20.55308,100.992416],[20.552521,100.992332],[20.55209,100.992523],[20.551741,100.99231],[20.551531,100.991898],[20.55085,100.990868],[20.55032,100.990334],[20.549789,100.990082],[20.549299,100.989761],[20.54896,100.989288],[20.54842,100.988937],[20.547911,100.989052],[20.547541,100.989052],[20.54726,100.988808],[20.547199,100.988564],[20.547291,100.988129],[20.54792,100.987732],[20.548281,100.987221],[20.54855,100.986969],[20.54892,100.98597],[20.549141,100.985703],[20.54917,100.985458],[20.549219,100.984077],[20.548691,100.982964],[20.54842,100.981506],[20.548479,100.980377],[20.5481,100.978722],[20.54752,100.978149],[20.54685,100.977989],[20.54624,100.97744],[20.5457,100.976273],[20.5452,100.975906],[20.544399,100.975807],[20.54377,100.975662],[20.542471,100.975243],[20.54208,100.974892],[20.54159,100.974548],[20.539921,100.973717],[20.53916,100.973557],[20.538691,100.973351],[20.538179,100.973351],[20.5369,100.974091],[20.536739,100.974319],[20.536341,100.974571],[20.535971,100.974487],[20.535299,100.974068],[20.53492,100.973717],[20.534109,100.973328],[20.53293,100.973343],[20.531759,100.97274],[20.53125,100.972107],[20.53051,100.970657],[20.53039,100.969528],[20.5303,100.969162],[20.53018,100.968811],[20.5298,100.968231],[20.52944,100.967308],[20.529369,100.966843],[20.528959,100.966469],[20.528351,100.966072],[20.528219,100.965103],[20.527941,100.963737],[20.527439,100.963303],[20.526911,100.962936],[20.526951,100.962593],[20.526859,100.962067],[20.526461,100.961693],[20.526291,100.961227],[20.526251,100.960648],[20.525999,100.960114],[20.525721,100.959808],[20.525379,100.959648],[20.52515,100.95961],[20.52487,100.959358],[20.524879,100.959],[20.52479,100.958633],[20.524349,100.957977],[20.52438,100.957527],[20.52458,100.956757],[20.524401,100.956306],[20.523899,100.955887],[20.52313,100.955688],[20.521749,100.955513],[20.52129,100.955353],[20.520531,100.955307],[20.519991,100.955101],[20.51984,100.954948],[20.51955,100.954887],[20.51899,100.954674],[20.51889,100.954483],[20.518459,100.954193],[20.517891,100.954369],[20.51753,100.954918],[20.517229,100.955589],[20.516911,100.955673],[20.516781,100.955406],[20.51675,100.955177],[20.516399,100.95488],[20.516001,100.955002],[20.51556,100.954964],[20.515129,100.955009],[20.51465,100.954941],[20.514441,100.954613],[20.514151,100.954613],[20.513359,100.954933],[20.512911,100.955147],[20.512659,100.955383],[20.512381,100.955353],[20.512211,100.955177],[20.511669,100.954857],[20.510799,100.954773],[20.51033,100.95462],[20.509859,100.95462],[20.509159,100.954979],[20.508619,100.95491],[20.508591,100.954819],[20.50824,100.954483],[20.507959,100.954536],[20.50754,100.954376],[20.50742,100.953873],[20.5072,100.953484],[20.506941,100.953117],[20.506491,100.952904],[20.50629,100.95295],[20.50569,100.952927],[20.505541,100.952667],[20.505461,100.95208],[20.505541,100.951523],[20.50552,100.951027],[20.50514,100.95005],[20.504801,100.949707],[20.5047,100.949722],[20.504009,100.949532],[20.50391,100.949249],[20.50391,100.948463],[20.504061,100.94799],[20.50411,100.947418],[20.50355,100.946037],[20.503401,100.945763],[20.503059,100.945679],[20.502661,100.945686],[20.50226,100.945457],[20.501881,100.945129],[20.50157,100.945236],[20.501011,100.945084],[20.500731,100.944633],[20.500641,100.944183],[20.49922,100.941566],[20.499359,100.940933],[20.499519,100.94046],[20.499371,100.940048],[20.499241,100.93988],[20.498859,100.93972],[20.498159,100.939621],[20.4972,100.939293],[20.496759,100.939034],[20.495871,100.938087],[20.49571,100.937851],[20.49563,100.937263],[20.495661,100.93663],[20.495871,100.936119],[20.49629,100.935638],[20.496309,100.935127],[20.496031,100.934868],[20.49571,100.934036],[20.49589,100.933388],[20.495741,100.932892],[20.49498,100.932777],[20.49445,100.932426],[20.49431,100.931923],[20.494341,100.931267],[20.49431,100.931099],[20.494011,100.930893],[20.49321,100.930763],[20.492571,100.930313],[20.49185,100.928413],[20.491751,100.927803],[20.49176,100.927254],[20.49139,100.92659],[20.49098,100.926178],[20.490841,100.925911],[20.490829,100.925552],[20.491171,100.924057],[20.49114,100.923424],[20.49077,100.92276],[20.489731,100.921677],[20.48945,100.921021],[20.489349,100.920464],[20.489,100.919884],[20.4884,100.919647],[20.48777,100.919579],[20.487341,100.919411],[20.487,100.918861],[20.486811,100.918312],[20.485781,100.918266],[20.48568,100.918182],[20.485201,100.917587],[20.48465,100.916412],[20.484159,100.91584],[20.482771,100.914902],[20.4821,100.914253],[20.48135,100.912987],[20.480671,100.912178],[20.480471,100.911392],[20.480471,100.91098],[20.480089,100.910461],[20.479731,100.910301],[20.479071,100.90979],[20.47794,100.909103],[20.477369,100.908531],[20.476601,100.906883],[20.47571,100.90554],[20.474541,100.904732],[20.473881,100.904083],[20.472811,100.903282],[20.47242,100.903183],[20.472,100.903503],[20.471279,100.904449],[20.470301,100.904877],[20.469681,100.904831],[20.46957,100.904793],[20.46909,100.904823],[20.46899,100.9049],[20.468519,100.905083],[20.468321,100.904953],[20.467649,100.904373],[20.46719,100.904243],[20.466841,100.904373],[20.46665,100.904541],[20.4662,100.90477],[20.466,100.904678],[20.46546,100.903999],[20.465309,100.903397],[20.465151,100.902946],[20.464861,100.902763],[20.464399,100.902634],[20.464001,100.902367],[20.463751,100.901993],[20.463631,100.901466],[20.46343,100.901207],[20.463039,100.901466],[20.46282,100.90168],[20.462469,100.901588],[20.46212,100.900787],[20.46162,100.900551],[20.46133,100.900681],[20.46069,100.900719],[20.45845,100.899513],[20.457861,100.899582],[20.45747,100.899841],[20.456659,100.900284],[20.456261,100.900414],[20.455641,100.900398],[20.455151,100.900307],[20.455021,100.900269],[20.454729,100.900047],[20.45451,100.899963],[20.45429,100.899986],[20.45396,100.900497],[20.45385,100.901176],[20.453739,100.90139],[20.453609,100.901497],[20.452829,100.901802],[20.452379,100.902184],[20.452061,100.902313],[20.451651,100.902046],[20.451401,100.902023],[20.451059,100.902046],[20.450279,100.902458],[20.45005,100.902367],[20.449881,100.902206],[20.44982,100.902008],[20.4499,100.901688],[20.45009,100.90136],[20.45014,100.900932],[20.449961,100.900688],[20.449631,100.900429],[20.44912,100.900352],[20.448231,100.900642],[20.447929,100.900574],[20.44776,100.900124],[20.447121,100.899727],[20.446989,100.89901],[20.446911,100.898842],[20.44643,100.898232],[20.44639,100.897873],[20.446119,100.897621],[20.445709,100.897324],[20.44548,100.897087],[20.44516,100.896988],[20.44486,100.896957],[20.44445,100.896759],[20.443979,100.896339],[20.44319,100.89537],[20.44272,100.895103],[20.44248,100.894997],[20.44202,100.894943],[20.441351,100.894531],[20.441059,100.893669],[20.44046,100.892189],[20.43977,100.890793],[20.43943,100.890282],[20.438919,100.889763],[20.43788,100.889023],[20.43775,100.888542],[20.437759,100.888077],[20.43762,100.887833],[20.43714,100.887604],[20.43623,100.887047],[20.43495,100.886482],[20.43429,100.886368],[20.433781,100.886124],[20.433281,100.885551],[20.432489,100.884438],[20.43186,100.883698],[20.431721,100.883377],[20.43148,100.882393],[20.43161,100.881477],[20.431881,100.880569],[20.432011,100.879272],[20.432039,100.878532],[20.4324,100.877853],[20.43273,100.877502],[20.432911,100.877068],[20.43289,100.876793],[20.4321,100.875381],[20.43191,100.874802],[20.43194,100.87458],[20.432581,100.872719],[20.432581,100.872276],[20.43252,100.872063],[20.43162,100.870483],[20.431311,100.870262],[20.430981,100.870163],[20.43005,100.869987],[20.429199,100.869553],[20.428631,100.869164],[20.42746,100.868912],[20.42679,100.868423],[20.425791,100.865967],[20.425171,100.865547],[20.42388,100.865791],[20.42346,100.865646],[20.422541,100.865097],[20.42201,100.865021],[20.42149,100.86512],[20.421021,100.865021],[20.42034,100.864563],[20.41993,100.86441],[20.418819,100.864616],[20.4179,100.864693],[20.417549,100.864601],[20.417191,100.864342],[20.416691,100.863647],[20.41651,100.863052],[20.416361,100.862183],[20.41654,100.86145],[20.417061,100.861153],[20.417681,100.86113],[20.418091,100.860687],[20.41827,100.859192],[20.418051,100.858353],[20.41744,100.857529],[20.41696,100.856644],[20.41647,100.855377],[20.416161,100.854729],[20.41585,100.853371],[20.41531,100.852493],[20.414829,100.851921],[20.41411,100.851807],[20.413851,100.851913],[20.41334,100.851891],[20.41227,100.851173],[20.411011,100.850693],[20.41024,100.850456],[20.409161,100.850647],[20.4083,100.851181],[20.40797,100.851501],[20.407829,100.85173],[20.407471,100.851898],[20.40719,100.851692],[20.406799,100.851608],[20.406441,100.85186],[20.40589,100.851952],[20.405939,100.851692],[20.40617,100.851547],[20.406401,100.851303],[20.406481,100.850723],[20.4063,100.850304],[20.4062,100.849747],[20.406031,100.849426],[20.40575,100.84903],[20.405689,100.848663],[20.405701,100.848289],[20.4056,100.848053],[20.405199,100.847672],[20.404961,100.847282],[20.4039,100.844551],[20.40336,100.84343],[20.40317,100.84256],[20.402519,100.841721],[20.40229,100.841179],[20.402269,100.840698],[20.40242,100.840233],[20.40267,100.839737],[20.402769,100.838913],[20.40255,100.838364],[20.402349,100.838127],[20.401461,100.837593],[20.401011,100.837212],[20.40053,100.836159],[20.400261,100.835037],[20.39954,100.833992],[20.399269,100.83374],[20.398939,100.83287],[20.398991,100.832283],[20.39875,100.83165],[20.398331,100.83136],[20.3974,100.83091],[20.39673,100.83007],[20.396311,100.829826],[20.3958,100.829758],[20.395069,100.82946],[20.39382,100.828629],[20.39279,100.828011],[20.392191,100.827499],[20.391821,100.826736],[20.391741,100.825974],[20.39159,100.8255],[20.391411,100.825127],[20.38825,100.819542],[20.38793,100.819183],[20.387569,100.818626],[20.387489,100.818451],[20.387341,100.817963],[20.38714,100.816818],[20.386801,100.815941],[20.386749,100.815369],[20.38707,100.81385],[20.387199,100.813408],[20.387409,100.813042],[20.387449,100.81279],[20.38743,100.812622],[20.387119,100.812263],[20.386539,100.81205],[20.386061,100.811661],[20.385509,100.811409],[20.38489,100.811539],[20.3846,100.811523],[20.38423,100.811234],[20.383739,100.810417],[20.38348,100.810173],[20.38299,100.809921],[20.382561,100.809387],[20.38196,100.807297],[20.38113,100.805763],[20.380911,100.804916],[20.38061,100.804077],[20.38055,100.803352],[20.38064,100.802711],[20.3804,100.801903],[20.379869,100.801193],[20.3792,100.8004],[20.378929,100.799477],[20.378759,100.798393],[20.37841,100.797707],[20.377251,100.796219],[20.376989,100.795158],[20.376949,100.793961],[20.37689,100.793716],[20.375931,100.79213],[20.37571,100.791107],[20.375681,100.789543],[20.375401,100.788361],[20.374701,100.786774],[20.374371,100.785843],[20.372959,100.782387],[20.372789,100.781883],[20.3727,100.781303],[20.37212,100.780533],[20.37154,100.779892],[20.371189,100.779694],[20.37081,100.779663],[20.37048,100.7798],[20.36981,100.780281],[20.368521,100.780807],[20.368019,100.780952],[20.367649,100.780861],[20.367491,100.780609],[20.367319,100.780083],[20.367041,100.779579],[20.36451,100.776817],[20.364189,100.776627],[20.363819,100.776787],[20.363609,100.777168],[20.3634,100.777367],[20.362921,100.777603],[20.3626,100.777847],[20.36236,100.777977],[20.362089,100.77774],[20.362089,100.777489],[20.362631,100.776283],[20.36305,100.774963],[20.363199,100.7743],[20.36344,100.773872],[20.363831,100.773392],[20.363911,100.77298],[20.363729,100.772507],[20.363569,100.772301],[20.36347,100.771698],[20.363581,100.771027],[20.36319,100.770531],[20.36265,100.769958],[20.36215,100.769112],[20.36161,100.768837],[20.36137,100.768867],[20.36116,100.768822],[20.36088,100.768646],[20.360689,100.768097],[20.360809,100.767242],[20.360649,100.766617],[20.36017,100.765137],[20.36006,100.764549],[20.360109,100.763947],[20.360519,100.763573],[20.36062,100.763557],[20.36084,100.76339],[20.360979,100.762657],[20.361469,100.762306],[20.36165,100.762062],[20.361641,100.761658],[20.361,100.760948],[20.36079,100.760422],[20.36071,100.76001],[20.3608,100.759506],[20.360941,100.759323],[20.361179,100.759109],[20.36128,100.758728],[20.361179,100.758553],[20.36101,100.757988],[20.361059,100.757187],[20.361031,100.756912],[20.36109,100.756393],[20.360991,100.75592],[20.360701,100.755699],[20.360519,100.755363],[20.3605,100.755219],[20.360491,100.754608],[20.3606,100.754219],[20.36092,100.753792],[20.36104,100.752907],[20.360901,100.752434],[20.36084,100.750587],[20.36058,100.749977],[20.360451,100.749313],[20.3603,100.748833],[20.360041,100.748421],[20.359171,100.747307],[20.35895,100.746758],[20.358841,100.745842],[20.358509,100.744392],[20.358709,100.743652],[20.35891,100.743362],[20.35898,100.742538],[20.3589,100.742188],[20.35845,100.741653],[20.357941,100.741547],[20.35754,100.741432],[20.356831,100.740913],[20.356331,100.740807],[20.35593,100.740837],[20.35537,100.740517],[20.355209,100.740196],[20.354429,100.738113],[20.35376,100.736107],[20.353001,100.734627],[20.352421,100.733772],[20.352209,100.733543],[20.351999,100.733192],[20.351879,100.73275],[20.351839,100.732262],[20.351891,100.731537],[20.35169,100.730789],[20.351521,100.730362],[20.35149,100.729736],[20.35153,100.729507],[20.35186,100.729012],[20.353081,100.727547],[20.355471,100.725609],[20.355841,100.724991],[20.35594,100.724503],[20.35598,100.721733],[20.355761,100.721252],[20.354799,100.7202],[20.354271,100.719833],[20.35388,100.719398],[20.35384,100.718674],[20.35331,100.717789],[20.35264,100.717194],[20.35252,100.71669],[20.35284,100.715897],[20.35318,100.715599],[20.353701,100.715561],[20.35397,100.715111],[20.35391,100.714462],[20.354231,100.713768],[20.35479,100.713478],[20.35507,100.71312],[20.355579,100.712921],[20.35626,100.713051],[20.357,100.71286],[20.35745,100.712578],[20.358089,100.711929],[20.35874,100.711441],[20.35887,100.711403],[20.35931,100.711357],[20.35961,100.711456],[20.36083,100.712143],[20.36128,100.71212],[20.36129,100.711639],[20.36125,100.71096],[20.36128,100.710663],[20.361561,100.710159],[20.36167,100.709839],[20.361679,100.709351],[20.36149,100.708809],[20.3615,100.70829],[20.36186,100.707458],[20.361879,100.706818],[20.36179,100.705933],[20.361799,100.704933],[20.361879,100.704659],[20.36215,100.704163],[20.36253,100.703773],[20.36327,100.703308],[20.36344,100.70314],[20.363621,100.702858],[20.363569,100.7024],[20.363199,100.701279],[20.36265,100.700531],[20.362511,100.700272],[20.3627,100.698997],[20.363359,100.69799],[20.363741,100.696861],[20.364189,100.695938],[20.365049,100.694862],[20.36602,100.693771],[20.367121,100.692047],[20.367201,100.691879],[20.36727,100.690613],[20.36672,100.689194],[20.366659,100.688438],[20.366449,100.687683],[20.366079,100.687073],[20.365471,100.686607],[20.36454,100.686203],[20.364031,100.685371],[20.364111,100.684464],[20.36484,100.682533],[20.36484,100.682167],[20.364559,100.680946],[20.364309,100.680222],[20.364389,100.679558],[20.36446,100.679359],[20.364479,100.678917],[20.364429,100.678467],[20.364491,100.678032],[20.364611,100.677727],[20.364639,100.677147],[20.36442,100.676842],[20.36405,100.676666],[20.3631,100.676376],[20.36293,100.676277],[20.362341,100.675774],[20.36183,100.675163],[20.36145,100.674423],[20.361349,100.674026],[20.361389,100.672523],[20.36096,100.670631],[20.36039,100.66877],[20.36035,100.667908],[20.3601,100.667038],[20.359289,100.665192],[20.358999,100.664146],[20.35878,100.663017],[20.35887,100.662514],[20.358971,100.662277],[20.35936,100.661819],[20.359591,100.661163],[20.359501,100.660599],[20.359249,100.659683],[20.35911,100.657623],[20.358919,100.657127],[20.35828,100.656113],[20.358061,100.655678],[20.358009,100.654892],[20.3578,100.65432],[20.356991,100.653603],[20.356319,100.652359],[20.35602,100.651573],[20.355881,100.650909],[20.355579,100.648392],[20.355459,100.647987],[20.355089,100.647163],[20.355061,100.646568],[20.35541,100.646088],[20.3556,100.6455],[20.35557,100.644867],[20.355499,100.644569],[20.35507,100.643646],[20.35486,100.642967],[20.35471,100.642616],[20.354441,100.642212],[20.354469,100.641777],[20.355169,100.641617],[20.35548,100.641289],[20.355471,100.641037],[20.35537,100.640633],[20.35556,100.640099],[20.35564,100.639603],[20.35552,100.639214],[20.35527,100.638763],[20.35511,100.637718],[20.35515,100.637253],[20.355499,100.636238],[20.355551,100.635612],[20.35533,100.634941],[20.355101,100.634422],[20.355089,100.633911],[20.35535,100.633087],[20.355749,100.632797],[20.356001,100.632721],[20.35652,100.632339],[20.35663,100.632118],[20.357059,100.631897],[20.357349,100.632187],[20.35779,100.633057],[20.35833,100.633522],[20.359249,100.633881],[20.35972,100.633789],[20.3606,100.633453],[20.36109,100.63372],[20.36145,100.633698],[20.36198,100.633423],[20.36241,100.6325],[20.36285,100.631653],[20.36348,100.631264],[20.36356,100.630981],[20.36334,100.629883],[20.363649,100.629463],[20.363951,100.629417],[20.364241,100.629646],[20.36475,100.630089],[20.366261,100.630089],[20.36676,100.630257],[20.36722,100.630241],[20.367359,100.630096],[20.367661,100.62915],[20.36801,100.628601],[20.36879,100.628143],[20.369249,100.627342],[20.36919,100.6269],[20.368679,100.626373],[20.36817,100.624977],[20.36775,100.62352],[20.36764,100.622238],[20.36821,100.621208],[20.368561,100.620399],[20.36894,100.617233],[20.36931,100.615646],[20.369789,100.614014],[20.370131,100.613327],[20.37133,100.612297],[20.371679,100.611603],[20.37171,100.611191],[20.371889,100.610779],[20.37208,100.610573],[20.372219,100.610008],[20.371969,100.609047],[20.372511,100.607971],[20.374069,100.606483],[20.374969,100.605927],[20.376051,100.606056],[20.38036,100.602577],[20.38096,100.601677],[20.381519,100.600143],[20.38242,100.598907],[20.382891,100.596527],[20.383659,100.594353],[20.385059,100.59182],[20.38669,100.590233],[20.387131,100.587471],[20.387171,100.586563],[20.38603,100.583878],[20.380939,100.576797],[20.380171,100.575996],[20.36994,100.571991],[20.36841,100.570488],[20.3664,100.568863],[20.36528,100.567017],[20.364679,100.564987],[20.360701,100.554718],[20.358471,100.553917],[20.35429,100.54924],[20.35074,100.543022],[20.349541,100.541199],[20.348101,100.539291],[20.347191,100.538368],[20.342621,100.534698],[20.341419,100.533577],[20.340731,100.532547],[20.338511,100.530228],[20.337061,100.528732],[20.336281,100.528328],[20.33316,100.527657],[20.33197,100.526894],[20.33049,100.525299],[20.329559,100.524841],[20.32822,100.524857],[20.32708,100.524368],[20.32666,100.523468],[20.326349,100.5215],[20.325621,100.518784],[20.324909,100.518204],[20.324181,100.518158],[20.323641,100.518646],[20.321939,100.520767],[20.321239,100.521683],[20.320419,100.522118],[20.319901,100.522209],[20.318251,100.522148],[20.317381,100.522507],[20.316191,100.523354],[20.31547,100.523369],[20.31489,100.522926],[20.314529,100.52272],[20.313761,100.522552],[20.311609,100.520554],[20.310949,100.519928],[20.30965,100.518463],[20.30732,100.516968],[20.306,100.516747],[20.30275,100.517471],[20.300171,100.516441],[20.29899,100.51564],[20.29772,100.514442],[20.29727,100.512657],[20.297359,100.511261],[20.29715,100.510277],[20.296301,100.509506],[20.29497,100.509071],[20.29368,100.509033],[20.29195,100.506844],[20.2903,100.50457],[20.285521,100.502708],[20.283449,100.498299],[20.283251,100.496407],[20.280399,100.493027],[20.27717,100.491127],[20.27722,100.485771],[20.27581,100.479683],[20.274639,100.478523],[20.276501,100.473183],[20.27618,100.469414],[20.274891,100.467171],[20.273279,100.463387],[20.26845,100.46254],[20.26667,100.463539],[20.264891,100.464142],[20.263081,100.463921],[20.261669,100.464081],[20.26067,100.463333],[20.25362,100.451843],[20.251631,100.44397],[20.249929,100.44194],[20.24954,100.441002],[20.24959,100.439781],[20.249439,100.438667],[20.24979,100.437653],[20.250509,100.43676],[20.251249,100.436211],[20.251579,100.435791],[20.2516,100.434952],[20.25148,100.434082],[20.251381,100.433037],[20.25115,100.432297],[20.250879,100.431953],[20.25086,100.43148],[20.251381,100.430908],[20.25153,100.430489],[20.25128,100.430344],[20.25071,100.430359],[20.25016,100.430138],[20.25004,100.429741],[20.24996,100.428307],[20.25029,100.426987],[20.2505,100.426437],[20.25102,100.425758],[20.251671,100.425217],[20.252331,100.42408],[20.25292,100.42347],[20.25317,100.422729],[20.25334,100.422363],[20.254629,100.420921],[20.25526,100.420212],[20.25573,100.419533],[20.256161,100.418854],[20.2575,100.418037],[20.26022,100.416687],[20.26158,100.416077],[20.26276,100.415337],[20.263371,100.415131],[20.264509,100.415283],[20.26535,100.415337],[20.26556,100.415237],[20.26605,100.414757],[20.26685,100.414177],[20.267191,100.414017],[20.26763,100.413971],[20.26852,100.413879],[20.269581,100.413933],[20.270361,100.413727],[20.27227,100.413208],[20.27359,100.412773],[20.274349,100.412514],[20.27471,100.412376],[20.27606,100.411873],[20.276831,100.411552],[20.276409,100.410561],[20.276279,100.410294],[20.27615,100.409988],[20.27606,100.409683],[20.27594,100.409302],[20.275141,100.406822],[20.27511,100.40654],[20.275169,100.406197],[20.275311,100.406013],[20.275841,100.405251],[20.27589,100.404793],[20.275749,100.404839],[20.27441,100.405243],[20.27425,100.403351],[20.27413,100.402611],[20.27413,100.401932],[20.27434,100.401443],[20.274639,100.401062],[20.274851,100.400742],[20.274929,100.400337],[20.27487,100.399857],[20.27471,100.399567],[20.27459,100.399223],[20.274679,100.398827],[20.27494,100.398552],[20.27527,100.398163],[20.275551,100.397858],[20.275881,100.397522],[20.276079,100.397163],[20.276199,100.396843],[20.27632,100.396652],[20.27663,100.396622],[20.276911,100.396667],[20.27717,100.396584],[20.277411,100.396347],[20.27774,100.396149],[20.278099,100.39595],[20.27853,100.395973],[20.27895,100.396049],[20.279409,100.396217],[20.279831,100.396118],[20.280199,100.395813],[20.28047,100.3955],[20.280781,100.395203],[20.281601,100.394882],[20.282761,100.394447],[20.28368,100.394043],[20.28441,100.393593],[20.28524,100.393028],[20.28595,100.392647],[20.28698,100.391853],[20.28813,100.390877],[20.288759,100.390312],[20.289141,100.390083],[20.289619,100.389954],[20.289841,100.389992],[20.290581,100.390106],[20.291149,100.390129],[20.291599,100.390091],[20.29217,100.389877],[20.292589,100.389542],[20.292999,100.389359],[20.293369,100.389374],[20.293961,100.389542],[20.29447,100.389641],[20.294821,100.38961],[20.295271,100.38929],[20.295679,100.388977],[20.296261,100.388687],[20.296801,100.388641],[20.29731,100.388573],[20.29837,100.388542],[20.30019,100.388527],[20.30183,100.388512],[20.302429,100.388474],[20.30319,100.38829],[20.303801,100.388153],[20.3043,100.388008],[20.304621,100.387787],[20.304831,100.387444],[20.30509,100.386993],[20.30526,100.386574],[20.305479,100.386139],[20.30575,100.385818],[20.30608,100.385567],[20.306459,100.385223],[20.30687,100.38485],[20.307541,100.384323],[20.308189,100.383972],[20.30883,100.383537],[20.309139,100.383232],[20.309401,100.382782],[20.309681,100.382477],[20.31003,100.382294],[20.31057,100.382057],[20.31098,100.381866],[20.31156,100.381599],[20.31197,100.381378],[20.3123,100.381279],[20.312639,100.381027],[20.312889,100.380707],[20.313,100.380417],[20.313311,100.380112],[20.313641,100.379959],[20.31443,100.380043],[20.314791,100.380081],[20.315161,100.380127],[20.315491,100.379982],[20.31592,100.379784],[20.31637,100.379608],[20.31674,100.379433],[20.317169,100.379242],[20.3176,100.379158],[20.318119,100.379059],[20.31848,100.378937],[20.31889,100.37886],[20.319321,100.37886],[20.319889,100.37899],[20.3204,100.379143],[20.3209,100.379341],[20.321369,100.379547],[20.3218,100.379631],[20.322241,100.379623],[20.322611,100.379562],[20.32299,100.379532],[20.323339,100.379608],[20.323641,100.379692],[20.32411,100.379707],[20.32449,100.379662],[20.324921,100.379608],[20.32535,100.379517],[20.325729,100.379341],[20.326059,100.379143],[20.326441,100.379028],[20.32682,100.378967],[20.327221,100.37899],[20.32765,100.37886],[20.328011,100.378616],[20.32826,100.378326],[20.32863,100.377823],[20.328859,100.377487],[20.329109,100.377243],[20.32934,100.37706],[20.32963,100.376953],[20.329941,100.37664],[20.330299,100.376266],[20.330561,100.376167],[20.330811,100.376137],[20.331169,100.37616],[20.33145,100.376137],[20.331779,100.37606],[20.33213,100.375977],[20.332411,100.375961],[20.33263,100.376106],[20.332979,100.376221],[20.33329,100.376259],[20.33354,100.376228],[20.3339,100.37606],[20.3342,100.375877],[20.334539,100.375771],[20.334829,100.375763],[20.335251,100.37574],[20.335541,100.375763],[20.336029,100.375687],[20.33626,100.375671],[20.33643,100.375603],[20.3367,100.375473],[20.33703,100.37532],[20.337179,100.375252],[20.33742,100.375221],[20.337721,100.375191],[20.33802,100.375168],[20.338261,100.375038],[20.3384,100.37484],[20.33847,100.374542],[20.338579,100.374367],[20.33876,100.374283],[20.33905,100.374123],[20.339331,100.37397],[20.33963,100.373917],[20.33988,100.373917],[20.340219,100.37394],[20.34067,100.374039],[20.34096,100.374138],[20.34128,100.374191],[20.341631,100.374268],[20.34194,100.374222],[20.342171,100.374153],[20.34252,100.373993],[20.342779,100.373787],[20.342979,100.373619],[20.343149,100.37355],[20.343321,100.373573],[20.343439,100.373718],[20.343571,100.373993],[20.343639,100.374237],[20.343809,100.374451],[20.343969,100.374527],[20.3442,100.374588],[20.34449,100.374496],[20.34466,100.374367],[20.34499,100.374252],[20.345261,100.374168],[20.34564,100.373993],[20.3459,100.373756],[20.346201,100.373489],[20.346491,100.373222],[20.346901,100.372871],[20.34734,100.372421],[20.347401,100.372139],[20.347389,100.371803],[20.34742,100.371429],[20.34758,100.371147],[20.347691,100.370857],[20.347719,100.370499],[20.34775,100.370102],[20.34761,100.369751],[20.34746,100.369431],[20.347361,100.369164],[20.347429,100.368942],[20.34758,100.368767],[20.347799,100.368683],[20.348209,100.368736],[20.34856,100.368912],[20.34897,100.36911],[20.34931,100.369164],[20.349791,100.369118],[20.349871,100.368912],[20.34984,100.368584],[20.349751,100.368134],[20.34972,100.367828],[20.349819,100.367561],[20.35001,100.367409],[20.35022,100.367233],[20.3503,100.367058],[20.35021,100.366707],[20.34993,100.366386],[20.349001,100.365578],[20.34866,100.365158],[20.34852,100.364922],[20.34848,100.364563],[20.348579,100.364326],[20.34877,100.36412],[20.34897,100.363853],[20.348961,100.363533],[20.348801,100.363327],[20.348669,100.362938],[20.34873,100.362701],[20.348989,100.362427],[20.349251,100.362289],[20.34955,100.362137],[20.349911,100.362083],[20.35025,100.362068],[20.350719,100.361977],[20.351009,100.361893],[20.35121,100.361671],[20.35161,100.361397],[20.35191,100.361214],[20.35211,100.360901],[20.352079,100.360527],[20.35183,100.360138],[20.35158,100.359779],[20.35137,100.359253],[20.351299,100.358719],[20.351219,100.358002],[20.351151,100.357384],[20.35108,100.356857],[20.35088,100.356483],[20.3505,100.35611],[20.350109,100.355629],[20.349871,100.355217],[20.349701,100.354683],[20.349489,100.353912],[20.3491,100.352753],[20.348801,100.351936],[20.347561,100.350304],[20.346901,100.349297],[20.34656,100.348129],[20.34656,100.346901],[20.34639,100.345123],[20.34589,100.342987],[20.34516,100.339973],[20.344601,100.337914],[20.34466,100.335854],[20.344879,100.334167],[20.345329,100.333328],[20.34606,100.332893],[20.346901,100.333107],[20.34745,100.332718],[20.34734,100.3321],[20.34667,100.3321],[20.34568,100.33152],[20.34479,100.33123],[20.344589,100.330742],[20.34436,100.330368],[20.3437,100.330139],[20.34333,100.329803],[20.343019,100.32917],[20.342899,100.328369],[20.342899,100.32785],[20.343189,100.327393],[20.34322,100.326973],[20.34284,100.326714],[20.341669,100.326073],[20.341101,100.325531],[20.34067,100.325218],[20.339979,100.325218],[20.33952,100.325363],[20.338831,100.325241],[20.337999,100.324783],[20.33737,100.324211],[20.336769,100.323593],[20.335369,100.321274],[20.33522,100.320747],[20.334881,100.320259],[20.334339,100.319633],[20.334311,100.319199],[20.334391,100.318741],[20.33345,100.317093],[20.33288,100.317253],[20.332331,100.317337],[20.332081,100.317047],[20.33202,100.316566],[20.331619,100.316277],[20.32967,100.315422],[20.328091,100.314957],[20.32715,100.314362],[20.32658,100.313927],[20.326229,100.313393],[20.32612,100.312607],[20.32629,100.311546],[20.326151,100.310982],[20.325741,100.310516],[20.325371,100.310013],[20.325371,100.30941],[20.325689,100.307892],[20.32563,100.307426],[20.32514,100.306969],[20.324711,100.306427],[20.324051,100.305222],[20.323879,100.304573],[20.32357,100.303909],[20.32328,100.302879],[20.32291,100.301643],[20.322769,100.299751],[20.322571,100.298439],[20.32239,100.298073],[20.32202,100.297722],[20.32185,100.297348],[20.32165,100.296204],[20.321079,100.29483],[20.32073,100.293877],[20.32056,100.293022],[20.320789,100.290817],[20.320669,100.290329],[20.32053,100.289558],[20.31967,100.287437],[20.319361,100.287117],[20.31864,100.287163],[20.31818,100.28672],[20.31793,100.286179],[20.317381,100.284973],[20.31695,100.284317],[20.31624,100.283859],[20.31472,100.282997],[20.31423,100.2826],[20.313431,100.281357],[20.311621,100.277206],[20.31111,100.275887],[20.31082,100.275146],[20.30908,100.273827],[20.308451,100.273232],[20.307671,100.27137],[20.306641,100.269279],[20.306499,100.268623],[20.306499,100.265617],[20.306391,100.264183],[20.306129,100.263184],[20.305241,100.259972],[20.304871,100.258171],[20.304581,100.256622],[20.304291,100.253304],[20.30401,100.252586],[20.30341,100.252007],[20.302691,100.251839],[20.30192,100.251839],[20.301399,100.251747],[20.301121,100.251442],[20.300911,100.250214],[20.301001,100.247398],[20.30077,100.24614],[20.30043,100.245506],[20.29974,100.243019],[20.29954,100.240044],[20.29954,100.239563],[20.2992,100.239067],[20.29874,100.23864],[20.29825,100.238319],[20.29814,100.238037],[20.298161,100.234253],[20.29882,100.231483],[20.29908,100.229813],[20.299391,100.228607],[20.29949,100.227859],[20.299549,100.227211],[20.299721,100.226501],[20.299419,100.226082],[20.29817,100.224533],[20.29698,100.223846],[20.29533,100.22316],[20.29389,100.222473],[20.29315,100.222061],[20.292789,100.22155],[20.29199,100.221207],[20.29141,100.220932],[20.29093,100.220421],[20.29035,100.220078],[20.289249,100.219971],[20.288321,100.219727],[20.28706,100.219116],[20.28581,100.218048],[20.28484,100.217056],[20.283461,100.215637],[20.28233,100.214523],[20.280979,100.213013],[20.280149,100.211906],[20.27915,100.210457],[20.27844,100.209396],[20.278021,100.208717],[20.27783,100.207817],[20.27783,100.206902],[20.277571,100.205872],[20.27689,100.204773],[20.27615,100.203918],[20.27496,100.202103],[20.27429,100.200829],[20.27364,100.199516],[20.27281,100.19873],[20.271811,100.197639],[20.27062,100.196159],[20.27001,100.195267],[20.26927,100.194267],[20.26849,100.193413],[20.266081,100.191048],[20.265209,100.190262],[20.264339,100.189812],[20.26322,100.188988],[20.262699,100.188507],[20.26235,100.187859],[20.26174,100.186447],[20.260771,100.184647],[20.26021,100.182938],[20.26037,100.181908],[20.260679,100.180908],[20.2579,100.180527],[20.25491,100.17997],[20.253241,100.179314],[20.25135,100.179642],[20.249689,100.178421],[20.24847,100.17775],[20.247311,100.177437],[20.24621,100.177254],[20.2451,100.176331],[20.2435,100.174347],[20.242241,100.171883],[20.24194,100.171043],[20.24098,100.169128],[20.240601,100.167412],[20.24003,100.166458],[20.23889,100.165314],[20.238159,100.16391],[20.2374,100.161568],[20.237129,100.160439],[20.23694,100.157692],[20.23774,100.155632],[20.240351,100.150452],[20.24041,100.149551],[20.24004,100.149002],[20.238899,100.148613],[20.230089,100.145058],[20.227119,100.143799],[20.2234,100.144203],[20.22238,100.144028],[20.22163,100.14357],[20.22163,100.142311],[20.221689,100.136833],[20.22123,100.135452],[20.220779,100.134201],[20.2202,100.133003],[20.22032,100.132187],[20.220551,100.131569],[20.220949,100.130943],[20.22146,100.130539],[20.22238,100.130081],[20.2234,100.130028],[20.22426,100.130081],[20.225401,100.12957],[20.226839,100.128822],[20.228889,100.127907],[20.231239,100.126938],[20.232719,100.126312],[20.234501,100.125633],[20.235689,100.125282],[20.236549,100.125282],[20.23838,100.125557],[20.238951,100.125633],[20.239269,100.125359],[20.24003,100.124641],[20.24082,100.124222],[20.24209,100.123596],[20.24258,100.123177],[20.24321,100.122581],[20.24362,100.121933],[20.244169,100.120911],[20.244329,100.11969],[20.244141,100.114143],[20.244221,100.112823],[20.24461,100.111748],[20.24552,100.107658],[20.245569,100.105873],[20.246019,100.10495],[20.247499,100.102898],[20.248671,100.102791],[20.24914,100.102608],[20.25177,100.100777],[20.25688,100.097267],[20.258829,100.095711],[20.260731,100.093811],[20.259911,100.086281],[20.26025,100.084396],[20.261,100.082962],[20.262091,100.08181],[20.26926,100.076973],[20.26903,100.076843],[20.26845,100.076431],[20.26779,100.075684],[20.267691,100.075569],[20.2675,100.075333],[20.26725,100.074577],[20.267429,100.073776],[20.267599,100.073517],[20.267969,100.073036],[20.26873,100.072037],[20.268869,100.071808],[20.26894,100.071388],[20.268921,100.071098],[20.268801,100.069023],[20.26877,100.068626],[20.268709,100.067993],[20.26874,100.06781],[20.268801,100.067451],[20.269529,100.065788],[20.269621,100.065353],[20.26969,100.058792],[20.269739,100.057213],[20.269831,100.05687],[20.269979,100.056557],[20.27109,100.05513],[20.27137,100.054642],[20.27169,100.053932],[20.271879,100.053352],[20.2719,100.053291],[20.27212,100.051521],[20.27227,100.050903],[20.272511,100.050468],[20.272829,100.050049],[20.27322,100.049713],[20.27532,100.048187],[20.27696,100.046913],[20.278509,100.045799],[20.27902,100.04528],[20.279329,100.045052],[20.28196,100.043381],[20.28227,100.042969],[20.28232,100.042664],[20.28199,100.039772],[20.28216,100.037811],[20.28245,100.036713],[20.28249,100.03656],[20.283291,100.033943],[20.283461,100.032356],[20.28355,100.031937],[20.284889,100.027328],[20.28492,100.027069],[20.284889,100.026711],[20.284451,100.025642],[20.283649,100.02253],[20.282631,100.019608],[20.282459,100.019379],[20.2822,100.019218],[20.281549,100.018822],[20.281281,100.018517],[20.28104,100.017998],[20.28096,100.01783],[20.28046,100.016228],[20.280319,100.015823],[20.27994,100.014809],[20.27947,100.013863],[20.27894,100.012939],[20.278629,100.01239],[20.278191,100.011948],[20.277611,100.011673],[20.276871,100.011414],[20.276529,100.011253],[20.27626,100.010933],[20.2761,100.010567],[20.276011,100.009956],[20.276039,100.008537],[20.276131,100.008118],[20.276381,100.007423],[20.27643,100.007057],[20.27619,100.006447],[20.27611,100.005913],[20.276131,100.005661],[20.276541,100.004341],[20.27739,100.002243],[20.277519,100.001602],[20.27751,100.00135],[20.27717,100.000137],[20.27632,99.99839],[20.27622,99.997864],[20.27598,99.995117],[20.27578,99.994469],[20.2752,99.993393],[20.27483,99.992889],[20.274389,99.992393],[20.273899,99.991982],[20.2733,99.991608],[20.272711,99.991333],[20.27207,99.991112],[20.271151,99.990799],[20.26943,99.990196],[20.267929,99.989693],[20.26746,99.989517],[20.265051,99.98867],[20.260799,99.986908],[20.26021,99.986603],[20.25956,99.986122],[20.258579,99.98526],[20.25312,99.980637],[20.250441,99.978249],[20.249901,99.977707],[20.24902,99.976723],[20.24851,99.976128],[20.24799,99.975517],[20.243361,99.969711],[20.24229,99.968307],[20.23768,99.961952],[20.237089,99.961243],[20.23678,99.960907],[20.236469,99.960709],[20.23546,99.960403],[20.235189,99.960258],[20.235001,99.960167],[20.23457,99.959831],[20.23427,99.959534],[20.231171,99.955971],[20.23019,99.954781],[20.229759,99.954353],[20.22612,99.950317],[20.225361,99.949493],[20.223261,99.947304],[20.22253,99.946472],[20.22105,99.944946],[20.2173,99.940514],[20.21426,99.936852],[20.213909,99.936417],[20.210979,99.933022],[20.20336,99.924316],[20.20289,99.923752],[20.20256,99.923363],[20.20229,99.922813],[20.20085,99.919243],[20.200251,99.917732],[20.199671,99.916267],[20.199181,99.915077],[20.19784,99.911629],[20.19697,99.90963],[20.19672,99.908997],[20.196461,99.908287],[20.19632,99.907944],[20.19614,99.907539],[20.195181,99.905983],[20.19488,99.905342],[20.19462,99.904213],[20.19449,99.903137],[20.194229,99.901459],[20.19413,99.900963],[20.193979,99.90033],[20.19376,99.899719],[20.19334,99.898857],[20.192921,99.898331],[20.192261,99.897476],[20.1915,99.896606],[20.190639,99.895409],[20.187269,99.891022],[20.18634,99.889763],[20.185221,99.888191],[20.18457,99.887154],[20.18409,99.886269],[20.18368,99.885536],[20.18329,99.884857],[20.182751,99.883904],[20.18235,99.883186],[20.181841,99.882294],[20.181511,99.881844],[20.18092,99.881378],[20.18082,99.881287],[20.180349,99.880959],[20.179501,99.880363],[20.17819,99.879387],[20.176781,99.878387],[20.174061,99.87645],[20.17366,99.876106],[20.17345,99.875771],[20.1723,99.87352],[20.17215,99.873253],[20.17174,99.872673],[20.17095,99.872009],[20.169439,99.871193],[20.169069,99.87088],[20.16851,99.870308],[20.1668,99.869034],[20.16614,99.868408],[20.164459,99.866531],[20.163719,99.866043],[20.162889,99.865593],[20.160891,99.86451],[20.160801,99.864464],[20.16007,99.864059],[20.15867,99.863297],[20.157801,99.862694],[20.156269,99.861603],[20.156019,99.861389],[20.15589,99.861023],[20.15583,99.860527],[20.15589,99.860184],[20.155491,99.860199],[20.1551,99.860184],[20.1548,99.860092],[20.154181,99.859833],[20.154079,99.859734],[20.153299,99.8591],[20.152769,99.858704],[20.15164,99.858276],[20.147631,99.857521],[20.14694,99.857384],[20.14674,99.857361],[20.145821,99.857262],[20.14502,99.85717],[20.144711,99.85714],[20.143869,99.85704],[20.143379,99.856987],[20.142599,99.856903],[20.139759,99.856598],[20.13909,99.856613],[20.13855,99.856728],[20.137991,99.856918],[20.137341,99.85746],[20.13419,99.860947],[20.13195,99.862442],[20.13092,99.863426],[20.130289,99.863953],[20.12956,99.864464],[20.12685,99.867111],[20.12649,99.867317],[20.126051,99.867447],[20.12459,99.867813],[20.122669,99.868134],[20.12114,99.868584],[20.119909,99.869034],[20.119301,99.869392],[20.118059,99.87043],[20.11643,99.872063],[20.11577,99.87249],[20.11545,99.872627],[20.114981,99.872757],[20.09539,99.874527],[20.09425,99.874573],[20.090561,99.874893],[20.08865,99.874657],[20.08559,99.874527],[20.08499,99.87455],[20.080891,99.874908],[20.079241,99.875107],[20.07443,99.875717],[20.07328,99.875687],[20.06992,99.875542],[20.064859,99.875557],[20.06189,99.875443],[20.05637,99.875359],[20.05394,99.875443],[20.05282,99.875542],[20.049891,99.875992],[20.046709,99.876244],[20.0462,99.876266],[20.04603,99.876282],[20.045691,99.876312],[20.04425,99.876404],[20.04303,99.876297],[20.041679,99.876137],[20.04003,99.875839],[20.03854,99.875542],[20.03141,99.874046],[20.028919,99.873497],[20.026489,99.872787],[20.02272,99.87146],[20.01881,99.870377],[20.014919,99.86937],[20.01181,99.868759],[20.00489,99.867264],[20.004431,99.867188],[20.001101,99.866623],[19.99958,99.866287],[19.998461,99.865959],[19.994511,99.864754],[19.993469,99.864433],[19.991541,99.86377],[19.987789,99.862572],[19.983509,99.861198],[19.977421,99.859497],[19.9772,99.859444],[19.973289,99.858208],[19.969009,99.856873],[19.968769,99.856796],[19.967291,99.856339],[19.962219,99.854317],[19.96102,99.853737],[19.95957,99.853073],[19.956461,99.851562],[19.950371,99.848991],[19.95006,99.848846],[19.94776,99.848],[19.94174,99.8461],[19.941191,99.845947],[19.940399,99.845627],[19.939939,99.845512],[19.939461,99.845451],[19.93458,99.844978],[19.93329,99.844856],[19.9328,99.844833],[19.932329,99.844788],[19.93128,99.844658],[19.930479,99.844559],[19.92926,99.844452],[19.928101,99.844383],[19.927031,99.844254],[19.926519,99.844254],[19.9261,99.844322],[19.925659,99.844429],[19.924841,99.844704],[19.92466,99.844772],[19.92452,99.844833],[19.92285,99.84539],[19.91926,99.84671],[19.919029,99.846786],[19.9188,99.846863],[19.91856,99.846893],[19.918301,99.846916],[19.918011,99.846939],[19.9177,99.846916],[19.91733,99.846863],[19.91716,99.846832],[19.91688,99.846786],[19.91614,99.846657],[19.91597,99.846603],[19.915791,99.846542],[19.915649,99.846451],[19.9156,99.846413],[19.915449,99.846298],[19.91519,99.8461],[19.91506,99.845932],[19.914909,99.845734],[19.91482,99.845551],[19.9144,99.844727],[19.914,99.843964],[19.9137,99.843246],[19.913469,99.842857],[19.9133,99.842613],[19.913071,99.842331],[19.912821,99.842087],[19.91238,99.841667],[19.912121,99.841469],[19.911831,99.841248],[19.911221,99.840927],[19.9109,99.840782],[19.910589,99.840668],[19.910259,99.840652],[19.909861,99.840714],[19.90881,99.840759],[19.908581,99.840767],[19.90823,99.840813],[19.907591,99.840927],[19.907049,99.840973],[19.90662,99.840919],[19.906231,99.840958],[19.90579,99.840981],[19.90518,99.840973],[19.904579,99.840897],[19.903761,99.840767],[19.90309,99.840523],[19.9025,99.840378],[19.901751,99.840179],[19.901529,99.840134],[19.89817,99.839073],[19.896799,99.838638],[19.895309,99.838242],[19.89484,99.838097],[19.89209,99.837196],[19.89089,99.836861],[19.88945,99.836433],[19.879311,99.833359],[19.878031,99.832413],[19.87665,99.831192],[19.872709,99.827423],[19.862711,99.821381],[19.84935,99.809143],[19.836611,99.787727],[19.82707,99.775383],[19.824829,99.766403],[19.82202,99.763603],[19.80855,99.75489],[19.800699,99.753487],[19.78414,99.743393],[19.76815,99.736092],[19.7572,99.733566],[19.746201,99.726852],[19.74276,99.724037],[19.73921,99.722839],[19.72596,99.716492],[19.72014,99.716148],[19.716591,99.71666],[19.71174,99.720444],[19.708179,99.720268],[19.70447,99.719063],[19.688629,99.723358],[19.68475,99.727127],[19.679899,99.727821],[19.67149,99.731598],[19.6681,99.734169],[19.664539,99.734337],[19.65662,99.735718],[19.653709,99.736923],[19.64983,99.737259],[19.644501,99.738632],[19.637711,99.743103],[19.620081,99.743271],[19.61006,99.747726],[19.600519,99.749619],[19.595181,99.748589],[19.591459,99.746529],[19.582239,99.744987],[19.57626,99.746529],[19.57011,99.751678],[19.56736,99.752197],[19.550541,99.747391],[19.541479,99.742073],[19.51705,99.745667],[19.504271,99.746872],[19.50135,99.746696],[19.49699,99.748589],[19.48016,99.751678],[19.472389,99.753738],[19.469641,99.754082],[19.467211,99.755112],[19.462839,99.75563],[19.45928,99.755798],[19.453939,99.757172],[19.44973,99.758034],[19.44228,99.758202],[19.432249,99.761978],[19.42415,99.766098],[19.410549,99.770393],[19.37849,99.78756],[19.357759,99.799057],[19.339621,99.811943],[19.3218,99.838371],[19.310631,99.845917],[19.30415,99.852272],[19.29945,99.853127],[19.290051,99.855881],[19.275141,99.856392],[19.268181,99.857773],[19.255369,99.857422],[19.24938,99.858627],[19.240629,99.860863],[19.23674,99.862923],[19.229931,99.863426],[19.227011,99.863953],[19.20772,99.871498],[19.2001,99.872528],[19.19735,99.874763],[19.188431,99.889008],[19.178049,99.901016],[19.17128,99.906563],[19.16725,99.909927],[19.161579,99.914177],[19.158171,99.914436],[19.152809,99.912689],[19.141399,99.910896],[19.12985,99.910072],[19.115681,99.90567],[19.106331,99.908417],[19.095181,99.912193],[19.09145,99.913727],[19.082689,99.92231],[19.075069,99.927979],[19.069059,99.92746],[19.05657,99.932098],[19.05316,99.933472],[19.050079,99.935867],[19.04554,99.935532],[19.043261,99.934669],[19.04018,99.931236],[19.038719,99.931068],[19.03775,99.930382],[19.02947,99.927116],[19.02639,99.923523],[19.019899,99.920433],[19.019251,99.919052],[19.01503,99.911163],[19.00983,99.906013],[19.00659,99.902573],[19.005449,99.899307],[19.00334,99.898109],[19.00042,99.899483],[18.99782,99.901367],[18.994419,99.903259],[18.991011,99.904289],[18.988569,99.906174],[18.985979,99.906349],[18.98127,99.907204],[18.977051,99.91098],[18.976231,99.912872],[18.97364,99.914413],[18.9699,99.915283],[18.96796,99.918709],[18.96455,99.920937],[18.95822,99.920593],[18.95627,99.922829],[18.95075,99.923523],[18.93889,99.929008],[18.934999,99.931923],[18.93354,99.932793],[18.929319,99.931763],[18.924931,99.933983],[18.922171,99.935013],[18.91876,99.937424],[18.905769,99.943771],[18.902519,99.944633],[18.89814,99.946342],[18.893259,99.946693],[18.887251,99.944633],[18.88319,99.945312],[18.8741,99.947548],[18.867599,99.948402],[18.858829,99.948921],[18.851681,99.948059],[18.846161,99.947891],[18.834141,99.949432],[18.82406,99.949089],[18.821791,99.949608],[18.807159,99.958527],[18.804079,99.960587],[18.78701,99.964371],[18.78587,99.965233],[18.781969,99.969177],[18.776609,99.970032],[18.76491,99.97364],[18.76214,99.973457],[18.757429,99.970032],[18.753201,99.970032],[18.7428,99.975014],[18.74004,99.975357],[18.73597,99.973984],[18.733049,99.971237],[18.73012,99.971237],[18.72703,99.968491],[18.72541,99.968491],[18.72323,99.967339],[18.72118,99.966263],[18.719721,99.966263],[18.718901,99.964706],[18.71516,99.960938],[18.71386,99.958527],[18.71175,99.957161],[18.7085,99.958023],[18.706869,99.957497],[18.7059,99.956131],[18.70134,99.954758],[18.699551,99.952698],[18.69809,99.948753],[18.696951,99.947548],[18.68996,99.944283],[18.687691,99.944801],[18.68573,99.943604],[18.68037,99.934502],[18.674021,99.928673],[18.6724,99.927803],[18.66736,99.92643],[18.661659,99.924202],[18.65711,99.921967],[18.655649,99.92025],[18.65044,99.920433],[18.64784,99.920593],[18.645069,99.918709],[18.641821,99.91819],[18.635799,99.914589],[18.63434,99.911667],[18.626699,99.909103],[18.62442,99.90892],[18.618561,99.907722],[18.61824,99.906349],[18.614981,99.908234],[18.61091,99.907043],[18.6075,99.9048],[18.6049,99.904289],[18.60343,99.903603],[18.601971,99.902397],[18.598881,99.900681],[18.596109,99.898453],[18.592529,99.898621],[18.589769,99.896744],[18.588461,99.89502],[18.58684,99.89399],[18.58391,99.893471],[18.582609,99.89296],[18.58082,99.89193],[18.57691,99.886597],[18.575769,99.886093],[18.575121,99.886597],[18.57398,99.88575],[18.57333,99.88472],[18.572029,99.883858],[18.571541,99.882141],[18.56975,99.881287],[18.568291,99.879051],[18.5665,99.878883],[18.56373,99.875618],[18.56324,99.872871],[18.56275,99.87133],[18.56292,99.86927],[18.560801,99.866348],[18.55966,99.865997],[18.55966,99.864288],[18.558359,99.861198],[18.55673,99.859657],[18.555269,99.854507],[18.55348,99.853821],[18.5525,99.852448],[18.550871,99.851418],[18.54925,99.849182],[18.547291,99.848328],[18.543711,99.840767],[18.540131,99.839912],[18.53964,99.838707],[18.537849,99.838203],[18.53558,99.835617],[18.530531,99.832191],[18.529881,99.830299],[18.52581,99.828934],[18.51783,99.82412],[18.513769,99.820862],[18.5149,99.81897],[18.499439,99.812279],[18.47893,99.807472],[18.47648,99.806099],[18.47323,99.805237],[18.47225,99.80558],[18.466881,99.804207],[18.466709,99.802673],[18.463301,99.804382],[18.462971,99.803703],[18.459061,99.801292],[18.455641,99.797684],[18.45402,99.797173],[18.45385,99.795113],[18.451571,99.793404],[18.452061,99.790131],[18.45125,99.788589],[18.448311,99.786697],[18.448311,99.783607],[18.44245,99.776047],[18.44066,99.775017],[18.43952,99.772797],[18.43692,99.772453],[18.434799,99.769867],[18.42487,99.754601],[18.42519,99.752022],[18.42161,99.749107],[18.42128,99.747902],[18.4221,99.743103],[18.42112,99.741547],[18.420309,99.739487],[18.41995,99.737396],[18.42004,99.735573],[18.42008,99.733253],[18.41995,99.732552],[18.41889,99.730331],[18.41873,99.729698],[18.418711,99.72905],[18.418791,99.728363],[18.4195,99.727074],[18.419979,99.726349],[18.420231,99.726128],[18.421,99.7258],[18.424561,99.724602],[18.425671,99.724037],[18.426571,99.723328],[18.427401,99.722572],[18.428101,99.721451],[18.42823,99.720734],[18.42827,99.719788],[18.42893,99.718018],[18.429291,99.716713],[18.42931,99.715942],[18.429251,99.714172],[18.42909,99.71257],[18.42915,99.711746],[18.429159,99.710548],[18.42911,99.709961],[18.42881,99.709312],[18.42832,99.708794],[18.42795,99.708214],[18.427919,99.707649],[18.42795,99.706039],[18.42767,99.704086],[18.427589,99.702888],[18.427589,99.70208],[18.426929,99.700233],[18.426741,99.699043],[18.426781,99.698059],[18.42658,99.697319],[18.42609,99.696053],[18.42481,99.694153],[18.424101,99.693573],[18.423691,99.692886],[18.42347,99.69194],[18.423491,99.689323],[18.423241,99.688538],[18.423031,99.68734],[18.42272,99.686203],[18.422131,99.684937],[18.422041,99.684174],[18.42222,99.683647],[18.422501,99.683128],[18.422661,99.682358],[18.42264,99.680542],[18.422541,99.679131],[18.42197,99.675194],[18.42194,99.67244],[18.42174,99.671631],[18.421301,99.670486],[18.420971,99.669319],[18.42094,99.665627],[18.42099,99.663811],[18.42087,99.663017],[18.42053,99.66185],[18.417959,99.653954],[18.4172,99.651909],[18.41601,99.649818],[18.412809,99.644562],[18.406851,99.639587],[18.40027,99.634438],[18.392811,99.624962],[18.385281,99.615044],[18.37586,99.599113],[18.36557,99.581909],[18.355709,99.565353],[18.34586,99.548767],[18.33902,99.541557],[18.31636,99.528687],[18.310011,99.528687],[18.305771,99.527657],[18.285431,99.512939],[18.2847,99.512192],[18.284321,99.511879],[18.28384,99.511429],[18.283501,99.511009],[18.28231,99.50872],[18.282021,99.506973],[18.281969,99.506752],[18.281931,99.506447],[18.28183,99.504372],[18.281799,99.503326],[18.2817,99.501801],[18.28154,99.498703],[18.281389,99.496017],[18.28134,99.495178],[18.281179,99.492928],[18.28109,99.491997],[18.28097,99.491493],[18.280741,99.490639],[18.280491,99.490067],[18.280251,99.489571],[18.276279,99.484016],[18.275089,99.482361],[18.271931,99.477943],[18.26992,99.475143],[18.265791,99.469559],[18.264151,99.467949],[18.263901,99.467728],[18.259399,99.462921],[18.254829,99.457451],[18.25322,99.45546],[18.25285,99.455002],[18.252251,99.454407],[18.251181,99.453377],[18.248911,99.451523],[18.24684,99.449829],[18.246321,99.449249],[18.246229,99.449158],[18.24357,99.446136],[18.240339,99.442268],[18.240231,99.442131],[18.23794,99.439133],[18.237009,99.43779],[18.234949,99.434761],[18.234051,99.433434],[18.233271,99.432281],[18.232941,99.431862],[18.23254,99.431396],[18.231871,99.43087],[18.23115,99.430443],[18.23048,99.430099],[18.223049,99.426353],[18.219999,99.42485],[18.214729,99.422234],[18.2141,99.421783],[18.213449,99.421173],[18.21044,99.417763],[18.20784,99.414848],[18.206091,99.41288],[18.20507,99.411789],[18.2041,99.410851],[18.203369,99.410233],[18.202881,99.409859],[18.202271,99.409431],[18.20149,99.408997],[18.20116,99.408768],[18.20055,99.408447],[18.199909,99.408142],[18.198891,99.40773],[18.19791,99.407379],[18.19705,99.407158],[18.19627,99.40699],[18.195271,99.406807],[18.194441,99.406723],[18.193081,99.406639],[18.19174,99.406708],[18.190941,99.406807],[18.190041,99.406929],[18.18878,99.407204],[18.186609,99.407761],[18.184031,99.408447],[18.182199,99.408928],[18.18095,99.409187],[18.180309,99.409233],[18.17975,99.409233],[18.179211,99.409149],[18.17749,99.408699],[18.17017,99.406662],[18.166981,99.405777],[18.163481,99.404831],[18.15963,99.403793],[18.158501,99.403519],[18.157089,99.403229],[18.15344,99.402649],[18.150881,99.402184],[18.15004,99.402046],[18.149481,99.401962],[18.149,99.401863],[18.148581,99.401703],[18.147989,99.401352],[18.14753,99.400978],[18.14703,99.40033],[18.1467,99.399567],[18.14559,99.395081],[18.1453,99.394173],[18.144859,99.393402],[18.144341,99.3927],[18.14374,99.392097],[18.142941,99.391563],[18.14249,99.391312],[18.14209,99.391144],[18.141621,99.390961],[18.14101,99.390823],[18.14044,99.390778],[18.139891,99.390747],[18.13619,99.390709],[18.13114,99.390762],[18.128851,99.391121],[18.124069,99.392548],[18.10453,99.398163],[18.10178,99.398788],[18.099609,99.398727],[18.096781,99.398109],[18.094761,99.397583],[18.092661,99.397118],[18.091841,99.396919],[18.0884,99.396072],[18.085541,99.395348],[18.083891,99.394974],[18.075769,99.392998],[18.070539,99.391769],[18.066629,99.390846],[18.062481,99.390266],[18.05871,99.389839],[18.05596,99.389267],[18.054411,99.388397],[18.051821,99.386383],[18.050211,99.38546],[18.045561,99.383141],[18.043961,99.381851],[18.04265,99.380638],[18.041,99.379402],[18.036779,99.376457],[18.036421,99.376259],[18.034201,99.375107],[18.033239,99.374786],[18.032431,99.374603],[18.031601,99.374496],[18.030519,99.37442],[18.024441,99.373947],[18.0229,99.373329],[18.02154,99.37207],[18.012831,99.358124],[18.01133,99.357002],[18.009991,99.356583],[17.99893,99.355247],[17.98905,99.357224],[17.982321,99.356018],[17.979931,99.355743],[17.97489,99.356071],[17.973339,99.355614],[17.970539,99.353241],[17.969101,99.352692],[17.96756,99.352707],[17.962151,99.354393],[17.961781,99.354492],[17.96125,99.354637],[17.961029,99.35466],[17.96056,99.35466],[17.95981,99.354637],[17.959379,99.354561],[17.95863,99.354279],[17.95808,99.353981],[17.95723,99.353378],[17.95643,99.352737],[17.95587,99.352371],[17.955059,99.351822],[17.95433,99.351357],[17.95396,99.351189],[17.95359,99.351044],[17.953091,99.350883],[17.95245,99.350838],[17.951981,99.350853],[17.951429,99.350929],[17.95067,99.351082],[17.95013,99.351196],[17.94813,99.351593],[17.946581,99.351837],[17.946051,99.351921],[17.945681,99.351936],[17.945511,99.351929],[17.945129,99.351883],[17.944559,99.351707],[17.94421,99.351593],[17.943859,99.351433],[17.94348,99.351257],[17.94228,99.350517],[17.941111,99.349838],[17.93996,99.349243],[17.93936,99.348953],[17.93882,99.348679],[17.93819,99.348473],[17.9373,99.348289],[17.93652,99.348137],[17.934759,99.347778],[17.93421,99.347687],[17.932699,99.347427],[17.93189,99.347298],[17.92786,99.346573],[17.92705,99.346413],[17.92444,99.34594],[17.92285,99.345657],[17.92038,99.345207],[17.9198,99.345093],[17.91939,99.345001],[17.91836,99.344711],[17.91785,99.344589],[17.917351,99.344429],[17.917009,99.344269],[17.9163,99.343849],[17.915291,99.343246],[17.915051,99.343117],[17.91415,99.342613],[17.913731,99.342377],[17.913441,99.342216],[17.91333,99.342163],[17.913191,99.342133],[17.9125,99.342003],[17.91172,99.341957],[17.91118,99.341927],[17.910681,99.341873],[17.90926,99.341827],[17.908791,99.341797],[17.90661,99.341667],[17.904579,99.341522],[17.9039,99.341476],[17.903549,99.341469],[17.902691,99.341431],[17.902109,99.3414],[17.90139,99.341362],[17.900949,99.341331],[17.899851,99.341217],[17.899229,99.341133],[17.89868,99.341026],[17.898109,99.340927],[17.89765,99.340851],[17.89702,99.340736],[17.89642,99.340637],[17.895901,99.340553],[17.89366,99.340157],[17.89069,99.33963],[17.88946,99.339417],[17.888769,99.33931],[17.88637,99.338882],[17.88438,99.338531],[17.882891,99.33828],[17.881689,99.338081],[17.88026,99.337822],[17.87919,99.337646],[17.87808,99.337471],[17.87718,99.337318],[17.8766,99.337257],[17.87611,99.337181],[17.87467,99.337128],[17.874229,99.337143],[17.87361,99.337143],[17.871771,99.337196],[17.87114,99.337242],[17.870489,99.337273],[17.870131,99.337273],[17.86964,99.337196],[17.869011,99.337082],[17.8687,99.337013],[17.868401,99.336838],[17.86796,99.336563],[17.86767,99.336349],[17.86746,99.336197],[17.86726,99.336014],[17.86688,99.33551],[17.86599,99.334396],[17.865061,99.333237],[17.864401,99.332397],[17.863991,99.331802],[17.86343,99.331001],[17.86311,99.33049],[17.862749,99.32975],[17.86245,99.328903],[17.862289,99.328217],[17.86224,99.327454],[17.862181,99.326714],[17.862129,99.32605],[17.86191,99.322456],[17.861759,99.319107],[17.861549,99.315567],[17.86153,99.315292],[17.861521,99.31517],[17.861481,99.315033],[17.86117,99.313766],[17.8608,99.312477],[17.860331,99.310944],[17.86005,99.310051],[17.859909,99.309601],[17.859859,99.309486],[17.85973,99.309273],[17.85928,99.308662],[17.85885,99.308243],[17.858391,99.307747],[17.85741,99.306763],[17.85648,99.305923],[17.855591,99.305107],[17.85523,99.304764],[17.854839,99.304314],[17.854601,99.304031],[17.85445,99.303741],[17.85433,99.303513],[17.85412,99.303017],[17.85392,99.302223],[17.85384,99.30159],[17.85371,99.300491],[17.8533,99.296638],[17.853251,99.296318],[17.85321,99.296013],[17.853029,99.295303],[17.852871,99.2948],[17.852711,99.29451],[17.85252,99.294228],[17.852261,99.293854],[17.852079,99.293587],[17.85186,99.293404],[17.851761,99.293297],[17.85161,99.293198],[17.851259,99.292953],[17.850969,99.29277],[17.850731,99.292641],[17.85043,99.292542],[17.85,99.292397],[17.8496,99.29232],[17.84923,99.29229],[17.84869,99.29232],[17.84779,99.292458],[17.847481,99.292511],[17.844879,99.293228],[17.843941,99.293472],[17.843321,99.293587],[17.842369,99.293701],[17.841961,99.293739],[17.84166,99.293732],[17.84104,99.293709],[17.840599,99.293633],[17.840219,99.293533],[17.839899,99.293449],[17.83931,99.293243],[17.83873,99.292923],[17.83827,99.29261],[17.83799,99.292389],[17.836639,99.2911],[17.836531,99.291023],[17.836411,99.290932],[17.836281,99.290848],[17.835911,99.290672],[17.8354,99.290413],[17.83526,99.290337],[17.83514,99.290298],[17.834579,99.290268],[17.83226,99.290161],[17.831779,99.290154],[17.831591,99.290154],[17.831499,99.290138],[17.830999,99.289932],[17.83036,99.289597],[17.83024,99.28952],[17.83003,99.289322],[17.82963,99.288872],[17.82939,99.288643],[17.829281,99.28849],[17.82917,99.288239],[17.828871,99.287407],[17.82847,99.286018],[17.82832,99.285347],[17.828159,99.284813],[17.82811,99.284683],[17.82798,99.284462],[17.82766,99.284058],[17.82745,99.283836],[17.82724,99.2836],[17.827101,99.28347],[17.826941,99.283363],[17.826679,99.283234],[17.826389,99.283081],[17.82618,99.282997],[17.82585,99.282921],[17.825569,99.282867],[17.825081,99.282806],[17.824591,99.282799],[17.821569,99.28289],[17.82082,99.282898],[17.820551,99.282898],[17.81995,99.28286],[17.8197,99.282852],[17.819,99.282806],[17.818501,99.282753],[17.81819,99.282692],[17.8179,99.282547],[17.817579,99.282333],[17.817209,99.282066],[17.816971,99.281822],[17.816771,99.281609],[17.816601,99.281326],[17.81636,99.280884],[17.816179,99.280487],[17.816031,99.280083],[17.81386,99.273483],[17.81365,99.272911],[17.81352,99.272583],[17.813181,99.271957],[17.81295,99.271584],[17.8127,99.27124],[17.81225,99.270798],[17.81126,99.269852],[17.810381,99.269119],[17.80974,99.26857],[17.80872,99.267761],[17.80821,99.267357],[17.807859,99.267128],[17.80744,99.266907],[17.806999,99.266693],[17.80674,99.266617],[17.80644,99.266571],[17.80608,99.266533],[17.805759,99.266533],[17.805401,99.266533],[17.80504,99.266617],[17.80337,99.266998],[17.802469,99.267174],[17.802071,99.267227],[17.801889,99.267227],[17.801689,99.267227],[17.80142,99.267174],[17.8009,99.267036],[17.800541,99.266937],[17.80023,99.266861],[17.800051,99.266777],[17.798241,99.266006],[17.79715,99.265556],[17.79257,99.263641],[17.791861,99.263344],[17.78828,99.26181],[17.78756,99.261513],[17.78669,99.261124],[17.7859,99.260757],[17.78512,99.260429],[17.78488,99.260292],[17.784559,99.260033],[17.7843,99.259827],[17.783911,99.259506],[17.783489,99.259117],[17.78289,99.258347],[17.781799,99.257004],[17.78129,99.256287],[17.77948,99.254051],[17.7777,99.251877],[17.77697,99.251038],[17.77673,99.250763],[17.776421,99.250481],[17.77618,99.250313],[17.7756,99.250031],[17.775,99.249786],[17.773529,99.249382],[17.773161,99.249283],[17.770929,99.248657],[17.769039,99.248009],[17.768499,99.247833],[17.768101,99.247627],[17.7679,99.247437],[17.76725,99.246834],[17.76651,99.246017],[17.76532,99.244629],[17.76475,99.243988],[17.764339,99.243607],[17.763969,99.243401],[17.763491,99.243141],[17.76297,99.242897],[17.76252,99.242783],[17.761299,99.24247],[17.76108,99.242416],[17.76034,99.242218],[17.759871,99.242073],[17.759029,99.241737],[17.75853,99.241524],[17.758101,99.241241],[17.757481,99.240791],[17.756941,99.240318],[17.75658,99.239883],[17.754259,99.236938],[17.75318,99.235573],[17.752991,99.235367],[17.75267,99.235062],[17.752399,99.234879],[17.75209,99.234688],[17.751051,99.234238],[17.750351,99.234001],[17.7498,99.233772],[17.748859,99.233276],[17.748581,99.233093],[17.747829,99.232452],[17.746889,99.231583],[17.746691,99.231377],[17.74646,99.231194],[17.74609,99.230972],[17.74564,99.230827],[17.745159,99.230682],[17.744881,99.230637],[17.744419,99.230629],[17.743931,99.23069],[17.74349,99.230782],[17.743191,99.230873],[17.74276,99.231102],[17.74197,99.231628],[17.74017,99.232971],[17.73991,99.233147],[17.739531,99.233292],[17.73864,99.233566],[17.73842,99.233589],[17.73773,99.233589],[17.73707,99.233582],[17.736509,99.233513],[17.73584,99.233383],[17.73542,99.233292],[17.734819,99.233177],[17.73427,99.23304],[17.733521,99.232773],[17.732241,99.232307],[17.730801,99.231644],[17.730061,99.231293],[17.728479,99.230621],[17.727859,99.230362],[17.72703,99.230057],[17.726549,99.229881],[17.726231,99.229767],[17.725981,99.229721],[17.724819,99.229462],[17.72401,99.229309],[17.723749,99.229263],[17.723499,99.229233],[17.72278,99.229134],[17.72213,99.22905],[17.72184,99.229019],[17.72105,99.228928],[17.720671,99.228889],[17.720409,99.228859],[17.720261,99.228859],[17.720039,99.228882],[17.71792,99.229012],[17.71751,99.229027],[17.7131,99.229362],[17.71036,99.229683],[17.709999,99.229729],[17.709591,99.229782],[17.709379,99.229797],[17.70927,99.22982],[17.709061,99.229874],[17.708929,99.229912],[17.70859,99.230003],[17.703871,99.231422],[17.6992,99.232727],[17.69821,99.233017],[17.69763,99.233177],[17.697451,99.233223],[17.69726,99.233238],[17.696751,99.233276],[17.696369,99.233292],[17.69614,99.233307],[17.69598,99.233299],[17.69591,99.233292],[17.69561,99.233223],[17.69491,99.23304],[17.694389,99.23291],[17.694099,99.232841],[17.69388,99.232811],[17.69368,99.232803],[17.693279,99.23275],[17.692961,99.232727],[17.692671,99.232697],[17.69244,99.232697],[17.692301,99.232697],[17.692169,99.232727],[17.691891,99.232803],[17.69169,99.232857],[17.691191,99.233093],[17.691019,99.233177],[17.69067,99.233437],[17.690411,99.233658],[17.690121,99.233994],[17.689871,99.234283],[17.689671,99.234543],[17.689461,99.234879],[17.688641,99.236259],[17.68808,99.23719],[17.68734,99.238152],[17.68705,99.238503],[17.686781,99.238724],[17.6863,99.239014],[17.68573,99.239311],[17.68515,99.239563],[17.68358,99.24015],[17.679119,99.241768],[17.67421,99.243568],[17.670959,99.244667],[17.669821,99.24501],[17.66951,99.245102],[17.669319,99.245163],[17.669201,99.245171],[17.669081,99.245171],[17.66873,99.245163],[17.667709,99.245064],[17.66604,99.244743],[17.66552,99.244629],[17.66523,99.244583],[17.66506,99.24456],[17.664921,99.24456],[17.66469,99.244583],[17.6644,99.244614],[17.664009,99.244637],[17.663759,99.24469],[17.66358,99.244743],[17.663389,99.244812],[17.663219,99.244904],[17.662809,99.245117],[17.66263,99.245247],[17.662331,99.245453],[17.66197,99.245811],[17.660839,99.247223],[17.660061,99.248207],[17.659401,99.2491],[17.65922,99.249313],[17.659121,99.249413],[17.65889,99.249588],[17.658171,99.25016],[17.657921,99.250343],[17.657669,99.250473],[17.65728,99.250641],[17.656561,99.250893],[17.656309,99.250961],[17.655861,99.25103],[17.655359,99.251091],[17.654989,99.251106],[17.65469,99.251106],[17.654181,99.251038],[17.653561,99.25087],[17.653231,99.250763],[17.652941,99.250641],[17.652571,99.250427],[17.652439,99.250351],[17.652189,99.250183],[17.651711,99.249847],[17.65132,99.249489],[17.650909,99.249039],[17.650351,99.248322],[17.649651,99.247177],[17.64868,99.245667],[17.64819,99.244987],[17.647699,99.244331],[17.64736,99.243896],[17.647091,99.243652],[17.646799,99.243439],[17.646021,99.24292],[17.644899,99.242287],[17.643909,99.241737],[17.64311,99.24131],[17.641239,99.240349],[17.640791,99.240097],[17.640671,99.240044],[17.64039,99.239937],[17.640221,99.239883],[17.63924,99.239662],[17.639059,99.239616],[17.63826,99.239517],[17.63669,99.239388],[17.635361,99.23925],[17.63233,99.238876],[17.63176,99.238823],[17.631161,99.238739],[17.630199,99.238609],[17.63006,99.238586],[17.629971,99.238579],[17.62962,99.238541],[17.629141,99.238472],[17.62866,99.238403],[17.628309,99.23835],[17.627979,99.238281],[17.62742,99.238197],[17.62673,99.238037],[17.62583,99.237892],[17.625059,99.237633],[17.622801,99.236839],[17.621441,99.236008],[17.61692,99.232162],[17.61537,99.230904],[17.61335,99.229797],[17.60886,99.227928],[17.602249,99.22522],[17.597521,99.223282],[17.59412,99.222054],[17.587271,99.220108],[17.58593,99.219467],[17.584789,99.218277],[17.5783,99.208618],[17.57519,99.203941],[17.574329,99.203087],[17.573111,99.202309],[17.57239,99.202087],[17.57156,99.201981],[17.57074,99.202003],[17.564529,99.203102],[17.56094,99.203789],[17.559891,99.203529],[17.559389,99.203369],[17.55278,99.200447],[17.545259,99.197067],[17.537621,99.193703],[17.52972,99.190163],[17.522421,99.186867],[17.517151,99.184593],[17.511311,99.183838],[17.50985,99.183296],[17.508881,99.182648],[17.503361,99.178322],[17.499451,99.175423],[17.499241,99.175041],[17.48904,99.167084],[17.47415,99.162407],[17.469481,99.161247],[17.423571,99.157494],[17.41935,99.157249],[17.41753,99.156578],[17.411221,99.151299],[17.40942,99.150032],[17.40662,99.149208],[17.39879,99.149406],[17.39036,99.148537],[17.38191,99.147797],[17.377081,99.149017],[17.37434,99.149094],[17.36429,99.146599],[17.3626,99.146698],[17.354561,99.148918],[17.35183,99.149513],[17.34754,99.14946],[17.34433,99.149437],[17.34161,99.149643],[17.33868,99.151382],[17.335911,99.153374],[17.33367,99.154083],[17.33156,99.153992],[17.30291,99.147034],[17.295,99.142593],[17.28458,99.141388],[17.28159,99.140633],[17.25828,99.132843],[17.24894,99.128304],[17.23995,99.123833],[17.238461,99.122993],[17.237061,99.122704],[17.207069,99.123238],[17.20488,99.123596],[17.20418,99.123947],[17.2031,99.12455],[17.19191,99.130913],[17.179131,99.138077],[17.17695,99.138298],[17.17457,99.137848],[17.16736,99.135223],[17.15797,99.131851],[17.15015,99.129463],[17.147699,99.128029],[17.13851,99.112953],[17.13471,99.106644],[17.132629,99.104424],[17.126169,99.098793],[17.115339,99.091873],[17.113079,99.08847],[17.111059,99.084801],[17.109261,99.080406],[17.10791,99.077362],[17.105841,99.075607],[17.103371,99.074699],[17.089741,99.072487],[17.074369,99.06559],[17.07151,99.06543],[17.069031,99.066544],[17.06661,99.06781],[17.05814,99.072273],[17.047461,99.078308],[17.03545,99.087624],[17.023211,99.097221],[17.00762,99.108757],[16.997351,99.112717],[16.988581,99.117897],[16.980551,99.122093],[16.979561,99.122704],[16.978951,99.12368],[16.976191,99.128593],[16.97452,99.130058],[16.97257,99.130501],[16.968321,99.13092],[16.96356,99.131462],[16.96092,99.13134],[16.920919,99.115631],[16.919189,99.11586],[16.91795,99.11602],[16.91305,99.118767],[16.90901,99.121246],[16.9007,99.126984],[16.89715,99.128098],[16.893391,99.129143],[16.89175,99.129051],[16.885201,99.127052],[16.88372,99.126694],[16.881399,99.127083],[16.876499,99.130058],[16.87117,99.133377],[16.863501,99.13826],[16.85927,99.12957],[16.856239,99.123466],[16.855671,99.12233],[16.85342,99.117859],[16.85202,99.115067],[16.85084,99.113182],[16.84898,99.111923],[16.84684,99.111504],[16.84412,99.112358],[16.8416,99.11367],[16.84152,99.113724],[16.837959,99.115807],[16.835329,99.117531],[16.821699,99.130074],[16.801649,99.148598],[16.799669,99.150833],[16.798031,99.15358],[16.795401,99.157867],[16.79244,99.162163],[16.78866,99.166969],[16.76845,99.18911],[16.76483,99.192543],[16.7096,99.240257],[16.68836,99.258202],[16.679461,99.264771],[16.67762,99.266113],[16.677481,99.266212],[16.6754,99.267906],[16.67342,99.269623],[16.67309,99.270317],[16.67288,99.271057],[16.672859,99.271423],[16.67281,99.272797],[16.672779,99.273537],[16.672729,99.27478],[16.672661,99.275673],[16.672489,99.276649],[16.672251,99.277786],[16.67214,99.278313],[16.67173,99.280197],[16.671499,99.281181],[16.6712,99.283028],[16.671181,99.283287],[16.671249,99.285454],[16.671789,99.288597],[16.671829,99.288857],[16.672001,99.289909],[16.67218,99.290947],[16.672421,99.292236],[16.6726,99.293266],[16.67338,99.298218],[16.673161,99.300034],[16.672979,99.300537],[16.672041,99.302116],[16.66967,99.304527],[16.666189,99.308037],[16.665819,99.308411],[16.663031,99.31118],[16.66287,99.311348],[16.66259,99.31163],[16.6623,99.311943],[16.66151,99.312729],[16.6612,99.313026],[16.66095,99.313278],[16.66025,99.314003],[16.659611,99.314667],[16.659439,99.314842],[16.658159,99.316139],[16.65443,99.319923],[16.65276,99.321609],[16.652571,99.3218],[16.649229,99.325203],[16.647921,99.326508],[16.646601,99.32785],[16.64641,99.328041],[16.64311,99.331429],[16.64192,99.332878],[16.64097,99.334152],[16.64082,99.334373],[16.637951,99.338142],[16.63311,99.344543],[16.630091,99.348587],[16.629789,99.348991],[16.629169,99.349792],[16.628531,99.350601],[16.62711,99.352493],[16.62414,99.356438],[16.62381,99.35685],[16.62253,99.358543],[16.62108,99.360443],[16.618429,99.363991],[16.61496,99.368683],[16.61392,99.370857],[16.613609,99.37159],[16.61319,99.372566],[16.613079,99.37281],[16.61297,99.373062],[16.612749,99.373558],[16.611071,99.377563],[16.610439,99.379044],[16.60939,99.381523],[16.60792,99.384987],[16.60771,99.385483],[16.607599,99.385727],[16.607189,99.386703],[16.60689,99.387444],[16.606569,99.388168],[16.606159,99.389153],[16.605419,99.390877],[16.605009,99.391869],[16.603491,99.395462],[16.603121,99.396317],[16.60302,99.396568],[16.602591,99.397552],[16.600929,99.401466],[16.60062,99.402206],[16.600519,99.402458],[16.59807,99.408287],[16.596411,99.412201],[16.596001,99.41317],[16.595791,99.413658],[16.595591,99.414146],[16.594521,99.416603],[16.594311,99.417084],[16.594101,99.41758],[16.594,99.417831],[16.59269,99.420998],[16.591021,99.424927],[16.588301,99.431328],[16.586519,99.435532],[16.58543,99.437042],[16.584,99.438202],[16.58209,99.439056],[16.580641,99.439629],[16.580151,99.439812],[16.578939,99.440331],[16.57461,99.442101],[16.57412,99.442299],[16.57338,99.442596],[16.57313,99.442703],[16.571659,99.443283],[16.57023,99.443893],[16.567341,99.44503],[16.566139,99.445511],[16.563231,99.446663],[16.56251,99.446953],[16.55891,99.448486],[16.55868,99.448608],[16.558229,99.448868],[16.556589,99.45018],[16.554319,99.4524],[16.55036,99.456284],[16.548071,99.458511],[16.54731,99.459251],[16.544491,99.461937],[16.544331,99.462097],[16.543751,99.462677],[16.543159,99.463272],[16.54306,99.463379],[16.542561,99.463837],[16.5424,99.463989],[16.542191,99.464241],[16.542009,99.464417],[16.541679,99.464737],[16.541269,99.465134],[16.540661,99.465729],[16.540331,99.466057],[16.53981,99.466583],[16.539049,99.4673],[16.538851,99.467484],[16.53808,99.468224],[16.53751,99.468781],[16.536751,99.469521],[16.53598,99.470268],[16.53504,99.471191],[16.534849,99.471367],[16.53429,99.471931],[16.53392,99.472313],[16.533001,99.473228],[16.53264,99.473587],[16.530359,99.475601],[16.528509,99.47641],[16.52446,99.477753],[16.52404,99.47789],[16.52319,99.478142],[16.52297,99.47821],[16.522091,99.478523],[16.52186,99.478592],[16.521629,99.478683],[16.521151,99.478859],[16.51795,99.479942],[16.516251,99.480507],[16.51479,99.481003],[16.51083,99.482323],[16.50983,99.482658],[16.509581,99.482742],[16.508089,99.483253],[16.507589,99.483414],[16.507099,99.483589],[16.506849,99.483673],[16.50609,99.483887],[16.504271,99.484047],[16.502211,99.483627],[16.501431,99.483429],[16.50091,99.483299],[16.498619,99.482689],[16.497601,99.482422],[16.497089,99.482277],[16.49658,99.48214],[16.49402,99.481621],[16.492479,99.481903],[16.491171,99.482773],[16.48962,99.484154],[16.48595,99.487839],[16.485571,99.488213],[16.48538,99.488403],[16.483351,99.490791],[16.482929,99.491463],[16.48209,99.49276],[16.48167,99.493408],[16.481529,99.493629],[16.481239,99.494072],[16.481091,99.494301],[16.480101,99.495537],[16.479,99.496292],[16.47747,99.496696],[16.47649,99.496689],[16.476089,99.496658],[16.47576,99.496643],[16.475479,99.496613],[16.47537,99.496597],[16.47506,99.496567],[16.474609,99.496552],[16.472771,99.496483],[16.471889,99.496407],[16.471439,99.496384],[16.470751,99.496323],[16.470169,99.496246],[16.469761,99.496193],[16.468161,99.496147],[16.467911,99.496132],[16.46665,99.496063],[16.465639,99.495987],[16.464371,99.495918],[16.46105,99.495689],[16.460541,99.495644],[16.4568,99.495323],[16.455311,99.495621],[16.453951,99.496407],[16.45089,99.498993],[16.4485,99.500977],[16.447519,99.501823],[16.44635,99.5028],[16.445999,99.503113],[16.44545,99.503563],[16.44314,99.505539],[16.439569,99.508553],[16.438971,99.509071],[16.436991,99.51075],[16.43314,99.513939],[16.428801,99.517578],[16.424419,99.521103],[16.422661,99.521637],[16.421869,99.521713],[16.42108,99.521698],[16.4182,99.521629],[16.415039,99.521561],[16.414009,99.521538],[16.412491,99.5215],[16.411449,99.521492],[16.409679,99.521538],[16.409161,99.521561],[16.40608,99.521568],[16.405041,99.521561],[16.400579,99.521568],[16.40032,99.521568],[16.397169,99.521553],[16.395321,99.521553],[16.393999,99.521561],[16.39348,99.521561],[16.393221,99.521561],[16.391121,99.521568],[16.390341,99.521584],[16.38854,99.521942],[16.3883,99.522041],[16.38677,99.523033],[16.38658,99.523209],[16.385611,99.524483],[16.38533,99.52494],[16.38464,99.5261],[16.384501,99.526337],[16.38258,99.529541],[16.382441,99.529778],[16.382299,99.529999],[16.38088,99.53231],[16.380739,99.532539],[16.380051,99.53373],[16.37991,99.533958],[16.37948,99.53466],[16.377069,99.538559],[16.374229,99.543198],[16.37394,99.543663],[16.37365,99.544144],[16.370649,99.549042],[16.370359,99.549507],[16.36949,99.550911],[16.366779,99.555702],[16.365179,99.558617],[16.364639,99.559593],[16.36409,99.560547],[16.363819,99.561043],[16.363279,99.562012],[16.36249,99.563469],[16.360201,99.567574],[16.357809,99.572144],[16.354179,99.579102],[16.3515,99.584412],[16.35004,99.587318],[16.34803,99.591476],[16.345989,99.595329],[16.343031,99.599533],[16.341009,99.602783],[16.340269,99.605164],[16.338449,99.611328],[16.33709,99.614616],[16.33412,99.621323],[16.33148,99.627182],[16.331369,99.627449],[16.331261,99.627708],[16.330481,99.629509],[16.330259,99.630028],[16.327971,99.635368],[16.325199,99.641823],[16.32476,99.642838],[16.32181,99.649696],[16.319851,99.654007],[16.318529,99.655403],[16.31654,99.656693],[16.314871,99.657768],[16.312389,99.659416],[16.306021,99.663673],[16.305111,99.664284],[16.304211,99.664886],[16.303789,99.665169],[16.3034,99.665428],[16.30304,99.665657],[16.30287,99.665779],[16.30233,99.666168],[16.301941,99.666451],[16.3013,99.666878],[16.299049,99.668381],[16.29727,99.669563],[16.29705,99.669693],[16.2957,99.670593],[16.291679,99.673317],[16.28627,99.676964],[16.281839,99.679993],[16.279289,99.681396],[16.27492,99.682663],[16.27183,99.68354],[16.27051,99.683891],[16.269991,99.684036],[16.26354,99.685898],[16.26153,99.686478],[16.261141,99.6866],[16.260651,99.68676],[16.26017,99.686951],[16.25979,99.687103],[16.25938,99.687233],[16.258711,99.687469],[16.257021,99.688049],[16.252399,99.689629],[16.24692,99.691513],[16.2456,99.691933],[16.239849,99.693893],[16.238029,99.694511],[16.23308,99.696198],[16.23126,99.696831],[16.225599,99.698792],[16.218821,99.701103],[16.212601,99.703194],[16.20962,99.704193],[16.20705,99.70507],[16.206079,99.705429],[16.20174,99.706932],[16.19735,99.708397],[16.191231,99.710533],[16.188431,99.711472],[16.18173,99.713753],[16.18017,99.714302],[16.173941,99.716423],[16.16938,99.717972],[16.168091,99.718399],[16.16556,99.719292],[16.16477,99.719543],[16.16378,99.719856],[16.161659,99.720573],[16.16049,99.720901],[16.15974,99.721077],[16.159121,99.721191],[16.158421,99.721283],[16.157591,99.721336],[16.156981,99.721367],[16.15621,99.721359],[16.15048,99.721077],[16.14863,99.721024],[16.14603,99.720886],[16.13858,99.720573],[16.131781,99.720222],[16.12528,99.719902],[16.12373,99.719841],[16.122801,99.719818],[16.1194,99.719658],[16.118521,99.719597],[16.113729,99.719383],[16.11319,99.719353],[16.1068,99.719032],[16.105841,99.718987],[16.105129,99.719032],[16.10462,99.719116],[16.104019,99.719231],[16.10347,99.71936],[16.10277,99.719597],[16.10154,99.720123],[16.100809,99.720444],[16.099581,99.72094],[16.09844,99.72142],[16.09675,99.722153],[16.094219,99.723213],[16.09005,99.724953],[16.08955,99.725159],[16.084841,99.727127],[16.083389,99.72776],[16.077311,99.730301],[16.073151,99.732063],[16.07266,99.732262],[16.069929,99.733414],[16.06741,99.734489],[16.066401,99.73497],[16.065611,99.735367],[16.064939,99.735817],[16.06447,99.736214],[16.063801,99.73674],[16.06336,99.737137],[16.06078,99.739899],[16.056009,99.745132],[16.05513,99.746132],[16.05422,99.747093],[16.051439,99.750137],[16.050329,99.75135],[16.04903,99.752762],[16.04497,99.757187],[16.04143,99.761009],[16.041059,99.761414],[16.039579,99.763023],[16.037701,99.765007],[16.03714,99.76561],[16.036949,99.765823],[16.033899,99.769058],[16.03371,99.769257],[16.032,99.771072],[16.030279,99.772903],[16.03009,99.773102],[16.02557,99.777908],[16.02293,99.780693],[16.022169,99.781502],[16.02067,99.783081],[16.017441,99.786484],[16.016199,99.787788],[16.01602,99.787971],[16.01585,99.788147],[16.01568,99.788322],[16.015511,99.788498],[16.012739,99.791367],[16.011209,99.792999],[16.009171,99.795059],[16.00786,99.796494],[16.00614,99.798203],[16.0058,99.798553],[16.00466,99.799652],[16.003059,99.801308],[16.002541,99.801842],[16.00178,99.802597],[16.00106,99.803329],[15.99995,99.804489],[15.99944,99.805008],[15.99893,99.805519],[15.99852,99.805931],[15.99809,99.806351],[15.99742,99.807022],[15.99617,99.80825],[15.9937,99.810783],[15.98944,99.815048],[15.98454,99.819893],[15.97968,99.824661],[15.97439,99.829727],[15.97032,99.833603],[15.96583,99.83783],[15.96129,99.842163],[15.95713,99.846077],[15.95294,99.849953],[15.94795,99.854523],[15.9424,99.859627],[15.93697,99.864578],[15.93211,99.868973],[15.92862,99.872124],[15.9278,99.872879],[15.9247,99.875671],[15.92328,99.876953],[15.91854,99.880997],[15.91306,99.885612],[15.9105,99.887657],[15.90986,99.888168],[15.9086,99.889183],[15.90651,99.890747],[15.90628,99.890923],[15.90516,99.891769],[15.90126,99.894272],[15.89934,99.895317],[15.89693,99.896713],[15.8955,99.897507],[15.89383,99.898468],[15.89143,99.899841],[15.89,99.900673],[15.88886,99.90136],[15.88588,99.903069],[15.88534,99.903381],[15.88477,99.903732],[15.88452,99.903877],[15.8836,99.904411],[15.88287,99.904839],[15.8822,99.90519],[15.88194,99.905327],[15.88062,99.906067],[15.87939,99.906723],[15.87742,99.907837],[15.87723,99.907944],[15.87684,99.908173],[15.87643,99.908409],[15.87577,99.908791],[15.87485,99.909317],[15.87437,99.909599],[15.87366,99.910019],[15.86913,99.912613],[15.86472,99.915161],[15.86172,99.916901],[15.85842,99.918762],[15.8563,99.919983],[15.85584,99.920273],[15.85352,99.921623],[15.84915,99.924141],[15.848,99.924797],[15.84266,99.927872],[15.8408,99.92894],[15.83893,99.929993],[15.83869,99.930107],[15.83772,99.930634],[15.83604,99.931587],[15.83532,99.932007],[15.83225,99.933769],[15.83179,99.934036],[15.83115,99.934402],[15.83021,99.934952],[15.82925,99.935547],[15.82839,99.93605],[15.82702,99.936836],[15.82609,99.93734],[15.82586,99.937469],[15.82543,99.937714],[15.82486,99.938042],[15.82453,99.938217],[15.82423,99.938393],[15.82276,99.939194],[15.82242,99.939377],[15.82224,99.939491],[15.82184,99.939728],[15.81962,99.941002],[15.81839,99.941757],[15.81794,99.942009],[15.81565,99.943443],[15.81245,99.946007],[15.80879,99.949387],[15.80795,99.95015],[15.80672,99.951286],[15.80631,99.95166],[15.8061,99.951851],[15.80549,99.952423],[15.80023,99.957314],[15.79641,99.960907],[15.79151,99.965446],[15.79109,99.96582],[15.79089,99.966019],[15.79047,99.966408],[15.78922,99.967567],[15.78465,99.971817],[15.78341,99.972961],[15.77872,99.977364],[15.77314,99.98259],[15.77137,99.984322],[15.77118,99.984497],[15.771,99.98468],[15.7703,99.985336],[15.76963,99.985992],[15.76806,99.98748],[15.76747,99.988037],[15.76677,99.988701],[15.76587,99.989563],[15.76536,99.990021],[15.76506,99.990311],[15.76447,99.990868],[15.76404,99.99128],[15.76343,99.991859],[15.76275,99.9925],[15.76078,99.99437],[15.75662,99.99836],[15.75542,99.999496],[15.75523,99.99968],[15.75283,100.001961],[15.75206,100.002693],[15.75028,100.004356],[15.7501,100.004539],[15.74955,100.005058],[15.74901,100.005569],[15.74865,100.005913],[15.74847,100.006073],[15.74829,100.006241],[15.74811,100.006409],[15.74671,100.007736],[15.74604,100.008377],[15.74588,100.008537],[15.74571,100.00869],[15.74555,100.00885],[15.74347,100.010841],[15.74286,100.011513],[15.74271,100.011703],[15.74197,100.012627],[15.74139,100.013474],[15.74012,100.015778],[15.73951,100.017059],[15.73938,100.017326],[15.73767,100.020683],[15.73662,100.022697],[15.73636,100.023193],[15.73404,100.027718],[15.7334,100.028908],[15.73182,100.031929],[15.73156,100.03244],[15.73129,100.032944],[15.73064,100.034187],[15.72901,100.037308],[15.72816,100.038933],[15.72779,100.039627],[15.72742,100.040352],[15.72717,100.040833],[15.72655,100.042023],[15.7244,100.04612],[15.72409,100.046707],[15.72305,100.048714],[15.72204,100.050598],[15.72073,100.053078],[15.72005,100.054352],[15.71917,100.056023],[15.71907,100.05619],[15.71891,100.056511],[15.71863,100.057007],[15.71828,100.057648],[15.71801,100.058121],[15.71785,100.058388],[15.71766,100.058548],[15.71751,100.058578],[15.71732,100.058617],[15.71702,100.058617],[15.71687,100.058578],[15.71626,100.058357],[15.71531,100.058052],[15.71488,100.057907],[15.71418,100.057663],[15.71319,100.057289],[15.70982,100.056313],[15.70848,100.056099],[15.70526,100.055977],[15.70499,100.055977],[15.70418,100.055969],[15.69769,100.055939],[15.69256,100.055923],[15.68718,100.05587],[15.68639,100.055878],[15.68184,100.055962],[15.67809,100.056519],[15.67601,100.057114],[15.67575,100.05719],[15.67549,100.057281],[15.67423,100.05777],[15.67133,100.059227],[15.67039,100.059776],[15.66859,100.06102],[15.66796,100.061508],[15.66775,100.061684],[15.66653,100.062759],[15.66613,100.063141],[15.66593,100.063339],[15.66535,100.063927],[15.66513,100.064194],[15.66399,100.065514],[15.66335,100.066238],[15.6628,100.066879],[15.66244,100.067307],[15.65813,100.072357],[15.65441,100.076736],[15.65335,100.07798],[15.64987,100.082092],[15.64952,100.082497],[15.64579,100.086853],[15.64386,100.089127],[15.64161,100.091782],[15.63819,100.095734],[15.63676,100.097382],[15.63577,100.098457],[15.63527,100.099083],[15.63476,100.099693],[15.63253,100.10228],[15.63229,100.102562],[15.6313,100.103737],[15.63024,100.105003],[15.62668,100.109123],[15.6219,100.114677],[15.62155,100.115082],[15.62043,100.116333],[15.61751,100.119652],[15.61555,100.121933],[15.61525,100.122299],[15.61512,100.122459],[15.61465,100.122726],[15.61421,100.12278],[15.61356,100.12236],[15.61316,100.121872],[15.61283,100.121582],[15.6123,100.121407],[15.61209,100.121422],[15.61115,100.121536],[15.6109,100.121559],[15.61037,100.121597],[15.60577,100.122017],[15.60203,100.122414],[15.60097,100.122528],[15.59964,100.122673],[15.59883,100.122726],[15.59727,100.122887],[15.594,100.123238],[15.59322,100.123322],[15.59139,100.123497],[15.59112,100.123528],[15.58641,100.124046],[15.58456,100.12426],[15.58217,100.124512],[15.57952,100.124786],[15.57741,100.125023],[15.57477,100.125313],[15.57104,100.12571],[15.5673,100.126099],[15.56677,100.126152],[15.56257,100.126587],[15.55892,100.126907],[15.55866,100.126938],[15.55732,100.127083],[15.55625,100.12719],[15.55572,100.127258],[15.55546,100.127289],[15.55467,100.127388],[15.54787,100.128113],[15.54605,100.128242],[15.54499,100.128197],[15.54446,100.128113],[15.54343,100.127853],[15.5396,100.126534],[15.53935,100.126427],[15.53479,100.124977],[15.53266,100.124817],[15.53055,100.125191],[15.52954,100.125526],[15.52501,100.127136],[15.52288,100.127296],[15.52028,100.126984],[15.51816,100.126678],[15.51471,100.126213],[15.5098,100.125504],[15.50955,100.125473],[15.50904,100.125397],[15.50748,100.125252],[15.50665,100.125229],[15.50425,100.125526],[15.50321,100.125801],[15.50295,100.125893],[15.50144,100.126472],[15.49994,100.127098],[15.49968,100.127197],[15.4979,100.127907],[15.49206,100.130219],[15.49181,100.130333],[15.48732,100.132233],[15.48482,100.133888],[15.48358,100.134918],[15.48048,100.137543],[15.47986,100.138069],[15.47966,100.138237],[15.47863,100.139107],[15.4778,100.139793],[15.47758,100.139954],[15.4769,100.140404],[15.47667,100.140549],[15.4762,100.140823],[15.47547,100.141182],[15.47293,100.142067],[15.47161,100.142403],[15.46452,100.144142],[15.46318,100.144463],[15.46139,100.144882],[15.46078,100.145027],[15.45703,100.145958],[15.45379,100.14653],[15.45133,100.146538],[15.44864,100.146118],[15.44813,100.145958],[15.44761,100.145798],[15.44397,100.144928],[15.44036,100.144043],[15.43984,100.143913],[15.43825,100.143509],[15.43669,100.143097],[15.43405,100.142403],[15.43217,100.142311],[15.43031,100.142761],[15.42954,100.143051],[15.42879,100.143341],[15.42844,100.143471],[15.42729,100.143898],[15.42502,100.144737],[15.41997,100.146683],[15.41895,100.147003],[15.41788,100.147179],[15.41599,100.147247],[15.41572,100.147247],[15.41438,100.147217],[15.41276,100.147232],[15.41113,100.147217],[15.40869,100.147186],[15.40271,100.147087],[15.40135,100.147087],[15.40056,100.147079],[15.39872,100.147141],[15.39752,100.147209],[15.39729,100.147232],[15.39668,100.147301],[15.39601,100.147377],[15.39561,100.147438],[15.39551,100.147453],[15.3949,100.14756],[15.39478,100.147583],[15.39407,100.14772],[15.39362,100.147827],[15.393,100.148003],[15.39124,100.148438],[15.39037,100.148712],[15.39014,100.148788],[15.38919,100.149109],[15.38869,100.149261],[15.38818,100.149422],[15.38664,100.14994],[15.38307,100.151154],[15.38178,100.151604],[15.38048,100.152039],[15.38021,100.15213],[15.37995,100.152222],[15.37785,100.152931],[15.37759,100.153023],[15.37479,100.153976],[15.3707,100.155373],[15.36592,100.157043],[15.36289,100.158073],[15.35931,100.159286],[15.35477,100.16095],[15.35355,100.161484],[15.34929,100.163544],[15.34725,100.164627],[15.34634,100.165154],[15.34216,100.16748],[15.341,100.168121],[15.33988,100.168739],[15.3395,100.168953],[15.33886,100.169312],[15.33798,100.1698],[15.33737,100.170143],[15.33693,100.170387],[15.33648,100.170631],[15.33251,100.172836],[15.33088,100.173737],[15.32901,100.174782],[15.32783,100.17543],[15.32526,100.176849],[15.32505,100.176971],[15.32421,100.177437],[15.32274,100.178253],[15.32159,100.178886],[15.32127,100.17907],[15.31896,100.180351],[15.31723,100.18132],[15.3147,100.182716],[15.31442,100.182877],[15.31256,100.183907],[15.31003,100.185318],[15.30866,100.186073],[15.30612,100.187477],[15.30554,100.187843],[15.30511,100.18808],[15.30416,100.188568],[15.30307,100.189117],[15.30274,100.189278],[15.30025,100.190407],[15.2999,100.190559],[15.29957,100.190697],[15.2993,100.190811],[15.29896,100.190964],[15.29851,100.191147],[15.29838,100.1912],[15.29825,100.191261],[15.29813,100.191307],[15.29798,100.191368],[15.29782,100.191437],[15.2976,100.191521],[15.29703,100.191742],[15.29618,100.192047],[15.29541,100.192329],[15.29437,100.19268],[15.29415,100.192757],[15.29393,100.192833],[15.29348,100.192978],[15.29326,100.193047],[15.28926,100.194153],[15.28852,100.194344],[15.28729,100.194672],[15.28608,100.195],[15.28584,100.195061],[15.28535,100.19519],[15.28036,100.196571],[15.27729,100.197403],[15.27612,100.197723],[15.2747,100.198097],[15.27351,100.198418],[15.27231,100.198738],[15.26826,100.199837],[15.26282,100.201271],[15.26071,100.201843],[15.26047,100.20192],[15.25882,100.202377],[15.2581,100.202583],[15.25691,100.202904],[15.25644,100.203018],[15.25549,100.203247],[15.25526,100.2033],[15.2548,100.203407],[15.25265,100.203819],[15.24998,100.204338],[15.24949,100.20443],[15.24851,100.204643],[15.24778,100.204781],[15.24681,100.204987],[15.24633,100.205078],[15.24512,100.205307],[15.24278,100.20578],[15.24127,100.206078],[15.24049,100.20623],[15.23587,100.207352],[15.23538,100.207481],[15.23346,100.208],[15.23133,100.208572],[15.22951,100.209053],[15.22351,100.210709],[15.2228,100.210907],[15.22038,100.211639],[15.22014,100.211723],[15.21967,100.211884],[15.21848,100.212288],[15.21754,100.212608],[15.21614,100.21312],[15.21521,100.213493],[15.21316,100.214401],[15.20888,100.216461],[15.20757,100.217171],[15.20649,100.217796],[15.20231,100.220222],[15.19877,100.222237],[15.19429,100.224808],[15.19122,100.226486],[15.18906,100.227707],[15.18715,100.228844],[15.18267,100.231468],[15.18014,100.233093],[15.17931,100.23365],[15.17829,100.23436],[15.17748,100.234932],[15.17647,100.235672],[15.17547,100.236397],[15.17467,100.237],[15.17427,100.237297],[15.17085,100.239853],[15.16943,100.240891],[15.16743,100.242371],[15.16702,100.242668],[15.16662,100.242973],[15.1636,100.245178],[15.16119,100.246941],[15.15867,100.248703],[15.15807,100.249092],[15.1566,100.249992],[15.15618,100.250237],[15.1529,100.251968],[15.15093,100.25296],[15.14985,100.25354],[15.14877,100.254128],[15.14688,100.255127],[15.14652,100.25531],[15.14462,100.256218],[15.14441,100.25631],[15.14381,100.256569],[15.14345,100.256737],[15.14328,100.256813],[15.14258,100.257141],[15.1424,100.257233],[15.13979,100.258553],[15.13638,100.260277],[15.13618,100.260384],[15.13599,100.260468],[15.13366,100.261642],[15.13288,100.262032],[15.13269,100.262131],[15.13211,100.262428],[15.13091,100.263031],[15.13071,100.26313],[15.13028,100.263344],[15.13006,100.263458],[15.12984,100.263573],[15.12871,100.26413],[15.12803,100.26445],[15.12519,100.265984],[15.12263,100.267998],[15.12059,100.270264],[15.12029,100.270668],[15.11829,100.273659],[15.11704,100.275551],[15.11691,100.275757],[15.11476,100.279121],[15.11189,100.283524],[15.1103,100.286003],[15.10981,100.286713],[15.10929,100.287376],[15.107,100.289864],[15.1045,100.291901],[15.10075,100.294456],[15.09984,100.29509],[15.09925,100.295486],[15.09802,100.296333],[15.09573,100.29789],[15.09328,100.299507],[15.08991,100.301826],[15.08797,100.303169],[15.08675,100.304001],[15.08506,100.305168],[15.08359,100.306198],[15.08292,100.306671],[15.08214,100.307297],[15.08133,100.307953],[15.07951,100.30954],[15.07753,100.31144],[15.07606,100.312767],[15.07379,100.315063],[15.07118,100.317436],[15.06834,100.319649],[15.06525,100.32151],[15.05924,100.324608],[15.05301,100.327957],[15.04762,100.330757],[15.04751,100.330833],[15.04493,100.332314],[15.04151,100.334091],[15.0373,100.335579],[15.03228,100.336708],[15.02009,100.339088],[15.01539,100.340363],[15.01103,100.342216],[14.99827,100.348938],[14.98775,100.3545],[14.97862,100.359711],[14.94595,100.385002],[14.93855,100.390968],[14.93602,100.392723],[14.93327,100.394218],[14.9229,100.399612],[14.9125,100.405006],[14.90917,100.406914],[14.90763,100.408119],[14.90623,100.409462],[14.90454,100.411537],[14.90295,100.413712],[14.89979,100.418411],[14.89884,100.419594],[14.89781,100.420708],[14.89672,100.421722],[14.89556,100.422684],[14.88987,100.426567],[14.88409,100.430473],[14.87735,100.435089],[14.87514,100.43644],[14.87249,100.437813],[14.87109,100.438423],[14.86971,100.43895],[14.86837,100.439407],[14.86738,100.439743],[14.84928,100.445084],[14.84726,100.445663],[14.84332,100.446716],[14.83894,100.447487],[14.83473,100.44767],[14.82958,100.44735],[14.82374,100.446953],[14.81974,100.446632],[14.81552,100.447098],[14.81223,100.448128],[14.80827,100.450729],[14.80396,100.454041],[14.7992,100.45681],[14.79534,100.458],[14.79177,100.458366],[14.78836,100.457741],[14.78346,100.455803],[14.77892,100.453453],[14.77537,100.451897],[14.77126,100.450951],[14.76771,100.450951],[14.76466,100.451317],[14.76021,100.452454],[14.75194,100.45343],[14.74029,100.454597],[14.72864,100.454987],[14.71756,100.455673],[14.71203,100.455742],[14.70655,100.455513],[14.70081,100.456139],[14.69838,100.456802],[14.69604,100.457611],[14.69409,100.458519],[14.69224,100.459549],[14.68872,100.461807],[14.68175,100.466316],[14.67903,100.468048],[14.67772,100.468758],[14.67635,100.469383],[14.6747,100.470032],[14.6729,100.470589],[14.67138,100.470947],[14.6698,100.471199],[14.66144,100.472649],[14.65078,100.474442],[14.64606,100.474808],[14.6414,100.474693],[14.63213,100.473251],[14.61383,100.469772],[14.60978,100.468941],[14.60526,100.469658],[14.60155,100.470863],[14.596,100.473961],[14.58557,100.480904],[14.5814,100.483727],[14.57584,100.487503],[14.57241,100.489838],[14.56537,100.493813],[14.55793,100.497063],[14.5467,100.500923],[14.53397,100.504532],[14.52399,100.507629],[14.51725,100.512268],[14.51076,100.517433],[14.50352,100.520782],[14.48903,100.526711],[14.48318,100.529457],[14.47226,100.534416],[14.46707,100.536926],[14.46552,100.537682],[14.46439,100.538063],[14.4626,100.538567],[14.45988,100.539131],[14.45759,100.539543],[14.45528,100.540001],[14.45267,100.540497],[14.45009,100.540977],[14.44627,100.541733],[14.44432,100.542099],[14.4423,100.542282],[14.43974,100.54303],[14.43799,100.543922],[14.43635,100.545029],[14.43472,100.546593],[14.4333,100.548424],[14.42962,100.553459],[14.42807,100.555634],[14.42727,100.556686],[14.42557,100.558952],[14.41425,100.574028],[14.40527,100.584137],[14.40375,100.585831],[14.40259,100.587097],[14.40093,100.588966],[14.39634,100.594048],[14.39526,100.595238],[14.39514,100.595383],[14.39509,100.595413],[14.39261,100.597809],[14.38907,100.600853],[14.38355,100.604683],[14.38173,100.605766],[14.37816,100.607613],[14.37716,100.608047],[14.37459,100.609138],[14.37241,100.609978],[14.36911,100.610939],[14.36623,100.611748],[14.36269,100.612419],[14.35971,100.613007],[14.35777,100.613167],[14.35565,100.613297],[14.35309,100.613327],[14.34958,100.613258],[14.34487,100.613213],[14.332,100.613342],[14.32856,100.613327],[14.31873,100.613327],[14.30838,100.613342],[14.3044,100.613373],[14.30383,100.613373],[14.30248,100.613388],[14.28388,100.613457],[14.26434,100.613449],[14.26224,100.613487],[14.25709,100.613564],[14.2519,100.613564],[14.24813,100.613564],[14.24431,100.613411],[14.24005,100.612999],[14.23393,100.612228],[14.23293,100.612091],[14.23122,100.61187],[14.21575,100.609734],[14.21111,100.609123],[14.21052,100.609062],[14.20943,100.608963],[14.20799,100.60891],[14.20694,100.608932],[14.2055,100.608994],[14.2024,100.609047],[14.20071,100.609154],[14.19831,100.609467],[14.19601,100.609779],[14.19276,100.610519],[14.18953,100.61145],[14.18302,100.613777],[14.17835,100.61557],[14.17814,100.615677],[14.17804,100.615761],[14.17794,100.615837],[14.17783,100.615936],[14.17773,100.616058],[14.17759,100.616257],[14.17754,100.616348],[14.17745,100.616524],[14.17739,100.616699],[14.17736,100.616814],[14.17734,100.616943],[14.17734,100.617081],[14.17737,100.617218],[14.17741,100.617348],[14.17747,100.61747],[14.17755,100.617599],[14.17835,100.618568],[14.17858,100.618782],[14.17868,100.618927],[14.17905,100.619164],[14.17952,100.619453],[14.17988,100.619713],[14.18023,100.620003],[14.18057,100.620293],[14.18088,100.620598],[14.18122,100.620956],[14.18154,100.621353],[14.18183,100.621742],[14.1821,100.622139],[14.18238,100.622627],[14.18266,100.623169],[14.18351,100.624786],[14.18394,100.625603],[14.1876,100.6325],[14.18777,100.632629],[14.18804,100.632973],[14.18819,100.633118],[14.18844,100.633324],[14.1886,100.633423],[14.18879,100.633507],[14.18898,100.633583],[14.18944,100.633728],[14.18958,100.633781],[14.18973,100.633858],[14.18985,100.633949],[14.18996,100.634079],[14.19003,100.634178],[14.1901,100.6343],[14.19017,100.634453],[14.19021,100.634598],[14.19024,100.634697],[14.19024,100.634773],[14.19026,100.634903],[14.19025,100.635078],[14.19024,100.635193],[14.19022,100.635292],[14.1902,100.635384],[14.19014,100.635567],[14.19004,100.635803],[14.18993,100.636009],[14.18973,100.636276],[14.18955,100.636513],[14.18934,100.636711],[14.18917,100.636848],[14.18869,100.637123],[14.18505,100.63929],[14.18225,100.640869],[14.16198,100.65229],[14.15898,100.653976],[14.14369,100.662613],[14.14085,100.664207],[14.12254,100.67453],[14.11993,100.676003],[14.1014,100.686447],[14.09778,100.688477],[14.08837,100.693787],[14.08782,100.694069],[14.08718,100.694328],[14.08655,100.694542],[14.08592,100.694717],[14.08521,100.694847],[14.08467,100.694923],[14.0686,100.696533],[14.06346,100.697052],[14.05247,100.698151],[14.05158,100.698227],[14.05068,100.698273],[14.02581,100.698288],[14.02536,100.698311],[14.02491,100.698341],[14.02444,100.698387],[14.02399,100.698463],[14.0235,100.698547],[14.02317,100.698624],[14.02292,100.698692],[14.0224,100.698837],[14.02195,100.698982],[14.02148,100.69915],[14.02108,100.699318],[14.02067,100.699501],[14.01956,100.699989],[14.00956,100.704399],[13.99926,100.708946],[13.99298,100.711723],[13.99042,100.712837],[13.98989,100.713013],[13.98935,100.713173],[13.98881,100.713287],[13.98828,100.713371],[13.98776,100.713417],[13.98726,100.713463],[13.98675,100.713448],[13.9863,100.713417],[13.98523,100.713333],[13.98473,100.713333],[13.9826,100.713287],[13.95215,100.71286],[13.95173,100.712837],[13.95132,100.712822],[13.95075,100.712784],[13.9502,100.712723],[13.94955,100.712624],[13.94912,100.712547],[13.94865,100.712463],[13.94311,100.710999],[13.93615,100.709167],[13.93011,100.707581],[13.92421,100.706032],[13.92266,100.705643],[13.92128,100.705261],[13.92036,100.704964],[13.91983,100.704773],[13.91909,100.704483],[13.9177,100.703888],[13.91276,100.701317],[13.90788,100.698799],[13.90705,100.698357],[13.89609,100.692703],[13.89326,100.691231],[13.88801,100.688507],[13.88746,100.688217],[13.87732,100.682983],[13.87618,100.682381],[13.86972,100.679039],[13.86879,100.678574],[13.86822,100.678307],[13.86793,100.6782],[13.86763,100.678101],[13.86725,100.677994],[13.86686,100.677887],[13.8578,100.675797],[13.8572,100.675636],[13.85666,100.675484],[13.85623,100.675323],[13.85546,100.675003],[13.8538,100.674316],[13.85204,100.673592],[13.85131,100.673302],[13.85097,100.67318],[13.85063,100.67308],[13.85029,100.672997],[13.84993,100.672928],[13.84957,100.672882],[13.84612,100.672638],[13.84541,100.672592],[13.84291,100.672417],[13.84251,100.672401],[13.84197,100.672401],[13.84152,100.672432],[13.84111,100.672478],[13.84064,100.672546],[13.84026,100.672623],[13.83963,100.672783],[13.83788,100.673233],[13.83672,100.673523],[13.83597,100.673721],[13.83529,100.673866],[13.83487,100.673943],[13.83439,100.674011],[13.83402,100.674049],[13.83295,100.674118],[13.83175,100.674179],[13.82532,100.67453],[13.8245,100.674606],[13.82378,100.674713],[13.8232,100.674828],[13.82128,100.675308],[13.81476,100.677017],[13.79887,100.681221],[13.79574,100.682037],[13.78257,100.685516],[13.78209,100.685669],[13.78161,100.685822],[13.7809,100.686073],[13.78006,100.686363],[13.77943,100.686623],[13.77875,100.68692],[13.77829,100.687134],[13.77761,100.687462],[13.77604,100.688309],[13.77088,100.691109],[13.76983,100.691681],[13.76765,100.692863],[13.76654,100.693466],[13.76069,100.696648],[13.75988,100.69709],[13.75691,100.6987],[13.75131,100.701736],[13.75102,100.701881],[13.75072,100.702011],[13.75036,100.702148],[13.7501,100.70224],[13.74983,100.702316],[13.74956,100.7024],[13.74928,100.702469],[13.74898,100.70253],[13.7487,100.702583],[13.7481,100.70266],[13.74738,100.702713],[13.74684,100.702713],[13.74257,100.702789],[13.74221,100.70298],[13.73885,100.703033],[13.73849,100.703217],[13.73729,100.703247],[13.73711,100.703346],[13.7362,100.70343],[13.73587,100.703499],[13.73561,100.703598],[13.73523,100.70388],[13.73436,100.704857],[13.73386,100.705383],[13.73325,100.705803],[13.73292,100.706093],[13.73268,100.706451],[13.73245,100.707199],[13.73227,100.70813],[13.7322,100.708519],[13.73188,100.710297],[13.7304,100.723747],[13.73037,100.724022],[13.72961,100.73085],[13.72959,100.731033],[13.72935,100.73317],[13.72933,100.733917],[13.72933,100.734703],[13.72949,100.740051],[13.72953,100.741081],[13.72953,100.741257],[13.7296,100.744133],[13.7297,100.748718],[13.72977,100.751572],[13.72991,100.757378],[13.72997,100.757896],[13.7309,100.761551],[13.73172,100.764793],[13.7318,100.765182],[13.73183,100.765602],[13.73191,100.76786],[13.73211,100.771118],[13.73215,100.773232],[13.73228,100.783249],[13.73232,100.784142],[13.73249,100.785889],[13.73291,100.79023],[13.73429,100.803726],[13.73383,100.805557],[13.73315,100.807281],[13.73138,100.809334],[13.72858,100.811081],[13.72721,100.81176],[13.7256,100.812553],[13.71357,100.818466],[13.71015,100.820236],[13.67427,100.838043],[13.67241,100.840233],[13.66908,100.845444],[13.60214,100.949783],[13.59885,100.954903],[13.59275,100.964043],[13.57161,100.981888],[13.55248,100.997871],[13.5509,100.999191],[13.5466,101.002937],[13.54299,101.005966],[13.53928,101.009087],[13.5367,101.011261],[13.49601,101.045448],[13.4933,101.046761],[13.49057,101.04705],[13.47329,101.04612],[13.4541,101.046257],[13.44076,101.046288],[13.42756,101.046783],[13.39933,101.047531],[13.39226,101.047073],[13.38711,101.046272],[13.36243,101.038658],[13.35742,101.036041],[13.35643,101.035423],[13.35091,101.031921],[13.34394,101.027634],[13.32626,101.016411],[13.31824,101.010399],[13.303,100.998978],[13.30144,100.997482],[13.30042,100.99649],[13.29915,100.99559],[13.29733,100.994743],[13.29551,100.993729],[13.29331,100.992599],[13.29079,100.991959],[13.28824,100.991524],[13.2831,100.991096],[13.27806,100.990791],[13.27206,100.990356],[13.26595,100.989998],[13.26406,100.989861],[13.26223,100.989769],[13.26119,100.98983],[13.26009,100.98996],[13.25884,100.990173],[13.25766,100.990509],[13.25655,100.990868],[13.25397,100.991837],[13.25177,100.992706],[13.24063,100.996986],[13.23351,100.99971],[13.22734,101.002083],[13.22418,101.003311],[13.22106,101.004509],[13.21955,101.005058],[13.21801,101.005463],[13.21637,101.005692],[13.21487,101.005783],[13.21191,101.005524],[13.20789,101.004379],[13.20639,101.003883],[13.19684,101.00074],[13.19001,100.99852],[13.18317,100.996277],[13.17575,100.993828],[13.16839,100.99144],[13.16099,100.989037],[13.15633,100.987556],[13.15439,100.986961],[13.15364,100.986717],[13.15228,100.986397],[13.15062,100.986153],[13.14806,100.986031],[13.14536,100.985947],[13.14282,100.985809],[13.13809,100.985718],[13.13165,100.985413],[13.12547,100.985199],[13.12188,100.985008],[13.12003,100.985031],[13.11832,100.985123],[13.11127,100.986557],[13.10656,100.987534],[13.10132,100.988663],[13.09598,100.989754],[13.09082,100.990791],[13.08545,100.99192],[13.07498,100.994072],[13.06974,100.995102],[13.06474,100.996117],[13.05745,100.996262],[13.05021,100.996323],[13.03819,100.996429],[13.025,100.996498],[13.01834,100.996536],[13.01381,100.996597],[13.01173,100.996452],[13.00731,100.995232],[12.99751,100.991707],[12.99483,100.990753],[12.98278,100.986504],[12.97491,100.983803],[12.97186,100.982681],[12.96919,100.981857],[12.96762,100.981293],[12.96685,100.981194],[12.9663,100.981056],[12.96574,100.98101],[12.96515,100.981056],[12.96462,100.981377],[12.96341,100.982033],[12.96096,100.98378],[12.95902,100.984718],[12.95468,100.98716],[12.95261,100.988342],[12.94143,100.994949],[12.93028,101.001678],[12.92805,101.003357],[12.92681,101.00486],[12.92379,101.009621],[12.92007,101.015747],[12.91659,101.0214],[12.91547,101.022774],[12.9151,101.023117],[12.91215,101.025848],[12.90933,101.028763],[12.90849,101.029533],[12.90795,101.03009],[12.90274,101.035248],[12.90131,101.036652],[12.90082,101.03714],[12.89481,101.043053],[12.88653,101.051193],[12.88284,101.05481],[12.87155,101.065903],[12.86993,101.067871],[12.86114,101.083557],[12.85287,101.098701],[12.84665,101.109756],[12.84072,101.120407],[12.83925,101.121857],[12.83811,101.12278],[12.83599,101.12429],[12.83082,101.127808],[12.82666,101.130661],[12.82239,101.133537],[12.81921,101.135651],[12.81603,101.137787],[12.80908,101.142593],[12.80223,101.147209],[12.79566,101.151749],[12.78903,101.15638],[12.78129,101.163872],[12.77738,101.167793],[12.77337,101.171707],[12.76987,101.175087],[12.76591,101.179092],[12.76228,101.182678],[12.75869,101.186302],[12.75254,101.192291],[12.7495,101.195259],[12.74631,101.198151],[12.73827,101.20517],[12.73008,101.212349],[12.72737,101.214783],[12.72482,101.217682],[12.72087,101.222397],[12.71684,101.227226],[12.70798,101.237846],[12.70502,101.241524],[12.7044,101.242378],[12.7039,101.243347],[12.70129,101.250237],[12.69903,101.256577],[12.69825,101.264671],[12.69778,101.270447],[12.69759,101.273117],[12.69682,101.279663],[12.69649,101.282837],[12.69607,101.285477],[12.69359,101.291321],[12.69267,101.293213],[12.69164,101.294777],[12.69023,101.29615],[12.68867,101.297241],[12.68297,101.299988],[12.67723,101.302818],[12.66358,101.309792],[12.66238,101.311333],[12.66135,101.316528],[12.66116,101.317993],[12.65854,101.326317],[12.65777,101.328644],[12.65398,101.336578],[12.6483,101.344757],[12.64673,101.348091],[12.64639,101.348824],[12.64616,101.349297],[12.64595,101.349747],[12.64557,101.350563],[12.64334,101.355293],[12.64314,101.355721],[12.63985,101.362717],[12.63967,101.363518],[12.63899,101.372093],[12.64012,101.388603],[12.64075,101.398293],[12.64155,101.408882],[12.64237,101.422127],[12.64219,101.424332],[12.64124,101.42881],[12.64327,101.435623],[12.65019,101.447891],[12.65435,101.455276],[12.6613,101.472076],[12.66057,101.488861],[12.66082,101.495087],[12.66561,101.511528],[12.67204,101.521507],[12.68008,101.523369],[12.68229,101.525742],[12.68671,101.534187],[12.70008,101.541809],[12.70731,101.54882],[12.71304,101.560768],[12.71314,101.563553],[12.71917,101.568703],[12.72148,101.574471],[12.72651,101.577766],[12.73162,101.587303],[12.73595,101.595383],[12.75103,101.609909],[12.75394,101.613403],[12.7559,101.615753],[12.76348,101.624847],[12.77363,101.639168],[12.77632,101.64283],[12.78186,101.646896],[12.78272,101.650703],[12.78339,101.653229],[12.78356,101.653877],[12.78415,101.656662],[12.78494,101.6586],[12.7862,101.661133],[12.78678,101.662407],[12.78695,101.663277],[12.78691,101.664818],[12.78645,101.669197],[12.78565,101.679581],[12.78532,101.681557],[12.78398,101.68602],[12.78172,101.693832],[12.77642,101.711746],[12.77624,101.712372],[12.77546,101.715767],[12.77636,101.718887],[12.77753,101.722893],[12.78054,101.732933],[12.78879,101.760483],[12.78925,101.762283],[12.78942,101.766441],[12.78921,101.76889],[12.78892,101.772278],[12.78788,101.785912],[12.78737,101.788971],[12.78692,101.789993],[12.7862,101.791634],[12.78431,101.79554],[12.78356,101.796959],[12.78314,101.798241],[12.78285,101.800392],[12.78164,101.810562],[12.78092,101.815964],[12.78046,101.819359],[12.77996,101.821373],[12.77896,101.824249],[12.77678,101.830948],[12.77469,101.837212],[12.7741,101.838966],[12.77222,101.842232],[12.77109,101.843819],[12.76665,101.850388],[12.76581,101.851372],[12.76473,101.852402],[12.76247,101.854286],[12.76138,101.855186],[12.7597,101.857162],[12.75732,101.859947],[12.75564,101.861931],[12.75476,101.863258],[12.75255,101.867813],[12.74983,101.873299],[12.7466,101.880547],[12.74455,101.885017],[12.74267,101.889313],[12.74187,101.890121],[12.7407,101.8909],[12.73957,101.89167],[12.73878,101.892616],[12.73798,101.894157],[12.73551,101.899353],[12.73346,101.904243],[12.73224,101.907806],[12.73099,101.911499],[12.73091,101.912956],[12.73053,101.91626],[12.72299,101.941582],[12.72316,101.953247],[12.72295,101.954933],[12.72217,101.957153],[12.72216,101.958961],[12.72146,101.971413],[12.7209,101.972687],[12.72015,101.973846],[12.71939,101.975357],[12.71882,101.976128],[12.71659,101.978317],[12.71395,101.980293],[12.71165,101.981361],[12.70043,101.986168],[12.69917,101.986771],[12.69767,101.988274],[12.69088,101.995911],[12.68599,102.001244],[12.68335,102.00415],[12.6823,102.005096],[12.68121,102.005569],[12.67991,102.005608],[12.67862,102.005386],[12.67744,102.00518],[12.67636,102.005051],[12.67552,102.005013],[12.67451,102.00518],[12.65326,102.011581],[12.65151,102.012482],[12.65004,102.016434],[12.64939,102.018707],[12.64882,102.021049],[12.64871,102.021553],[12.64862,102.021927],[12.64854,102.022362],[12.6485,102.02282],[12.64855,102.023499],[12.64883,102.025787],[12.64942,102.03067],[12.65019,102.040031],[12.65722,102.058571],[12.66028,102.066811],[12.66145,102.071777],[12.66534,102.088951],[12.66677,102.0914],[12.66697,102.091743],[12.66748,102.092644],[12.6629,102.119957],[12.6499,102.129128],[12.64373,102.130623],[12.64176,102.131866],[12.63252,102.142036],[12.62387,102.151543],[12.62117,102.148933],[12.61644,102.141602],[12.61577,102.140556],[12.60959,102.134377],[12.60811,102.133591],[12.60534,102.133743],[12.60309,102.135002],[12.60275,102.1353],[12.60235,102.135674],[12.60058,102.137268],[12.59573,102.143303],[12.58852,102.155151],[12.57278,102.162529],[12.56758,102.162529],[12.55827,102.157852],[12.54606,102.155487],[12.54006,102.157417],[12.53078,102.157288],[12.53014,102.157707],[12.52137,102.163589],[12.51361,102.168503],[12.50319,102.170288],[12.50093,102.170937],[12.48798,102.174721],[12.48346,102.179352],[12.48312,102.181931],[12.47407,102.190857],[12.46938,102.195831],[12.46737,102.199783],[12.46502,102.206131],[12.4658,102.220001],[12.45995,102.230057],[12.45079,102.245682],[12.4543,102.258827],[12.45664,102.262444],[12.45698,102.269478],[12.45161,102.284752],[12.44726,102.288696],[12.4439,102.297287],[12.44038,102.300537],[12.43006,102.313637],[12.42664,102.318916],[12.41257,102.330421],[12.39741,102.350517],[12.39663,102.354973],[12.39218,102.364067],[12.38945,102.368896],[12.38737,102.370117],[12.38571,102.37117],[12.38241,102.373177],[12.381,102.374153],[12.37111,102.388428],[12.36611,102.395821],[12.36796,102.410751],[12.36292,102.425003],[12.34096,102.4468],[12.33492,102.456932],[12.32819,102.45916],[12.32289,102.459846],[12.31658,102.465607],[12.31094,102.468086],[12.30272,102.475471],[12.29473,102.480309],[12.28444,102.484909],[12.27337,102.493149],[12.25648,102.507713],[12.25171,102.509537],[12.25944,102.518356],[12.26459,102.532806],[12.26085,102.543793],[12.25926,102.553307],[12.25758,102.555817],[12.2537,102.560799],[12.25156,102.568703],[12.25103,102.578362],[12.25093,102.587677],[12.25035,102.608727],[12.25054,102.611641],[12.24529,102.625427],[12.23383,102.627869],[12.23004,102.632057],[12.22525,102.645149],[12.20238,102.657333],[12.19404,102.659683],[12.18628,102.665611],[12.16334,102.679649],[12.15023,102.683006],[12.13089,102.691048],[12.1194,102.694992],[12.11467,102.697151],[12.1053,102.700394],[12.09618,102.705383],[12.08143,102.718521],[12.07709,102.725151],[12.06748,102.731934],[12.06485,102.73616],[12.06065,102.739113],[12.05058,102.75132],[12.04662,102.753799],[12.04233,102.758507],[12.01981,102.769608],[12.01509,102.77037],[12.00404,102.770599],[11.98184,102.776588],[11.96461,102.783089],[11.92141,102.80452],[11.90769,102.808289],[11.90115,102.811401],[11.88415,102.814987],[11.87684,102.818672],[11.86838,102.820839],[11.84824,102.831734],[11.84367,102.837181],[11.81262,102.853706],[11.80578,102.860786],[11.78507,102.874878],[11.7791,102.883461],[11.77862,102.884491],[11.77812,102.886162],[11.77667,102.886948],[11.77323,102.888817],[11.77145,102.888847],[11.7708,102.889069],[11.76782,102.890984],[11.76454,102.894508],[11.75899,102.896049],[11.75711,102.896729],[11.75476,102.896507],[11.75231,102.897057],[11.75154,102.897423],[11.7498,102.897713],[11.74754,102.898857],[11.74599,102.899002],[11.74284,102.900726],[11.74084,102.901321],[11.73924,102.902321],[11.73823,102.902657],[11.73688,102.904053],[11.73105,102.906174],[11.72379,102.905197],[11.71887,102.907021],[11.71666,102.907227],[11.7156,102.907669],[11.71261,102.907578],[11.71073,102.907593],[11.70928,102.906769],[11.70047,102.906502],[11.69846,102.904984],[11.69535,102.904503],[11.69275,102.904793],[11.68926,102.903084],[11.68662,102.902481],[11.68326,102.903008],[11.68151,102.903816],[11.67983,102.904114],[11.67867,102.904861],[11.67712,102.905067],[11.67607,102.905533],[11.67155,102.904831],[11.6703,102.905792],[11.66651,102.906242],[11.66574,102.906036],[11.66491,102.906464],[11.66189,102.906693],[11.65979,102.907532],[11.65812,102.906967],[11.65571,102.907349],[11.65356,102.908577],[11.65165,102.908836],[11.64946,102.911377],[11.64477,102.916077],[11.6429,102.918373],[11.64362,102.923988],[11.64301,102.928268],[11.64347,102.933006],[11.63845,102.941254],[11.63771,102.943657],[11.63596,102.946564],[11.63056,102.94841],[11.62356,102.949257],[11.62305,102.959099],[11.61957,102.962143],[11.61888,102.962822],[11.6163,102.979683],[11.61549,102.983543],[11.6144,102.988731],[11.60786,102.99955],[11.602,103.010292],[11.60196,103.01226],[11.60207,103.013702],[11.60248,103.015457],[11.60349,103.018707],[11.60551,103.024986],[11.60552,103.025497],[11.60557,103.02755],[11.6056,103.030159],[11.60596,103.035187],[11.60501,103.03965],[11.60492,103.040741],[11.60497,103.043221],[11.60483,103.045799],[11.60459,103.051231],[11.60384,103.054947],[11.60387,103.055687],[11.60395,103.056992],[11.60426,103.060738],[11.60432,103.061996],[11.60429,103.062576],[11.60388,103.063538],[11.60186,103.065804],[11.60169,103.06633],[11.60166,103.066963],[11.60207,103.070351],[11.60197,103.071091],[11.60167,103.071609],[11.6012,103.072037],[11.60047,103.072578],[11.59986,103.072983],[11.59913,103.073311],[11.59821,103.073441],[11.59735,103.073799],[11.59625,103.074707],[11.59593,103.075119],[11.59537,103.076553],[11.59405,103.079643],[11.59234,103.082916],[11.59217,103.085197],[11.59172,103.085518],[11.58763,103.08609],[11.58631,103.087021],[11.58491,103.087578],[11.58245,103.087196],[11.58056,103.086647],[11.57998,103.08696],[11.57799,103.089256],[11.57315,103.091026],[11.5725,103.091621],[11.57233,103.091957],[11.57225,103.092667],[11.57285,103.094414],[11.57348,103.095551],[11.57386,103.096298],[11.5736,103.098068],[11.5731,103.099411],[11.57245,103.100128],[11.57032,103.103363],[11.57003,103.104584],[11.56918,103.108437],[11.56847,103.11319],[11.56842,103.117027],[11.56869,103.118782],[11.56872,103.119423],[11.56863,103.120323],[11.56853,103.121597],[11.56842,103.12207],[11.56795,103.122673],[11.5659,103.12368],[11.56546,103.124168],[11.56533,103.124733],[11.56502,103.128433],[11.5649,103.12986],[11.5649,103.130928],[11.56522,103.131577],[11.5656,103.131882],[11.56614,103.132057],[11.56714,103.132141],[11.56756,103.132301],[11.56791,103.132591],[11.56859,103.13308],[11.56917,103.133186],[11.57056,103.133148],[11.57129,103.133347],[11.57193,103.133659],[11.57353,103.135071],[11.57457,103.135872],[11.57491,103.136261],[11.57502,103.136902],[11.57487,103.137917],[11.57441,103.140404],[11.57429,103.141327],[11.57433,103.142113],[11.57444,103.142891],[11.57476,103.144463],[11.57497,103.144943],[11.57528,103.145447],[11.57682,103.146919],[11.57742,103.147034],[11.57778,103.147011],[11.57831,103.147133],[11.57866,103.147537],[11.57868,103.148178],[11.57848,103.148842],[11.57848,103.150169],[11.57856,103.15094],[11.57885,103.151627],[11.57896,103.152298],[11.57817,103.156929],[11.57748,103.15934],[11.57724,103.160477],[11.57753,103.162361],[11.57745,103.163803],[11.57709,103.165443],[11.57664,103.168533],[11.57636,103.172096],[11.57614,103.175041],[11.57617,103.176277],[11.5766,103.177353],[11.57753,103.179581],[11.57851,103.181953],[11.57915,103.183578],[11.57981,103.185051],[11.5804,103.185829],[11.58186,103.187073],[11.58236,103.187508],[11.58281,103.188171],[11.58325,103.188911],[11.58361,103.189934],[11.58373,103.193459],[11.58285,103.196899],[11.58268,103.199982],[11.58339,103.202049],[11.58439,103.203133],[11.58479,103.204308],[11.58481,103.206703],[11.58574,103.20929],[11.58657,103.21035],[11.58873,103.212334],[11.59018,103.213943],[11.5904,103.214432],[11.5906,103.21769],[11.59058,103.217781],[11.59035,103.218803],[11.5882,103.220268],[11.58678,103.221764],[11.58348,103.22261],[11.57834,103.220749],[11.57638,103.221848],[11.57541,103.223122],[11.57472,103.22464],[11.57318,103.228439],[11.57241,103.229523],[11.57052,103.231133],[11.56974,103.232101],[11.56895,103.233109],[11.5683,103.234047],[11.56771,103.234581],[11.56548,103.235992],[11.56257,103.237617],[11.56186,103.237663],[11.56118,103.237488],[11.5604,103.237297],[11.55926,103.237343],[11.55846,103.236687],[11.55735,103.234642],[11.55677,103.233994],[11.55431,103.233093],[11.55359,103.232971],[11.55289,103.233101],[11.55138,103.233681],[11.54972,103.234703],[11.54917,103.235039],[11.5485,103.235313],[11.54473,103.23539],[11.54185,103.236504],[11.54024,103.237099],[11.53936,103.237282],[11.53716,103.237579],[11.53528,103.237],[11.534,103.236366],[11.53277,103.235626],[11.53164,103.234917],[11.53099,103.234749],[11.52984,103.23455],[11.52888,103.234177],[11.52735,103.233299],[11.52659,103.232536],[11.5262,103.23188],[11.5253,103.230614],[11.52429,103.229973],[11.52392,103.229927],[11.52121,103.229973],[11.51972,103.229561],[11.51893,103.229263],[11.5182,103.229317],[11.51399,103.23159],[11.51297,103.231812],[11.51194,103.231857],[11.51011,103.23188],[11.50902,103.232224],[11.50693,103.233429],[11.50576,103.233551],[11.50494,103.233231],[11.50325,103.23259],[11.50252,103.232422],[11.50093,103.232712],[11.50011,103.232773],[11.49915,103.232857],[11.49806,103.232651],[11.49561,103.231987],[11.49041,103.228378],[11.48962,103.227768],[11.48887,103.227501],[11.48762,103.227386],[11.48165,103.227951],[11.47617,103.227783],[11.47501,103.227638],[11.47367,103.226982],[11.47107,103.225647],[11.46887,103.224922],[11.46673,103.224213],[11.46596,103.224083],[11.46513,103.224503],[11.46288,103.22673],[11.45861,103.229118],[11.45768,103.229927],[11.45594,103.235283],[11.45535,103.235847],[11.45436,103.235909],[11.45231,103.23494],[11.45074,103.234207],[11.44935,103.233437],[11.44882,103.232803],[11.4481,103.231903],[11.44777,103.231461],[11.44646,103.23069],[11.44483,103.229797],[11.44376,103.228737],[11.44315,103.22834],[11.44296,103.228027],[11.44312,103.227257],[11.44294,103.226593],[11.44219,103.225899],[11.44182,103.225731],[11.44121,103.225906],[11.44061,103.226013],[11.43851,103.225807],[11.43649,103.225662],[11.43577,103.225906],[11.43484,103.226486],[11.43371,103.22715],[11.43153,103.228653],[11.43091,103.228668],[11.43053,103.228401],[11.43026,103.22805],[11.42979,103.227699],[11.42935,103.227997],[11.42913,103.228737],[11.42871,103.229958],[11.42834,103.230888],[11.42772,103.232048],[11.42666,103.232628],[11.42512,103.231987],[11.42317,103.23111],[11.41956,103.229424],[11.41809,103.229721],[11.41689,103.230324],[11.41594,103.231331],[11.41515,103.232651],[11.41403,103.233566],[11.41247,103.233757],[11.41083,103.233849],[11.4076,103.234238],[11.40635,103.23497],[11.40458,103.235901],[11.40382,103.23703],[11.40074,103.243408],[11.39951,103.246849],[11.39861,103.247864],[11.39231,103.250717],[11.38318,103.25174],[11.38208,103.252617],[11.38027,103.256081],[11.37877,103.259323],[11.37654,103.260857],[11.37606,103.261749],[11.37449,103.264359],[11.37389,103.264664],[11.3691,103.264771],[11.36836,103.265198],[11.36669,103.267418],[11.35941,103.271683],[11.35284,103.28212],[11.34847,103.285744],[11.34724,103.286469],[11.34553,103.287643],[11.34518,103.288109],[11.34536,103.288788],[11.34643,103.289711],[11.34668,103.290863],[11.34588,103.292938],[11.34509,103.293678],[11.33875,103.295464],[11.33796,103.296097],[11.33729,103.297028],[11.33656,103.297882],[11.33186,103.300552],[11.33066,103.30188],[11.3304,103.302391],[11.33031,103.303093],[11.33047,103.305153],[11.33047,103.306183],[11.32961,103.30854],[11.32908,103.309013],[11.32749,103.309433],[11.32654,103.310249],[11.3261,103.311157],[11.32575,103.312737],[11.32507,103.31424],[11.32294,103.317398],[11.32109,103.320778],[11.32049,103.321167],[11.31987,103.321289],[11.31806,103.321457],[11.31508,103.321899],[11.31325,103.322609],[11.31258,103.322662],[11.3116,103.322113],[11.3109,103.321907],[11.30992,103.321991],[11.30893,103.32225],[11.30779,103.322746],[11.30688,103.323372],[11.3058,103.324211],[11.30497,103.324944],[11.30449,103.325333],[11.30392,103.325691],[11.30293,103.325844],[11.30268,103.325783],[11.29959,103.324966],[11.29905,103.324928],[11.2979,103.324837],[11.29723,103.324654],[11.29601,103.323753],[11.29476,103.323433],[11.29397,103.323624],[11.2925,103.324753],[11.29014,103.325653],[11.28738,103.326508],[11.28699,103.327026],[11.28605,103.32917],[11.28512,103.330017],[11.28327,103.330742],[11.28231,103.330727],[11.27854,103.329353],[11.27771,103.329453],[11.27648,103.330269],[11.27562,103.330856],[11.27447,103.331558],[11.27372,103.332024],[11.27274,103.332283],[11.27011,103.332947],[11.26775,103.333687],[11.26709,103.334099],[11.26572,103.335281],[11.26541,103.335876],[11.26491,103.337448],[11.26399,103.339478],[11.26304,103.341507],[11.26191,103.343407],[11.2606,103.345131],[11.25998,103.345482],[11.25803,103.345978],[11.25598,103.346603],[11.2535,103.347031],[11.25327,103.347191],[11.25276,103.34761],[11.25099,103.351044],[11.24909,103.354622],[11.24879,103.355293],[11.24842,103.355789],[11.24748,103.356209],[11.24567,103.356209],[11.24308,103.356209],[11.24239,103.356491],[11.24009,103.358109],[11.23948,103.358612],[11.23888,103.359482],[11.23785,103.361458],[11.23727,103.361908],[11.23649,103.362137],[11.23424,103.362457],[11.23186,103.36274],[11.23022,103.363487],[11.22925,103.363747],[11.22569,103.364067],[11.22477,103.364693],[11.22408,103.365273],[11.22289,103.366341],[11.22187,103.367439],[11.22114,103.36763],[11.22042,103.367523],[11.22021,103.367577],[11.21984,103.367989],[11.21934,103.368477],[11.21889,103.368767],[11.21749,103.369614],[11.21565,103.371063],[11.21389,103.37262],[11.21215,103.37439],[11.21129,103.375877],[11.21071,103.37722],[11.21017,103.377876],[11.20754,103.379547],[11.20646,103.380302],[11.20535,103.381142],[11.20467,103.382057],[11.20402,103.383331],[11.20299,103.385292],[11.20158,103.387016],[11.20094,103.387779],[11.19945,103.388924],[11.19743,103.390358],[11.19607,103.390877],[11.19556,103.390968],[11.19516,103.391029],[11.19458,103.391098],[11.19393,103.390984],[11.19326,103.390533],[11.19254,103.390106],[11.19202,103.389648],[11.19145,103.388702],[11.19104,103.388496],[11.19063,103.388634],[11.19037,103.389236],[11.19007,103.389633],[11.18963,103.389832],[11.1892,103.389771],[11.18897,103.389664],[11.18855,103.389473],[11.18803,103.389282],[11.1875,103.389397],[11.18686,103.390068],[11.18626,103.390823],[11.18613,103.391403],[11.18627,103.391899],[11.18647,103.392479],[11.18649,103.392998],[11.1864,103.393242],[11.18608,103.393578],[11.18541,103.393738],[11.1844,103.393951],[11.184,103.394127],[11.18359,103.394417],[11.18341,103.394943],[11.18338,103.395569],[11.18366,103.396118],[11.18396,103.396408],[11.18422,103.396881],[11.18416,103.397163],[11.18315,103.398163],[11.18271,103.399933],[11.18287,103.401947],[11.18255,103.403778],[11.18269,103.404312],[11.18305,103.404793],[11.18307,103.405411],[11.18288,103.407066],[11.183,103.407387],[11.18321,103.407898],[11.18416,103.408882],[11.18428,103.409531],[11.18365,103.410843],[11.18349,103.411758],[11.18326,103.414078],[11.18286,103.416344],[11.18285,103.420883],[11.18364,103.424301],[11.1816,103.43045],[11.18061,103.4356],[11.17133,103.445473],[11.17097,103.446518],[11.17128,103.447769],[11.17192,103.449387],[11.17298,103.450996],[11.17648,103.454811],[11.18074,103.458771],[11.18119,103.459801],[11.18182,103.464951],[11.18233,103.465736],[11.18585,103.468758],[11.18979,103.471992],[11.19473,103.474182],[11.19598,103.474953],[11.19772,103.476303],[11.19857,103.476929],[11.19942,103.477669],[11.20113,103.478958],[11.20304,103.480507],[11.20471,103.481773],[11.20656,103.483238],[11.20854,103.484772],[11.20998,103.486183],[11.21027,103.486923],[11.21045,103.487823],[11.21039,103.489372],[11.21008,103.49366],[11.20821,103.51046],[11.20727,103.51165],[11.20585,103.513023],[11.20319,103.515953],[11.20203,103.519188],[11.20101,103.522598],[11.19859,103.532829],[11.19582,103.539001],[11.19552,103.544373],[11.19414,103.549026],[11.19365,103.553429],[11.19193,103.557022],[11.19208,103.559959],[11.19363,103.562714],[11.19476,103.56871],[11.19292,103.574707],[11.19234,103.575996],[11.19049,103.579964],[11.19004,103.581207],[11.18869,103.585373],[11.18686,103.587471],[11.18619,103.589417],[11.18608,103.590813],[11.18591,103.594711],[11.18573,103.595322],[11.1852,103.595947],[11.1827,103.597633],[11.18065,103.598991],[11.1801,103.5998],[11.17972,103.600929],[11.17936,103.602127],[11.17823,103.604088],[11.1776,103.605919],[11.17711,103.607857],[11.17699,103.608253],[11.17684,103.608704],[11.17675,103.609093],[11.17663,103.609612],[11.176,103.611229],[11.17401,103.615463],[11.17314,103.619499],[11.17309,103.620338],[11.17312,103.621239],[11.17308,103.624657],[11.1727,103.631561],[11.17279,103.632179],[11.17314,103.632736],[11.17592,103.635521],[11.17691,103.636276],[11.17731,103.636833],[11.17748,103.637352],[11.1775,103.638008],[11.17767,103.639717],[11.17787,103.640297],[11.17843,103.640999],[11.17895,103.641747],[11.17928,103.642517],[11.17927,103.643646],[11.17883,103.645798],[11.17867,103.646828],[11.17881,103.648117],[11.17961,103.651459],[11.17982,103.652237],[11.18029,103.653122],[11.18186,103.654266],[11.1829,103.655678],[11.1831,103.657021],[11.18229,103.659958],[11.18197,103.661087],[11.18152,103.662033],[11.17997,103.663933],[11.17963,103.66465],[11.17872,103.666634],[11.17818,103.667557],[11.1777,103.668221],[11.17682,103.668671],[11.17575,103.669441],[11.17496,103.670227],[11.17445,103.671227],[11.17418,103.671707],[11.1741,103.673157],[11.17405,103.674454],[11.17397,103.67588],[11.17366,103.676682],[11.17308,103.677841],[11.17065,103.682823],[11.17009,103.686668],[11.16957,103.690979],[11.16915,103.692131],[11.16804,103.693398],[11.16752,103.694008],[11.16648,103.695183],[11.16421,103.697701],[11.15985,103.702187],[11.15614,103.711243],[11.15262,103.720367],[11.15229,103.72171],[11.15202,103.723969],[11.1517,103.726891],[11.15096,103.732788],[11.15073,103.733566],[11.15039,103.734428],[11.14969,103.735809],[11.1481,103.738739],[11.14768,103.74202],[11.14836,103.743347],[11.14942,103.744827],[11.15026,103.745934],[11.15069,103.74662],[11.15106,103.747192],[11.15114,103.747833],[11.15095,103.748703],[11.14987,103.750328],[11.14856,103.752373],[11.14835,103.753464],[11.14851,103.754333],[11.14922,103.756638],[11.14941,103.757294],[11.14952,103.757881],[11.14919,103.758911],[11.14651,103.76133],[11.1442,103.763733],[11.14196,103.766197],[11.13964,103.768623],[11.13886,103.769012],[11.1381,103.76931],[11.13718,103.769592],[11.13477,103.770317],[11.13238,103.771004],[11.13146,103.771141],[11.13038,103.771156],[11.12787,103.771088],[11.12668,103.77153],[11.12241,103.773743],[11.12171,103.773857],[11.12084,103.773911],[11.12001,103.773933],[11.11721,103.773972],[11.10998,103.775299],[11.10607,103.774773],[11.1045,103.775162],[11.10346,103.775337],[11.10286,103.775177],[11.1018,103.774887],[11.09952,103.775078],[11.09706,103.775284],[11.09649,103.775337],[11.09577,103.775627],[11.09525,103.776192],[11.0947,103.777184],[11.09453,103.779541],[11.09447,103.781898],[11.09466,103.783058],[11.09488,103.784233],[11.09502,103.78524],[11.09505,103.785767],[11.09496,103.786369],[11.09466,103.787041],[11.09433,103.787537],[11.09375,103.788277],[11.09328,103.789017],[11.09195,103.791183],[11.09117,103.792397],[11.09022,103.79364],[11.08845,103.796211],[11.08748,103.798477],[11.08641,103.7995],[11.08534,103.79982],[11.08406,103.799927],[11.08297,103.799973],[11.08174,103.799881],[11.07517,103.796448],[11.07028,103.795197],[11.06735,103.795021],[11.06615,103.794579],[11.06494,103.794243],[11.0645,103.794113],[11.06399,103.794029],[11.0629,103.793983],[11.06133,103.793953],[11.06056,103.793938],[11.06005,103.793953],[11.05928,103.794083],[11.05789,103.794296],[11.05707,103.794327],[11.05632,103.793892],[11.0545,103.79258],[11.05322,103.792236],[11.05209,103.792221],[11.05152,103.792267],[11.05095,103.79245],[11.04974,103.793556],[11.04763,103.795731],[11.04724,103.796448],[11.04712,103.797119],[11.04707,103.797707],[11.04714,103.798843],[11.04714,103.800903],[11.04725,103.802391],[11.04753,103.803543],[11.05113,103.81208],[11.05209,103.814003],[11.05402,103.816803],[11.05514,103.818604],[11.05573,103.820747],[11.05638,103.82383],[11.057,103.825287],[11.05763,103.826073],[11.06003,103.828537],[11.06042,103.83004],[11.06021,103.83284],[11.06045,103.833878]/**/,[11.06309,103.839684],[11.06362,103.840446],[11.07223,103.848389],[11.07265,103.849403],[11.07273,103.850739],[11.07205,103.852127],[11.07038,103.854652],[11.07001,103.856651],[11.07053,103.858231],[11.0738,103.861671],[11.07438,103.863029],[11.07604,103.867943],[11.08074,103.876663],[11.08276,103.883034],[11.08504,103.887573],[11.08747,103.891853],[11.09351,103.902863],[11.09626,103.907677],[11.09797,103.910271],[11.09986,103.912628],[11.10172,103.914497],[11.11719,103.928207],[11.12314,103.933548],[11.12609,103.937073],[11.12849,103.940979],[11.13351,103.950737],[11.13833,103.960007],[11.14351,103.970093],[11.14877,103.980263],[11.15045,103.983887],[11.15166,103.987389],[11.15335,103.990837],[11.15434,103.992569],[11.16036,104.000847],[11.1649,104.007309],[11.16648,104.00956],[11.17444,104.020821],[11.17617,104.023148],[11.17744,104.024361],[11.1804,104.026291],[11.18675,104.032623],[11.18853,104.034492],[11.18943,104.035606],[11.1903,104.037193],[11.19067,104.038139],[11.19143,104.040947],[11.19232,104.044868],[11.19301,104.049026],[11.19386,104.055923],[11.19406,104.057426],[11.19365,104.060654],[11.19418,104.071198],[11.19437,104.073151],[11.19465,104.074532],[11.19516,104.07576],[11.20094,104.086983],[11.20212,104.08889],[11.20234,104.089523],[11.20257,104.090561],[11.20284,104.091293],[11.20358,104.092796],[11.20381,104.093384],[11.20417,104.094589],[11.20428,104.095154],[11.20439,104.09597],[11.20459,104.096642],[11.20479,104.097198],[11.20496,104.097893],[11.20516,104.099487],[11.20535,104.100258],[11.20553,104.100502],[11.20604,104.10096],[11.20737,104.101891],[11.20792,104.102623],[11.20809,104.103104],[11.20937,104.108627],[11.21023,104.112587],[11.2122,104.117897],[11.21319,104.120369],[11.21763,104.127892],[11.22001,104.131653],[11.22482,104.137657],[11.2308,104.146797],[11.24009,104.161209],[11.24535,104.16938],[11.25656,104.18306],[11.26132,104.188797],[11.26612,104.195312],[11.26954,104.199753],[11.27281,104.205101],[11.27728,104.212517],[11.27887,104.215157],[11.28602,104.227188],[11.29414,104.241119],[11.30092,104.252647],[11.30841,104.265282],[11.31258,104.272278],[11.31552,104.278542],[11.31805,104.282516],[11.32065,104.286133],[11.32409,104.291763],[11.32748,104.297836],[11.33257,104.305969],[11.34071,104.319382],[11.34404,104.324768],[11.34898,104.329353],[11.35067,104.331482],[11.35595,104.340073],[11.35931,104.34671],[11.36522,104.355904],[11.36764,104.358238],[11.37237,104.362923],[11.37664,104.368263],[11.37729,104.369011],[11.38512,104.374298],[11.39029,104.38002],[11.39617,104.38681],[11.3989,104.392479],[11.4047,104.399544],[11.40971,104.409241],[11.41611,104.424797],[11.41866,104.42984],[11.42282,104.446877],[11.4267,104.457939],[11.43018,104.46505],[11.43874,104.476578],[11.44111,104.480171],[11.44412,104.485619],[11.44534,104.487007],[11.44653,104.488136],[11.4482,104.48912],[11.45309,104.491272],[11.45469,104.492531],[11.45604,104.495033],[11.4585,104.504662],[11.45999,104.51059],[11.46157,104.517471],[11.4626,104.521729],[11.46297,104.522919],[11.46348,104.523781],[11.46505,104.525787],[11.46582,104.527733],[11.46739,104.531898],[11.47216,104.544884],[11.47508,104.553177],[11.47558,104.566727],[11.47516,104.57859],[11.47593,104.584923],[11.47684,104.58889],[11.47796,104.591553],[11.4827,104.61026],[11.48373,104.615677],[11.48535,104.624268],[11.48672,104.630508],[11.48914,104.63916],[11.4909,104.647552],[11.49224,104.652893],[11.49312,104.657547],[11.49447,104.66188],[11.49498,104.663223],[11.49638,104.66687],[11.49774,104.670662],[11.49856,104.672638],[11.49964,104.676613],[11.50056,104.679749],[11.50305,104.686951],[11.50356,104.694168],[11.50428,104.699677],[11.50513,104.704674],[11.50695,104.712051],[11.50716,104.715637],[11.5071,104.724953],[11.50695,104.728851],[11.50735,104.733101],[11.50765,104.734657],[11.5088,104.738792],[11.51005,104.744072],[11.51144,104.750343],[11.51393,104.763412],[11.51486,104.767693],[11.51789,104.77317],[11.51962,104.776314],[11.52081,104.778954],[11.52391,104.790916],[11.52485,104.794319],[11.52508,104.794853],[11.52576,104.796127],[11.526,104.796539],[11.5275,104.799171],[11.52917,104.80204],[11.5295,104.802589],[11.52975,104.803032],[11.53017,104.803993],[11.53039,104.804741],[11.53051,104.805389],[11.53062,104.805977],[11.53119,104.809479],[11.53182,104.813492],[11.53254,104.81739],[11.53259,104.817734],[11.53285,104.819397],[11.53309,104.820824],[11.5333,104.822166],[11.53381,104.825127],[11.53402,104.826477],[11.53435,104.828453],[11.53438,104.828537],[11.53437,104.828773],[11.53431,104.829033],[11.5342,104.829201],[11.53414,104.829323],[11.53413,104.829643],[11.53463,104.830093],[11.53414,104.830704],[11.53351,104.831467],[11.53081,104.834793],[11.52835,104.837891],[11.52877,104.841797],[11.52904,104.844307],[11.52908,104.844551],[11.53072,104.855827],[11.53079,104.856331],[11.53114,104.858963],[11.53308,104.873177],[11.53473,104.885193],[11.53474,104.885353],[11.53458,104.885536],[11.53447,104.885757],[11.53425,104.885963],[11.53221,104.886429],[11.53208,104.886452],[11.52989,104.886871],[11.52962,104.886932],[11.52785,104.887291],[11.52576,104.887718],[11.52572,104.888298],[11.52556,104.889893],[11.52537,104.890633],[11.52427,104.894363],[11.52349,104.897171],[11.5231,104.898407],[11.52284,104.899269],[11.52256,104.9002],[11.52215,104.901703],[11.52156,104.903717],[11.52088,104.906128],[11.52042,104.907951],[11.5193,104.913322],[11.51897,104.915192],[11.51894,104.915604],[11.51896,104.916061],[11.51903,104.916496],[11.51917,104.916962],[11.51975,104.91864],[11.51983,104.918854],[11.52025,104.919617],[11.5207,104.920212],[11.52108,104.920509],[11.52147,104.920723],[11.52208,104.920898],[11.52358,104.920998],[11.52505,104.921097],[11.52677,104.921227],[11.527,104.92186],[11.52883,104.926086],[11.52992,104.928574],[11.5299,104.92897],[11.53005,104.929619],[11.5302,104.930206],[11.53026,104.930496],[11.53027,104.930717],[11.53014,104.930946],[11.5296,104.931168],[11.52902,104.931396],[11.52877,104.931587],[11.52823,104.931801],[11.52758,104.931999],[11.52638,104.932114],[11.5239,104.93235],[11.51604,104.935379],[11.51338,104.935677],[11.51252,104.935997],[11.50867,104.937866],[11.50674,104.938766],[11.50388,104.939621],[11.50249,104.940048],[11.49697,104.942436],[11.49289,104.94355],[11.49186,104.94355],[11.49092,104.943123],[11.48942,104.942436],[11.48809,104.941818],[11.48757,104.94165],[11.48726,104.941727],[11.48513,104.942841],[11.48492,104.942963],[11.48385,104.943527],[11.48288,104.944061],[11.48157,104.944771],[11.48138,104.944633],[11.48112,104.944733],[11.48108,104.945053],[11.47857,104.946381],[11.47776,104.946823],[11.47264,104.949509],[11.47149,104.950127],[11.46992,104.950981],[11.46587,104.953209],[11.46406,104.954208],[11.46098,104.955994],[11.46003,104.956543],[11.45616,104.958847],[11.45244,104.961067],[11.45039,104.962288],[11.44289,104.966873],[11.44102,104.968018],[11.43993,104.968681],[11.43116,104.973999],[11.42561,104.977943],[11.4193,104.985237],[11.40634,104.999748],[11.40146,105.004936],[11.40073,105.005623],[11.39999,105.005829],[11.39922,105.005791],[11.39655,105.005074],[11.39496,105.004761],[11.3919,105.00444],[11.38985,105.004044],[11.38363,105.001984],[11.37883,105.001343],[11.37475,105.001892],[11.37105,105.003014],[11.36419,105.000473],[11.35815,105.001381],[11.35153,105.004639],[11.34709,105.007607],[11.34363,105.010948],[11.34161,105.013443],[11.33983,105.016502],[11.33843,105.019676],[11.33641,105.022873],[11.33367,105.025948],[11.32995,105.028282]];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{""}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/extendsKeywordCompletion1_test.go b/internal/fourslash/tests/gen/extendsKeywordCompletion1_test.go new file mode 100644 index 0000000000..280a0bc745 --- /dev/null +++ b/internal/fourslash/tests/gen/extendsKeywordCompletion1_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestExtendsKeywordCompletion1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `export interface B ex/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "extends"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/extendsKeywordCompletion2_test.go b/internal/fourslash/tests/gen/extendsKeywordCompletion2_test.go new file mode 100644 index 0000000000..c8db9f24c4 --- /dev/null +++ b/internal/fourslash/tests/gen/extendsKeywordCompletion2_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestExtendsKeywordCompletion2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function f1() {} +function f2() {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "extends"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/forwardReference_test.go b/internal/fourslash/tests/gen/forwardReference_test.go new file mode 100644 index 0000000000..c1f5dd594e --- /dev/null +++ b/internal/fourslash/tests/gen/forwardReference_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestForwardReference(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function f() { + var x = new t(); + x./**/ +} +class t { + public n: number; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"n"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/genericCloduleCompletionList_test.go b/internal/fourslash/tests/gen/genericCloduleCompletionList_test.go new file mode 100644 index 0000000000..3963bd4130 --- /dev/null +++ b/internal/fourslash/tests/gen/genericCloduleCompletionList_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGenericCloduleCompletionList(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class D { x: number } +module D { export function f() { } } +var d: D; +d./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions10_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions10_test.go new file mode 100644 index 0000000000..b927fe7bf4 --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions10_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions10(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: Foo.js +/** + * @type {function(this:number)} + */ +function f() { this./**/ }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "toExponential"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions11_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions11_test.go new file mode 100644 index 0000000000..fd64f7ad12 --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions11_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions11(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: Foo.js +/** @type {number|string} */ +var v; +v./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "toExponential"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "charCodeAt"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions14_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions14_test.go new file mode 100644 index 0000000000..720ad8f6d3 --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions14_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions14(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: file1.js +/// +interface Number { + toExponential(fractionDigits?: number): string; +} +var x = 1; +x./*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "toExponential"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions1_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions1_test.go new file mode 100644 index 0000000000..c3dbf17af7 --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions1_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: Foo.js +/** @type {number} */ +var v; +v./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "toExponential"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions21_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions21_test.go new file mode 100644 index 0000000000..f764fd0c52 --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions21_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions21(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: file.js +class Prv { + #privatething = 1; + notSoPrivate = 1; +} +new Prv()['[|/**/|]'];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Label: "notSoPrivate"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions2_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions2_test.go new file mode 100644 index 0000000000..0215d482db --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions2_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: Foo.js +/** @type {(number|string)} */ +var v; +v./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "valueOf"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions3_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions3_test.go new file mode 100644 index 0000000000..4528f7b1fd --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions3_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: Foo.js +/** @type {Array.} */ +var v; +v./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "concat"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions4_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions4_test.go new file mode 100644 index 0000000000..9fcca50096 --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions4_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions4(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: Foo.js +/** @return {number} */ +function foo(a,b) { } +foo(1,2)./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "toExponential"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions5_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions5_test.go new file mode 100644 index 0000000000..018c859c59 --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions5_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions5(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: Foo.js +/** + * @template T + * @param {T} a + * @return {T} */ +function foo(a) { } +let x = foo; +foo(1)./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "toExponential"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions8_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions8_test.go new file mode 100644 index 0000000000..3d53294716 --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions8_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions8(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: Foo.js +/** + * @type {function(): number} + */ +var v; +v()./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "toExponential"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions9_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions9_test.go new file mode 100644 index 0000000000..023b96474c --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions9_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions9(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: Foo.js +/** + * @type {function(new:number)} + */ +var v; +new v()./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "toExponential"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/getJavaScriptCompletions_tsCheck_test.go b/internal/fourslash/tests/gen/getJavaScriptCompletions_tsCheck_test.go new file mode 100644 index 0000000000..aaedb42724 --- /dev/null +++ b/internal/fourslash/tests/gen/getJavaScriptCompletions_tsCheck_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestGetJavaScriptCompletions_tsCheck(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: /a.js +// @ts-check +interface I { a: number; b: number; } +interface J { b: number; c: number; } +declare const ij: I | J; +ij./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonExportsSpecifierEndsInTs_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonExportsSpecifierEndsInTs_test.go new file mode 100644 index 0000000000..1cbf59e86e --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonExportsSpecifierEndsInTs_test.go @@ -0,0 +1,44 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonExportsSpecifierEndsInTs(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /node_modules/pkg/package.json +{ + "name": "pkg", + "version": "1.0.0", + "exports": { + "./something.ts": "./a.js" + } + } +// @Filename: /node_modules/pkg/a.d.ts +export function foo(): void; +// @Filename: /package.json +{ + "dependencies": { + "pkg": "*" + } + } +// @Filename: /index.ts +import {} from "pkg//*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"something.ts"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonExportsTrailingSlash1_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonExportsTrailingSlash1_test.go new file mode 100644 index 0000000000..89f160f3c1 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonExportsTrailingSlash1_test.go @@ -0,0 +1,55 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonExportsTrailingSlash1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @moduleResolution: nodenext +// @Filename: /node_modules/pkg/package.json +{ + "name": "pkg", + "version": "1.0.0", + "exports": { + "./test/": "./" + } + } +// @Filename: /node_modules/pkg/foo.d.ts +export function foo(): void; +// @Filename: /package.json +{ + "dependencies": { + "pkg": "*" + } + } +// @Filename: /index.ts +import {} from "pkg//*1*/"; +import {} from "pkg/test//*2*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"test"}, + }, + }) + f.VerifyCompletions(t, []string{"2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo.js"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsConditions1_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsConditions1_test.go new file mode 100644 index 0000000000..79d1c74d80 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsConditions1_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsConditions1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#thing": { + "types": { "import": "./types-esm/thing.d.mts", "require": "./types/thing.d.ts" }, + "default": { "import": "./esm/thing.mjs", "require": "./dist/thing.js" } + } + } +} +// @Filename: /types/thing.d.ts +export function something(name: string): any; +// @Filename: /src/foo.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#thing"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsLength1_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsLength1_test.go new file mode 100644 index 0000000000..5029a14787 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsLength1_test.go @@ -0,0 +1,76 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsLength1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#*": "./src/*.ts" + } +} +// @Filename: /src/a/b/c/something.ts +export function something(name: string): any; +// @Filename: /src/a/b/c/d.ts +import {} from "/*1*/"; +import {} from "#a//*2*/"; +import {} from "#a/b//*3*/"; +import {} from "#a/b/c//*4*/"; +import {} from "#a/b/c/something//*5*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#a"}, + }, + }) + f.VerifyCompletions(t, []string{"2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"b"}, + }, + }) + f.VerifyCompletions(t, []string{"3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"c"}, + }, + }) + f.VerifyCompletions(t, []string{"4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"d", "something"}, + }, + }) + f.VerifyCompletions(t, []string{"5"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsLength2_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsLength2_test.go new file mode 100644 index 0000000000..b40e295aed --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsLength2_test.go @@ -0,0 +1,76 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsLength2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#*": "./src/*.ts" + } +} +// @Filename: /src/a/b/c/something.ts +export function something(name: string): any; +// @Filename: /a.ts +import {} from "/*1*/"; +import {} from "#a//*2*/"; +import {} from "#a/b//*3*/"; +import {} from "#a/b/c//*4*/"; +import {} from "#a/b/c/something//*5*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#a"}, + }, + }) + f.VerifyCompletions(t, []string{"2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"b"}, + }, + }) + f.VerifyCompletions(t, []string{"3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"c"}, + }, + }) + f.VerifyCompletions(t, []string{"4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"something"}, + }, + }) + f.VerifyCompletions(t, []string{"5"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern2_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern2_test.go new file mode 100644 index 0000000000..660502daab --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern2_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsPattern2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @allowImportingTsExtensions: true +// @Filename: /package.json +{ + "imports": { + "#*": "./src/*" + } +} +// @Filename: /src/something.ts +export function something(name: string): any; +// @Filename: /a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#something.ts"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_capsInPath1_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_capsInPath1_test.go new file mode 100644 index 0000000000..f52d13e18a --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_capsInPath1_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsPattern_capsInPath1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /Dev/package.json +{ + "imports": { + "#thing": "./src/something.js" + } +} +// @Filename: /Dev/src/something.ts +export function something(name: string): any; +// @Filename: /Dev/a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#thing"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_capsInPath2_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_capsInPath2_test.go new file mode 100644 index 0000000000..8851814607 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_capsInPath2_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsPattern_capsInPath2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /Dev/package.json +{ + "imports": { + "#thing/*": "./src/*.js" + } +} +// @Filename: /Dev/src/something.ts +export function something(name: string): any; +// @Filename: /Dev/a.ts +import {} from "#thing//*2*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"something"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_js_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_js_test.go new file mode 100644 index 0000000000..082eb4d826 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_js_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsPattern_js(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#*": "./src/*.js" + } +} +// @Filename: /src/something.ts +export function something(name: string): any; +// @Filename: /a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#something"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_js_ts_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_js_ts_test.go new file mode 100644 index 0000000000..20fed04baa --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_js_ts_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsPattern_js_ts(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#*.js": "./src/*.ts" + } +} +// @Filename: /src/something.ts +export function something(name: string): any; +// @Filename: /a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#something.js"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_test.go new file mode 100644 index 0000000000..75a01a1060 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsPattern(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#*": "./src/*" + } +} +// @Filename: /src/something.ts +export function something(name: string): any; +// @Filename: /a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#something.js"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_js_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_js_test.go new file mode 100644 index 0000000000..402c0fd864 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_js_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsPattern_ts_js(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#*.ts": "./src/*.js" + } +} +// @Filename: /src/something.ts +export function something(name: string): any; +// @Filename: /a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#something.ts"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_test.go new file mode 100644 index 0000000000..ed04955b69 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsPattern_ts(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#*": "./src/*.ts" + } +} +// @Filename: /src/something.ts +export function something(name: string): any; +// @Filename: /a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#something"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_ts_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_ts_test.go new file mode 100644 index 0000000000..a39a90a2ab --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImportsPattern_ts_ts_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImportsPattern_ts_ts(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#*.ts": "./src/*.ts" + } +} +// @Filename: /src/something.ts +export function something(name: string): any; +// @Filename: /a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#something.ts"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImports_js_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImports_js_test.go new file mode 100644 index 0000000000..7aa4056093 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImports_js_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImports_js(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#thing": "./src/something.js" + } +} +// @Filename: /src/something.ts +export function something(name: string): any; +// @Filename: /a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#thing"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletionsPackageJsonImports_ts_test.go b/internal/fourslash/tests/gen/importCompletionsPackageJsonImports_ts_test.go new file mode 100644 index 0000000000..1c0ca50100 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletionsPackageJsonImports_ts_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletionsPackageJsonImports_ts(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#thing": "./src/something.ts" + } +} +// @Filename: /src/something.ts +export function something(name: string): any; +// @Filename: /a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#thing"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletions_importsMap1_test.go b/internal/fourslash/tests/gen/importCompletions_importsMap1_test.go new file mode 100644 index 0000000000..0b48033982 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletions_importsMap1_test.go @@ -0,0 +1,49 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletions_importsMap1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} +// @Filename: /home/src/workspaces/project/package.json +{ + "type": "module", + "imports": { + "#is-browser": { + "browser": "./dist/env/browser.js", + "default": "./dist/env/node.js" + } + } +} +// @Filename: /home/src/workspaces/project/src/env/browser.ts +export const isBrowser = true; +// @Filename: /home/src/workspaces/project/src/env/node.ts +export const isBrowser = false; +// @Filename: /home/src/workspaces/project/src/a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#is-browser"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletions_importsMap2_test.go b/internal/fourslash/tests/gen/importCompletions_importsMap2_test.go new file mode 100644 index 0000000000..5a5c50d939 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletions_importsMap2_test.go @@ -0,0 +1,54 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletions_importsMap2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} +// @Filename: /home/src/workspaces/project/package.json +{ + "type": "module", + "imports": { + "#internal/*": "./dist/internal/*" + } +} +// @Filename: /home/src/workspaces/project/src/internal/foo.ts +export function something(name: string) {} +// @Filename: /home/src/workspaces/project/src/a.ts +import {} from "/*1*/"; +import {} from "#internal//*2*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#internal"}, + }, + }) + f.VerifyCompletions(t, []string{"2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo.js"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletions_importsMap3_test.go b/internal/fourslash/tests/gen/importCompletions_importsMap3_test.go new file mode 100644 index 0000000000..1ee218c574 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletions_importsMap3_test.go @@ -0,0 +1,54 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletions_importsMap3(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} +// @Filename: /home/src/workspaces/project/package.json +{ + "type": "module", + "imports": { + "#internal/": "./dist/internal/" + } +} +// @Filename: /home/src/workspaces/project/src/internal/foo.ts +export function something(name: string) {} +// @Filename: /home/src/workspaces/project/src/a.ts +import {} from "/*1*/"; +import {} from "#internal//*2*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#internal"}, + }, + }) + f.VerifyCompletions(t, []string{"2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo.js"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletions_importsMap4_test.go b/internal/fourslash/tests/gen/importCompletions_importsMap4_test.go new file mode 100644 index 0000000000..5cfe53d57c --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletions_importsMap4_test.go @@ -0,0 +1,47 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletions_importsMap4(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} +// @Filename: /home/src/workspaces/project/package.json +{ + "type": "module", + "imports": { + "#is-browser": { + "types": "./dist/env/browser.d.ts", + "default": "./dist/env/browser.js" + } + } +} +// @Filename: /home/src/workspaces/project/src/env/browser.ts +export const isBrowser = true; +// @Filename: /home/src/workspaces/project/src/a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#is-browser"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importCompletions_importsMap5_test.go b/internal/fourslash/tests/gen/importCompletions_importsMap5_test.go new file mode 100644 index 0000000000..1ebe159375 --- /dev/null +++ b/internal/fourslash/tests/gen/importCompletions_importsMap5_test.go @@ -0,0 +1,48 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportCompletions_importsMap5(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist", + "declarationDir": "types", + } +} +// @Filename: /home/src/workspaces/project/package.json +{ + "type": "module", + "imports": { + "#is-browser": { + "types": "./types/env/browser.d.ts", + "default": "./not-dist-on-purpose/env/browser.js" + } + } +} +// @Filename: /home/src/workspaces/project/src/env/browser.ts +export const isBrowser = true; +// @Filename: /home/src/workspaces/project/src/a.ts +import {} from "/*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#is-browser"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importStatementCompletions4_test.go b/internal/fourslash/tests/gen/importStatementCompletions4_test.go new file mode 100644 index 0000000000..daf8dbb27a --- /dev/null +++ b/internal/fourslash/tests/gen/importStatementCompletions4_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportStatementCompletions4(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: /a.js +import Foo /*a*/ + +function fromBar() {} +// @Filename: /b.jsx +import Foo /*b*/ + +function fromBar() {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"a", "b"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "from"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importStatementCompletions_noPatternAmbient_test.go b/internal/fourslash/tests/gen/importStatementCompletions_noPatternAmbient_test.go new file mode 100644 index 0000000000..4d34c6a065 --- /dev/null +++ b/internal/fourslash/tests/gen/importStatementCompletions_noPatternAmbient_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportStatementCompletions_noPatternAmbient(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /types.d.ts +declare module "*.css" { + const styles: any; + export = styles; +} +// @Filename: /index.ts +import style/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "type"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importStatementCompletions_pnpmTransitive_test.go b/internal/fourslash/tests/gen/importStatementCompletions_pnpmTransitive_test.go new file mode 100644 index 0000000000..2017823f5e --- /dev/null +++ b/internal/fourslash/tests/gen/importStatementCompletions_pnpmTransitive_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportStatementCompletions_pnpmTransitive(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ "compilerOptions": { "module": "commonjs" } } +// @Filename: /home/src/workspaces/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts +import "csstype"; +export declare function Component(): void; +// @Filename: /home/src/workspaces/project/node_modules/.pnpm/csstype@3.0.8/node_modules/csstype/index.d.ts +export interface SvgProperties {} +// @Filename: /home/src/workspaces/project/index.ts +[|import SvgProp/**/|] +// @link: /home/src/workspaces/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react -> /home/src/workspaces/project/node_modules/@types/react +// @link: /home/src/workspaces/project/node_modules/.pnpm/csstype@3.0.8/node_modules/csstype -> /home/src/workspaces/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/csstype` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.GoToMarker(t, "") + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "type"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/importTypeMemberCompletions_test.go b/internal/fourslash/tests/gen/importTypeMemberCompletions_test.go new file mode 100644 index 0000000000..9a5828b1aa --- /dev/null +++ b/internal/fourslash/tests/gen/importTypeMemberCompletions_test.go @@ -0,0 +1,133 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestImportTypeMemberCompletions(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /ns.ts +export namespace Foo { + export namespace Bar { + export class Baz {} + export interface Bat {} + export const a: number; + const b: string; + } +} +// @Filename: /top.ts +export interface Bat {} +export const a: number; +// @Filename: /equals.ts +class Foo { + public static bar: string; + private static baz: number; +} +export = Foo; +// @Filename: /usage1.ts +type A = typeof import("./ns")./*1*/ +// @Filename: /usage2.ts +type B = typeof import("./ns").Foo./*2*/ +// @Filename: /usage3.ts +type C = typeof import("./ns").Foo.Bar./*3*/ +// @Filename: /usage4.ts +type D = import("./ns")./*4*/ +// @Filename: /usage5.ts +type E = import("./ns").Foo./*5*/ +// @Filename: /usage6.ts +type F = import("./ns").Foo.Bar./*6*/ +// @Filename: /usage7.ts +type G = typeof import("./top")./*7*/ +// @Filename: /usage8.ts +type H = import("./top")./*8*/ +// @Filename: /usage9.ts +type H = typeof import("./equals")./*9*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Foo"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Bar"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "Baz"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Foo"}, + }, + }) + f.VerifyCompletions(t, "5", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Bar"}, + }, + }) + f.VerifyCompletions(t, "6", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Bat", "Baz"}, + }, + }) + f.VerifyCompletions(t, "7", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a"}, + }, + }) + f.VerifyCompletions(t, "8", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Bat"}, + }, + }) + f.VerifyCompletions(t, "9", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar", "prototype"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/javaScriptModules12_test.go b/internal/fourslash/tests/gen/javaScriptModules12_test.go new file mode 100644 index 0000000000..41046432ae --- /dev/null +++ b/internal/fourslash/tests/gen/javaScriptModules12_test.go @@ -0,0 +1,85 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJavaScriptModules12(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: mod1.js +var x = require('fs'); +/*1*/ +// @Filename: mod2.js +var y; +if(true) { + y = require('fs'); +} +/*2*/ +// @Filename: glob1.js +var a = require; +/*3*/ +// @Filename: glob2.js +var b = ''; +/*4*/ +// @Filename: consumer.js +/*5*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"x", &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "a"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "b"}}, + Excludes: []string{"y"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"y", &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "a"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "b"}}, + Excludes: []string{"x"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "b"}}, + Excludes: []string{"x", "y"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "a"}, "b"}, + Excludes: []string{"x", "y"}, + }, + }) + f.VerifyCompletions(t, []string{"5"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "a"}, &lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "b"}}, + Excludes: []string{"x", "y"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/javaScriptModules14_test.go b/internal/fourslash/tests/gen/javaScriptModules14_test.go new file mode 100644 index 0000000000..f0fff515fb --- /dev/null +++ b/internal/fourslash/tests/gen/javaScriptModules14_test.go @@ -0,0 +1,43 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJavaScriptModules14(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: myMod.js +if (true) { + exports.b = true; +} else { + exports.n = 3; +} +function fn() { + exports.s = 'foo'; +} +var invisible = true; +// @Filename: isGlobal.js +var y = 10; +// @Filename: consumer.js +var x = require('myMod'); +/**/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "y"}}, + Excludes: []string{"invisible"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/javaScriptModules18_test.go b/internal/fourslash/tests/gen/javaScriptModules18_test.go new file mode 100644 index 0000000000..49f04c242e --- /dev/null +++ b/internal/fourslash/tests/gen/javaScriptModules18_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJavaScriptModules18(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: myMod.js +var x = require('fs'); +// @Filename: other.js +/**/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/javaScriptModulesWithBackticks_test.go b/internal/fourslash/tests/gen/javaScriptModulesWithBackticks_test.go new file mode 100644 index 0000000000..82363ba51e --- /dev/null +++ b/internal/fourslash/tests/gen/javaScriptModulesWithBackticks_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJavaScriptModulesWithBackticks(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: a.js +exports.x = 0; +// @Filename: consumer.js +var a = require(` + "`" + `./a` + "`" + `); +a./**/;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/javascriptModules23_test.go b/internal/fourslash/tests/gen/javascriptModules23_test.go new file mode 100644 index 0000000000..4d386119de --- /dev/null +++ b/internal/fourslash/tests/gen/javascriptModules23_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJavascriptModules23(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: mod.ts +var foo = {a: "test"}; +export = foo; +// @Filename: app.ts +import {a} from "./mod" +a./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"toString"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/javascriptModules25_test.go b/internal/fourslash/tests/gen/javascriptModules25_test.go new file mode 100644 index 0000000000..a78bb2d8c0 --- /dev/null +++ b/internal/fourslash/tests/gen/javascriptModules25_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJavascriptModules25(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: mod.js +function foo() { return {a: true}; } +module.exports.a = foo; +// @Filename: app.js +import * as mod from "./mod" +mod./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/javascriptModulesTypeImportAsValue_test.go b/internal/fourslash/tests/gen/javascriptModulesTypeImportAsValue_test.go new file mode 100644 index 0000000000..927c555644 --- /dev/null +++ b/internal/fourslash/tests/gen/javascriptModulesTypeImportAsValue_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJavascriptModulesTypeImportAsValue(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: types.js +/** + * @typedef {Object} Pet + * @prop {string} name + */ +module.exports = { a: 1 }; +// @Filename: app.js +import { /**/ } from "./types"` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"Pet"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/javascriptModulesTypeImport_test.go b/internal/fourslash/tests/gen/javascriptModulesTypeImport_test.go new file mode 100644 index 0000000000..77b43f4bff --- /dev/null +++ b/internal/fourslash/tests/gen/javascriptModulesTypeImport_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJavascriptModulesTypeImport(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @Filename: types.js +/** + * @typedef {Object} Pet + * @prop {string} name + */ +module.exports = { a: 1 }; +// @Filename: app.js +/** + * @param { import("./types")./**/ } p + */ +function walk(p) { + console.log(` + "`" + `Walking ${p.name}...` + "`" + `); +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"Pet"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsDocGenerics1_test.go b/internal/fourslash/tests/gen/jsDocGenerics1_test.go new file mode 100644 index 0000000000..4124b03d3a --- /dev/null +++ b/internal/fourslash/tests/gen/jsDocGenerics1_test.go @@ -0,0 +1,45 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsDocGenerics1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: ref.d.ts + namespace Thing { + export interface Thung { + a: number; + ] + ] +// @Filename: Foo.js + + /** @type {Array} */ + var v; + v[0]./*1*/ + + /** @type {{x: Array>}} */ + var w; + w.x[0][0]./*2*/ + + /** @type {Array} */ + var x; + x[0].a./*3*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindMethod), Label: "toFixed"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsdocImportTagCompletion1_test.go b/internal/fourslash/tests/gen/jsdocImportTagCompletion1_test.go new file mode 100644 index 0000000000..4fd477e63e --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocImportTagCompletion1_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocImportTagCompletion1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJS: true +// @checkJs: true +// @filename: /a.js +/** + * @/**/ + */` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"import"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsdocNullableUnion_test.go b/internal/fourslash/tests/gen/jsdocNullableUnion_test.go new file mode 100644 index 0000000000..c0ab4b4819 --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocNullableUnion_test.go @@ -0,0 +1,57 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocNullableUnion(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @checkJs: true +// @Filename: Foo.js +/** + * @param {never | {x: string}} p1 + * @param {undefined | {y: number}} p2 + * @param {null | {z: boolean}} p3 + * @returns {void} nothing + */ +function f(p1, p2, p3) { + p1./*1*/; + p2./*2*/; + p3./*3*/; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"y"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"z"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsdocOverloadTagCompletion_test.go b/internal/fourslash/tests/gen/jsdocOverloadTagCompletion_test.go new file mode 100644 index 0000000000..de29139314 --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocOverloadTagCompletion_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocOverloadTagCompletion(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJS: true +// @checkJs: true +// @filename: /a.js +/** + * @/**/ + */` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"overload"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsdocParamTagSpecialKeywords_test.go b/internal/fourslash/tests/gen/jsdocParamTagSpecialKeywords_test.go new file mode 100644 index 0000000000..cc99866dbb --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocParamTagSpecialKeywords_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocParamTagSpecialKeywords(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: test.js +/** + * @param {string} type + */ +function test(type) { + type./**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"charAt"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsdocParameterNameCompletion_test.go b/internal/fourslash/tests/gen/jsdocParameterNameCompletion_test.go new file mode 100644 index 0000000000..b037a43c60 --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocParameterNameCompletion_test.go @@ -0,0 +1,61 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocParameterNameCompletion(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/** + * @param /*0*/ + */ +function f(foo, bar) {} +/** + * @param foo + * @param /*1*/ + */ +function g(foo, bar) {} +/** + * @param can/*2*/ + * @param cantaloupe + */ +function h(cat, canary, canoodle, cantaloupe, zebra) {} +/** + * @param /*3*/ {string} /*4*/ + */ +function i(foo, bar) {}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"0", "3", "4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo", "bar"}, + }, + }) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"canary", "canoodle"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsdocPropTagCompletion_test.go b/internal/fourslash/tests/gen/jsdocPropTagCompletion_test.go new file mode 100644 index 0000000000..c3fb93d166 --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocPropTagCompletion_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocPropTagCompletion(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/** + * @typedef Foo + * @pr/**/ + */` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"prop"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsdocSatisfiesTagCompletion2_test.go b/internal/fourslash/tests/gen/jsdocSatisfiesTagCompletion2_test.go new file mode 100644 index 0000000000..2d90a32679 --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocSatisfiesTagCompletion2_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocSatisfiesTagCompletion2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @noEmit: true +// @allowJS: true +// @checkJs: true +// @filename: /a.js +/** + * @/**/ + */ +const t = { a: 1 };` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"satisfies"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsdocTemplatePrototypeCompletions_test.go b/internal/fourslash/tests/gen/jsdocTemplatePrototypeCompletions_test.go new file mode 100644 index 0000000000..6a2a6da20e --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocTemplatePrototypeCompletions_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocTemplatePrototypeCompletions(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @checkJs: true +// @filename: index.js +https://github.com/microsoft/TypeScript/issues/11492 +/** @constructor */ +function Foo() {} +/** + * @template T + * @param {T} bar + * @returns {T} + */ +Foo.prototype.foo = function (bar) {}; +new Foo().foo({ id: 1234 })./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"id"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsdocTypedefTag1_test.go b/internal/fourslash/tests/gen/jsdocTypedefTag1_test.go new file mode 100644 index 0000000000..fb8b46a169 --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocTypedefTag1_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocTypedefTag1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: jsdocCompletion_typedef.js +/** + * @typedef {Object} MyType + * @property {string} yes + */ +function foo() { } +/** + * @param {MyType} my + */ +function a(my) { + my.yes./*1*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"charAt"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsdocTypedefTag2_test.go b/internal/fourslash/tests/gen/jsdocTypedefTag2_test.go new file mode 100644 index 0000000000..a852c69d29 --- /dev/null +++ b/internal/fourslash/tests/gen/jsdocTypedefTag2_test.go @@ -0,0 +1,53 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsdocTypedefTag2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowNonTsExtensions: true +// @Filename: jsdocCompletion_typedef.js +/** + * @typedef {Object} A.B.MyType + * @property {string} yes + */ +function foo() {} +/** + * @param {A.B.MyType} my2 + */ +function a(my2) { + my2.yes./*1*/ +} +/** + * @param {MyType} my2 + */ +function b(my2) { + my2.yes./*2*/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"charAt"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"charAt"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/jsxAriaLikeCompletions_test.go b/internal/fourslash/tests/gen/jsxAriaLikeCompletions_test.go new file mode 100644 index 0000000000..4bca05022f --- /dev/null +++ b/internal/fourslash/tests/gen/jsxAriaLikeCompletions_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestJsxAriaLikeCompletions(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx +declare var React: any; +declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { "aria-whatever"?: string } + } + interface ElementAttributesProperty { props: any } +} +const a =

;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "aria-whatever"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/lambdaThisMembers_test.go b/internal/fourslash/tests/gen/lambdaThisMembers_test.go new file mode 100644 index 0000000000..63cd4b390f --- /dev/null +++ b/internal/fourslash/tests/gen/lambdaThisMembers_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestLambdaThisMembers(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + a: number; + b() { + var x = () => { + this./**/; + } + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "b"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/memberCompletionOnRightSideOfImport_test.go b/internal/fourslash/tests/gen/memberCompletionOnRightSideOfImport_test.go new file mode 100644 index 0000000000..e6050d4940 --- /dev/null +++ b/internal/fourslash/tests/gen/memberCompletionOnRightSideOfImport_test.go @@ -0,0 +1,17 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberCompletionOnRightSideOfImport(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `import x = M./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/memberCompletionOnTypeParameters2_test.go b/internal/fourslash/tests/gen/memberCompletionOnTypeParameters2_test.go new file mode 100644 index 0000000000..6c523250dd --- /dev/null +++ b/internal/fourslash/tests/gen/memberCompletionOnTypeParameters2_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberCompletionOnTypeParameters2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class A { + foo(): string { return ''; } +} + +class B extends A { + bar(): string { + return ''; + } +} + +class C { + x: U; + y = this.x./**/ // completion list here +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/memberListAfterDoubleDot_test.go b/internal/fourslash/tests/gen/memberListAfterDoubleDot_test.go new file mode 100644 index 0000000000..ac38a9394a --- /dev/null +++ b/internal/fourslash/tests/gen/memberListAfterDoubleDot_test.go @@ -0,0 +1,17 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberListAfterDoubleDot(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `../**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/memberListAfterSingleDot_test.go b/internal/fourslash/tests/gen/memberListAfterSingleDot_test.go new file mode 100644 index 0000000000..05768a80d6 --- /dev/null +++ b/internal/fourslash/tests/gen/memberListAfterSingleDot_test.go @@ -0,0 +1,17 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberListAfterSingleDot(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/memberListErrorRecovery_test.go b/internal/fourslash/tests/gen/memberListErrorRecovery_test.go new file mode 100644 index 0000000000..cc32d548b0 --- /dev/null +++ b/internal/fourslash/tests/gen/memberListErrorRecovery_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberListErrorRecovery(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { static fun() { }; } + +Foo./**/; +/*1*/var bar;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextLocalDeclarationPriority)), Label: "fun"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/memberListInWithBlock2_test.go b/internal/fourslash/tests/gen/memberListInWithBlock2_test.go new file mode 100644 index 0000000000..9dbd800a92 --- /dev/null +++ b/internal/fourslash/tests/gen/memberListInWithBlock2_test.go @@ -0,0 +1,23 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberListInWithBlock2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface IFoo { + a: number; +} + +with (x) { + var y: IFoo = { /*1*/ }; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", nil) +} diff --git a/internal/fourslash/tests/gen/memberListInWithBlock3_test.go b/internal/fourslash/tests/gen/memberListInWithBlock3_test.go new file mode 100644 index 0000000000..1a5b6d233a --- /dev/null +++ b/internal/fourslash/tests/gen/memberListInWithBlock3_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberListInWithBlock3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `var x = { a: 0 }; +with(x./*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/memberListInWithBlock_test.go b/internal/fourslash/tests/gen/memberListInWithBlock_test.go new file mode 100644 index 0000000000..dd6047e3b8 --- /dev/null +++ b/internal/fourslash/tests/gen/memberListInWithBlock_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberListInWithBlock(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class c { + static x: number; + public foo() { + with ({}) { + function f() { } + var d = this./*1*/foo; + /*2*/ + } + } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", nil) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"foo", "f", "c", "d", "x", "Object"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/memberListOfEnumFromExternalModule_test.go b/internal/fourslash/tests/gen/memberListOfEnumFromExternalModule_test.go new file mode 100644 index 0000000000..e94917d715 --- /dev/null +++ b/internal/fourslash/tests/gen/memberListOfEnumFromExternalModule_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberListOfEnumFromExternalModule(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: memberListOfEnumFromExternalModule_file0.ts +export enum Topic{ One, Two } +var topic = Topic.One; +// @Filename: memberListOfEnumFromExternalModule_file1.ts +import t = require('./memberListOfEnumFromExternalModule_file0'); +var topic = t.Topic./*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"One", "Two"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/memberListOfEnumInModule_test.go b/internal/fourslash/tests/gen/memberListOfEnumInModule_test.go new file mode 100644 index 0000000000..73df50065e --- /dev/null +++ b/internal/fourslash/tests/gen/memberListOfEnumInModule_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberListOfEnumInModule(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module Fixes { + enum Foo { + bar, + baz + } + var f: Foo = Foo./**/; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar", "baz"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/memberListOfModuleBeforeKeyword_test.go b/internal/fourslash/tests/gen/memberListOfModuleBeforeKeyword_test.go new file mode 100644 index 0000000000..2fd36d9222 --- /dev/null +++ b/internal/fourslash/tests/gen/memberListOfModuleBeforeKeyword_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberListOfModuleBeforeKeyword(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module TypeModule1 { + export class C1 { } + export class C2 { } +} +var x: TypeModule1./*namedType*/ +module TypeModule2 { + export class Test3 {} +} + +TypeModule1./*dottedExpression*/ +module TypeModule3 { + export class Test3 {} +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"C1", "C2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/memberListOfModule_test.go b/internal/fourslash/tests/gen/memberListOfModule_test.go new file mode 100644 index 0000000000..4a2621e3ab --- /dev/null +++ b/internal/fourslash/tests/gen/memberListOfModule_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberListOfModule(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module Foo { + export class Bar { + + } + + + export module Blah { + + } +} + +var x: Foo./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Bar"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/memberListOnFunctionParameter_test.go b/internal/fourslash/tests/gen/memberListOnFunctionParameter_test.go new file mode 100644 index 0000000000..7632f96e9f --- /dev/null +++ b/internal/fourslash/tests/gen/memberListOnFunctionParameter_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestMemberListOnFunctionParameter(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module Test10 { + var x: string[] = []; + x.forEach(function (y) { y./**/} ); +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"charAt"}, + Excludes: []string{"toFixed"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/noCompletionListOnCommentsInsideObjectLiterals_test.go b/internal/fourslash/tests/gen/noCompletionListOnCommentsInsideObjectLiterals_test.go new file mode 100644 index 0000000000..ca36a1adae --- /dev/null +++ b/internal/fourslash/tests/gen/noCompletionListOnCommentsInsideObjectLiterals_test.go @@ -0,0 +1,26 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestNoCompletionListOnCommentsInsideObjectLiterals(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `module ObjectLiterals { + interface MyPoint { + x1: number; + y1: number; + } + + var p1: MyPoint = { + /* /*1*/ Comment /*2*/ */ + }; +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), nil) +} diff --git a/internal/fourslash/tests/gen/noCompletionsForCurrentOrLaterParametersInDefaults_test.go b/internal/fourslash/tests/gen/noCompletionsForCurrentOrLaterParametersInDefaults_test.go new file mode 100644 index 0000000000..021f40c193 --- /dev/null +++ b/internal/fourslash/tests/gen/noCompletionsForCurrentOrLaterParametersInDefaults_test.go @@ -0,0 +1,89 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestNoCompletionsForCurrentOrLaterParametersInDefaults(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function f1(a = /*1*/, b) { } +function f2(a = a/*2*/, b) { } +function f3(a = a + /*3*/, b = a/*4*/, c = /*5*/) { } +function f3(a) { + function f4(b = /*6*/, c) { } +} +const f5 = (a, b = (c = /*7*/, e) => { }, d = b) => { } + +type A1 = K` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"a", "b"}, + }, + }) + f.VerifyCompletions(t, []string{"3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"a", "b"}, + }, + }) + f.VerifyCompletions(t, []string{"4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a"}, + }, + }) + f.VerifyCompletions(t, []string{"5"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b"}, + }, + }) + f.VerifyCompletions(t, []string{"6"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a"}, + Excludes: []string{"b", "c"}, + }, + }) + f.VerifyCompletions(t, []string{"7"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"a", "b", "d"}, + }, + }) + f.VerifyCompletions(t, []string{"T1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"K", "L"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/nodeModulesImportCompletions1_test.go b/internal/fourslash/tests/gen/nodeModulesImportCompletions1_test.go new file mode 100644 index 0000000000..4cd4d89482 --- /dev/null +++ b/internal/fourslash/tests/gen/nodeModulesImportCompletions1_test.go @@ -0,0 +1,66 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestNodeModulesImportCompletions1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @allowJs: true +// @module: node18 +// @Filename: /src/module.mts +export {} +// @Filename: /src/module.cts +export {} +// @Filename: /src/module.js +export {} +// @Filename: /src/decl.d.mts +export {} +// @Filename: /src/decl.d.cts +export {} +// @Filename: /src/decl.d.ts +export {} +// @Filename: /src/js.mjs +export {} +// @Filename: /src/js.cjs +export {} +// @Filename: /src/js.js +export {} +// @Filename: /main.mts +import {} from "./src//*1*/"; +import mod = require("./src//*2*/"); +const m = import("./src//*3*/"); +// @Filename: /main.cts +import {} from "./src//*4*/"; +import mod = require("./src//*5*/"); +const m = import("./src//*6*/"); +// @Filename: /main.ts +import {} from "./src//*7*/"; +import mod = require("./src//*8*/"); +const m = import("./src//*9*/");` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "3", "6", "9"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"decl.cjs", "decl.mjs", "decl.js", "js.cjs", "js.js", "js.mjs", "module.cjs", "module.js", "module.mjs"}, + }, + }) + f.VerifyCompletions(t, []string{"2", "4", "5", "7", "8"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"decl.cjs", "decl.mjs", "decl", "js.cjs", "js", "js.mjs", "module.cjs", "module", "module.mjs"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/objectLiteralBindingInParameter_test.go b/internal/fourslash/tests/gen/objectLiteralBindingInParameter_test.go new file mode 100644 index 0000000000..0a7cb2471a --- /dev/null +++ b/internal/fourslash/tests/gen/objectLiteralBindingInParameter_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestObjectLiteralBindingInParameter(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface I { x1: number; x2: string } +function f(cb: (ev: I) => any) { } +f(({/*1*/}) => 0); +[null].reduce(({/*2*/}, b) => b); +interface Foo { + m(x: { x1: number, x2: number }): void; + prop: I; +} +let x: Foo = { + m({ /*3*/ }) { + }, + get prop(): I { return undefined; }, + set prop({ /*4*/ }) { + } +};` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x1", "x2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsAllowModuleAugmentationExtensions_test.go b/internal/fourslash/tests/gen/pathCompletionsAllowModuleAugmentationExtensions_test.go new file mode 100644 index 0000000000..1e47c8f848 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsAllowModuleAugmentationExtensions_test.go @@ -0,0 +1,31 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsAllowModuleAugmentationExtensions(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /project/foo.css +export const foo = 0; +// @Filename: declarations.d.ts +declare module "*.css" {} +// @Filename: /project/main.ts +import {} from ".//**/"` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo.css"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsBundlerNoNodeCondition_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsBundlerNoNodeCondition_test.go new file mode 100644 index 0000000000..d820179c76 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsBundlerNoNodeCondition_test.go @@ -0,0 +1,42 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonExportsBundlerNoNodeCondition(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @moduleResolution: bundler +// @Filename: /node_modules/foo/package.json +{ + "name": "foo", + "exports": { + "./only-for-node": { + "node": "./something.js" + }, + "./for-everywhere": "./other.js", + } +} +// @Filename: /node_modules/foo/something.d.ts +export const index = 0; +// @Filename: /node_modules/foo/other.d.ts +export const index = 0; +// @Filename: /index.ts +import { } from "foo//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "for-everywhere"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsCustomConditions_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsCustomConditions_test.go new file mode 100644 index 0000000000..9089d235d0 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsCustomConditions_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonExportsCustomConditions(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @customConditions: custom-condition +// @Filename: /node_modules/foo/package.json +{ + "name": "foo", + "exports": { + "./only-with-custom-conditions": { + "custom-condition": "./something.js" + }, + } +} +// @Filename: /node_modules/foo/something.d.ts +export const index = 0; +// @Filename: /index.ts +import { } from "foo//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "only-with-custom-conditions"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard10_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard10_test.go new file mode 100644 index 0000000000..06f6018dc0 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard10_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonExportsWildcard10(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: preserve +// @moduleResolution: bundler +// @allowImportingTsExtensions: true +// @jsx: react +// @Filename: /node_modules/repo/package.json +{ + "name": "repo", + "exports": { + "./*": "./src/*" + } +} +// @Filename: /node_modules/repo/src/card.tsx +export {}; +// @Filename: /main.ts +import { } from "repo//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "card.tsx"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard11_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard11_test.go new file mode 100644 index 0000000000..d53e456b2b --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard11_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonExportsWildcard11(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: preserve +// @moduleResolution: bundler +// @jsx: react +// @Filename: /node_modules/repo/package.json +{ + "name": "repo", + "exports": { + "./*": "./src/*" + } +} +// @Filename: /node_modules/repo/src/card.tsx +export {}; +// @Filename: /main.ts +import { } from "repo//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "card.js"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard12_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard12_test.go new file mode 100644 index 0000000000..7e96f18542 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard12_test.go @@ -0,0 +1,69 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonExportsWildcard12(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /node_modules/foo/package.json + { + "name": "foo", + "exports": { + "./bar/_*/suffix": "./dist/*.js" + } + } +// @Filename: /node_modules/foo/dist/b.d.ts +export const x = 0; +// @Filename: /node_modules/foo/dist/dir/x.d.ts +/export const x = 0; +// @Filename: /a.mts +import {} from "foo/bar//*0*/"; +import {} from "foo/bar/dir//*1*/"; // invalid +import {} from "foo/bar/_/*2*/"; +import {} from "foo/bar/_dir//*3*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "bar/_b/suffix"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "bar/_dir/suffix"}}, + }, + }) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "bar/_b/suffix"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "bar/_dir/suffix"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "b"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "dir"}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "x"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard1_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard1_test.go new file mode 100644 index 0000000000..7a55b80ce8 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard1_test.go @@ -0,0 +1,58 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonExportsWildcard1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /node_modules/foo/package.json +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "default": "./dist/index.js" + }, + "./*": { + "types": "./dist/*.d.ts", + "import": "./dist/*.mjs", + "default": "./dist/*.js" + }, + "./arguments": { + "types": "./dist/arguments/index.d.ts", + "import": "./dist/arguments/index.mjs", + "default": "./dist/arguments/index.js" + } + } +} +// @Filename: /node_modules/foo/dist/index.d.ts +export const index = 0; +// @Filename: /node_modules/foo/dist/blah.d.ts +export const blah = 0; +// @Filename: /node_modules/foo/dist/arguments/index.d.ts +export const arguments = 0; +// @Filename: /index.mts +import { } from "foo//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "blah"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "index"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "arguments"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard5_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard5_test.go new file mode 100644 index 0000000000..bcc4d4fcc2 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard5_test.go @@ -0,0 +1,73 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonExportsWildcard5(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /node_modules/foo/package.json +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/types/index.d.mts", + "default": "./dist/esm/index.mjs" + }, + "default": { + "types": "./dist/types/index.d.ts", + "default": "./dist/cjs/index.js" + } + }, + "./*": { + "import": { + "types": "./dist/types/*.d.mts", + "default": "./dist/esm/*.mjs" + }, + "default": { + "types": "./dist/types/*.d.ts", + "default": "./dist/cjs/*.js" + } + }, + "./only-in-cjs": { + "require": { + "types": "./dist/types/only-in-cjs/index.d.ts", + "default": "./dist/cjs/only-in-cjs/index.js" + } + } + } +} +// @Filename: /node_modules/foo/dist/types/index.d.mts +export const index = 0; +// @Filename: /node_modules/foo/dist/types/index.d.ts +export const index = 0; +// @Filename: /node_modules/foo/dist/types/blah.d.mts +export const blah = 0; +// @Filename: /node_modules/foo/dist/types/blah.d.ts +export const blah = 0; +// @Filename: /node_modules/foo/dist/types/only-in-cjs/index.d.ts +export const onlyInCjs = 0; +// @Filename: /index.mts +import { } from "foo//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "blah"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "index"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard6_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard6_test.go new file mode 100644 index 0000000000..3a47ebd9b5 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard6_test.go @@ -0,0 +1,42 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonExportsWildcard6(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /node_modules/foo/package.json +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "exports": { + "./*": "./dist/*?.d.ts" + } +} +// @Filename: /node_modules/foo/dist/index.d.ts +export const index = 0; +// @Filename: /node_modules/foo/dist/blah?.d.ts +export const blah = 0; +// @Filename: /index.mts +import { } from "foo//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard7_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard7_test.go new file mode 100644 index 0000000000..8d90c11540 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard7_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonExportsWildcard7(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /node_modules/foo/package.json +{ + "name": "foo", + "exports": { + "./*": "./dist/*.js" + } +} +// @Filename: /node_modules/foo/dist/blah.d.ts +export const blah = 0; +// @Filename: /index.mts +import { } from "foo//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard8_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard8_test.go new file mode 100644 index 0000000000..5d671e0df2 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard8_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonExportsWildcard8(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /node_modules/foo/package.json +{ + "name": "foo", + "exports": { + "./*": "./dist/*.js" + } +} +// @Filename: /node_modules/foo/dist/blah.js +export const blah = 0; +// @Filename: /node_modules/foo/dist/blah.d.ts +export declare const blah: 0; +// @Filename: /index.mts +import { } from "foo//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard9_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard9_test.go new file mode 100644 index 0000000000..ff5c508fd9 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonExportsWildcard9_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonExportsWildcard9(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @allowJs: true +// @maxNodeModuleJsDepth: 1 +// @Filename: /node_modules/foo/package.json +{ + "name": "foo", + "exports": { + "./*": "./dist/*.js" + } +} +// @Filename: /node_modules/foo/dist/blah.js +export const blah = 0; +// @Filename: /index.mts +import { } from "foo//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsBundlerNoNodeCondition_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsBundlerNoNodeCondition_test.go new file mode 100644 index 0000000000..21bc359196 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsBundlerNoNodeCondition_test.go @@ -0,0 +1,42 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsBundlerNoNodeCondition(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @moduleResolution: bundler +// @Filename: /package.json +{ + "name": "foo", + "imports": { + "#only-for-node": { + "node": "./something.js" + }, + "#for-everywhere": "./other.js", + } +} +// @Filename: /something.d.ts +export const index = 0; +// @Filename: /other.d.ts +export const index = 0; +// @Filename: /index.ts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#for-everywhere"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsCustomConditions_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsCustomConditions_test.go new file mode 100644 index 0000000000..0d9ed6093a --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsCustomConditions_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsCustomConditions(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @customConditions: custom-condition +// @Filename: /package.json +{ + "name": "foo", + "imports": { + "#only-with-custom-conditions": { + "custom-condition": "./something.js" + }, + } +} +// @Filename: /something.d.ts +export const index = 0; +// @Filename: /index.ts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#only-with-custom-conditions"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1_test.go new file mode 100644 index 0000000000..c0120322ff --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1_test.go @@ -0,0 +1,36 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /src/node_modules/#internal/package.json +{ + "imports": { + "#thing": "./dist/something.js" + } +} +// @Filename: /src/node_modules/#internal/dist/something.d.ts +export function something(name: string): any; +// @Filename: /src/a.ts +import {} from "#internal//*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2_test.go new file mode 100644 index 0000000000..003348d83b --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#internal/*": "./src/*.ts" + } +} +// @Filename: /src/something.ts +export function something(name: string): any; +// @Filename: /src/node_modules/#internal/package.json +{} +// @Filename: /src/a.ts +import {} from "#internal//*1*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "something"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsOnlyFromClosestScope1_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsOnlyFromClosestScope1_test.go new file mode 100644 index 0000000000..e8d9f5a902 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsOnlyFromClosestScope1_test.go @@ -0,0 +1,49 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsOnlyFromClosestScope1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "imports": { + "#thing": "./src/something.ts" + } +} +// @Filename: /src/package.json +{} +// @Filename: /src/something.ts +export function something(name: string): any; +// @Filename: /src/a.ts +import {} from "/*1*/"; +// @Filename: /a.ts +import {} from "/*2*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) + f.VerifyCompletions(t, []string{"2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"#thing"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard1_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard1_test.go new file mode 100644 index 0000000000..17a95f7765 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard1_test.go @@ -0,0 +1,60 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsSrcNoDistWildcard1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} +// @Filename: /home/src/workspaces/project/package.json +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "imports": { + "#*": { + "types": "./dist/*.d.ts", + "import": "./dist/*.mjs", + "default": "./dist/*.js" + }, + "#arguments": { + "types": "./dist/arguments/index.d.ts", + "import": "./dist/arguments/index.mjs", + "default": "./dist/arguments/index.js" + } + } +} +// @Filename: /home/src/workspaces/project/src/index.ts +export const index = 0; +// @Filename: /home/src/workspaces/project/src/blah.ts +export const blah = 0; +// @Filename: /home/src/workspaces/project/src/arguments/index.ts +export const arguments = 0; +// @Filename: /home/src/workspaces/project/src/m.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#index"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#arguments"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard5_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard5_test.go new file mode 100644 index 0000000000..a9eff778ef --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard5_test.go @@ -0,0 +1,71 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsSrcNoDistWildcard5(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist/esm", + "declarationDir": "dist/types" + } +} +// @Filename: /home/src/workspaces/project/package.json +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "imports": { + "#*": { + "import": { + "types": "./dist/types/*.d.mts", + "default": "./dist/esm/*.mjs" + }, + "default": { + "types": "./dist/types/*.d.ts", + "default": "./dist/cjs/*.js" + } + }, + "#only-in-cjs": { + "require": { + "types": "./dist/types/only-in-cjs/index.d.ts", + "default": "./dist/cjs/only-in-cjs/index.js" + } + } + } +} +// @Filename: /home/src/workspaces/project/src/index.mts +export const index = 0; +// @Filename: /home/src/workspaces/project/src/index.ts +export const index = 0; +// @Filename: /home/src/workspaces/project/src/blah.mts +export const blah = 0; +// @Filename: /home/src/workspaces/project/src/blah.ts +export const blah = 0; +// @Filename: /home/src/workspaces/project/src/only-in-cjs/index.ts +export const onlyInCjs = 0; +// @Filename: /home/src/workspaces/project/src/index.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#index"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard6_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard6_test.go new file mode 100644 index 0000000000..da77c4f20a --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard6_test.go @@ -0,0 +1,49 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsSrcNoDistWildcard6(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} +// @Filename: /home/src/workspaces/project/package.json +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "imports": { + "#*": "./dist/*?.d.ts" + } +} +// @Filename: /home/src/workspaces/project/src/index.ts +export const index = 0; +// @Filename: /home/src/workspaces/project/src/blah?.ts +export const blah = 0; +// @Filename: /home/src/workspaces/project/src/m.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard7_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard7_test.go new file mode 100644 index 0000000000..bc816ea6aa --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard7_test.go @@ -0,0 +1,44 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsSrcNoDistWildcard7(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} +// @Filename: /home/src/workspaces/project/package.json +{ + "name": "foo", + "imports": { + "#*": "./dist/*.js" + } +} +// @Filename: /home/src/workspaces/project/src/blah.ts +export const blah = 0; +// @Filename: /home/src/workspaces/project/src/index.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard8_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard8_test.go new file mode 100644 index 0000000000..4edef4cd80 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard8_test.go @@ -0,0 +1,44 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsSrcNoDistWildcard8(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} +// @Filename: /home/src/workspaces/project/package.json +{ + "name": "foo", + "imports": { + "#*": "./dist/*.js" + } +} +// @Filename: /home/src/workspaces/project/src/blah.ts +export const blah = 0; +// @Filename: /home/src/workspaces/project/src/index.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard9_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard9_test.go new file mode 100644 index 0000000000..0787bf6ccd --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsSrcNoDistWildcard9_test.go @@ -0,0 +1,45 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsSrcNoDistWildcard9(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /home/src/workspaces/project/tsconfig.json +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist", + "allowJs": true + } +} +// @Filename: /home/src/workspaces/project/package.json +{ + "name": "foo", + "imports": { + "#*": "./dist/*.js" + } +} +// @Filename: /home/src/workspaces/project/src/blah.js +export const blah = 0; +// @Filename: /home/src/workspaces/project/src/index.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard10_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard10_test.go new file mode 100644 index 0000000000..784c3b3ff2 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard10_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsWildcard10(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: preserve +// @moduleResolution: bundler +// @allowImportingTsExtensions: true +// @jsx: react +// @Filename: /package.json +{ + "name": "repo", + "imports": { + "#*": "./src/*" + } +} +// @Filename: /src/card.tsx +export {}; +// @Filename: /main.ts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#card.tsx"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard11_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard11_test.go new file mode 100644 index 0000000000..db6591349c --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard11_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsWildcard11(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: preserve +// @moduleResolution: bundler +// @jsx: react +// @Filename: /package.json +{ + "name": "repo", + "imports": { + "#*": "./src/*" + } +} +// @Filename: /src/card.tsx +export {}; +// @Filename: /main.ts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#card.js"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard12_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard12_test.go new file mode 100644 index 0000000000..a4c583e846 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard12_test.go @@ -0,0 +1,69 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsWildcard12(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json + { + "name": "repo", + "imports": { + "#foo/_*/suffix": "./src/*.ts" + } + } +// @Filename: /src/b.ts +export const x = 0; +// @Filename: /src/dir/x.ts +/export const x = 0; +// @Filename: /src/a.ts +import {} from "#foo//*0*/"; +import {} from "#foo/dir//*1*/"; // invalid +import {} from "#foo/_/*2*/"; +import {} from "#foo/_dir//*3*/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#foo/_a/suffix"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#foo/_b/suffix"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "#foo/_dir/suffix"}}, + }, + }) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#foo/_a/suffix"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#foo/_b/suffix"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "#foo/_dir/suffix"}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "a"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "b"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFolder), Label: "dir"}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "x"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard1_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard1_test.go new file mode 100644 index 0000000000..1991a9c7df --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard1_test.go @@ -0,0 +1,53 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsWildcard1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "imports": { + "#*": { + "types": "./dist/*.d.ts", + "import": "./dist/*.mjs", + "default": "./dist/*.js" + }, + "#arguments": { + "types": "./dist/arguments/index.d.ts", + "import": "./dist/arguments/index.mjs", + "default": "./dist/arguments/index.js" + } + } +} +// @Filename: /dist/index.d.ts +export const index = 0; +// @Filename: /dist/blah.d.ts +export const blah = 0; +// @Filename: /dist/arguments/index.d.ts +export const arguments = 0; +// @Filename: /index.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#index"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#arguments"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard5_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard5_test.go new file mode 100644 index 0000000000..ad3bdf38a3 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard5_test.go @@ -0,0 +1,63 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsWildcard5(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "imports": { + "#*": { + "import": { + "types": "./dist/types/*.d.mts", + "default": "./dist/esm/*.mjs" + }, + "default": { + "types": "./dist/types/*.d.ts", + "default": "./dist/cjs/*.js" + } + }, + "#only-in-cjs": { + "require": { + "types": "./dist/types/only-in-cjs/index.d.ts", + "default": "./dist/cjs/only-in-cjs/index.js" + } + } + } +} +// @Filename: /dist/types/index.d.mts +export const index = 0; +// @Filename: /dist/types/index.d.ts +export const index = 0; +// @Filename: /dist/types/blah.d.mts +export const blah = 0; +// @Filename: /dist/types/blah.d.ts +export const blah = 0; +// @Filename: /dist/types/only-in-cjs/index.d.ts +export const onlyInCjs = 0; +// @Filename: /index.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#index"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard6_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard6_test.go new file mode 100644 index 0000000000..58fd279c1e --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard6_test.go @@ -0,0 +1,42 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsWildcard6(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "imports": { + "#*": "./dist/*?.d.ts" + } +} +// @Filename: /dist/index.d.ts +export const index = 0; +// @Filename: /dist/blah?.d.ts +export const blah = 0; +// @Filename: /index.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard7_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard7_test.go new file mode 100644 index 0000000000..3662848b87 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard7_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsWildcard7(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "name": "foo", + "imports": { + "#*": "./dist/*.js" + } +} +// @Filename: /dist/blah.d.ts +export const blah = 0; +// @Filename: /index.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard8_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard8_test.go new file mode 100644 index 0000000000..610ac4ccbf --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard8_test.go @@ -0,0 +1,39 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsWildcard8(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @Filename: /package.json +{ + "name": "foo", + "imports": { + "#*": "./dist/*.js" + } +} +// @Filename: /dist/blah.js +export const blah = 0; +// @Filename: /dist/blah.d.ts +export declare const blah: 0; +// @Filename: /index.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard9_test.go b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard9_test.go new file mode 100644 index 0000000000..4ba19e60a7 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsPackageJsonImportsWildcard9_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsPackageJsonImportsWildcard9(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: node18 +// @allowJs: true +// @Filename: /package.json +{ + "name": "foo", + "imports": { + "#*": "./dist/*.js" + } +} +// @Filename: /dist/blah.js +export const blah = 0; +// @Filename: /index.mts +import { } from "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindFile), Label: "#blah"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsTypesVersionsLocal_test.go b/internal/fourslash/tests/gen/pathCompletionsTypesVersionsLocal_test.go new file mode 100644 index 0000000000..85cab8fb51 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsTypesVersionsLocal_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsTypesVersionsLocal(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /package.json +{ + "typesVersions": { + "*": { + "*": ["./src/*"] + } + } +} +// @Filename: /src/add.ts +export function add(a: number, b: number) { return a + b; } +// @Filename: /src/index.ts +import { add } from ".//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"add"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard2_test.go b/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard2_test.go new file mode 100644 index 0000000000..a4c25ede19 --- /dev/null +++ b/internal/fourslash/tests/gen/pathCompletionsTypesVersionsWildcard2_test.go @@ -0,0 +1,45 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestPathCompletionsTypesVersionsWildcard2(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @module: commonjs +// @Filename: /node_modules/foo/package.json +{ + "types": "index.d.ts", + "typesVersions": { + "<=3.4.1": { + "*": ["ts-old/*"] + } + } +} +// @Filename: /node_modules/foo/nope.d.ts +export const nope = 0; +// @Filename: /node_modules/foo/ts-old/index.d.ts +export const index = 0; +// @Filename: /node_modules/foo/ts-old/blah.d.ts +export const blah = 0; +// @Filename: /node_modules/foo/ts-old/subfolder/one.d.ts +export const one = 0; +// @Filename: /a.ts +import { } from "foo//**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"nope", "ts-old"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/satisfiesOperatorCompletion_test.go b/internal/fourslash/tests/gen/satisfiesOperatorCompletion_test.go new file mode 100644 index 0000000000..3739c5a9b4 --- /dev/null +++ b/internal/fourslash/tests/gen/satisfiesOperatorCompletion_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestSatisfiesOperatorCompletion(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type T = number; +var x; +var y = x satisfies /**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"T"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/specialIntersectionsOrderIndependent_test.go b/internal/fourslash/tests/gen/specialIntersectionsOrderIndependent_test.go new file mode 100644 index 0000000000..3e6afe77e5 --- /dev/null +++ b/internal/fourslash/tests/gen/specialIntersectionsOrderIndependent_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestSpecialIntersectionsOrderIndependent(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function a(arg: 'test' | (string & {})): void +a('/*1*/') +declare function b(arg: 'test' | ({} & string)): void +b('/*2*/')` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"test"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/stringCompletionsFromGenericConditionalTypesUsingTemplateLiteralTypes_test.go b/internal/fourslash/tests/gen/stringCompletionsFromGenericConditionalTypesUsingTemplateLiteralTypes_test.go new file mode 100644 index 0000000000..736800e502 --- /dev/null +++ b/internal/fourslash/tests/gen/stringCompletionsFromGenericConditionalTypesUsingTemplateLiteralTypes_test.go @@ -0,0 +1,61 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestStringCompletionsFromGenericConditionalTypesUsingTemplateLiteralTypes(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +type keyword = "foo" | "bar" | "baz" + +type validateString = s extends keyword + ? s + : s extends ` + "`" + `${infer left extends keyword}|${infer right}` + "`" + ` + ? right extends keyword + ? s + : ` + "`" + `${left}|${keyword}` + "`" + ` + : keyword + +type isUnknown = unknown extends t + ? [t] extends [{}] + ? false + : true + : false + +type validate = def extends string + ? validateString + : isUnknown extends true + ? keyword + : { + [k in keyof def]: validate + } +const parse = (def: validate) => def +const shallowExpression = parse("foo|/*ts*/") +const nestedExpression = parse({ prop: "foo|/*ts2*/" })` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"bar", "baz", "foo", "foo|bar", "foo|baz", "foo|foo"}, + }, + }) + f.VerifyCompletions(t, []string{"ts2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"foo|bar", "foo|baz", "foo|foo"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/stringCompletionsImportOrExportSpecifier_test.go b/internal/fourslash/tests/gen/stringCompletionsImportOrExportSpecifier_test.go new file mode 100644 index 0000000000..4ba0e11c0b --- /dev/null +++ b/internal/fourslash/tests/gen/stringCompletionsImportOrExportSpecifier_test.go @@ -0,0 +1,188 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestStringCompletionsImportOrExportSpecifier(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: exports.ts +export let foo = 1; +let someValue = 2; +let someType = 3; +export { + someValue as "__some value", + someType as "__some type", +}; +// @Filename: values.ts +import { "/*valueImport0*/" } from "./exports"; +import { "/*valueImport1*/" as valueImport1 } from "./exports"; +import { foo as "/*valueImport2*/" } from "./exports"; +import { foo, "/*valueImport3*/" as valueImport3 } from "./exports"; + +export { "/*valueExport0*/" } from "./exports"; +export { "/*valueExport1*/" as valueExport1 } from "./exports"; +export { foo as "/*valueExport2*/" } from "./exports"; +export { foo, "/*valueExport3*/" } from "./exports"; +// @Filename: types.ts +import { type "/*typeImport0*/" } from "./exports"; +import { type "/*typeImport1*/" as typeImport1 } from "./exports"; +import { type foo as "/*typeImport2*/" } from "./exports"; +import { type foo, type "/*typeImport3*/" as typeImport3 } from "./exports"; + +export { type "/*typeExport0*/" } from "./exports"; +export { type "/*typeExport1*/" as typeExport1 } from "./exports"; +export { type foo as "/*typeExport2*/" } from "./exports"; +export { type foo, type "/*typeExport3*/" } from "./exports";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "valueImport0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value", "foo"}, + }, + }) + f.VerifyCompletions(t, "valueImport1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value", "foo"}, + }, + }) + f.VerifyCompletions(t, "valueImport2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) + f.VerifyCompletions(t, "valueImport3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value"}, + }, + }) + f.VerifyCompletions(t, "valueExport0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value", "foo"}, + }, + }) + f.VerifyCompletions(t, "valueExport1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value", "foo"}, + }, + }) + f.VerifyCompletions(t, "valueExport2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) + f.VerifyCompletions(t, "valueExport3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value"}, + }, + }) + f.VerifyCompletions(t, "typeImport0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value", "foo"}, + }, + }) + f.VerifyCompletions(t, "typeImport1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value", "foo"}, + }, + }) + f.VerifyCompletions(t, "typeImport2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) + f.VerifyCompletions(t, "typeImport3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value"}, + }, + }) + f.VerifyCompletions(t, "typeExport0", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value", "foo"}, + }, + }) + f.VerifyCompletions(t, "typeExport1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value", "foo"}, + }, + }) + f.VerifyCompletions(t, "typeExport2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) + f.VerifyCompletions(t, "typeExport3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"__some type", "__some value"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/stringCompletionsVsEscaping_test.go b/internal/fourslash/tests/gen/stringCompletionsVsEscaping_test.go new file mode 100644 index 0000000000..155625a399 --- /dev/null +++ b/internal/fourslash/tests/gen/stringCompletionsVsEscaping_test.go @@ -0,0 +1,101 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestStringCompletionsVsEscaping(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type Value

= ` + "`" + `var(--\\\\, ${P})` + "`" + ` +export const value: Value<'one' | 'two'> = "/*1*/" + +export const test: ` + "`" + `\ntest\n` + "`" + ` = '/*2*/' + +export const doubleQuoted1: ` + "`" + `"double-quoted"` + "`" + ` = '/*3*/' +export const doubleQuoted2: ` + "`" + `"double-quoted"` + "`" + ` = "/*4*/" + +export const singleQuoted2: ` + "`" + `'single-quoted'` + "`" + ` = "/*5*/" +export const singleQuoted2: ` + "`" + `'single-quoted'` + "`" + ` = '/*6*/' + +export const backtickQuoted1: '` + "`" + `backtick-quoted` + "`" + `' = "/*7*/" +export const backtickQuoted2: '` + "`" + `backtick-quoted` + "`" + `' = ` + "`" + `/*8*/` + "`" + `` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"var(--\\\\\\\\, one)", "var(--\\\\\\\\, two)"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"\\ntest\\n"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"\"double-quoted\""}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"\\\"double-quoted\\\""}, + }, + }) + f.VerifyCompletions(t, "5", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"'single-quoted'"}, + }, + }) + f.VerifyCompletions(t, "6", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"\\'single-quoted\\'"}, + }, + }) + f.VerifyCompletions(t, "7", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"`backtick-quoted`"}, + }, + }) + f.VerifyCompletions(t, "8", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"\\`backtick-quoted\\`"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/stringLiteralCompletionsForGenericConditionalTypesUsingTemplateLiteralTypes_test.go b/internal/fourslash/tests/gen/stringLiteralCompletionsForGenericConditionalTypesUsingTemplateLiteralTypes_test.go new file mode 100644 index 0000000000..928a41ccda --- /dev/null +++ b/internal/fourslash/tests/gen/stringLiteralCompletionsForGenericConditionalTypesUsingTemplateLiteralTypes_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestStringLiteralCompletionsForGenericConditionalTypesUsingTemplateLiteralTypes(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = ` type PathOf = + K extends ` + "`" + `${infer U}.${infer V}` + "`" + ` + ? U extends keyof T ? PathOf : ` + "`" + `${P}${keyof T & (string | number)}` + "`" + ` + : K extends keyof T ? ` + "`" + `${P}${K}` + "`" + ` : ` + "`" + `${P}${keyof T & (string | number)}` + "`" + `; + + declare function consumer(path: PathOf<{a: string, b: {c: string}}, K>) : number; + + consumer('b./*ts*/')` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "b", "b.c"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/stringLiteralCompletionsForOpenEndedTemplateLiteralType_test.go b/internal/fourslash/tests/gen/stringLiteralCompletionsForOpenEndedTemplateLiteralType_test.go new file mode 100644 index 0000000000..419a72611b --- /dev/null +++ b/internal/fourslash/tests/gen/stringLiteralCompletionsForOpenEndedTemplateLiteralType_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestStringLiteralCompletionsForOpenEndedTemplateLiteralType(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function conversionTest(groupName: | "downcast" | "dataDowncast" | "editingDowncast" | ` + "`" + `${string}Downcast` + "`" + ` & {}) {} +conversionTest("/**/");` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"dataDowncast", "downcast", "editingDowncast"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/stringLiteralCompletionsForStringEnumContextualType_test.go b/internal/fourslash/tests/gen/stringLiteralCompletionsForStringEnumContextualType_test.go new file mode 100644 index 0000000000..74e3b93b08 --- /dev/null +++ b/internal/fourslash/tests/gen/stringLiteralCompletionsForStringEnumContextualType_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestStringLiteralCompletionsForStringEnumContextualType(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `const enum E { + A = "A", +} +const e: E = "/**/";` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/stringLiteralCompletionsForTypeIndexedAccess_test.go b/internal/fourslash/tests/gen/stringLiteralCompletionsForTypeIndexedAccess_test.go new file mode 100644 index 0000000000..2bbd64e18e --- /dev/null +++ b/internal/fourslash/tests/gen/stringLiteralCompletionsForTypeIndexedAccess_test.go @@ -0,0 +1,37 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestStringLiteralCompletionsForTypeIndexedAccess(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `type Foo = { a: string; b: number; c: boolean; }; +type A = Foo["/*1*/"]; +type AorB = Foo["a" | "/*2*/"];` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"a", "b", "c"}, + }, + }) + f.VerifyCompletions(t, []string{"2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"b", "c"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/stringLiteralCompletionsInArgUsingInferenceResultFromPreviousArg_test.go b/internal/fourslash/tests/gen/stringLiteralCompletionsInArgUsingInferenceResultFromPreviousArg_test.go new file mode 100644 index 0000000000..c6f35a3472 --- /dev/null +++ b/internal/fourslash/tests/gen/stringLiteralCompletionsInArgUsingInferenceResultFromPreviousArg_test.go @@ -0,0 +1,52 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestStringLiteralCompletionsInArgUsingInferenceResultFromPreviousArg(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @strict: true +// https://github.com/microsoft/TypeScript/issues/55545 +enum myEnum { + valA = "valA", + valB = "valB", +} + +interface myEnumParamMapping { + ["valA"]: "1" | "2"; + ["valB"]: "3" | "4"; +} + +function myFunction( + a: K, + b: myEnumParamMapping[K], +) {} + +myFunction("valA", "/*ts1*/"); +myFunction("valA", ` + "`" + `/*ts2*/` + "`" + `); + +function myFunction2( + a: K, + { b }: { b: myEnumParamMapping[K] }, +) {} + +myFunction2("valA", { b: "/*ts3*/" }); +myFunction2("valA", { b: ` + "`" + `/*ts4*/` + "`" + ` });` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts1", "ts2", "ts3", "ts4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"1", "2"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/stringLiteralCompletionsInJsxAttributeInitializer_test.go b/internal/fourslash/tests/gen/stringLiteralCompletionsInJsxAttributeInitializer_test.go new file mode 100644 index 0000000000..073c44a93d --- /dev/null +++ b/internal/fourslash/tests/gen/stringLiteralCompletionsInJsxAttributeInitializer_test.go @@ -0,0 +1,53 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestStringLiteralCompletionsInJsxAttributeInitializer(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @jsx: preserve +// @filename: /a.tsx +type Props = { a: number } | { b: "somethingelse", c: 0 | 1 }; +declare function Foo(args: Props): any + +const a1 = +const a2 = +const a3 = +const a4 = +const a5 = ` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"somethingelse"}, + }, + }) + f.VerifyCompletions(t, []string{"3", "4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"\"somethingelse\""}, + }, + }) + f.VerifyCompletions(t, []string{"5"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Excludes: []string{"0", "1"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/stringLiteralCompletionsInPositionTypedUsingRest_test.go b/internal/fourslash/tests/gen/stringLiteralCompletionsInPositionTypedUsingRest_test.go new file mode 100644 index 0000000000..2b9cb483e5 --- /dev/null +++ b/internal/fourslash/tests/gen/stringLiteralCompletionsInPositionTypedUsingRest_test.go @@ -0,0 +1,45 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestStringLiteralCompletionsInPositionTypedUsingRest(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `declare function pick(obj: T, ...keys: K[]): Pick; +declare function pick2(obj: T, ...keys: K): Pick; + +const obj = { aaa: 1, bbb: '2', ccc: true }; + +pick(obj, 'aaa', '/*ts1*/'); +pick2(obj, 'aaa', '/*ts2*/'); +class Q { + public select(...args: Keys[]) {} +} +new Q<{ id: string; name: string }>().select("name", "/*ts3*/");` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"ts1", "ts2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"aaa", "bbb", "ccc"}, + }, + }) + f.VerifyCompletions(t, []string{"ts3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"name", "id"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/stringLiteralTypeCompletionsInTypeArgForNonGeneric1_test.go b/internal/fourslash/tests/gen/stringLiteralTypeCompletionsInTypeArgForNonGeneric1_test.go new file mode 100644 index 0000000000..e5f9457cf1 --- /dev/null +++ b/internal/fourslash/tests/gen/stringLiteralTypeCompletionsInTypeArgForNonGeneric1_test.go @@ -0,0 +1,21 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestStringLiteralTypeCompletionsInTypeArgForNonGeneric1(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `interface Foo {} +type Bar = {}; + +let x: Foo<"/*1*/">; +let y: Bar<"/*2*/">;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, f.Markers(), nil) +} diff --git a/internal/fourslash/tests/gen/switchCompletions_test.go b/internal/fourslash/tests/gen/switchCompletions_test.go new file mode 100644 index 0000000000..c7f0b16df1 --- /dev/null +++ b/internal/fourslash/tests/gen/switchCompletions_test.go @@ -0,0 +1,80 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestSwitchCompletions(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = ` enum E { A, B } + declare const e: E; + switch (e) { + case E.A: + return 0; + case E./*1*/ + } + declare const f: 1 | 2 | 3; + switch (f) { + case 1: + return 1; + case /*2*/ + } + declare const f2: 'foo' | 'bar' | 'baz'; + switch (f2) { + case 'bar': + return 1; + case '/*3*/' + } + + // repro from #52874 + declare let x: "foo" | "bar"; + switch (x) { + case ('/*4*/') + }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"B"}, + Excludes: []string{"A"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"2", "3"}, + Excludes: []string{"1"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "baz"}, + Excludes: []string{"bar"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"foo", "bar"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/thisPredicateFunctionCompletions02_test.go b/internal/fourslash/tests/gen/thisPredicateFunctionCompletions02_test.go new file mode 100644 index 0000000000..4c6e2e98bf --- /dev/null +++ b/internal/fourslash/tests/gen/thisPredicateFunctionCompletions02_test.go @@ -0,0 +1,73 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestThisPredicateFunctionCompletions02(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = ` interface Sundries { + broken: boolean; + } + + interface Supplies { + spoiled: boolean; + } + + interface Crate { + contents: T; + isSundries(): this is Crate; + isSupplies(): this is Crate; + isPackedTight(): this is (this & {extraContents: T}); + } + const crate: Crate; + if (crate.isPackedTight()) { + crate./*1*/; + } + if (crate.isSundries()) { + crate.contents./*2*/; + if (crate.isPackedTight()) { + crate./*3*/; + } + } + if (crate.isSupplies()) { + crate.contents./*4*/; + if (crate.isPackedTight()) { + crate./*5*/; + } + }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "3", "5"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"contents", "extraContents", "isPackedTight", "isSundries", "isSupplies"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"broken"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"spoiled"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tripleSlashRefPathCompletionAbsolutePaths_test.go b/internal/fourslash/tests/gen/tripleSlashRefPathCompletionAbsolutePaths_test.go new file mode 100644 index 0000000000..eeb48eff0a --- /dev/null +++ b/internal/fourslash/tests/gen/tripleSlashRefPathCompletionAbsolutePaths_test.go @@ -0,0 +1,54 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTripleSlashRefPathCompletionAbsolutePaths(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: tests/test0.ts +/// /*7*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"0", "1", "2", "3", "4", "5", "6", "7"}, nil) + f.VerifyCompletions(t, []string{"8", "9"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"f.ts"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tripleSlashRefPathCompletionExtensionsAllowJSFalse_test.go b/internal/fourslash/tests/gen/tripleSlashRefPathCompletionExtensionsAllowJSFalse_test.go new file mode 100644 index 0000000000..2674416606 --- /dev/null +++ b/internal/fourslash/tests/gen/tripleSlashRefPathCompletionExtensionsAllowJSFalse_test.go @@ -0,0 +1,43 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTripleSlashRefPathCompletionExtensionsAllowJSFalse(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: test0.ts +/// "}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletion11_test.go b/internal/fourslash/tests/gen/tsxCompletion11_test.go new file mode 100644 index 0000000000..7a85ee5b57 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletion11_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletion11(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@module: commonjs +//@jsx: preserve +//@Filename: exporter.tsx + export class Thing { } +//@Filename: file.tsx + import {Thing} from './exporter'; + var x1 =

; + let opt1 = ; + let opt2 = ; + let opt3 = ; + let opt4 = ;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2", "5"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"propString", "propx", &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "optional?", InsertText: ptrTo("optional"), FilterText: ptrTo("optional")}}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"propString", &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "optional?", InsertText: ptrTo("optional"), FilterText: ptrTo("optional")}}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"propString"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletion13_test.go b/internal/fourslash/tests/gen/tsxCompletion13_test.go new file mode 100644 index 0000000000..53de7a80ce --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletion13_test.go @@ -0,0 +1,72 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletion13(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx +// @jsx: preserve +// @skipLibCheck: true + declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } + } + interface ClickableProps { + children?: string; + className?: string; + } + interface ButtonProps extends ClickableProps { + onClick(event?: React.MouseEvent): void; + } + interface LinkProps extends ClickableProps { + goTo: string; + } + declare function MainButton(buttonProps: ButtonProps): JSX.Element; + declare function MainButton(linkProps: LinkProps): JSX.Element; + declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; + let opt = ; + let opt = ; + let opt = {}} /*3*/ />; + let opt = {}} ignore-prop /*4*/ />; + let opt = ; + let opt = ;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "6"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"goTo", "onClick", &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "children?", InsertText: ptrTo("children"), FilterText: ptrTo("children")}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "className?", InsertText: ptrTo("className"), FilterText: ptrTo("className")}}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"goTo", "onClick", &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "className?", InsertText: ptrTo("className"), FilterText: ptrTo("className")}}, + }, + }) + f.VerifyCompletions(t, []string{"3", "4", "5"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "children?", InsertText: ptrTo("children"), FilterText: ptrTo("children")}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), SortText: ptrTo(string(ls.SortTextOptionalMember)), Label: "className?", InsertText: ptrTo("className"), FilterText: ptrTo("className")}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletion14_test.go b/internal/fourslash/tests/gen/tsxCompletion14_test.go new file mode 100644 index 0000000000..b61680d200 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletion14_test.go @@ -0,0 +1,53 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletion14(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@module: commonjs +//@jsx: preserve + declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } + } +//@Filename: exporter.tsx + export class Thing { props: { ONE: string; TWO: number } } + export module M { + export declare function SFCComp(props: { Three: number; Four: string }): JSX.Element; + } +//@Filename: file.tsx + import * as Exp from './exporter'; + var x1 = ; + var x2 = ; + var x3 = ; + var x4 = ;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "3"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"ONE", "TWO"}, + }, + }) + f.VerifyCompletions(t, []string{"2", "4"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Four", "Three"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletion15_test.go b/internal/fourslash/tests/gen/tsxCompletion15_test.go new file mode 100644 index 0000000000..5fe5a19734 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletion15_test.go @@ -0,0 +1,150 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletion15(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@module: commonjs +//@jsx: preserve + declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } + } +//@Filename: exporter.tsx + export module M { + export declare function SFCComp(props: { Three: number; Four: string }): JSX.Element; + } +//@Filename: file.tsx + import * as Exp from './exporter'; + var x1 = ; + var x2 = ; + var x3 = ; + var x4 = ; + var x6 = ; + var x7 = ; + var x8 = ; + var x9 = ; + var x10 = ; + var x11 = ; + var x12 =
;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp"}, + }, + }) + f.VerifyCompletions(t, "3", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp"}, + }, + }) + f.VerifyCompletions(t, "4", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp>"}, + }, + }) + f.VerifyCompletions(t, "5", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp"}, + }, + }) + f.VerifyCompletions(t, "6", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp"}, + }, + }) + f.VerifyCompletions(t, "7", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp"}, + }, + }) + f.VerifyCompletions(t, "8", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp"}, + }, + }) + f.VerifyCompletions(t, "9", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp"}, + }, + }) + f.VerifyCompletions(t, "10", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp"}, + }, + }) + f.VerifyCompletions(t, "11", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp"}, + }, + }) + f.VerifyCompletions(t, "12", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Exp.M.SFCComp"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletion1_test.go b/internal/fourslash/tests/gen/tsxCompletion1_test.go new file mode 100644 index 0000000000..7df6c10184 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletion1_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletion1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx + declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } + } + var x =
;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"ONE", "TWO"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletion2_test.go b/internal/fourslash/tests/gen/tsxCompletion2_test.go new file mode 100644 index 0000000000..9302b7b8f7 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletion2_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletion2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx + declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } + } + class MyComp { props: { ONE: string; TWO: number } } + var x = ;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"ONE", "TWO"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletion3_test.go b/internal/fourslash/tests/gen/tsxCompletion3_test.go new file mode 100644 index 0000000000..f652ed19c4 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletion3_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletion3(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx + declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { one; two; } + } + } +
;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"two"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletion4_test.go b/internal/fourslash/tests/gen/tsxCompletion4_test.go new file mode 100644 index 0000000000..0ff410b81e --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletion4_test.go @@ -0,0 +1,34 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletion4(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx + declare namespace JSX { + interface Element { } + interface IntrinsicElements { + div: { one; two; } + } + } + let bag = { x: 100, y: 200 }; +
;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"ONE", "TWO"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletion6_test.go b/internal/fourslash/tests/gen/tsxCompletion6_test.go new file mode 100644 index 0000000000..f15f6301b2 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletion6_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletion6(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx + declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } + } + var x =
;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"TWO"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletion7_test.go b/internal/fourslash/tests/gen/tsxCompletion7_test.go new file mode 100644 index 0000000000..006d15bc07 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletion7_test.go @@ -0,0 +1,35 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletion7(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx + declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } + } + let y = { ONE: '' }; + var x =
;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), SortText: ptrTo(string(ls.SortTextLocationPriority)), Label: "TWO"}, &lsproto.CompletionItem{Kind: ptrTo(lsproto.CompletionItemKindField), SortText: ptrTo(string(ls.SortTextMemberDeclaredBySpreadAssignment)), Label: "ONE"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletion8_test.go b/internal/fourslash/tests/gen/tsxCompletion8_test.go new file mode 100644 index 0000000000..2977cc3738 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletion8_test.go @@ -0,0 +1,33 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletion8(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx + declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } + } + var x =
;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, []string{"1", "2"}, &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"ONE", "TWO"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback1_test.go b/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback1_test.go new file mode 100644 index 0000000000..4838f3f2bd --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback1_test.go @@ -0,0 +1,51 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletionInFunctionExpressionOfChildrenCallback1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@module: commonjs +//@jsx: preserve +// @Filename: 1.tsx + declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } + interface ElementChildrenAttribute { children; } + } + interface IUser { + Name: string; + } + interface IFetchUserProps { + children: (user: IUser) => any; + } + function FetchUser(props: IFetchUserProps) { return undefined; } + function UserName() { + return ( + + { user => ( +

{ user./**/ }

+ )} +
+ ); + }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"Name"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback_test.go b/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback_test.go new file mode 100644 index 0000000000..18481affdb --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletionInFunctionExpressionOfChildrenCallback_test.go @@ -0,0 +1,41 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletionInFunctionExpressionOfChildrenCallback(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@module: commonjs +//@jsx: preserve +// @Filename: 1.tsx + declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } + } + interface IUser { + Name: string; + } + interface IFetchUserProps { + children: (user: IUser) => any; + } + function FetchUser(props: IFetchUserProps) { return undefined; } + function UserName() { + return ( + + { user => ( +

{ user./**/ }

+ )} +
+ ); + }` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/tsxCompletionNonTagLessThan_test.go b/internal/fourslash/tests/gen/tsxCompletionNonTagLessThan_test.go new file mode 100644 index 0000000000..3d6ac5d59c --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletionNonTagLessThan_test.go @@ -0,0 +1,40 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletionNonTagLessThan(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @Filename: /a.tsx +var x: Array"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletionOnClosingTag2_test.go b/internal/fourslash/tests/gen/tsxCompletionOnClosingTag2_test.go new file mode 100644 index 0000000000..3a9fe7f299 --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletionOnClosingTag2_test.go @@ -0,0 +1,44 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletionOnClosingTag2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx + declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } + } + var x1 =
+

Hello world + ` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"div"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"h1"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX1_test.go b/internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX1_test.go new file mode 100644 index 0000000000..62d4114bba --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX1_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletionOnClosingTagWithoutJSX1(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx + var x1 =
"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX2_test.go b/internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX2_test.go new file mode 100644 index 0000000000..bd3ee3eeea --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletionOnClosingTagWithoutJSX2_test.go @@ -0,0 +1,38 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletionOnClosingTagWithoutJSX2(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `//@Filename: file.tsx + var x1 =
+

Hello world + ` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"div"}, + }, + }) + f.VerifyCompletions(t, "2", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"h1"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/tsxCompletionsGenericComponent_test.go b/internal/fourslash/tests/gen/tsxCompletionsGenericComponent_test.go new file mode 100644 index 0000000000..e8af17d53f --- /dev/null +++ b/internal/fourslash/tests/gen/tsxCompletionsGenericComponent_test.go @@ -0,0 +1,49 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTsxCompletionsGenericComponent(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `// @jsx: preserve +// @skipLibCheck: true +// @Filename: file.tsx + declare module JSX { + interface Element { } + interface IntrinsicElements { + } + interface ElementAttributesProperty { props; } + } + +class Table

{ + constructor(public props: P) {} +} + +type Props = { widthInCol: number; text: string; }; + +/** + * @param width {number} Table width in px + */ +function createTable(width) { + return /*1*/ /> +} + +createTable(800);` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"widthInCol", "text"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/typeArgCompletion_test.go b/internal/fourslash/tests/gen/typeArgCompletion_test.go new file mode 100644 index 0000000000..37be7ff48c --- /dev/null +++ b/internal/fourslash/tests/gen/typeArgCompletion_test.go @@ -0,0 +1,32 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTypeArgCompletion(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Base { +} +class Derived extends Base { +} +interface I1{ +} +var x1: I1;` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"Derived"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/typeKeywordInFunction_test.go b/internal/fourslash/tests/gen/typeKeywordInFunction_test.go new file mode 100644 index 0000000000..4ac39905f4 --- /dev/null +++ b/internal/fourslash/tests/gen/typeKeywordInFunction_test.go @@ -0,0 +1,29 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTypeKeywordInFunction(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `function a() { + ty/**/ +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "type"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/typeOfKeywordCompletion_test.go b/internal/fourslash/tests/gen/typeOfKeywordCompletion_test.go new file mode 100644 index 0000000000..ba736f20f0 --- /dev/null +++ b/internal/fourslash/tests/gen/typeOfKeywordCompletion_test.go @@ -0,0 +1,27 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTypeOfKeywordCompletion(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `export type A = typ/**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{&lsproto.CompletionItem{SortText: ptrTo(string(ls.SortTextGlobalsOrKeywords)), Label: "typeof"}}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/typeReferenceOnServer_test.go b/internal/fourslash/tests/gen/typeReferenceOnServer_test.go new file mode 100644 index 0000000000..9dcda5d03d --- /dev/null +++ b/internal/fourslash/tests/gen/typeReferenceOnServer_test.go @@ -0,0 +1,28 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestTypeReferenceOnServer(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `/// +var x: number; +x./*1*/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "1", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Includes: []fourslash.ExpectedCompletionItem{"toFixed"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/unclosedCommentsInConstructor_test.go b/internal/fourslash/tests/gen/unclosedCommentsInConstructor_test.go new file mode 100644 index 0000000000..580b253e90 --- /dev/null +++ b/internal/fourslash/tests/gen/unclosedCommentsInConstructor_test.go @@ -0,0 +1,19 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestUnclosedCommentsInConstructor(t *testing.T) { + t.Parallel() + t.Skip() + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `class Foo { + constructor(/* /**/) { } +}` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", nil) +} diff --git a/internal/fourslash/tests/gen/unclosedStringLiteralErrorRecovery_test.go b/internal/fourslash/tests/gen/unclosedStringLiteralErrorRecovery_test.go new file mode 100644 index 0000000000..6da7f40513 --- /dev/null +++ b/internal/fourslash/tests/gen/unclosedStringLiteralErrorRecovery_test.go @@ -0,0 +1,30 @@ +package fourslash_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil" +) + +func TestUnclosedStringLiteralErrorRecovery(t *testing.T) { + t.Parallel() + + defer testutil.RecoverAndFail(t, "Panic on fourslash test") + const content = `"an unclosed string is a terrible thing! + +class foo { public x() { } } +var f = new foo(); +f./**/` + f := fourslash.NewFourslash(t, nil /*capabilities*/, content) + f.VerifyCompletions(t, "", &fourslash.VerifyCompletionsExpectedList{ + IsIncomplete: false, + ItemDefaults: &lsproto.CompletionItemDefaults{ + CommitCharacters: &defaultCommitCharacters, + }, + Items: &fourslash.VerifyCompletionsExpectedItems{ + Exact: []fourslash.ExpectedCompletionItem{"x"}, + }, + }) +} diff --git a/internal/fourslash/tests/gen/util_test.go b/internal/fourslash/tests/gen/util_test.go new file mode 100644 index 0000000000..ef381f26d4 --- /dev/null +++ b/internal/fourslash/tests/gen/util_test.go @@ -0,0 +1,7 @@ +package fourslash_test + +func ptrTo[T any](v T) *T { + return &v +} + +var defaultCommitCharacters = []string{".", ",", ";"} diff --git a/internal/fourslash/tests/util_test.go b/internal/fourslash/tests/util_test.go new file mode 100644 index 0000000000..ef381f26d4 --- /dev/null +++ b/internal/fourslash/tests/util_test.go @@ -0,0 +1,7 @@ +package fourslash_test + +func ptrTo[T any](v T) *T { + return &v +} + +var defaultCommitCharacters = []string{".", ",", ";"} diff --git a/internal/ls/completions.go b/internal/ls/completions.go index 6b87fe4a7e..fcbba072b4 100644 --- a/internal/ls/completions.go +++ b/internal/ls/completions.go @@ -18,6 +18,7 @@ import ( "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/jsnum" "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/lsutil" "github.com/microsoft/typescript-go/internal/scanner" "github.com/microsoft/typescript-go/internal/stringutil" ) @@ -31,12 +32,16 @@ func (l *LanguageService) ProvideCompletion( preferences *UserPreferences, ) (*lsproto.CompletionList, error) { program, file := l.getProgramAndFile(documentURI) + var triggerCharacter *string + if context != nil { + triggerCharacter = context.TriggerCharacter + } return l.getCompletionsAtPosition( ctx, program, file, int(l.converters.LineAndCharacterToPosition(file, position)), - context, + triggerCharacter, preferences, clientOptions, ), nil @@ -272,16 +277,16 @@ func (l *LanguageService) getCompletionsAtPosition( program *compiler.Program, file *ast.SourceFile, position int, - context *lsproto.CompletionContext, + triggerCharacter *string, preferences *UserPreferences, clientOptions *lsproto.CompletionClientCapabilities, ) *lsproto.CompletionList { _, previousToken := getRelevantTokens(position, file) - if context.TriggerCharacter != nil && !IsInString(file, position, previousToken) && !isValidTrigger(file, *context.TriggerCharacter, previousToken, position) { + if triggerCharacter != nil && !IsInString(file, position, previousToken) && !isValidTrigger(file, *triggerCharacter, previousToken, position) { return nil } - if context.TriggerCharacter != nil && *context.TriggerCharacter == " " { + if triggerCharacter != nil && *triggerCharacter == " " { // `isValidTrigger` ensures we are at `import |` if ptrIsTrue(preferences.IncludeCompletionsForImportStatements) { return &lsproto.CompletionList{ @@ -291,7 +296,7 @@ func (l *LanguageService) getCompletionsAtPosition( return nil } - compilerOptions := program.GetCompilerOptions() + compilerOptions := program.Options() // !!! see if incomplete completion list and continue or clean @@ -346,7 +351,7 @@ func (l *LanguageService) getCompletionsAtPosition( } func getCompletionData(program *compiler.Program, typeChecker *checker.Checker, file *ast.SourceFile, position int, preferences *UserPreferences) completionData { - inCheckedFile := isCheckedFile(file, program.GetCompilerOptions()) + inCheckedFile := isCheckedFile(file, program.Options()) currentToken := astnav.GetTokenAtPosition(file, position) @@ -385,6 +390,15 @@ func getCompletionData(program *compiler.Program, typeChecker *checker.Checker, if contextToken != nil { // !!! import completions + // Bail out if this is a known invalid completion location. + // !!! if (!importStatementCompletionInfo.replacementSpan && ...) + if isCompletionListBlocker(contextToken, previousToken, location, file, position, typeChecker) { + if keywordFilters != KeywordCompletionFiltersNone { + isNewIdentifierLocation, _ := computeCommitCharactersAndIsNewIdentifier(contextToken, file, position) + return keywordCompletionData(keywordFilters, isJSOnlyLocation, isNewIdentifierLocation) + } + return nil + } parent := contextToken.Parent if contextToken.Kind == ast.KindDotToken || contextToken.Kind == ast.KindQuestionDotToken { @@ -398,7 +412,7 @@ func getCompletionData(program *compiler.Program, typeChecker *checker.Checker, if ast.NodeIsMissing(leftMostAccessExpression) || ((ast.IsCallExpression(node) || ast.IsFunctionLike(node)) && node.End() == contextToken.Pos() && - getLastChild(node, file).Kind != ast.KindCloseParenToken) { + lsutil.GetLastChild(node, file).Kind != ast.KindCloseParenToken) { // This is likely dot from incorrectly parsed expression and user is starting to write spread // eg: Math.min(./**/) // const x = function (./**/) {} @@ -412,7 +426,7 @@ func getCompletionData(program *compiler.Program, typeChecker *checker.Checker, case ast.KindImportType: node = parent case ast.KindMetaProperty: - node = getFirstToken(parent, file) + node = lsutil.GetFirstToken(parent, file) if node.Kind != ast.KindImportKeyword && node.Kind != ast.KindNewKeyword { panic("Unexpected token kind: " + node.Kind.String()) } @@ -1814,7 +1828,7 @@ func (l *LanguageService) createCompletionItem( } precedingToken := astnav.FindPrecedingToken(file, data.propertyAccessToConvert.Pos()) var awaitText string - if precedingToken != nil && positionIsASICandidate(precedingToken.End(), precedingToken.Parent, file) { + if precedingToken != nil && lsutil.PositionIsASICandidate(precedingToken.End(), precedingToken.Parent, file) { awaitText = ";" } @@ -1868,7 +1882,7 @@ func (l *LanguageService) createCompletionItem( ast.IsGetAccessorDeclaration(contextToken.Parent.Parent) || ast.IsSetAccessorDeclaration(contextToken.Parent.Parent) || ast.IsSpreadAssignment(contextToken.Parent) || - getLastToken(ast.FindAncestor(contextToken.Parent, ast.IsPropertyAssignment), file) == contextToken || + lsutil.GetLastToken(ast.FindAncestor(contextToken.Parent, ast.IsPropertyAssignment), file) == contextToken || ast.IsShorthandPropertyAssignment(contextToken.Parent) && getLineOfPosition(file, contextToken.End()) != getLineOfPosition(file, position) { source = string(completionSourceObjectLiteralMemberWithComma) @@ -1886,7 +1900,7 @@ func (l *LanguageService) createCompletionItem( insertText = origin.asObjectLiteralMethod().insertText isSnippet = origin.asObjectLiteralMethod().isSnippet labelDetails = origin.asObjectLiteralMethod().labelDetails // !!! check if this can conflict with case above where we set label details - if !ptrIsTrue(clientOptions.CompletionItem.LabelDetailsSupport) { + if !clientSupportsItemLabelDetails(clientOptions) { name = name + *origin.asObjectLiteralMethod().labelDetails.Detail labelDetails = nil } @@ -1896,7 +1910,7 @@ func (l *LanguageService) createCompletionItem( if data.isJsxIdentifierExpected && !data.isRightOfOpenTag && - ptrIsTrue(clientOptions.CompletionItem.SnippetSupport) && + clientSupportsItemSnippet(clientOptions) && !jsxAttributeCompletionStyleIs(preferences.JsxAttributeCompletionStyle, JsxAttributeCompletionStyleNone) && !(ast.IsJsxAttribute(data.location.Parent) && data.location.Parent.Initializer() != nil) { useBraces := jsxAttributeCompletionStyleIs(preferences.JsxAttributeCompletionStyle, JsxAttributeCompletionStyleBraces) @@ -1964,10 +1978,10 @@ func (l *LanguageService) createCompletionItem( elementKind := getSymbolKind(typeChecker, symbol, data.location) var commitCharacters *[]string - if ptrIsTrue(clientOptions.CompletionItem.CommitCharactersSupport) { + if clientSupportsItemCommitCharacters(clientOptions) { if elementKind == ScriptElementKindWarning || elementKind == ScriptElementKindString { commitCharacters = &[]string{} - } else if !supportsDefaultCommitCharacters(clientOptions) { + } else if !clientSupportsDefaultCommitCharacters(clientOptions) { commitCharacters = ptrTo(data.defaultCommitCharacters) } // Otherwise use the completion list default. @@ -1998,11 +2012,6 @@ func (l *LanguageService) createCompletionItem( ) } -func supportsDefaultCommitCharacters(clientOptions *lsproto.CompletionClientCapabilities) bool { - return clientOptions.CompletionList.ItemDefaults != nil && - slices.Contains(*clientOptions.CompletionList.ItemDefaults, "commitCharacters") -} - func isRecommendedCompletionMatch(localSymbol *ast.Symbol, recommendedCompletion *ast.Symbol, typeChecker *checker.Checker) bool { return localSymbol == recommendedCompletion || localSymbol.Flags&ast.SymbolFlagsExportValue != 0 && typeChecker.GetExportSymbolOfSymbol(localSymbol) == recommendedCompletion @@ -3424,7 +3433,7 @@ func tryGetObjectLikeCompletionContainer(contextToken *ast.Node, position int, f return parent.Parent } ancestorNode := ast.FindAncestor(parent, ast.IsPropertyAssignment) - if ancestorNode != nil && getLastToken(ancestorNode, file) == contextToken && ast.IsObjectLiteralExpression(ancestorNode.Parent) { + if ancestorNode != nil && lsutil.GetLastToken(ancestorNode, file) == contextToken && ast.IsObjectLiteralExpression(ancestorNode.Parent) { return ancestorNode.Parent } } @@ -3441,7 +3450,7 @@ func tryGetObjectLikeCompletionContainer(contextToken *ast.Node, position int, f } ancestorNode := ast.FindAncestor(parent, ast.IsPropertyAssignment) if contextToken.Kind != ast.KindColonToken && - ancestorNode != nil && getLastToken(ancestorNode, file) == contextToken && + ancestorNode != nil && lsutil.GetLastToken(ancestorNode, file) == contextToken && ast.IsObjectLiteralExpression(ancestorNode.Parent) { return ancestorNode.Parent } @@ -3889,8 +3898,8 @@ func setCommitCharacters( defaultCommitCharacters *[]string, ) *lsproto.CompletionItemDefaults { var itemDefaults *lsproto.CompletionItemDefaults - supportsItemCommitCharacters := ptrIsTrue(clientOptions.CompletionItem.CommitCharactersSupport) - if supportsDefaultCommitCharacters(clientOptions) && supportsItemCommitCharacters { + supportsItemCommitCharacters := clientSupportsItemCommitCharacters(clientOptions) + if clientSupportsDefaultCommitCharacters(clientOptions) && supportsItemCommitCharacters { itemDefaults = &lsproto.CompletionItemDefaults{ CommitCharacters: defaultCommitCharacters, } @@ -4027,7 +4036,7 @@ func (l *LanguageService) createLSPCompletionItem( } } else { // Ported from vscode ts extension. - if optionalReplacementSpan != nil && ptrIsTrue(clientOptions.CompletionItem.InsertReplaceSupport) { + if optionalReplacementSpan != nil && clientSupportsItemInsertReplace(clientOptions) { insertRange := &lsproto.Range{ Start: optionalReplacementSpan.Start, End: l.createLspPosition(position, file), @@ -4056,7 +4065,7 @@ func (l *LanguageService) createLSPCompletionItem( filterText = accessorText + core.IfElse(insertText != "", insertText, name) if textEdit == nil { insertText = filterText - if wordRange != nil && ptrIsTrue(clientOptions.CompletionItem.InsertReplaceSupport) { + if wordRange != nil && clientSupportsItemInsertReplace(clientOptions) { textEdit = &lsproto.TextEditOrInsertReplaceEdit{ InsertReplaceEdit: &lsproto.InsertReplaceEdit{ NewText: insertText, @@ -4200,3 +4209,255 @@ func (l *LanguageService) getLabelStatementCompletions( } return items } + +func isCompletionListBlocker( + contextToken *ast.Node, + previousToken *ast.Node, + location *ast.Node, + file *ast.SourceFile, + position int, + typeChecker *checker.Checker, +) bool { + return isInStringOrRegularExpressionOrTemplateLiteral(contextToken, position) || + isSolelyIdentifierDefinitionLocation(contextToken, previousToken, file, position, typeChecker) || + isDotOfNumericLiteral(contextToken, file) || + isInJsxText(contextToken, location) || + ast.IsBigIntLiteral(contextToken) +} + +func isInStringOrRegularExpressionOrTemplateLiteral(contextToken *ast.Node, position int) bool { + // To be "in" one of these literals, the position has to be: + // 1. entirely within the token text. + // 2. at the end position of an unterminated token. + // 3. at the end of a regular expression (due to trailing flags like '/foo/g'). + return (ast.IsRegularExpressionLiteral(contextToken) || ast.IsStringTextContainingNode(contextToken)) && + (contextToken.Loc.ContainsExclusive(position)) || + position == contextToken.End() && + (ast.IsUnterminatedNode(contextToken) || ast.IsRegularExpressionLiteral(contextToken)) +} + +// true if we are certain that the currently edited location must define a new location; false otherwise. +func isSolelyIdentifierDefinitionLocation( + contextToken *ast.Node, + previousToken *ast.Node, + file *ast.SourceFile, + position int, + typeChecker *checker.Checker, +) bool { + parent := contextToken.Parent + containingNodeKind := parent.Kind + switch contextToken.Kind { + case ast.KindCommaToken: + return containingNodeKind == ast.KindVariableDeclaration || + isVariableDeclarationListButNotTypeArgument(contextToken, file, typeChecker) || + containingNodeKind == ast.KindVariableStatement || + containingNodeKind == ast.KindEnumDeclaration || // enum a { foo, | + isFunctionLikeButNotConstructor(containingNodeKind) || + containingNodeKind == ast.KindInterfaceDeclaration || // interface A= contextToken.Pos()) + case ast.KindDotToken: + return containingNodeKind == ast.KindArrayBindingPattern // var [.| + case ast.KindColonToken: + return containingNodeKind == ast.KindBindingElement // var {x :html| + case ast.KindOpenBracketToken: + return containingNodeKind == ast.KindArrayBindingPattern // var [x| + case ast.KindOpenParenToken: + return containingNodeKind == ast.KindCatchClause || isFunctionLikeButNotConstructor(containingNodeKind) + case ast.KindOpenBraceToken: + return containingNodeKind == ast.KindEnumDeclaration // enum a { | + case ast.KindLessThanToken: + return containingNodeKind == ast.KindClassDeclaration || // class A< | + containingNodeKind == ast.KindClassExpression || // var C = class D< | + containingNodeKind == ast.KindInterfaceDeclaration || // interface A< | + containingNodeKind == ast.KindTypeAliasDeclaration || // type List< | + ast.IsFunctionLikeKind(containingNodeKind) + case ast.KindStaticKeyword: + return containingNodeKind == ast.KindPropertyDeclaration && + !ast.IsClassLike(parent.Parent) + case ast.KindDotDotDotToken: + return containingNodeKind == ast.KindParameter || + (parent.Parent != nil && parent.Parent.Kind == ast.KindArrayBindingPattern) // var [...z| + case ast.KindPublicKeyword, ast.KindPrivateKeyword, ast.KindProtectedKeyword: + return containingNodeKind == ast.KindParameter && !ast.IsConstructorDeclaration(parent.Parent) + case ast.KindAsKeyword: + return containingNodeKind == ast.KindImportSpecifier || + containingNodeKind == ast.KindExportSpecifier || + containingNodeKind == ast.KindNamespaceImport + case ast.KindGetKeyword, ast.KindSetKeyword: + return !isFromObjectTypeDeclaration(contextToken) + case ast.KindIdentifier: + if (containingNodeKind == ast.KindImportSpecifier || containingNodeKind == ast.KindExportSpecifier) && + contextToken == parent.Name() && + contextToken.Text() == "type" { + // import { type | } + return false + } + ancestorVariableDeclaration := ast.FindAncestor(parent, ast.IsVariableDeclaration) + if ancestorVariableDeclaration != nil && getLineOfPosition(file, contextToken.End()) < position { + // let a + // | + return false + } + case ast.KindClassKeyword, ast.KindEnumKeyword, ast.KindInterfaceKeyword, ast.KindFunctionKeyword, + ast.KindVarKeyword, ast.KindImportKeyword, ast.KindLetKeyword, ast.KindConstKeyword, ast.KindInferKeyword: + return true + case ast.KindTypeKeyword: + // import { type foo| } + return containingNodeKind != ast.KindImportSpecifier + case ast.KindAsteriskToken: + return ast.IsFunctionLike(parent) && !ast.IsMethodDeclaration(parent) + } + + // If the previous token is keyword corresponding to class member completion keyword + // there will be completion available here + if isClassMemberCompletionKeyword(keywordForNode(contextToken)) && isFromObjectTypeDeclaration(contextToken) { + return false + } + + if isConstructorParameterCompletion(contextToken) { + // constructor parameter completion is available only if + // - its modifier of the constructor parameter or + // - its name of the parameter and not being edited + // eg. constructor(a |<- this shouldnt show completion + if !ast.IsIdentifier(contextToken) || + ast.IsParameterPropertyModifier(keywordForNode(contextToken)) || + isCurrentlyEditingNode(contextToken, file, position) { + return false + } + } + + // Previous token may have been a keyword that was converted to an identifier. + switch keywordForNode(contextToken) { + case ast.KindAbstractKeyword, ast.KindClassKeyword, ast.KindConstKeyword, ast.KindDeclareKeyword, + ast.KindEnumKeyword, ast.KindFunctionKeyword, ast.KindInterfaceKeyword, ast.KindLetKeyword, + ast.KindPrivateKeyword, ast.KindProtectedKeyword, ast.KindPublicKeyword, + ast.KindStaticKeyword, ast.KindVarKeyword: + return true + case ast.KindAsyncKeyword: + return ast.IsPropertyDeclaration(contextToken.Parent) + } + + // If we are inside a class declaration, and `constructor` is totally not present, + // but we request a completion manually at a whitespace... + ancestorClassLike := ast.FindAncestor(parent, ast.IsClassLike) + if ancestorClassLike != nil && contextToken == previousToken && + isPreviousPropertyDeclarationTerminated(contextToken, file, position) { + // Don't block completions. + return false + } + + ancestorPropertyDeclaration := ast.FindAncestor(parent, ast.IsPropertyDeclaration) + // If we are inside a class declaration and typing `constructor` after property declaration... + if ancestorPropertyDeclaration != nil && contextToken != previousToken && + ast.IsClassLike(previousToken.Parent.Parent) && + // And the cursor is at the token... + position <= previousToken.End() { + // If we are sure that the previous property declaration is terminated according to newline or semicolon... + if isPreviousPropertyDeclarationTerminated(contextToken, file, previousToken.End()) { + // Don't block completions. + return false + } else if contextToken.Kind != ast.KindEqualsToken && + // Should not block: `class C { blah = c/**/ }` + // But should block: `class C { blah = somewhat c/**/ }` and `class C { blah: SomeType c/**/ }` + (ast.IsInitializedProperty(ancestorPropertyDeclaration) || ancestorPropertyDeclaration.Type() != nil) { + return true + } + } + + return ast.IsDeclarationName(contextToken) && + !ast.IsShorthandPropertyAssignment(parent) && + !ast.IsJsxAttribute(parent) && + // Don't block completions if we're in `class C /**/`, `interface I /**/` or `` , + // because we're *past* the end of the identifier and might want to complete `extends`. + // If `contextToken !== previousToken`, this is `class C ex/**/`, `interface I ex/**/` or ``. + !((ast.IsClassLike(parent) || ast.IsInterfaceDeclaration(parent) || ast.IsTypeParameterDeclaration(parent)) && + (contextToken != previousToken || position > previousToken.End())) +} + +func isVariableDeclarationListButNotTypeArgument(node *ast.Node, file *ast.SourceFile, typeChecker *checker.Checker) bool { + return node.Parent.Kind == ast.KindVariableDeclarationList && + !isPossiblyTypeArgumentPosition(node, file, typeChecker) +} + +func isFunctionLikeButNotConstructor(kind ast.Kind) bool { + return ast.IsFunctionLikeKind(kind) && kind != ast.KindConstructor +} + +func isPreviousPropertyDeclarationTerminated(contextToken *ast.Node, file *ast.SourceFile, position int) bool { + return contextToken.Kind != ast.KindEqualsToken && + (contextToken.Kind == ast.KindSemicolonToken || + getLineOfPosition(file, contextToken.End()) != getLineOfPosition(file, position)) +} + +func isDotOfNumericLiteral(contextToken *ast.Node, file *ast.SourceFile) bool { + if contextToken.Kind == ast.KindNumericLiteral { + text := file.Text()[contextToken.Pos():contextToken.End()] + r, _ := utf8.DecodeLastRuneInString(text) + return r == '.' + } + + return false +} + +func isInJsxText(contextToken *ast.Node, location *ast.Node) bool { + if contextToken.Kind == ast.KindJsxText { + return true + } + + if contextToken.Kind == ast.KindGreaterThanToken && contextToken.Parent != nil { + // /**/ /> + // /**/ > + // - contextToken: GreaterThanToken (before cursor) + // - location: JsxSelfClosingElement or JsxOpeningElement + // - contextToken.parent === location + if location == contextToken.Parent && ast.IsJsxOpeningLikeElement(location) { + return false + } + + if contextToken.Parent.Kind == ast.KindJsxOpeningElement { + //

/**/ + // - contextToken: GreaterThanToken (before cursor) + // - location: JSXElement + // - different parents (JSXOpeningElement, JSXElement) + return location.Parent.Kind != ast.KindJsxOpeningElement + } + + if contextToken.Parent.Kind == ast.KindJsxClosingElement || + contextToken.Parent.Kind == ast.KindJsxSelfClosingElement { + return contextToken.Parent.Parent != nil && contextToken.Parent.Parent.Kind == ast.KindJsxElement + } + } + + return false +} + +func hasCompletionItem(clientOptions *lsproto.CompletionClientCapabilities) bool { + return clientOptions != nil && clientOptions.CompletionItem != nil +} + +func clientSupportsItemLabelDetails(clientOptions *lsproto.CompletionClientCapabilities) bool { + return hasCompletionItem(clientOptions) && ptrIsTrue(clientOptions.CompletionItem.LabelDetailsSupport) +} + +func clientSupportsItemSnippet(clientOptions *lsproto.CompletionClientCapabilities) bool { + return hasCompletionItem(clientOptions) && ptrIsTrue(clientOptions.CompletionItem.SnippetSupport) +} + +func clientSupportsItemCommitCharacters(clientOptions *lsproto.CompletionClientCapabilities) bool { + return hasCompletionItem(clientOptions) && ptrIsTrue(clientOptions.CompletionItem.CommitCharactersSupport) +} + +func clientSupportsItemInsertReplace(clientOptions *lsproto.CompletionClientCapabilities) bool { + return hasCompletionItem(clientOptions) && ptrIsTrue(clientOptions.CompletionItem.InsertReplaceSupport) +} + +func clientSupportsDefaultCommitCharacters(clientOptions *lsproto.CompletionClientCapabilities) bool { + if clientOptions == nil || clientOptions.CompletionList == nil || clientOptions.CompletionList.ItemDefaults == nil { + return false + } + return slices.Contains(*clientOptions.CompletionList.ItemDefaults, "commitCharacters") +} diff --git a/internal/ls/completions_test.go b/internal/ls/completions_test.go index 7fb8821a02..028153adcc 100644 --- a/internal/ls/completions_test.go +++ b/internal/ls/completions_test.go @@ -8,9 +8,9 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "github.com/microsoft/typescript-go/internal/bundled" "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/fourslash" "github.com/microsoft/typescript-go/internal/ls" "github.com/microsoft/typescript-go/internal/lsp/lsproto" - "github.com/microsoft/typescript-go/internal/testutil/lstestutil" "github.com/microsoft/typescript-go/internal/testutil/projecttestutil" "gotest.tools/v3/assert" ) @@ -1387,12 +1387,12 @@ export function isAnyDirectorySeparator(charCode: number): boolean { InsertReplaceEdit: &lsproto.InsertReplaceEdit{ NewText: "CharacterCodes", Insert: lsproto.Range{ - Start: lsproto.Position{Line: 27, Character: 0}, - End: lsproto.Position{Line: 27, Character: 1}, + Start: lsproto.Position{Line: 33, Character: 0}, + End: lsproto.Position{Line: 33, Character: 1}, }, Replace: lsproto.Range{ - Start: lsproto.Position{Line: 27, Character: 0}, - End: lsproto.Position{Line: 27, Character: 1}, + Start: lsproto.Position{Line: 33, Character: 0}, + End: lsproto.Position{Line: 33, Character: 1}, }, }, }, @@ -1940,6 +1940,148 @@ files = { }, }, }, + { + name: "completionListAtInvalidLocation", + files: map[string]string{ + defaultMainFileName: `var v1 = ''; +" /*openString1*/ +var v2 = ''; +"/*openString2*/ +var v3 = ''; +" bar./*openString3*/ +var v4 = ''; +// bar./*inComment1*/ +var v6 = ''; +// /*inComment2*/ +var v7 = ''; +/* /*inComment3*/ +var v11 = ''; + // /*inComment4*/ +var v12 = ''; +type htm/*inTypeAlias*/ + +// /*inComment5*/ +foo; +var v10 = /reg/*inRegExp1*/ex/;`, + }, + expectedResult: map[string]*testCaseResult{ + "openString1": { + list: nil, + }, + "openString2": { + list: nil, + }, + "openString3": { + list: nil, + }, + // !!! isInComment + // "inComment1": { + // list: nil, + // }, + // "inComment2": { + // list: nil, + // }, + // "inComment3": { + // list: nil, + // }, + // "inComment4": { + // list: nil, + // }, + // "inComment5": { + // list: nil, + // }, + // "inTypeAlias": { + // list: nil, + // }, + // "inRegExp1": { + // list: nil, + // }, + }, + }, + { + name: "completionListAtIdentifierDefinitionLocations_destructuring_a", + files: map[string]string{ + defaultMainFileName: `var [x/*variable1*/`, + }, + expectedResult: map[string]*testCaseResult{ + "variable1": { + list: nil, + }, + }, + }, + { + name: "completionListAtIdentifierDefinitionLocations_destructuring_f", + files: map[string]string{ + defaultMainFileName: `var {x, y/*variable6*/`, + }, + expectedResult: map[string]*testCaseResult{ + "variable6": { + list: nil, + }, + }, + }, + { + name: "completionListAfterNumericLiteral_f1", + files: map[string]string{ + defaultMainFileName: `0./*dotOnNumberExpressions1*/`, + }, + expectedResult: map[string]*testCaseResult{ + "dotOnNumberExpressions1": { + list: nil, + }, + }, + }, + { + name: "tsxCompletion9", + files: map[string]string{ + "/file.tsx": `declare module JSX { + interface Element { } + interface IntrinsicElements { + div: { ONE: string; TWO: number; } + } +} +var x1 =
/*1*/ hello /*2*/ world /*3*/
; +var x2 =
/*4*/
/*5*/ world /*6*/
; +var x3 =
/*7*/
/*8*/world/*9*/
; +var x4 =
/*10*/
; +
+/*end*/ +`, + }, + mainFileName: "/file.tsx", + expectedResult: map[string]*testCaseResult{ + "1": { + list: nil, + }, + "2": { + list: nil, + }, + "3": { + list: nil, + }, + "4": { + list: nil, + }, + "5": { + list: nil, + }, + "6": { + list: nil, + }, + "7": { + list: nil, + }, + "8": { + list: nil, + }, + "9": { + list: nil, + }, + "10": { + list: nil, + }, + }, + }, } for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { @@ -1955,10 +2097,10 @@ func runTest(t *testing.T, files map[string]string, expected map[string]*testCas } parsedFiles := make(map[string]any) parsedFiles[defaultTsconfigFileName] = `{}` - var markerPositions map[string]*lstestutil.Marker + var markerPositions map[string]*fourslash.Marker for fileName, content := range files { if fileName == mainFileName { - testData := lstestutil.ParseTestData("", content, fileName) + testData := fourslash.ParseTestData(t, content, fileName) markerPositions = testData.MarkerPositions parsedFiles[fileName] = testData.Files[0].Content // !!! Assumes no usage of @filename, markers only on main file } else { diff --git a/internal/ls/converters.go b/internal/ls/converters.go index 7ad81d9b78..41a3411b3b 100644 --- a/internal/ls/converters.go +++ b/internal/ls/converters.go @@ -44,8 +44,8 @@ func (c *Converters) FromLSPRange(script Script, textRange lsproto.Range) core.T ) } -func (c *Converters) FromLSPTextChange(script Script, change *lsproto.TextDocumentContentChangePartial) TextChange { - return TextChange{ +func (c *Converters) FromLSPTextChange(script Script, change *lsproto.TextDocumentContentChangePartial) core.TextChange { + return core.TextChange{ TextRange: c.FromLSPRange(script, change.Range), NewText: change.Text, } diff --git a/internal/ls/diagnostics.go b/internal/ls/diagnostics.go index 3635d8f043..f24b954629 100644 --- a/internal/ls/diagnostics.go +++ b/internal/ls/diagnostics.go @@ -10,37 +10,44 @@ import ( func (l *LanguageService) GetDocumentDiagnostics(ctx context.Context, documentURI lsproto.DocumentUri) (*lsproto.DocumentDiagnosticReport, error) { program, file := l.getProgramAndFile(documentURI) - syntaxDiagnostics := program.GetSyntacticDiagnostics(ctx, file) - var lspDiagnostics []*lsproto.Diagnostic - if len(syntaxDiagnostics) != 0 { - lspDiagnostics = make([]*lsproto.Diagnostic, 0, len(syntaxDiagnostics)) - for _, diag := range syntaxDiagnostics { - lspDiagnostics = append(lspDiagnostics, toLSPDiagnostic(diag, l.converters)) - } - } else { - diagnostics := program.GetSemanticDiagnostics(ctx, file) - suggestionDiagnostics := program.GetSuggestionDiagnostics(ctx, file) - lspDiagnostics = make([]*lsproto.Diagnostic, 0, len(diagnostics)+len(suggestionDiagnostics)) - for _, diag := range diagnostics { - lspDiagnostics = append(lspDiagnostics, toLSPDiagnostic(diag, l.converters)) - } - for _, diag := range suggestionDiagnostics { - // !!! user preference for suggestion diagnostics; keep only unnecessary/dprecated? - lspDiagnostics = append(lspDiagnostics, toLSPDiagnostic(diag, l.converters)) + diagnostics := make([][]*ast.Diagnostic, 0, 3) + if syntaxDiagnostics := program.GetSyntacticDiagnostics(ctx, file); len(syntaxDiagnostics) != 0 { + diagnostics = append(diagnostics, syntaxDiagnostics) + } else { + diagnostics = append(diagnostics, program.GetSemanticDiagnostics(ctx, file)) + // !!! user preference for suggestion diagnostics; keep only unnecessary/deprecated? + // See: https://github.com/microsoft/vscode/blob/3dbc74129aaae102e5cb485b958fa5360e8d3e7a/extensions/typescript-language-features/src/languageFeatures/diagnostics.ts#L114 + diagnostics = append(diagnostics, program.GetSuggestionDiagnostics(ctx, file)) + if program.Options().GetEmitDeclarations() { + diagnostics = append(diagnostics, program.GetDeclarationDiagnostics(ctx, file)) } } + return &lsproto.DocumentDiagnosticReport{ RelatedFullDocumentDiagnosticReport: &lsproto.RelatedFullDocumentDiagnosticReport{ FullDocumentDiagnosticReport: lsproto.FullDocumentDiagnosticReport{ - Kind: lsproto.StringLiteralFull{}, - Items: lspDiagnostics, + Items: toLSPDiagnostics(l.converters, diagnostics...), }, }, }, nil } -func toLSPDiagnostic(diagnostic *ast.Diagnostic, converters *Converters) *lsproto.Diagnostic { +func toLSPDiagnostics(converters *Converters, diagnostics ...[]*ast.Diagnostic) []*lsproto.Diagnostic { + size := 0 + for _, diagSlice := range diagnostics { + size += len(diagSlice) + } + lspDiagnostics := make([]*lsproto.Diagnostic, 0, size) + for _, diagSlice := range diagnostics { + for _, diag := range diagSlice { + lspDiagnostics = append(lspDiagnostics, toLSPDiagnostic(converters, diag)) + } + } + return lspDiagnostics +} + +func toLSPDiagnostic(converters *Converters, diagnostic *ast.Diagnostic) *lsproto.Diagnostic { var severity lsproto.DiagnosticSeverity switch diagnostic.Category() { case diagnostics.CategorySuggestion: diff --git a/internal/ls/findallreferences.go b/internal/ls/findallreferences.go new file mode 100644 index 0000000000..16c435d74c --- /dev/null +++ b/internal/ls/findallreferences.go @@ -0,0 +1,1489 @@ +package ls + +import ( + "cmp" + "fmt" + "slices" + "strings" + "unicode/utf8" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/astnav" + "github.com/microsoft/typescript-go/internal/binder" + "github.com/microsoft/typescript-go/internal/checker" + "github.com/microsoft/typescript-go/internal/compiler" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/scanner" + + "github.com/microsoft/typescript-go/internal/tspath" +) + +// === types for settings === +type referenceUse int + +const ( + referenceUseNone referenceUse = 0 + referenceUseOther referenceUse = 1 + referenceUseReferences referenceUse = 2 + referenceUseRename referenceUse = 3 +) + +type refOptions struct { + findInStrings bool + findInComments bool + use referenceUse // other, references, rename + implementations bool + useAliasesForRename bool // renamed from providePrefixAndSuffixTextForRename. default: true +} + +// === types for results === + +type refInfo struct { + file *ast.SourceFile + fileName string + reference *ast.FileReference + unverified bool +} + +type SymbolAndEntries struct { + definition *Definition + references []*referenceEntry +} + +func NewSymbolAndEntries(kind definitionKind, node *ast.Node, symbol *ast.Symbol, references []*referenceEntry) *SymbolAndEntries { + return &SymbolAndEntries{ + &Definition{ + Kind: kind, + node: node, + symbol: symbol, + }, + references, + } +} + +type definitionKind int + +const ( + definitionKindSymbol definitionKind = 0 + definitionKindLabel definitionKind = 1 + definitionKindKeyword definitionKind = 2 + definitionKindThis definitionKind = 3 + definitionKindString definitionKind = 4 + definitionKindTripleSlashReference definitionKind = 5 +) + +type Definition struct { + Kind definitionKind + symbol *ast.Symbol + node *ast.Node + tripleSlashFileRef *tripleSlashDefinition +} +type tripleSlashDefinition struct { + reference *ast.FileReference + file *ast.SourceFile +} + +type entryKind int + +const ( + entryKindNone entryKind = 0 + entryKindRange entryKind = 1 + entryKindNode entryKind = 2 + entryKindStringLiteral entryKind = 3 + entryKindSearchedLocalFoundProperty entryKind = 4 + entryKindSearchedPropertyFoundLocal entryKind = 5 +) + +type referenceEntry struct { + kind entryKind + node *ast.Node + context *ast.Node // !!! ContextWithStartAndEndNode, optional + fileName string + textRange *lsproto.Range +} + +func (l *LanguageService) getRangeOfEntry(entry *referenceEntry) *lsproto.Range { + if entry.textRange == nil { + entry.textRange = l.getRangeOfNode(entry.node, nil, nil) + } + return entry.textRange +} + +func (l *LanguageService) newRangeEntry(file *ast.SourceFile, start, end int) *referenceEntry { + // !!! used in not-yet implemented features + return &referenceEntry{ + kind: entryKindRange, + fileName: file.FileName(), + textRange: l.createLspRangeFromBounds(start, end, file), + } +} + +func newNodeEntryWithKind(node *ast.Node, kind entryKind) *referenceEntry { + e := newNodeEntry(node) + e.kind = kind + return e +} + +func newNodeEntry(node *ast.Node) *referenceEntry { + // creates nodeEntry with `kind == entryKindNode` + n := node + if node != nil && node.Name() != nil { + n = node.Name() + } + return &referenceEntry{ + kind: entryKindNode, + node: node, + context: getContextNodeForNodeEntry(n), + } +} + +func getContextNodeForNodeEntry(node *ast.Node) *ast.Node { + if ast.IsDeclaration(node) { + return getContextNode(node) + } + + if node.Parent == nil { + return nil + } + + if !ast.IsDeclaration(node.Parent) && node.Parent.Kind != ast.KindExportAssignment && node.Parent.Kind != ast.KindJSExportAssignment { + // Special property assignment in javascript + if ast.IsInJSFile(node) { + // !!! jsdoc: check if branch still needed + binaryExpression := core.IfElse(node.Parent.Kind == ast.KindBinaryExpression, + node.Parent, + core.IfElse(ast.IsAccessExpression(node.Parent) && node.Parent.Parent.Kind == ast.KindBinaryExpression && node.Parent.Parent.AsBinaryExpression().Left == node.Parent, + node.Parent.Parent, + nil)) + if binaryExpression != nil && ast.GetAssignmentDeclarationKind(binaryExpression.AsBinaryExpression()) != ast.JSDeclarationKindNone { + return getContextNode(binaryExpression) + } + } + + // Jsx Tags + if node.Parent.Kind == ast.KindJsxOpeningElement || node.Parent.Kind == ast.KindJsxClosingElement { + return node.Parent.Parent + } else if node.Parent.Kind == ast.KindJsxSelfClosingElement || + node.Parent.Kind == ast.KindLabeledStatement || + node.Parent.Kind == ast.KindBreakStatement || + node.Parent.Kind == ast.KindContinueStatement { + return node.Parent + } else if node.Parent.Kind == ast.KindStringLiteral || node.Parent.Kind == ast.KindNoSubstitutionTemplateLiteral { + if validImport := tryGetImportFromModuleSpecifier(node); validImport != nil { + declOrStatement := ast.FindAncestor(validImport, func(*ast.Node) bool { + return ast.IsDeclaration(node) || ast.IsStatement(node) || ast.IsJSDocTag(node) + }) + if ast.IsDeclaration(declOrStatement) { + return getContextNode(declOrStatement) + } + return declOrStatement + } + } + + // Handle computed property name + propertyName := ast.FindAncestor(node, ast.IsComputedPropertyName) + if propertyName != nil { + return getContextNode(propertyName.Parent) + } + return nil + } + + if node.Parent.Name() == node || // node is name of declaration, use parent + node.Parent.Kind == ast.KindConstructor || + node.Parent.Kind == ast.KindExportAssignment || + node.Parent.Kind == ast.KindJSExportAssignment || + // Property name of the import export specifier or binding pattern, use parent + ((ast.IsImportOrExportSpecifier(node.Parent) || node.Parent.Kind == ast.KindBindingElement) && node.Parent.PropertyName() == node) || + // Is default export + (node.Kind == ast.KindDefaultKeyword && ast.HasSyntacticModifier(node.Parent, ast.ModifierFlagsExportDefault)) { + return getContextNode(node.Parent) + } + + return nil +} + +func getContextNode(node *ast.Node) *ast.Node { + if node == nil { + return nil + } + switch node.Kind { + case ast.KindVariableDeclaration: + if !ast.IsVariableDeclarationList(node.Parent) || len(node.Parent.AsVariableDeclarationList().Declarations.Nodes) != 1 { + return node + } else if ast.IsVariableStatement(node.Parent.Parent) { + return node.Parent.Parent + } else if ast.IsForInOrOfStatement(node.Parent.Parent) { + return getContextNode(node.Parent.Parent) + } + return node.Parent + + case ast.KindBindingElement: + return getContextNode(node.Parent.Parent) + + case ast.KindImportSpecifier: + return node.Parent.Parent.Parent + + case ast.KindExportSpecifier, ast.KindNamespaceImport: + return node.Parent.Parent + + case ast.KindImportClause, ast.KindNamespaceExport: + return node.Parent + + case ast.KindBinaryExpression: + return core.IfElse(node.Parent.Kind == ast.KindExpressionStatement, node.Parent, node) + + case ast.KindForOfStatement, ast.KindForInStatement: + // !!! not implemented + return nil + + case ast.KindPropertyAssignment, ast.KindShorthandPropertyAssignment: + if isArrayLiteralOrObjectLiteralDestructuringPattern(node.Parent) { + return getContextNode(ast.FindAncestor(node.Parent, func(node *ast.Node) bool { + return node.Kind == ast.KindBinaryExpression || ast.IsForInOrOfStatement(node) + })) + } + return node + case ast.KindSwitchStatement: + // !!! not implemented + return nil + default: + return node + } +} + +// utils +func (l *LanguageService) getRangeOfNode(node *ast.Node, sourceFile *ast.SourceFile, endNode *ast.Node) *lsproto.Range { + if sourceFile == nil { + sourceFile = ast.GetSourceFileOfNode(node) + } + start := scanner.GetTokenPosOfNode(node, sourceFile, false /*includeJsDoc*/) + end := core.IfElse(endNode != nil, endNode, node).End() + if ast.IsStringLiteralLike(node) && (end-start) > 2 { + if endNode != nil { + panic("endNode is not nil for stringLiteralLike") + } + start += 1 + end -= 1 + } + if endNode != nil && endNode.Kind == ast.KindCaseBlock { + end = endNode.Pos() + } + return l.createLspRangeFromBounds(start, end, sourceFile) +} + +func isValidReferencePosition(node *ast.Node, searchSymbolName string) bool { + switch node.Kind { + case ast.KindPrivateIdentifier: + // !!! + // if (isJSDocMemberName(node.Parent)) { + // return true; + // } + return len(node.Text()) == len(searchSymbolName) + case ast.KindIdentifier: + return len(node.Text()) == len(searchSymbolName) + case ast.KindNoSubstitutionTemplateLiteral, ast.KindStringLiteral: + return len(node.Text()) == len(searchSymbolName) && (isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || + isNameOfModuleDeclaration(node) || + isExpressionOfExternalModuleImportEqualsDeclaration(node) || + // !!! object.defineProperty + // (ast.IsCallExpression(node.Parent) && ast.IsBindableObjectDefinePropertyCall(node.Parent) && node.Parent.Arguments()[1] == node) || + ast.IsImportOrExportSpecifier(node.Parent)) + case ast.KindNumericLiteral: + return isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && len(node.Text()) == len(searchSymbolName) + case ast.KindDefaultKeyword: + return len("default") == len(searchSymbolName) + } + return false +} + +func isForRenameWithPrefixAndSuffixText(options refOptions) bool { + return options.use == referenceUseRename && options.useAliasesForRename +} + +func skipPastExportOrImportSpecifierOrUnion(symbol *ast.Symbol, node *ast.Node, checker *checker.Checker, useLocalSymbolForExportSpecifier bool) *ast.Symbol { + if node == nil { + return nil + } + parent := node.Parent + if parent.Kind == ast.KindExportSpecifier && useLocalSymbolForExportSpecifier { + return getLocalSymbolForExportSpecifier(node.AsIdentifier(), symbol, parent.AsExportSpecifier(), checker) + } + // If the symbol is declared as part of a declaration like `{ type: "a" } | { type: "b" }`, use the property on the union type to get more references. + return core.FirstNonNil(symbol.Declarations, func(decl *ast.Node) *ast.Symbol { + if decl.Parent == nil { + // Ignore UMD module and global merge + if symbol.Flags&ast.SymbolFlagsTransient != 0 { + return nil + } + // Assertions for GH#21814. We should be handling SourceFile symbols in `getReferencedSymbolsForModule` instead of getting here. + panic(fmt.Sprintf("Unexpected symbol at %s: %s", node.Kind.String(), symbol.Name)) + } + if decl.Parent.Kind == ast.KindTypeLiteral && decl.Parent.Parent.Kind == ast.KindUnionType { + return checker.GetPropertyOfType(checker.GetTypeFromTypeNode(decl.Parent.Parent), symbol.Name) + } + return nil + }) +} + +func getSymbolScope(symbol *ast.Symbol) *ast.Node { + // If this is the symbol of a named function expression or named class expression, + // then named references are limited to its own scope. + valueDeclaration := symbol.ValueDeclaration + if valueDeclaration != nil && (valueDeclaration.Kind == ast.KindFunctionExpression || valueDeclaration.Kind == ast.KindClassExpression) { + return valueDeclaration + } + + if len(symbol.Declarations) == 0 { + return nil + } + + declarations := symbol.Declarations + // If this is private property or method, the scope is the containing class + if symbol.Flags&(ast.SymbolFlagsProperty|ast.SymbolFlagsMethod) != 0 { + privateDeclaration := core.Find(declarations, func(d *ast.Node) bool { + return checker.HasModifier(d, ast.ModifierFlagsPrivate) || ast.IsPrivateIdentifierClassElementDeclaration(d) + }) + if privateDeclaration != nil { + return ast.FindAncestorKind(privateDeclaration, ast.KindClassDeclaration) + } + // Else this is a public property and could be accessed from anywhere. + return nil + } + + // If symbol is of object binding pattern element without property name we would want to + // look for property too and that could be anywhere + if core.Some(declarations, isObjectBindingElementWithoutPropertyName) { + return nil + } + + /* + If the symbol has a parent, it's globally visible unless: + - It's a private property (handled above). + - It's a type parameter. + - The parent is an external module: then we should only search in the module (and recurse on the export later). + - But if the parent has `export as namespace`, the symbol is globally visible through that namespace. + */ + exposedByParent := symbol.Parent != nil && symbol.Flags&ast.SymbolFlagsTypeParameter == 0 + if exposedByParent && !(checker.IsExternalModuleSymbol(symbol.Parent) && symbol.Parent.GlobalExports == nil) { + return nil + } + + var scope *ast.Node + for _, declaration := range declarations { + container := getContainerNode(declaration) + if scope != nil && scope != container { + // Different declarations have different containers, bail out + return nil + } + + if container == nil || (container.Kind == ast.KindSourceFile && !ast.IsExternalOrCommonJSModule(container.AsSourceFile())) { + // This is a global variable and not an external module, any declaration defined + // within this scope is visible outside the file + return nil + } + + scope = container + } + + // If symbol.parent, this means we are in an export of an external module. (Otherwise we would have returned `undefined` above.) + // For an export of a module, we may be in a declaration file, and it may be accessed elsewhere. E.g.: + // declare module "a" { export type T = number; } + // declare module "b" { import { T } from "a"; export const x: T; } + // So we must search the whole source file. (Because we will mark the source file as seen, we we won't return to it when searching for imports.) + if exposedByParent { + return ast.GetSourceFileOfNode(scope).AsNode() + } + return scope // TODO: GH#18217 +} + +// === functions on (*ls) === + +func (l *LanguageService) ProvideReferences(params *lsproto.ReferenceParams) []*lsproto.Location { + // `findReferencedSymbols` except only computes the information needed to return reference locations + program, sourceFile := l.getProgramAndFile(params.TextDocument.Uri) + position := int(l.converters.LineAndCharacterToPosition(sourceFile, params.Position)) + + node := astnav.GetTouchingPropertyName(sourceFile, position) + options := refOptions{use: referenceUseReferences} + + symbolsAndEntries := l.getReferencedSymbolsForNode(position, node, program, program.GetSourceFiles(), options, nil) + + return core.FlatMap(symbolsAndEntries, l.convertSymbolAndEntryToLocation) +} + +// == functions for conversions == +func (l *LanguageService) convertSymbolAndEntryToLocation(s *SymbolAndEntries) []*lsproto.Location { + var locations []*lsproto.Location + for _, ref := range s.references { + if ref.textRange == nil { + sourceFile := ast.GetSourceFileOfNode(ref.node) + ref.textRange = l.createLspRangeFromNode(ref.node, ast.GetSourceFileOfNode(ref.node)) + ref.fileName = sourceFile.FileName() + } + locations = append(locations, &lsproto.Location{ + Uri: FileNameToDocumentURI(ref.fileName), + Range: *ref.textRange, + }) + } + return locations +} + +func (l *LanguageService) mergeReferences(program *compiler.Program, referencesToMerge ...[]*SymbolAndEntries) []*SymbolAndEntries { + result := []*SymbolAndEntries{} + getSourceFileIndexOfEntry := func(program *compiler.Program, entry *referenceEntry) int { + var sourceFile *ast.SourceFile + if entry.kind == entryKindRange { + sourceFile = program.GetSourceFile(entry.fileName) + } else { + sourceFile = ast.GetSourceFileOfNode(entry.node) + } + return slices.Index(program.SourceFiles(), sourceFile) + } + + for _, references := range referencesToMerge { + if len(references) == 0 { + continue + } + if len(result) == 0 { + result = references + continue + } + for _, entry := range references { + if entry.definition == nil || entry.definition.Kind != definitionKindSymbol { + result = append(result, entry) + continue + } + symbol := entry.definition.symbol + refIndex := core.FindIndex(result, func(ref *SymbolAndEntries) bool { + return ref.definition != nil && + ref.definition.Kind == definitionKindSymbol && + ref.definition.symbol == symbol + }) + if refIndex == -1 { + result = append(result, entry) + continue + } + + reference := result[refIndex] + sortedRefs := append(reference.references, entry.references...) + slices.SortStableFunc(sortedRefs, func(entry1, entry2 *referenceEntry) int { + entry1File := getSourceFileIndexOfEntry(program, entry1) + entry2File := getSourceFileIndexOfEntry(program, entry2) + if entry1File != entry2File { + return cmp.Compare(entry1File, entry2File) + } + + return CompareRanges(l.getRangeOfEntry(entry1), l.getRangeOfEntry(entry2)) + }) + result[refIndex] = &SymbolAndEntries{ + definition: reference.definition, + references: sortedRefs, + } + } + } + return result +} + +// === functions for find all ref implementation === + +func (l *LanguageService) getReferencedSymbolsForNode(position int, node *ast.Node, program *compiler.Program, sourceFiles []*ast.SourceFile, options refOptions, sourceFilesSet *core.Set[string]) []*SymbolAndEntries { + // !!! cancellationToken + if sourceFilesSet == nil || sourceFilesSet.Len() == 0 { + sourceFilesSet = core.NewSetWithSizeHint[string](len(sourceFiles)) + for _, file := range sourceFiles { + sourceFilesSet.Add(file.FileName()) + } + } + + if node.Kind == ast.KindSourceFile { + resolvedRef := getReferenceAtPosition(node.AsSourceFile(), position, program) + if resolvedRef.file == nil { + return nil + } + + checker, done := program.GetTypeChecker(l.ctx) + defer done() + + if moduleSymbol := checker.GetMergedSymbol(resolvedRef.file.Symbol); moduleSymbol != nil { + return getReferencedSymbolsForModule(program, moduleSymbol /*excludeImportTypeOfExportEquals*/, false, sourceFiles, sourceFilesSet) + } + + // !!! not implemented + // fileIncludeReasons := program.getFileIncludeReasons(); + // if (!fileIncludeReasons) { + // return nil + // } + return []*SymbolAndEntries{{ + definition: &Definition{Kind: definitionKindTripleSlashReference, tripleSlashFileRef: &tripleSlashDefinition{reference: resolvedRef.reference}}, + references: getReferencesForNonModule(resolvedRef.file, program /*fileIncludeReasons,*/), + }} + } + + if !options.implementations { + // !!! cancellationToken + if special := getReferencedSymbolsSpecial(node, sourceFiles); special != nil { + return special + } + } + + checker, done := program.GetTypeChecker(l.ctx) + defer done() + + // constructors should use the class symbol, detected by name, if present + symbol := checker.GetSymbolAtLocation(core.IfElse(node.Kind == ast.KindConstructor && node.Parent.Name() != nil, node.Parent.Name(), node)) + // Could not find a symbol e.g. unknown identifier + if symbol == nil { + // String literal might be a property (and thus have a symbol), so do this here rather than in getReferencedSymbolsSpecial. + if !options.implementations && ast.IsStringLiteralLike(node) { + if isModuleSpecifierLike(node) { + // !!! not implemented + // fileIncludeReasons := program.GetFileIncludeReasons() + // if referencedFile := program.GetResolvedModuleFromModuleSpecifier(node, nil /*sourceFile*/); referencedFile != nil { + // return []*SymbolAndEntries{{ + // definition: &Definition{Kind: definitionKindString, node: node}, + // references: getReferencesForNonModule(referencedFile, program /*fileIncludeReasons,*/), + // }} + // } + // Fall through to string literal references. This is not very likely to return + // anything useful, but I guess it's better than nothing, and there's an existing + // test that expects this to happen (fourslash/cases/untypedModuleImport.ts). + } + // !!! not implemented + // return getReferencesForStringLiteral(node, sourceFiles, checker) // !!! cancellationToken + return nil + } + return nil + } + + if symbol.Name == ast.InternalSymbolNameExportEquals { + return getReferencedSymbolsForModule(program, symbol.Parent, false /*excludeImportTypeOfExportEquals*/, sourceFiles, sourceFilesSet) + } + + moduleReferences := l.getReferencedSymbolsForModuleIfDeclaredBySourceFile(symbol, program, sourceFiles, options, sourceFilesSet) // !!! cancellationToken + if moduleReferences != nil && symbol.Flags&ast.SymbolFlagsTransient != 0 { + return moduleReferences + } + + aliasedSymbol := getMergedAliasedSymbolOfNamespaceExportDeclaration(node, symbol, checker) + moduleReferencesOfExportTarget := l.getReferencedSymbolsForModuleIfDeclaredBySourceFile(aliasedSymbol, program, sourceFiles, options, sourceFilesSet) // !!! cancellationToken + + references := getReferencedSymbolsForSymbol(symbol, node, sourceFiles, sourceFilesSet, checker, options) // !!! cancellationToken + return l.mergeReferences(program, moduleReferences, references, moduleReferencesOfExportTarget) +} + +func (l *LanguageService) getReferencedSymbolsForModuleIfDeclaredBySourceFile(symbol *ast.Symbol, program *compiler.Program, sourceFiles []*ast.SourceFile, options refOptions, sourceFilesSet *core.Set[string]) []*SymbolAndEntries { + moduleSourceFileName := "" + if symbol == nil || !((symbol.Flags&ast.SymbolFlagsModule != 0) && len(symbol.Declarations) != 0) { + return nil + } + if moduleSourceFile := core.Find(symbol.Declarations, ast.IsSourceFile); moduleSourceFile != nil { + moduleSourceFileName = moduleSourceFile.AsSourceFile().FileName() + } else { + return nil + } + exportEquals := symbol.Exports[ast.InternalSymbolNameExportEquals] + // If exportEquals != nil, we're about to add references to `import("mod")` anyway, so don't double-count them. + moduleReferences := getReferencedSymbolsForModule(program, symbol, exportEquals != nil, sourceFiles, sourceFilesSet) + if exportEquals == nil || !sourceFilesSet.Has(moduleSourceFileName) { + return moduleReferences + } + // Continue to get references to 'export ='. + checker, done := program.GetTypeChecker(l.ctx) + defer done() + + symbol, _ = checker.ResolveAlias(exportEquals) + return l.mergeReferences(program, moduleReferences, getReferencedSymbolsForSymbol(symbol /*node*/, nil, sourceFiles, sourceFilesSet, checker /*, cancellationToken*/, options)) +} + +func getReferencedSymbolsSpecial(node *ast.Node, sourceFiles []*ast.SourceFile) []*SymbolAndEntries { + if isTypeKeyword(node.Kind) { + // A void expression (i.e., `void foo()`) is not special, but the `void` type is. + if node.Kind == ast.KindVoidKeyword && node.Parent.Kind == ast.KindVoidExpression { + return nil + } + + // A modifier readonly (like on a property declaration) is not special; + // a readonly type keyword (like `readonly string[]`) is. + if node.Kind == ast.KindReadonlyKeyword && !isReadonlyTypeOperator(node) { + return nil + } + // Likewise, when we *are* looking for a special keyword, make sure we + // *don't* include readonly member modifiers. + return getAllReferencesForKeyword( + sourceFiles, + node.Kind, + // cancellationToken, + node.Kind == ast.KindReadonlyKeyword, + ) + } + + if ast.IsImportMeta(node.Parent) && node.Parent.Name() == node { + // !!! unimplemented + return nil // getAllReferencesForImportMeta(sourceFiles /*, cancellationToken*/) + } + + if node.Kind == ast.KindStaticKeyword && node.Parent.Kind == ast.KindClassStaticBlockDeclaration { + return []*SymbolAndEntries{{definition: &Definition{Kind: definitionKindKeyword, node: node}, references: []*referenceEntry{newNodeEntry(node)}}} + } + + // Labels + if isJumpStatementTarget(node) { + // if we have a label definition, look within its statement for references, if not, then + // the label is undefined and we have no results.. + if labelDefinition := getTargetLabel(node.Parent, node.Text()); labelDefinition != nil { + return getLabelReferencesInNode(labelDefinition.Parent, labelDefinition) + } + return nil + } + + if isLabelOfLabeledStatement(node) { + // it is a label definition and not a target, search within the parent labeledStatement + return getLabelReferencesInNode(node.Parent, node.AsIdentifier()) + } + + if isThis(node) { + return getReferencesForThisKeyword(node, sourceFiles /*, cancellationToken*/) + } + + if node.Kind == ast.KindSuperKeyword { + return getReferencesForSuperKeyword(node) + } + + return nil +} + +func getLabelReferencesInNode(container *ast.Node, targetLabel *ast.Identifier) []*SymbolAndEntries { + sourceFile := ast.GetSourceFileOfNode(container) + labelName := targetLabel.Text + references := core.MapNonNil(getPossibleSymbolReferenceNodes(sourceFile, labelName, container), func(node *ast.Node) *referenceEntry { + // Only pick labels that are either the target label, or have a target that is the target label + if node == targetLabel.AsNode() || (isJumpStatementTarget(node) && getTargetLabel(node, labelName) == targetLabel) { + return newNodeEntry(node) + } + return nil + }) + return []*SymbolAndEntries{NewSymbolAndEntries(definitionKindLabel, targetLabel.AsNode(), nil, references)} +} + +func getReferencesForThisKeyword(thisOrSuperKeyword *ast.Node, sourceFiles []*ast.SourceFile) []*SymbolAndEntries { + searchSpaceNode := ast.GetThisContainer(thisOrSuperKeyword, false /*includeArrowFunctions*/, false /*includeClassComputedPropertyName*/) + + // Whether 'this' occurs in a static context within a class. + staticFlag := ast.ModifierFlagsStatic + isParameterName := func(node *ast.Node) bool { + return node.Kind == ast.KindIdentifier && node.Parent.Kind == ast.KindParameter && node.Parent.Name() == node + } + + switch searchSpaceNode.Kind { + case ast.KindMethodDeclaration, ast.KindMethodSignature, + ast.KindPropertyDeclaration, ast.KindPropertySignature, ast.KindConstructor, ast.KindGetAccessor, ast.KindSetAccessor: + if (searchSpaceNode.Kind == ast.KindMethodDeclaration || searchSpaceNode.Kind == ast.KindMethodSignature) && ast.IsObjectLiteralMethod(searchSpaceNode) { + staticFlag &= searchSpaceNode.ModifierFlags() + searchSpaceNode = searchSpaceNode.Parent // re-assign to be the owning object literals + break + } + staticFlag &= searchSpaceNode.ModifierFlags() + searchSpaceNode = searchSpaceNode.Parent // re-assign to be the owning class + break + case ast.KindSourceFile: + if ast.IsExternalModule(searchSpaceNode.AsSourceFile()) || isParameterName(thisOrSuperKeyword) { + return nil + } + case ast.KindFunctionDeclaration, ast.KindFunctionExpression: + break + // Computed properties in classes are not handled here because references to this are illegal, + // so there is no point finding references to them. + default: + return nil + } + + filesToSearch := sourceFiles + if searchSpaceNode.Kind == ast.KindSourceFile { + filesToSearch = []*ast.SourceFile{searchSpaceNode.AsSourceFile()} + } + references := core.Map( + core.FlatMap(filesToSearch, func(sourceFile *ast.SourceFile) []*ast.Node { + // cancellationToken.throwIfCancellationRequested(); + return core.Filter( + getPossibleSymbolReferenceNodes(sourceFile, "this", core.IfElse(searchSpaceNode.Kind == ast.KindSourceFile, sourceFile.AsNode(), searchSpaceNode)), + func(node *ast.Node) bool { + if !isThis(node) { + return false + } + container := ast.GetThisContainer(node /*includeArrowFunctions*/, false /*includeClassComputedPropertyName*/, false) + if !ast.CanHaveSymbol(container) { + return false + } + switch searchSpaceNode.Kind { + case ast.KindFunctionExpression, ast.KindFunctionDeclaration: + return searchSpaceNode.Symbol() == container.Symbol() + case ast.KindMethodDeclaration, ast.KindMethodSignature: + return ast.IsObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.Symbol() == container.Symbol() + case ast.KindClassExpression, ast.KindClassDeclaration, ast.KindObjectLiteralExpression: + // Make sure the container belongs to the same class/object literals + // and has the appropriate static modifier from the original container. + return container.Parent != nil && ast.CanHaveSymbol(container.Parent) && searchSpaceNode.Symbol() == container.Parent.Symbol() && ast.IsStatic(container) == (staticFlag != ast.ModifierFlagsNone) + case ast.KindSourceFile: + return container.Kind == ast.KindSourceFile && !ast.IsExternalModule(container.AsSourceFile()) && !isParameterName(node) + } + return false + }) + }), + func(n *ast.Node) *referenceEntry { return newNodeEntry(n) }, + ) + + thisParameter := core.FirstNonNil(references, func(ref *referenceEntry) *ast.Node { + if ref.node.Parent.Kind == ast.KindParameter { + return ref.node + } + return nil + }) + if thisParameter == nil { + thisParameter = thisOrSuperKeyword + } + return []*SymbolAndEntries{NewSymbolAndEntries(definitionKindThis, thisParameter, nil, references)} +} + +func getReferencesForSuperKeyword(superKeyword *ast.Node) []*SymbolAndEntries { + searchSpaceNode := ast.GetSuperContainer(superKeyword, false /*stopOnFunctions*/) + if searchSpaceNode == nil { + return nil + } + // Whether 'super' occurs in a static context within a class. + staticFlag := ast.ModifierFlagsStatic + + switch searchSpaceNode.Kind { + case ast.KindPropertyDeclaration, ast.KindPropertySignature, ast.KindMethodDeclaration, ast.KindMethodSignature, ast.KindConstructor, ast.KindGetAccessor, ast.KindSetAccessor: + staticFlag &= searchSpaceNode.ModifierFlags() + searchSpaceNode = searchSpaceNode.Parent // re-assign to be the owning class + break + default: + return nil + } + + sourceFile := ast.GetSourceFileOfNode(searchSpaceNode) + references := core.MapNonNil(getPossibleSymbolReferenceNodes(sourceFile, "super", searchSpaceNode), func(node *ast.Node) *referenceEntry { + if node.Kind != ast.KindSuperKeyword { + return nil + } + + container := ast.GetSuperContainer(node, false /*stopOnFunctions*/) + + // If we have a 'super' container, we must have an enclosing class. + // Now make sure the owning class is the same as the search-space + // and has the same static qualifier as the original 'super's owner. + if container != nil && ast.IsStatic(container) == (staticFlag != ast.ModifierFlagsNone) && container.Parent.Symbol() == searchSpaceNode.Symbol() { + return newNodeEntry(node) + } + return nil + }) + + return []*SymbolAndEntries{NewSymbolAndEntries(definitionKindSymbol, nil, searchSpaceNode.Symbol(), references)} +} + +func getAllReferencesForKeyword(sourceFiles []*ast.SourceFile, keywordKind ast.Kind, filterReadOnlyTypeOperator bool) []*SymbolAndEntries { + // references is a list of NodeEntry + references := core.FlatMap(sourceFiles, func(sourceFile *ast.SourceFile) []*referenceEntry { + // cancellationToken.throwIfCancellationRequested(); + return core.MapNonNil(getPossibleSymbolReferenceNodes(sourceFile, scanner.TokenToString(keywordKind), sourceFile.AsNode()), func(referenceLocation *ast.Node) *referenceEntry { + if referenceLocation.Kind == keywordKind && (!filterReadOnlyTypeOperator || isReadonlyTypeOperator(referenceLocation)) { + return newNodeEntry(referenceLocation) + } + return nil + }) + }) + if len(references) == 0 { + return nil + } + return []*SymbolAndEntries{NewSymbolAndEntries(definitionKindKeyword, references[0].node, nil, references)} +} + +func getPossibleSymbolReferenceNodes(sourceFile *ast.SourceFile, symbolName string, container *ast.Node) []*ast.Node { + return core.MapNonNil(getPossibleSymbolReferencePositions(sourceFile, symbolName, container), func(pos int) *ast.Node { + if referenceLocation := astnav.GetTouchingPropertyName(sourceFile, pos); referenceLocation != sourceFile.AsNode() { + return referenceLocation + } + return nil + }) +} + +func getPossibleSymbolReferencePositions(sourceFile *ast.SourceFile, symbolName string, container *ast.Node) []int { + positions := []int{} + + /// TODO: Cache symbol existence for files to save text search + // Also, need to make this work for unicode escapes. + + // Be resilient in the face of a symbol with no name or zero length name + if symbolName == "" { + return positions + } + + text := sourceFile.Text() + sourceLength := len(text) + symbolNameLength := len(symbolName) + + if container == nil { + container = sourceFile.AsNode() + } + + position := strings.Index(text[container.Pos():], symbolName) + endPos := container.End() + for position >= 0 && position < endPos { + // We found a match. Make sure it's not part of a larger word (i.e. the char + // before and after it have to be a non-identifier char). + endPosition := position + symbolNameLength + + if (position == 0 || !scanner.IsIdentifierPart(rune(text[position-1]), core.ScriptTargetLatest)) && + (endPosition == sourceLength || !scanner.IsIdentifierPart(rune(text[endPosition]), core.ScriptTargetLatest)) { + // Found a real match. Keep searching. + positions = append(positions, position) + } + startIndex := position + symbolNameLength + 1 + if foundIndex := strings.Index(text[startIndex:], symbolName); foundIndex != -1 { + position = startIndex + foundIndex + } else { + break + } + } + + return positions +} + +func getReferencesForNonModule(referencedFile *ast.SourceFile, program *compiler.Program) []*referenceEntry { + // !!! not implemented + return []*referenceEntry{} +} + +func getMergedAliasedSymbolOfNamespaceExportDeclaration(node *ast.Node, symbol *ast.Symbol, checker *checker.Checker) *ast.Symbol { + if node.Parent != nil && node.Parent.Kind == ast.KindNamespaceExportDeclaration { + if aliasedSymbol, ok := checker.ResolveAlias(symbol); ok { + targetSymbol := checker.GetMergedSymbol(aliasedSymbol) + if aliasedSymbol != targetSymbol { + return targetSymbol + } + } + } + return nil +} + +func getReferencedSymbolsForModule(program *compiler.Program, symbol *ast.Symbol, excludeImportTypeOfExportEquals bool, sourceFiles []*ast.SourceFile, sourceFilesSet *core.Set[string]) []*SymbolAndEntries { + // !!! not implemented + return nil +} + +func getReferenceAtPosition(sourceFile *ast.SourceFile, position int, program *compiler.Program) *refInfo { + if referencePath := findReferenceInPosition(sourceFile.ReferencedFiles, position); referencePath != nil { + if file := program.GetSourceFileFromReference(sourceFile, referencePath); file != nil { + return &refInfo{reference: referencePath, fileName: file.FileName(), file: file, unverified: false} + } + return nil + } + + if typeReferenceDirective := findReferenceInPosition(sourceFile.TypeReferenceDirectives, position); typeReferenceDirective != nil { + if reference := program.GetResolvedTypeReferenceDirectiveFromTypeReferenceDirective(typeReferenceDirective, sourceFile); reference != nil { + if file := program.GetSourceFile(reference.ResolvedFileName); file != nil { + return &refInfo{reference: typeReferenceDirective, fileName: file.FileName(), file: file, unverified: false} + } + } + return nil + } + + if libReferenceDirective := findReferenceInPosition(sourceFile.LibReferenceDirectives, position); libReferenceDirective != nil { + if file := program.GetLibFileFromReference(libReferenceDirective); file != nil { + return &refInfo{reference: libReferenceDirective, fileName: file.FileName(), file: file, unverified: false} + } + return nil + } + + if len(sourceFile.Imports()) == 0 && len(sourceFile.ModuleAugmentations) == 0 { + return nil + } + + node := astnav.GetTouchingToken(sourceFile, position) + if !isModuleSpecifierLike(node) || !tspath.IsExternalModuleNameRelative(node.Text()) { + return nil + } + if resolution := program.GetResolvedModuleFromModuleSpecifier(sourceFile, node); resolution != nil { + verifiedFileName := resolution.ResolvedFileName + fileName := resolution.ResolvedFileName + if fileName == "" { + fileName = tspath.ResolvePath(tspath.GetDirectoryPath(sourceFile.FileName()), node.Text()) + } + return &refInfo{ + file: program.GetSourceFile(fileName), + fileName: fileName, + reference: nil, + unverified: verifiedFileName != "", + } + } + + return nil +} + +// -- Core algorithm for find all references -- +func getReferencedSymbolsForSymbol(originalSymbol *ast.Symbol, node *ast.Node, sourceFiles []*ast.SourceFile, sourceFilesSet *core.Set[string], checker *checker.Checker, options refOptions) []*SymbolAndEntries { + // Core find-all-references algorithm for a normal symbol. + + symbol := core.Coalesce(skipPastExportOrImportSpecifierOrUnion(originalSymbol, node, checker /*useLocalSymbolForExportSpecifier*/, !isForRenameWithPrefixAndSuffixText(options)), originalSymbol) + + // Compute the meaning from the location and the symbol it references + searchMeaning := getIntersectingMeaningFromDeclarations(node, symbol, ast.SemanticMeaningAll) + state := newState(sourceFiles, sourceFilesSet, node, checker /*, cancellationToken*/, searchMeaning, options) + + var exportSpecifier *ast.Node + if !isForRenameWithPrefixAndSuffixText(options) || len(symbol.Declarations) == 0 { + exportSpecifier = core.Find(symbol.Declarations, ast.IsExportSpecifier) + } + if exportSpecifier != nil { + // !!! not implemented + + // When renaming at an export specifier, rename the export and not the thing being exported. + // state.getReferencesAtExportSpecifier(exportSpecifier.Name(), symbol, exportSpecifier.AsExportSpecifier(), state.createSearch(node, originalSymbol, comingFromUnknown /*comingFrom*/, "", nil), true /*addReferencesHere*/, true /*alwaysGetReferences*/) + } else if node != nil && node.Kind == ast.KindDefaultKeyword && symbol.Name == ast.InternalSymbolNameDefault && symbol.Parent != nil { + state.addReference(node, symbol, entryKindNone) + // !!! not implemented + // state.searchForImportsOfExport(node, symbol, &ExportInfo{exportingModuleSymbol: symbol.Parent, exportKind: ExportKindDefault}) + } else { + search := state.createSearch(node, symbol, comingFromUnknown /*comingFrom*/, "", state.populateSearchSymbolSet(symbol, node, options.use == referenceUseRename, options.useAliasesForRename, options.implementations)) + state.getReferencesInContainerOrFiles(symbol, search) + } + + return state.result +} + +type ExportKind int + +const ( + ExportKindDefault ExportKind = 0 + ExportKindNamed ExportKind = 1 + ExportKindExportEquals ExportKind = 2 +) + +type ExportInfo struct { + exportingModuleSymbol *ast.Symbol + exportKind ExportKind +} + +type comingFromType int + +const ( + comingFromUnknown comingFromType = 0 + comingFromImport comingFromType = 1 + comingFromExport comingFromType = 2 +) + +// Symbol that is currently being searched for. +// This will be replaced if we find an alias for the symbol. +type refSearch struct { + // If coming from an export, we will not recursively search for the imported symbol (since that's where we came from). + comingFrom comingFromType // import, export + + symbol *ast.Symbol + text string + escapedText string + + // Only set if `options.implementations` is true. These are the symbols checked to get the implementations of a property access. + parents []*ast.Symbol + + allSearchSymbols []*ast.Symbol + + // Whether a symbol is in the search set. + // Do not compare directly to `symbol` because there may be related symbols to search for. See `populateSearchSymbolSet`. + includes func(symbol *ast.Symbol) bool +} + +// type ( +// ImportTracker = func(exportSymbol *ast.Symbol, exportInfo ExportInfo, isForRename bool) ImportsResult +// ImportsResult struct { +// importSearches []struct { +// importLocation *ast.ModuleExportName +// importSymbol *ast.Symbol +// } +// singleReferences []*ast.Node // ientifier | stringliteral +// indirectUsers []*ast.SourceFile +// } +// ) + +type inheritKey struct { + symbol, parent ast.SymbolId +} + +type refState struct { + sourceFiles []*ast.SourceFile + sourceFilesSet *core.Set[string] + specialSearchKind string // !!! none, constructor, class + checker *checker.Checker + // cancellationToken CancellationToken + searchMeaning ast.SemanticMeaning + options refOptions + result []*SymbolAndEntries + + inheritsFromCache map[inheritKey]bool + seenContainingTypeReferences *core.Set[*ast.Node] // node seen tracker + // seenReExportRHS *core.Set[*ast.Node] // node seen tracker + // importTracker ImportTracker + symbolIdToReferences map[ast.SymbolId]*SymbolAndEntries + sourceFileToSeenSymbols map[ast.NodeId]*core.Set[ast.SymbolId] +} + +func newState(sourceFiles []*ast.SourceFile, sourceFilesSet *core.Set[string], node *ast.Node, checker *checker.Checker, searchMeaning ast.SemanticMeaning, options refOptions) *refState { + return &refState{ + sourceFiles: sourceFiles, + sourceFilesSet: sourceFilesSet, + specialSearchKind: "none", // !!! other search kinds not implemented + checker: checker, + searchMeaning: searchMeaning, + options: options, + result: []*SymbolAndEntries{}, + inheritsFromCache: map[inheritKey]bool{}, + seenContainingTypeReferences: &core.Set[*ast.Node]{}, + // seenReExportRHS: &core.Set[*ast.Node]{}, + symbolIdToReferences: map[ast.SymbolId]*SymbolAndEntries{}, + sourceFileToSeenSymbols: map[ast.NodeId]*core.Set[ast.SymbolId]{}, + } +} + +// @param allSearchSymbols set of additional symbols for use by `includes` +func (state *refState) createSearch(location *ast.Node, symbol *ast.Symbol, comingFrom comingFromType, text string, allSearchSymbols []*ast.Symbol) *refSearch { + // Note: if this is an external module symbol, the name doesn't include quotes. + // Note: getLocalSymbolForExportDefault handles `export default class C {}`, but not `export default C` or `export { C as default }`. + // The other two forms seem to be handled downstream (e.g. in `skipPastExportOrImportSpecifier`), so special-casing the first form + // here appears to be intentional). + + symbolToSearchFor := binder.GetLocalSymbolForExportDefault(symbol) + if symbolToSearchFor == nil { + if s := getNonModuleSymbolOfMergedModuleSymbol(symbol); s != nil { + symbolToSearchFor = s + } else { + symbolToSearchFor = symbol + } + } + text = func() string { + var name string = ast.SymbolName(symbolToSearchFor) + firstChar, _ := utf8.DecodeRuneInString(name) + lastChar, _ := utf8.DecodeLastRuneInString(name) + if firstChar == lastChar && (firstChar == '\'' || firstChar == '"' || firstChar == '`') { + return name[1 : len(name)-1] + } + return name + }() + escapedText := text + if len(allSearchSymbols) == 0 { + allSearchSymbols = []*ast.Symbol{symbol} + } + includes := func(sym *ast.Symbol) bool { return slices.Contains(allSearchSymbols, sym) } + + search := &refSearch{symbol: symbol, comingFrom: comingFrom, text: text, escapedText: escapedText, allSearchSymbols: allSearchSymbols, includes: includes} + if state.options.implementations && location != nil { + search.parents = getParentSymbolsOfPropertyAccess(location, symbol, state.checker) + } + + return search +} + +func (state *refState) referenceAdder(searchSymbol *ast.Symbol) func(*ast.Node, entryKind) { + // !!! after find all references is fully implemented, rename this to something like 'getReferenceAdder' + symbolId := ast.GetSymbolId(searchSymbol) + symbolAndEntry := state.symbolIdToReferences[symbolId] + if symbolAndEntry == nil { + state.symbolIdToReferences[symbolId] = NewSymbolAndEntries(definitionKindSymbol, nil, searchSymbol, []*referenceEntry{}) + state.result = append(state.result, state.symbolIdToReferences[symbolId]) + symbolAndEntry = state.symbolIdToReferences[symbolId] + } + return func(node *ast.Node, kind entryKind) { + symbolAndEntry.references = append(symbolAndEntry.references, newNodeEntryWithKind(node, kind)) + } +} + +func (state *refState) addReference(referenceLocation *ast.Node, symbol *ast.Symbol, kind entryKind) { + // if rename symbol from default export anonymous function, for example `export default function() {}`, we do not need to add reference + if state.options.use == referenceUseRename && referenceLocation.Kind == ast.KindDefaultKeyword { + return + } + + addRef := state.referenceAdder(symbol) + if state.options.implementations { + state.addImplementationReferences(referenceLocation, func(n *ast.Node) { addRef(n, kind) }) + } else { + addRef(referenceLocation, kind) + } +} + +func (state *refState) addImplementationReferences(refNode *ast.Node, addRef func(*ast.Node)) { + // Check if we found a function/propertyAssignment/method with an implementation or initializer + if ast.IsDeclarationName(refNode) && isImplementation(refNode.Parent) { + addRef(refNode) + return + } + + if refNode.Kind != ast.KindIdentifier { + return + } + + if refNode.Parent.Kind == ast.KindShorthandPropertyAssignment { + // Go ahead and dereference the shorthand assignment by going to its definition + + // !!! not implemented + // getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addRef); + } + + // Check if the node is within an extends or implements clause + + if containingNode := getContainingNodeIfInHeritageClause(refNode); containingNode != nil { + addRef(containingNode) + return + } + + // If we got a type reference, try and see if the reference applies to any expressions that can implement an interface + // Find the first node whose parent isn't a type node -- i.e., the highest type node. + typeNode := ast.FindAncestor(refNode, func(a *ast.Node) bool { + return !ast.IsQualifiedName(a.Parent) && !ast.IsTypeNode(a.Parent) && !ast.IsTypeElement(a.Parent) + }) + + if typeNode == nil || typeNode.Parent.Type() == nil { + return + } + + typeHavingNode := typeNode.Parent + if typeHavingNode.Type() == typeNode && !state.seenContainingTypeReferences.AddIfAbsent(typeHavingNode) { + addIfImplementation := func(e *ast.Expression) { + if isImplementationExpression(e) { + addRef(e) + } + } + if ast.HasInitializer(typeHavingNode) { + addIfImplementation(typeHavingNode.Initializer()) + } else if ast.IsFunctionLike(typeHavingNode) && typeHavingNode.Body() != nil { + body := typeHavingNode.Body() + if body.Kind == ast.KindBlock { + ast.ForEachReturnStatement(body, func(returnStatement *ast.Node) bool { + if expr := returnStatement.Expression(); expr != nil { + addIfImplementation(expr) + } + return false + }) + } else { + addIfImplementation(body) + } + } else if ast.IsAssertionExpression(typeHavingNode) || ast.IsSatisfiesExpression(typeHavingNode) { + addIfImplementation(typeHavingNode.Expression()) + } + } +} + +func (state *refState) getReferencesInContainerOrFiles(symbol *ast.Symbol, search *refSearch) { + // Try to get the smallest valid scope that we can limit our search to; + // otherwise we'll need to search globally (i.e. include each file). + + if scope := getSymbolScope(symbol); scope != nil { + state.getReferencesInContainer(scope, ast.GetSourceFileOfNode(scope), search /*addReferencesHere*/, !(scope.Kind == ast.KindSourceFile && !slices.Contains(state.sourceFiles, scope.AsSourceFile()))) + } else { + // Global search + for _, sourceFile := range state.sourceFiles { + // state.cancellationToken.throwIfCancellationRequested(); + state.searchForName(sourceFile, search) + } + } +} + +func (state *refState) getReferencesInSourceFile(sourceFile *ast.SourceFile, search *refSearch, addReferencesHere bool) { + // state.cancellationToken.throwIfCancellationRequested(); + state.getReferencesInContainer(sourceFile.AsNode(), sourceFile, search, addReferencesHere) +} + +func (state *refState) getReferencesInContainer(container *ast.Node, sourceFile *ast.SourceFile, search *refSearch, addReferencesHere bool) { + // Search within node "container" for references for a search value, where the search value is defined as a + // tuple of (searchSymbol, searchText, searchLocation, and searchMeaning). + // searchLocation: a node where the search value + if !state.markSearchedSymbols(sourceFile, search.allSearchSymbols) { + return + } + + for _, position := range getPossibleSymbolReferencePositions(sourceFile, search.text, container) { + state.getReferencesAtLocation(sourceFile, position, search, addReferencesHere) + } +} + +func (state *refState) markSearchedSymbols(sourceFile *ast.SourceFile, symbols []*ast.Symbol) bool { + sourceId := ast.GetNodeId(sourceFile.AsNode()) + seenSymbols := state.sourceFileToSeenSymbols[sourceId] + if seenSymbols == nil { + seenSymbols = &core.Set[ast.SymbolId]{} + state.sourceFileToSeenSymbols[sourceId] = seenSymbols + } + + anyNewSymbols := false + for _, sym := range symbols { + symbolId := ast.GetSymbolId(sym) + if seenSymbols.Has(symbolId) { + continue + } + anyNewSymbols = true + seenSymbols.Add(symbolId) + } + return anyNewSymbols +} + +func (state *refState) getReferencesAtLocation(sourceFile *ast.SourceFile, position int, search *refSearch, addReferencesHere bool) { + referenceLocation := astnav.GetTouchingPropertyName(sourceFile, position) + + if !isValidReferencePosition(referenceLocation, search.text) { + // This wasn't the start of a token. Check to see if it might be a + // match in a comment or string if that's what the caller is asking + // for. + + // !!! not implemented + // if (!state.options.implementations && (state.options.findInStrings && isInString(sourceFile, position) || state.options.findInComments && isInNonReferenceComment(sourceFile, position))) { + // // In the case where we're looking inside comments/strings, we don't have + // // an actual definition. So just use 'undefined' here. Features like + // // 'Rename' won't care (as they ignore the definitions), and features like + // // 'FindReferences' will just filter out these results. + // state.addStringOrCommentReference(sourceFile.FileName, createTextSpan(position, search.text.length)); + // } + + return + } + + if getMeaningFromLocation(referenceLocation)&state.searchMeaning == 0 { + return + } + + referenceSymbol := state.checker.GetSymbolAtLocation(referenceLocation) + if referenceSymbol == nil { + return + } + + parent := referenceLocation.Parent + if parent.Kind == ast.KindImportSpecifier && parent.PropertyName() == referenceLocation { + // This is added through `singleReferences` in ImportsResult. If we happen to see it again, don't add it again. + return + } + + if parent.Kind == ast.KindExportSpecifier { + // !!! not implemented + // debug.Assert(referenceLocation.Kind == ast.KindIdentifier || referenceLocation.Kind == ast.KindStringLiteral) + // state.getReferencesAtExportSpecifier(referenceLocation /* Identifier | StringLiteral*/, referenceSymbol, parent.AsExportSpecifier(), search, addReferencesHere, false /*alwaysGetReferences*/) + return + } + + relatedSymbol, relatedSymbolKind := state.getRelatedSymbol(search, referenceSymbol, referenceLocation) + if relatedSymbol == nil { + state.getReferenceForShorthandProperty(referenceSymbol, search) + return + } + + switch state.specialSearchKind { + case "none": + if addReferencesHere { + state.addReference(referenceLocation, relatedSymbol, relatedSymbolKind) + } + case "constructor": + // !!! not implemented + // state.addConstructorReferences(referenceLocation, sourceFile, search) + case "class": + // !!! not implemented + // state.addClassStaticThisReferences(referenceLocation, search) + } + + // Use the parent symbol if the location is commonjs require syntax on javascript files only. + if ast.IsInJSFile(referenceLocation) && referenceLocation.Parent.Kind == ast.KindBindingElement && + ast.IsVariableDeclarationInitializedToRequire(referenceLocation.Parent.Parent.Parent) { + referenceSymbol = referenceLocation.Parent.Symbol() + // The parent will not have a symbol if it's an ObjectBindingPattern (when destructuring is used). In + // this case, just skip it, since the bound identifiers are not an alias of the import. + if referenceSymbol == nil { + return + } + } + + // !!! not implemented + // state.getImportOrExportReferences(referenceLocation, referenceSymbol, search) +} + +func (state *refState) getReferenceForShorthandProperty(referenceSymbol *ast.Symbol, search *refSearch) { + if referenceSymbol.Flags&ast.SymbolFlagsTransient != 0 || referenceSymbol.ValueDeclaration == nil { + return + } + shorthandValueSymbol := state.checker.GetShorthandAssignmentValueSymbol(referenceSymbol.ValueDeclaration) + name := ast.GetNameOfDeclaration(referenceSymbol.ValueDeclaration) + + // Because in short-hand property assignment, an identifier which stored as name of the short-hand property assignment + // has two meanings: property name and property value. Therefore when we do findAllReference at the position where + // an identifier is declared, the language service should return the position of the variable declaration as well as + // the position in short-hand property assignment excluding property accessing. However, if we do findAllReference at the + // position of property accessing, the referenceEntry of such position will be handled in the first case. + if name != nil && search.includes(shorthandValueSymbol) { + state.addReference(name, shorthandValueSymbol, entryKindNone) + } +} + +// === search === +func (state *refState) populateSearchSymbolSet(symbol *ast.Symbol, location *ast.Node, isForRename, providePrefixAndSuffixText, implementations bool) []*ast.Symbol { + if location == nil { + return []*ast.Symbol{symbol} + } + result := []*ast.Symbol{} + state.forEachRelatedSymbol( + symbol, + location, + isForRename, + !(isForRename && providePrefixAndSuffixText), + func(sym *ast.Symbol, root *ast.Symbol, base *ast.Symbol, _ entryKind) (*ast.Symbol, entryKind) { + // static method/property and instance method/property might have the same name. Only include static or only include instance. + if base != nil { + if isStaticSymbol(symbol) != isStaticSymbol(base) { + base = nil + } + } + + result = append(result, core.CoalesceList(base, root, sym)) + return nil, entryKindNone + }, // when try to find implementation, implementations is true, and not allowed to find base class + /*allowBaseTypes*/ func(_ *ast.Symbol) bool { return !implementations }, + ) + return result +} + +func (state *refState) getRelatedSymbol(search *refSearch, referenceSymbol *ast.Symbol, referenceLocation *ast.Node) (*ast.Symbol, entryKind) { + return state.forEachRelatedSymbol( + referenceSymbol, + referenceLocation, + false, /*isForRenamePopulateSearchSymbolSet*/ + state.options.use != referenceUseRename || state.options.useAliasesForRename, /*onlyIncludeBindingElementAtReferenceLocation*/ + func(sym *ast.Symbol, rootSymbol *ast.Symbol, baseSymbol *ast.Symbol, kind entryKind) (*ast.Symbol, entryKind) { + // check whether the symbol used to search itself is just the searched one. + if baseSymbol != nil { + // static method/property and instance method/property might have the same name. Only check static or only check instance. + if isStaticSymbol(referenceSymbol) != isStaticSymbol(baseSymbol) { + baseSymbol = nil + } + } + searchSym := core.CoalesceList(baseSymbol, rootSymbol, sym) + if searchSym != nil && search.includes(searchSym) { + if rootSymbol != nil && sym.CheckFlags&ast.CheckFlagsSynthetic == 0 { + return rootSymbol, kind + } + return sym, kind + } + // For a base type, use the symbol for the derived type. For a synthetic (e.g. union) property, use the union symbol. + return nil, entryKindNone + }, + func(rootSymbol *ast.Symbol) bool { + return !(len(search.parents) != 0 && !core.Some(search.parents, func(parent *ast.Symbol) bool { + return false + // !!! not implemented + // return state.explicitlyInheritsFrom(rootSymbol.Parent, parent) + })) + }, + ) +} + +func (state *refState) forEachRelatedSymbol( + symbol *ast.Symbol, + location *ast.Node, + isForRenamePopulateSearchSymbolSet, + onlyIncludeBindingElementAtReferenceLocation bool, + cbSymbol func(*ast.Symbol, *ast.Symbol, *ast.Symbol, entryKind) (*ast.Symbol, entryKind), + allowBaseTypes func(*ast.Symbol) bool, +) (*ast.Symbol, entryKind) { + fromRoot := func(sym *ast.Symbol, kind entryKind) (*ast.Symbol, entryKind) { + // If this is a union property: + // - In populateSearchSymbolsSet we will add all the symbols from all its source symbols in all unioned types. + // - In findRelatedSymbol, we will just use the union symbol if any source symbol is included in the search. + // If the symbol is an instantiation from a another symbol (e.g. widened symbol): + // - In populateSearchSymbolsSet, add the root the list + // - In findRelatedSymbol, return the source symbol if that is in the search. (Do not return the instantiation symbol.) + returnKind := entryKindNone + return core.FirstNonNil(state.checker.GetRootSymbols(sym), func(rootSymbol *ast.Symbol) *ast.Symbol { + if s, currKind := cbSymbol(sym, rootSymbol, nil /*baseSymbol*/, kind); s != nil { + returnKind = currKind + return s + } + // Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions + if rootSymbol.Parent != nil && rootSymbol.Parent.Flags&(ast.SymbolFlagsClass|ast.SymbolFlagsInterface) != 0 && allowBaseTypes(rootSymbol) { + return getPropertySymbolsFromBaseTypes(rootSymbol.Parent, rootSymbol.Name, state.checker, func(base *ast.Symbol) *ast.Symbol { + s, currKind := cbSymbol(sym, rootSymbol, base, kind) + if s != nil { + returnKind = currKind + } + return s + }) + } + return nil + }), returnKind + } + // !!! not yet implemented + // const containingObjectLiteralElement = getContainingObjectLiteralElement(location); + // if (containingObjectLiteralElement) {} + + if aliasedSymbol := getMergedAliasedSymbolOfNamespaceExportDeclaration(location, symbol, state.checker); aliasedSymbol != nil { + // In case of UMD module and global merging, search for global as well + if res, kind := cbSymbol(aliasedSymbol, nil /*rootSymbol*/, nil /*baseSymbol*/, entryKindNode); res != nil { + return res, kind + } + } + + if res, kind := fromRoot(symbol, entryKindNone); res != nil { + return res, core.IfElse(kind != entryKindNone, kind, entryKindNode) + } + + if symbol.ValueDeclaration != nil && ast.IsParameterPropertyDeclaration(symbol.ValueDeclaration, symbol.ValueDeclaration.Parent) { + // For a parameter property, now try on the other symbol (property if this was a parameter, parameter if this was a property). + if symbol.ValueDeclaration == nil || symbol.ValueDeclaration.Kind != ast.KindParameter { + panic("expected symbol.ValueDeclaration to be a parameter") + } + paramProp1, paramProp2 := state.checker.GetSymbolsOfParameterPropertyDeclaration(symbol.ValueDeclaration, symbol.Name) + // Debug.assert(paramProps.length == 2 && (paramProps[0].flags & SymbolFlags.FunctionScopedVariable) && (paramProps[1].flags & SymbolFlags.Property)); // is [parameter, property] + if !(paramProp1.Flags&ast.SymbolFlagsFunctionScopedVariable != 0 && paramProp2.Flags&ast.SymbolFlagsProperty != 0) { + panic("Expected a parameter and a property") + } + return fromRoot(core.IfElse(symbol.Flags&ast.SymbolFlagsFunctionScopedVariable != 0, paramProp2, paramProp1), entryKindNone) + } + + if exportSpecifier := ast.GetDeclarationOfKind(symbol, ast.KindExportSpecifier); exportSpecifier != nil && (!isForRenamePopulateSearchSymbolSet || exportSpecifier.PropertyName() == nil) { + if localSymbol := state.checker.GetExportSpecifierLocalTargetSymbol(exportSpecifier); localSymbol != nil { + if res, kind := cbSymbol(localSymbol, nil /*rootSymbol*/, nil /*baseSymbol*/, entryKindNode); res != nil { + return res, kind + } + } + } + + // symbolAtLocation for a binding element is the local symbol. See if the search symbol is the property. + // Don't do this when populating search set for a rename when prefix and suffix text will be provided -- just rename the local. + if !isForRenamePopulateSearchSymbolSet { + var bindingElementPropertySymbol *ast.Symbol + if onlyIncludeBindingElementAtReferenceLocation { + if !isObjectBindingElementWithoutPropertyName(location.Parent) { + return nil, entryKindNone + } + bindingElementPropertySymbol = getPropertySymbolFromBindingElement(state.checker, location.Parent) + } else { + bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, state.checker) + } + if bindingElementPropertySymbol == nil { + return nil, entryKindNone + } + return fromRoot(bindingElementPropertySymbol, entryKindSearchedPropertyFoundLocal) + } + + // Debug.assert(isForRenamePopulateSearchSymbolSet); + + // due to the above assert and the arguments at the uses of this function, + // (onlyIncludeBindingElementAtReferenceLocation <=> !providePrefixAndSuffixTextForRename) holds + includeOriginalSymbolOfBindingElement := onlyIncludeBindingElementAtReferenceLocation + + if includeOriginalSymbolOfBindingElement { + if bindingElementPropertySymbol := getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, state.checker); bindingElementPropertySymbol != nil { + return fromRoot(bindingElementPropertySymbol, entryKindSearchedPropertyFoundLocal) + } + } + return nil, entryKindNone +} + +// Search for all occurrences of an identifier in a source file (and filter out the ones that match). +func (state *refState) searchForName(sourceFile *ast.SourceFile, search *refSearch) { + if _, ok := getNameTable(sourceFile)[search.escapedText]; ok { + state.getReferencesInSourceFile(sourceFile, search, true /*addReferencesHere*/) + } +} diff --git a/internal/ls/findallreferences_test.go b/internal/ls/findallreferences_test.go new file mode 100644 index 0000000000..268975ec39 --- /dev/null +++ b/internal/ls/findallreferences_test.go @@ -0,0 +1,258 @@ +package ls_test + +import ( + "strings" + "testing" + + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil/projecttestutil" + "gotest.tools/v3/assert" +) + +func runFindReferencesTest(t *testing.T, input string, expectedLocations map[string]*core.Set[string]) { + testData := fourslash.ParseTestData(t, input, "/file1.ts") + markerPositions := testData.MarkerPositions + ctx := projecttestutil.WithRequestID(t.Context()) + service, done := createLanguageService(ctx, testData.Files[0].Filename, map[string]any{ + testData.Files[0].Filename: testData.Files[0].Content, + }) + defer done() + + // for each marker location, calculate the expected ref location ahead of time so we don't have to re-calculate each location for every reference call + allExpectedLocations := map[lsproto.Location]string{} + for _, marker := range testData.MarkerPositions { + allExpectedLocations[*service.GetExpectedReferenceFromMarker(marker.Filename, marker.Position)] = marker.Name + } + + for requestMarkerName, expectedSet := range expectedLocations { + marker, ok := markerPositions[requestMarkerName] + if !ok { + t.Fatalf("No marker found for '%s'", requestMarkerName) + } + + referencesResult := service.TestProvideReferences(marker.Filename, marker.Position) + libReference := 0 + + for _, loc := range referencesResult { + if name, ok := allExpectedLocations[*loc]; ok { + // check if returned ref location is in this request's expected set + assert.Assert(t, expectedSet.Has(name), "Reference to '%s' not expected when find all references requested at %s", name, requestMarkerName) + } else if strings.Contains(string(loc.Uri), "///bundled:///libs") { + libReference += 1 + } else { + t.Fatalf("Found reference at loc '%v' when find all references triggered at '%s'", loc, requestMarkerName) + } + } + expectedNum := expectedSet.Len() + libReference + assert.Assert(t, len(referencesResult) == expectedNum, "assertion failed: expected %d references at marker %s, got %d", expectedNum, requestMarkerName, len(referencesResult)) + } +} + +func TestFindReferences(t *testing.T) { + t.Parallel() + + testCases := []struct { + title string + input string + expectedLocations map[string]*core.Set[string] + }{ + { + title: "getOccurencesIsDefinitionOfParameter", + input: `function f(/*1*/x: number) { + return /*2*/x + 1 +}`, + expectedLocations: map[string]*core.Set[string]{ + "1": core.NewSetFromItems("1", "2"), + "2": core.NewSetFromItems("1", "2"), + }, + }, + { + title: "findAllRefsUnresolvedSymbols1", + input: `let a: /*a0*/Bar; +let b: /*a1*/Bar; +let c: /*a2*/Bar; +let d: /*b0*/Bar./*c0*/X; +let e: /*b1*/Bar./*c1*/X; +let f: /*b2*/Bar./*d0*/X./*e0*/Y;`, + expectedLocations: map[string]*core.Set[string]{ + "a0": core.NewSetFromItems("a0", "a1", "a2"), + "a1": core.NewSetFromItems("a0", "a1", "a2"), + "a2": core.NewSetFromItems("a0", "a1", "a2"), + "b0": core.NewSetFromItems("b0", "b1", "b2"), + "b1": core.NewSetFromItems("b0", "b1", "b2"), + "b2": core.NewSetFromItems("b0", "b1", "b2"), + "c0": core.NewSetFromItems("c0", "c1"), + "c1": core.NewSetFromItems("c0", "c1"), + "d0": core.NewSetFromItems("d0"), + "e0": core.NewSetFromItems("e0"), + }, + }, + { + title: "findAllRefsPrimitive partial", + input: `const x: /*1*/any = 0; +const any = 2; +const y: /*2*/any = any; +function f(b: /*3*/boolean): /*4*/boolean; +type T = /*5*/never; type U = /*6*/never; +function n(x: /*7*/number): /*8*/number; +function o(x: /*9*/object): /*10*/object; +function s(x: /*11*/string): /*12*/string; +function sy(s: /*13*/symbol): /*14*/symbol; +function v(v: /*15*/void): /*16*/void; +`, + expectedLocations: map[string]*core.Set[string]{ + "1": core.NewSetFromItems("1", "2"), + "2": core.NewSetFromItems("1", "2"), + "3": core.NewSetFromItems("3", "4"), + "4": core.NewSetFromItems("3", "4"), + "5": core.NewSetFromItems("5", "6"), + "6": core.NewSetFromItems("5", "6"), + "7": core.NewSetFromItems("7", "8"), + "8": core.NewSetFromItems("7", "8"), + "9": core.NewSetFromItems("9", "10"), + "10": core.NewSetFromItems("9", "10"), + "11": core.NewSetFromItems("11", "12"), + "12": core.NewSetFromItems("11", "12"), + "13": core.NewSetFromItems("13", "14"), + "14": core.NewSetFromItems("13", "14"), + "15": core.NewSetFromItems("15", "16"), + "16": core.NewSetFromItems("15", "16"), + }, + }, + { + title: "findAllReferencesDynamicImport1Partial", + input: `export function foo() { return "foo"; } +/*1*/import("/*2*/./foo") +/*3*/var x = import("/*4*/./foo")`, + expectedLocations: map[string]*core.Set[string]{ + "1": {}, + }, + }, + { + title: "findAllRefsForDefaultExport02 partial", + input: `/*1*/export default function /*2*/DefaultExportedFunction() { + return /*3*/DefaultExportedFunction; +} + +var x: typeof /*4*/DefaultExportedFunction; + +var y = /*5*/DefaultExportedFunction(); + +/*6*/namespace /*7*/DefaultExportedFunction { +}`, + expectedLocations: map[string]*core.Set[string]{ + "2": core.NewSetFromItems("2", "3", "4", "5"), + "3": core.NewSetFromItems("2", "3", "4", "5"), + "4": core.NewSetFromItems("2", "3", "4", "5"), + "5": core.NewSetFromItems("2", "3", "4", "5"), + "7": core.NewSetFromItems("7"), + }, + }, + { + title: "findAllReferPropertyAccessExpressionHeritageClause", + input: `class B {} +function foo() { + return {/*1*/B: B}; +} +class C extends (foo())./*2*/B {} +class C1 extends foo()./*3*/B {}`, + expectedLocations: map[string]*core.Set[string]{ + "1": core.NewSetFromItems("1", "2", "3"), + "2": core.NewSetFromItems("1", "2", "3"), + "3": core.NewSetFromItems("1", "2", "3"), + }, + }, + { + title: "findAllRefsForFunctionExpression01 partial", + input: `var foo = /*1*/function /*2*/foo(a = /*3*/foo(), b = () => /*4*/foo) { + /*5*/foo(/*6*/foo, /*7*/foo); +}`, + expectedLocations: map[string]*core.Set[string]{ + "1": core.NewSetFromItems("1", "2", "3", "4", "5", "6", "7"), + "2": core.NewSetFromItems("1", "2", "3", "4", "5", "6", "7"), + "3": core.NewSetFromItems("1", "2", "3", "4", "5", "6", "7"), + "4": core.NewSetFromItems("1", "2", "3", "4", "5", "6", "7"), + "5": core.NewSetFromItems("1", "2", "3", "4", "5", "6", "7"), + "6": core.NewSetFromItems("1", "2", "3", "4", "5", "6", "7"), + "7": core.NewSetFromItems("1", "2", "3", "4", "5", "6", "7"), + }, + }, + { + title: "findAllRefsForObjectSpread", + input: `interface A1 { readonly /*0*/a: string }; +interface A2 { /*1*/a?: number }; +let a1: A1; +let a2: A2; +let a12 = { ...a1, ...a2 }; +a12./*2*/a; +a1./*3*/a;`, + expectedLocations: map[string]*core.Set[string]{ + "0": core.NewSetFromItems("0", "2", "3"), + "1": core.NewSetFromItems("1", "2"), + "2": core.NewSetFromItems("0", "1", "2"), + "3": core.NewSetFromItems("0", "2", "3"), + }, + }, + { + title: "findAllRefsForObjectLiteralProperties", + input: `var x = { + /*1*/property: {} +}; + +x./*2*/property; + +/*3*/let {/*4*/property: pVar} = x;`, + expectedLocations: map[string]*core.Set[string]{ + "0": core.NewSetFromItems("0", "2", "3", "4"), + "1": core.NewSetFromItems("1", "2", "3", "4"), + "2": core.NewSetFromItems("1", "2", "3", "4"), + "3": core.NewSetFromItems("1", "2", "3", "4"), + }, + }, + { + title: "findAllRefsImportEquals", + input: `import j = N./*0*/q; +namespace N { export const /*1*/q = 0; }`, + expectedLocations: map[string]*core.Set[string]{ + "0": core.NewSetFromItems("0", "1"), + }, + }, + { + title: "findAllRefsForRest", + input: `interface Gen { +x: number +/*0*/parent: Gen; +millennial: string; +} +let t: Gen; +var { x, ...rest } = t; +rest./*1*/parent;`, + expectedLocations: map[string]*core.Set[string]{ + "0": core.NewSetFromItems("0", "1"), + "1": core.NewSetFromItems("0", "1"), + }, + }, + { + title: "findAllRefsForVariableInExtendsClause01", + input: `/*1*/var /*2*/Base = class { }; +class C extends /*3*/Base { }`, + expectedLocations: map[string]*core.Set[string]{ + "1": core.NewSetFromItems("1", "2", "3"), + "2": core.NewSetFromItems("1", "2", "3"), + "3": core.NewSetFromItems("1", "2", "3"), + }, + }, + } + + for _, testCase := range testCases { + if testCase.title != "findAllReferPropertyAccessExpressionHeritageClause" { + continue + } + t.Run(testCase.title, func(t *testing.T) { + t.Parallel() + runFindReferencesTest(t, testCase.input, testCase.expectedLocations) + }) + } +} diff --git a/internal/ls/findallreferencesexport_test.go b/internal/ls/findallreferencesexport_test.go new file mode 100644 index 0000000000..0077a3d7a6 --- /dev/null +++ b/internal/ls/findallreferencesexport_test.go @@ -0,0 +1,31 @@ +package ls + +import ( + "github.com/microsoft/typescript-go/internal/astnav" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" +) + +func (l *LanguageService) GetExpectedReferenceFromMarker(fileName string, pos int) *lsproto.Location { + // Temporary testing function--this function only works for markers that are on symbols/names. + // We won't need this once marker ranges are implemented, or once reference tests are baselined + _, sourceFile := l.tryGetProgramAndFile(fileName) + node := astnav.GetTouchingPropertyName(sourceFile, pos) + return &lsproto.Location{ + Uri: FileNameToDocumentURI(fileName), + Range: *l.createLspRangeFromNode(node, sourceFile), + } +} + +func (l *LanguageService) TestProvideReferences(fileName string, pos int) []*lsproto.Location { + _, sourceFile := l.tryGetProgramAndFile(fileName) + lsPos := l.converters.PositionToLineAndCharacter(sourceFile, core.TextPos(pos)) + return l.ProvideReferences(&lsproto.ReferenceParams{ + TextDocumentPositionParams: lsproto.TextDocumentPositionParams{ + TextDocument: lsproto.TextDocumentIdentifier{ + Uri: FileNameToDocumentURI(fileName), + }, + Position: lsPos, + }, + }) +} diff --git a/internal/ls/format.go b/internal/ls/format.go new file mode 100644 index 0000000000..199c983d38 --- /dev/null +++ b/internal/ls/format.go @@ -0,0 +1,125 @@ +package ls + +import ( + "context" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/format" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" +) + +func toFormatCodeSettings(opt *lsproto.FormattingOptions) *format.FormatCodeSettings { + initial := format.GetDefaultFormatCodeSettings("\n") + initial.TabSize = int(opt.TabSize) + initial.IndentSize = int(opt.TabSize) + initial.ConvertTabsToSpaces = opt.InsertSpaces + if opt.TrimTrailingWhitespace != nil { + initial.TrimTrailingWhitespace = *opt.TrimTrailingWhitespace + } + + // !!! get format settings + // TODO: We support a _lot_ more options than this + return initial +} + +func (l *LanguageService) toLSProtoTextEdits(file *ast.SourceFile, changes []core.TextChange) []*lsproto.TextEdit { + result := make([]*lsproto.TextEdit, 0, len(changes)) + for _, c := range changes { + result = append(result, &lsproto.TextEdit{ + NewText: c.NewText, + Range: *l.createLspRangeFromBounds(c.Pos(), c.End(), file), + }) + } + return result +} + +func (l *LanguageService) ProvideFormatDocument( + ctx context.Context, + documentURI lsproto.DocumentUri, + options *lsproto.FormattingOptions, +) ([]*lsproto.TextEdit, error) { + _, file := l.getProgramAndFile(documentURI) + return l.toLSProtoTextEdits(file, l.getFormattingEditsForDocument( + ctx, + file, + toFormatCodeSettings(options), + )), nil +} + +func (l *LanguageService) ProvideFormatDocumentRange( + ctx context.Context, + documentURI lsproto.DocumentUri, + options *lsproto.FormattingOptions, + r lsproto.Range, +) ([]*lsproto.TextEdit, error) { + _, file := l.getProgramAndFile(documentURI) + return l.toLSProtoTextEdits(file, l.getFormattingEditsForRange( + ctx, + file, + toFormatCodeSettings(options), + l.converters.FromLSPRange(file, r), + )), nil +} + +func (l *LanguageService) ProvideFormatDocumentOnType( + ctx context.Context, + documentURI lsproto.DocumentUri, + options *lsproto.FormattingOptions, + position lsproto.Position, + character string, +) ([]*lsproto.TextEdit, error) { + _, file := l.getProgramAndFile(documentURI) + return l.toLSProtoTextEdits(file, l.getFormattingEditsAfterKeystroke( + ctx, + file, + toFormatCodeSettings(options), + int(l.converters.LineAndCharacterToPosition(file, position)), + character, + )), nil +} + +func (l *LanguageService) getFormattingEditsForRange( + ctx context.Context, + file *ast.SourceFile, + options *format.FormatCodeSettings, + r core.TextRange, +) []core.TextChange { + ctx = format.WithFormatCodeSettings(ctx, options, options.NewLineCharacter) + return format.FormatSelection(ctx, file, r.Pos(), r.End()) +} + +func (l *LanguageService) getFormattingEditsForDocument( + ctx context.Context, + file *ast.SourceFile, + options *format.FormatCodeSettings, +) []core.TextChange { + ctx = format.WithFormatCodeSettings(ctx, options, options.NewLineCharacter) + return format.FormatDocument(ctx, file) +} + +func (l *LanguageService) getFormattingEditsAfterKeystroke( + ctx context.Context, + file *ast.SourceFile, + options *format.FormatCodeSettings, + position int, + key string, +) []core.TextChange { + ctx = format.WithFormatCodeSettings(ctx, options, options.NewLineCharacter) + + if isInComment(file, position, nil) == nil { + switch key { + case "{": + return format.FormatOnOpeningCurly(ctx, file, position) + case "}": + return format.FormatOnClosingCurly(ctx, file, position) + case ";": + return format.FormatOnSemicolon(ctx, file, position) + case "\n": + return format.FormatOnEnter(ctx, file, position) + default: + return nil + } + } + return nil +} diff --git a/internal/ls/signaturehelp.go b/internal/ls/signaturehelp.go new file mode 100644 index 0000000000..dcca18f73f --- /dev/null +++ b/internal/ls/signaturehelp.go @@ -0,0 +1,1149 @@ +package ls + +import ( + "context" + "strings" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/astnav" + "github.com/microsoft/typescript-go/internal/checker" + "github.com/microsoft/typescript-go/internal/compiler" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/nodebuilder" + "github.com/microsoft/typescript-go/internal/printer" + "github.com/microsoft/typescript-go/internal/scanner" +) + +type callInvocation struct { + node *ast.Node +} + +type typeArgsInvocation struct { + called *ast.Identifier +} + +type contextualInvocation struct { + signature *checker.Signature + node *ast.Node // Just for enclosingDeclaration for printing types + symbol *ast.Symbol +} + +type invocation struct { + callInvocation *callInvocation + typeArgsInvocation *typeArgsInvocation + contextualInvocation *contextualInvocation +} + +func (l *LanguageService) ProvideSignatureHelp( + ctx context.Context, + documentURI lsproto.DocumentUri, + position lsproto.Position, + context *lsproto.SignatureHelpContext, + clientOptions *lsproto.SignatureHelpClientCapabilities, + preferences *UserPreferences, +) *lsproto.SignatureHelp { + program, sourceFile := l.getProgramAndFile(documentURI) + return l.GetSignatureHelpItems( + ctx, + int(l.converters.LineAndCharacterToPosition(sourceFile, position)), + program, + sourceFile, + context, + clientOptions, + preferences) +} + +func (l *LanguageService) GetSignatureHelpItems( + ctx context.Context, + position int, + program *compiler.Program, + sourceFile *ast.SourceFile, + context *lsproto.SignatureHelpContext, + clientOptions *lsproto.SignatureHelpClientCapabilities, + preferences *UserPreferences, +) *lsproto.SignatureHelp { + typeChecker, done := program.GetTypeCheckerForFile(ctx, sourceFile) + defer done() + + // Decide whether to show signature help + startingToken := astnav.FindPrecedingToken(sourceFile, position) + if startingToken == nil { + // We are at the beginning of the file + return nil + } + + // Only need to be careful if the user typed a character and signature help wasn't showing. + onlyUseSyntacticOwners := context.TriggerKind == lsproto.SignatureHelpTriggerKindTriggerCharacter + + // Bail out quickly in the middle of a string or comment, don't provide signature help unless the user explicitly requested it. + if onlyUseSyntacticOwners && IsInString(sourceFile, position, startingToken) { // isInComment(sourceFile, position) needs formatting implemented + return nil + } + + isManuallyInvoked := context.TriggerKind == 1 + argumentInfo := getContainingArgumentInfo(startingToken, sourceFile, typeChecker, isManuallyInvoked, position) + if argumentInfo == nil { + return nil + } + + // cancellationToken.throwIfCancellationRequested(); + + // Extra syntactic and semantic filtering of signature help + candidateInfo := getCandidateOrTypeInfo(argumentInfo, typeChecker, sourceFile, startingToken, onlyUseSyntacticOwners) + // cancellationToken.throwIfCancellationRequested(); + + // if (!candidateInfo) { !!! + // // We didn't have any sig help items produced by the TS compiler. If this is a JS + // // file, then see if we can figure out anything better. + // return isSourceFileJS(sourceFile) ? createJSSignatureHelpItems(argumentInfo, program, cancellationToken) : undefined; + // } + + // return typeChecker.runWithCancellationToken(cancellationToken, typeChecker => + if candidateInfo.candidateInfo != nil { + return createSignatureHelpItems(candidateInfo.candidateInfo.candidates, candidateInfo.candidateInfo.resolvedSignature, argumentInfo, sourceFile, typeChecker, onlyUseSyntacticOwners, clientOptions) + } + return createTypeHelpItems(candidateInfo.typeInfo, argumentInfo, sourceFile, clientOptions, typeChecker) +} + +func createTypeHelpItems(symbol *ast.Symbol, argumentInfo *argumentListInfo, sourceFile *ast.SourceFile, clientOptions *lsproto.SignatureHelpClientCapabilities, c *checker.Checker) *lsproto.SignatureHelp { + typeParameters := c.GetLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) + if typeParameters == nil { + return nil + } + item := getTypeHelpItem(symbol, typeParameters, getEnclosingDeclarationFromInvocation(argumentInfo.invocation), sourceFile, c) + + // Converting signatureHelpParameter to *lsproto.ParameterInformation + parameters := make([]*lsproto.ParameterInformation, len(item.Parameters)) + for i, param := range item.Parameters { + parameters[i] = param.parameterInfo + } + signatureInformation := []*lsproto.SignatureInformation{ + { + Label: item.Label, + Documentation: nil, + Parameters: ¶meters, + }, + } + + var activeParameter *lsproto.Nullable[uint32] + if argumentInfo.argumentIndex == nil { + if clientOptions.SignatureInformation.NoActiveParameterSupport != nil && *clientOptions.SignatureInformation.NoActiveParameterSupport { + activeParameter = nil + } else { + activeParameter = ptrTo(lsproto.ToNullable(uint32(0))) + } + } else { + activeParameter = ptrTo(lsproto.ToNullable(uint32(*argumentInfo.argumentIndex))) + } + return &lsproto.SignatureHelp{ + Signatures: signatureInformation, + ActiveSignature: ptrTo(uint32(0)), + ActiveParameter: activeParameter, + } +} + +func getTypeHelpItem(symbol *ast.Symbol, typeParameter []*checker.Type, enclosingDeclaration *ast.Node, sourceFile *ast.SourceFile, c *checker.Checker) signatureInformation { + printer := printer.NewPrinter(printer.PrinterOptions{NewLine: core.NewLineKindLF}, printer.PrintHandlers{}, nil) + + parameters := make([]signatureHelpParameter, len(typeParameter)) + for i, typeParam := range typeParameter { + parameters[i] = createSignatureHelpParameterForTypeParameter(typeParam, sourceFile, enclosingDeclaration, c, printer) + } + + // Creating display label + var displayParts strings.Builder + displayParts.WriteString(c.SymbolToString(symbol)) + if len(parameters) != 0 { + displayParts.WriteString(scanner.TokenToString(ast.KindLessThanToken)) + for i, typeParameter := range parameters { + if i > 0 { + displayParts.WriteString(", ") + } + displayParts.WriteString(*typeParameter.parameterInfo.Label.String) + } + displayParts.WriteString(scanner.TokenToString(ast.KindGreaterThanToken)) + } + + return signatureInformation{ + Label: displayParts.String(), + Documentation: nil, + Parameters: parameters, + IsVariadic: false, + } +} + +func createSignatureHelpItems(candidates []*checker.Signature, resolvedSignature *checker.Signature, argumentInfo *argumentListInfo, sourceFile *ast.SourceFile, c *checker.Checker, useFullPrefix bool, clientOptions *lsproto.SignatureHelpClientCapabilities) *lsproto.SignatureHelp { + enclosingDeclaration := getEnclosingDeclarationFromInvocation(argumentInfo.invocation) + if enclosingDeclaration == nil { + return nil + } + var callTargetSymbol *ast.Symbol + if argumentInfo.invocation.contextualInvocation != nil { + callTargetSymbol = argumentInfo.invocation.contextualInvocation.symbol + } else { + callTargetSymbol = c.GetSymbolAtLocation(getExpressionFromInvocation(argumentInfo)) + if callTargetSymbol == nil && useFullPrefix && resolvedSignature.Declaration() != nil { + callTargetSymbol = resolvedSignature.Declaration().Symbol() + } + } + + var callTargetDisplayParts strings.Builder + if callTargetSymbol != nil { + callTargetDisplayParts.WriteString(c.SymbolToString(callTargetSymbol)) + } + items := make([][]signatureInformation, len(candidates)) + for i, candidateSignature := range candidates { + items[i] = getSignatureHelpItem(candidateSignature, argumentInfo.isTypeParameterList, callTargetDisplayParts.String(), enclosingDeclaration, sourceFile, c) + } + + selectedItemIndex := 0 + itemSeen := 0 + for i := range items { + item := items[i] + if (candidates)[i] == resolvedSignature { + selectedItemIndex = itemSeen + if len(item) > 1 { + count := 0 + for _, j := range item { + if j.IsVariadic || len(j.Parameters) >= argumentInfo.argumentCount { + selectedItemIndex = itemSeen + count + break + } + count++ + } + } + } + itemSeen = itemSeen + len(item) + } + + // Debug.assert(selectedItemIndex !== -1) + flattenedSignatures := []signatureInformation{} + for _, item := range items { + flattenedSignatures = append(flattenedSignatures, item...) + } + if len(flattenedSignatures) == 0 { + return nil + } + + // Converting []signatureInformation to []*lsproto.SignatureInformation + signatureInformation := make([]*lsproto.SignatureInformation, len(flattenedSignatures)) + for i, item := range flattenedSignatures { + parameters := make([]*lsproto.ParameterInformation, len(item.Parameters)) + for j, param := range item.Parameters { + parameters[j] = param.parameterInfo + } + signatureInformation[i] = &lsproto.SignatureInformation{ + Label: item.Label, + Documentation: nil, + Parameters: ¶meters, + } + } + + var activeParameter *lsproto.Nullable[uint32] + if argumentInfo.argumentIndex == nil { + if clientOptions.SignatureInformation.NoActiveParameterSupport != nil && *clientOptions.SignatureInformation.NoActiveParameterSupport { + activeParameter = nil + } + } else { + activeParameter = ptrTo(lsproto.ToNullable(uint32(*argumentInfo.argumentIndex))) + } + help := &lsproto.SignatureHelp{ + Signatures: signatureInformation, + ActiveSignature: ptrTo(uint32(selectedItemIndex)), + ActiveParameter: activeParameter, + } + + activeSignature := flattenedSignatures[selectedItemIndex] + if activeSignature.IsVariadic { + firstRest := core.FindIndex(activeSignature.Parameters, func(p signatureHelpParameter) bool { + return p.isRest + }) + if -1 < firstRest && firstRest < len(activeSignature.Parameters)-1 { + // We don't have any code to get this correct; instead, don't highlight a current parameter AT ALL + help.ActiveParameter = ptrTo(lsproto.ToNullable(uint32(len(activeSignature.Parameters)))) + } + if help.ActiveParameter != nil && *&help.ActiveParameter.Value > uint32(len(activeSignature.Parameters)-1) { + help.ActiveParameter = ptrTo(lsproto.ToNullable(uint32(len(activeSignature.Parameters) - 1))) + } + } + return help +} + +func getSignatureHelpItem(candidate *checker.Signature, isTypeParameterList bool, callTargetSymbol string, enclosingDeclaration *ast.Node, sourceFile *ast.SourceFile, c *checker.Checker) []signatureInformation { + var infos []*signatureHelpItemInfo + if isTypeParameterList { + infos = itemInfoForTypeParameters(candidate, c, enclosingDeclaration, sourceFile) + } else { + infos = itemInfoForParameters(candidate, c, enclosingDeclaration, sourceFile) + } + + suffixDisplayParts := returnTypeToDisplayParts(candidate, c) + + result := make([]signatureInformation, len(infos)) + for i, info := range infos { + var display strings.Builder + display.WriteString(callTargetSymbol) + display.WriteString(info.displayParts) + display.WriteString(suffixDisplayParts) + result[i] = signatureInformation{ + Label: display.String(), + Documentation: nil, + Parameters: info.parameters, + IsVariadic: info.isVariadic, + } + } + return result +} + +func returnTypeToDisplayParts(candidateSignature *checker.Signature, c *checker.Checker) string { + var returnType strings.Builder + returnType.WriteString(": ") + predicate := c.GetTypePredicateOfSignature(candidateSignature) + if predicate != nil { + returnType.WriteString(c.TypePredicateToString(predicate)) + } else { + returnType.WriteString(c.TypeToString(c.GetReturnTypeOfSignature(candidateSignature))) + } + return returnType.String() +} + +func itemInfoForTypeParameters(candidateSignature *checker.Signature, c *checker.Checker, enclosingDeclaration *ast.Node, sourceFile *ast.SourceFile) []*signatureHelpItemInfo { + printer := printer.NewPrinter(printer.PrinterOptions{NewLine: core.NewLineKindLF}, printer.PrintHandlers{}, nil) + + var typeParameters []*checker.Type + if candidateSignature.Target() != nil { + typeParameters = candidateSignature.Target().TypeParameters() + } else { + typeParameters = candidateSignature.TypeParameters() + } + signatureHelpTypeParameters := make([]signatureHelpParameter, len(typeParameters)) + for i, typeParameter := range typeParameters { + signatureHelpTypeParameters[i] = createSignatureHelpParameterForTypeParameter(typeParameter, sourceFile, enclosingDeclaration, c, printer) + } + + thisParameter := []signatureHelpParameter{} + if candidateSignature.ThisParameter() != nil { + thisParameter = []signatureHelpParameter{createSignatureHelpParameterForParameter(candidateSignature.ThisParameter(), enclosingDeclaration, printer, sourceFile, c)} + } + + // Creating type parameter display label + var displayParts strings.Builder + displayParts.WriteString(scanner.TokenToString(ast.KindLessThanToken)) + for i, typeParameter := range signatureHelpTypeParameters { + if i > 0 { + displayParts.WriteString(", ") + } + displayParts.WriteString(*typeParameter.parameterInfo.Label.String) + } + displayParts.WriteString(scanner.TokenToString(ast.KindGreaterThanToken)) + + // Creating display label for parameters like, (a: string, b: number) + lists := c.GetExpandedParameters(candidateSignature, false) + if len(lists) != 0 { + displayParts.WriteString(scanner.TokenToString(ast.KindOpenParenToken)) + } + + result := make([]*signatureHelpItemInfo, len(lists)) + for i, parameterList := range lists { + var displayParameters strings.Builder + displayParameters.WriteString(displayParts.String()) + parameters := thisParameter + for j, param := range parameterList { + parameter := createSignatureHelpParameterForParameter(param, enclosingDeclaration, printer, sourceFile, c) + parameters = append(parameters, parameter) + if j > 0 { + displayParameters.WriteString(", ") + } + displayParameters.WriteString(*parameter.parameterInfo.Label.String) + } + displayParameters.WriteString(scanner.TokenToString(ast.KindCloseParenToken)) + + result[i] = &signatureHelpItemInfo{ + isVariadic: false, + parameters: signatureHelpTypeParameters, + displayParts: displayParameters.String(), + } + } + return result +} + +func itemInfoForParameters(candidateSignature *checker.Signature, c *checker.Checker, enclosingDeclaratipn *ast.Node, sourceFile *ast.SourceFile) []*signatureHelpItemInfo { + printer := printer.NewPrinter(printer.PrinterOptions{NewLine: core.NewLineKindLF}, printer.PrintHandlers{}, nil) + + signatureHelpTypeParameters := make([]signatureHelpParameter, len(candidateSignature.TypeParameters())) + if len(candidateSignature.TypeParameters()) != 0 { + for i, typeParameter := range candidateSignature.TypeParameters() { + signatureHelpTypeParameters[i] = createSignatureHelpParameterForTypeParameter(typeParameter, sourceFile, enclosingDeclaratipn, c, printer) + } + } + + // Creating display label for type parameters like, + var displayParts strings.Builder + if len(signatureHelpTypeParameters) != 0 { + displayParts.WriteString(scanner.TokenToString(ast.KindLessThanToken)) + for _, typeParameter := range signatureHelpTypeParameters { + displayParts.WriteString(*typeParameter.parameterInfo.Label.String) + } + displayParts.WriteString(scanner.TokenToString(ast.KindGreaterThanToken)) + } + + // Creating display parts for parameters. For example, (a: string, b: number) + lists := c.GetExpandedParameters(candidateSignature, false) + if len(lists) != 0 { + displayParts.WriteString(scanner.TokenToString(ast.KindOpenParenToken)) + } + + isVariadic := func(parameterList []*ast.Symbol) bool { + if !c.HasEffectiveRestParameter(candidateSignature) { + return false + } + if len(lists) == 1 { + return true + } + return len(parameterList) != 0 && parameterList[len(parameterList)-1] != nil && (parameterList[len(parameterList)-1].CheckFlags&ast.CheckFlagsRestParameter != 0) + } + + result := make([]*signatureHelpItemInfo, len(lists)) + for i, parameterList := range lists { + parameters := make([]signatureHelpParameter, len(parameterList)) + var displayParameters strings.Builder + displayParameters.WriteString(displayParts.String()) + for j, param := range parameterList { + parameter := createSignatureHelpParameterForParameter(param, enclosingDeclaratipn, printer, sourceFile, c) + parameters[j] = parameter + if j > 0 { + displayParameters.WriteString(", ") + } + displayParameters.WriteString(*parameter.parameterInfo.Label.String) + } + displayParameters.WriteString(scanner.TokenToString(ast.KindCloseParenToken)) + + result[i] = &signatureHelpItemInfo{ + isVariadic: isVariadic(parameterList), + parameters: parameters, + displayParts: displayParameters.String(), + } + + } + return result +} + +const signatureHelpNodeBuilderFlags = nodebuilder.FlagsOmitParameterModifiers | nodebuilder.FlagsIgnoreErrors | nodebuilder.FlagsUseAliasDefinedOutsideCurrentScope + +func createSignatureHelpParameterForParameter(parameter *ast.Symbol, enclosingDeclaratipn *ast.Node, p *printer.Printer, sourceFile *ast.SourceFile, c *checker.Checker) signatureHelpParameter { + display := p.Emit(checker.NewNodeBuilder(c, printer.NewEmitContext()).SymbolToParameterDeclaration(parameter, enclosingDeclaratipn, signatureHelpNodeBuilderFlags, nodebuilder.InternalFlagsNone, nil), sourceFile) + isOptional := parameter.CheckFlags&ast.CheckFlagsOptionalParameter != 0 + isRest := parameter.CheckFlags&ast.CheckFlagsRestParameter != 0 + return signatureHelpParameter{ + parameterInfo: &lsproto.ParameterInformation{ + Label: lsproto.StringOrTuple{String: &display}, + Documentation: nil, + }, + isRest: isRest, + isOptional: isOptional, + } +} + +func createSignatureHelpParameterForTypeParameter(t *checker.Type, sourceFile *ast.SourceFile, enclosingDeclaration *ast.Node, c *checker.Checker, p *printer.Printer) signatureHelpParameter { + display := p.Emit(checker.NewNodeBuilder(c, printer.NewEmitContext()).TypeParameterToDeclaration(t, enclosingDeclaration, signatureHelpNodeBuilderFlags, nodebuilder.InternalFlagsNone, nil), sourceFile) + return signatureHelpParameter{ + parameterInfo: &lsproto.ParameterInformation{ + Label: lsproto.StringOrTuple{String: &display}, + }, + isRest: false, + isOptional: false, + } +} + +// Represents the signature of something callable. A signature +// can have a label, like a function-name, a doc-comment, and +// a set of parameters. +type signatureInformation struct { + // The Label of this signature. Will be shown in + // the UI. + Label string + // The human-readable doc-comment of this signature. Will be shown + // in the UI but can be omitted. + Documentation *string + // The Parameters of this signature. + Parameters []signatureHelpParameter + // Needed only here, not in lsp + IsVariadic bool +} + +type signatureHelpItemInfo struct { + isVariadic bool + parameters []signatureHelpParameter + displayParts string +} + +type signatureHelpParameter struct { + parameterInfo *lsproto.ParameterInformation + isRest bool + isOptional bool +} + +func getEnclosingDeclarationFromInvocation(invocation *invocation) *ast.Node { + if invocation.callInvocation != nil { + return invocation.callInvocation.node + } else if invocation.typeArgsInvocation != nil { + return invocation.typeArgsInvocation.called.AsNode() + } else { + return invocation.contextualInvocation.node + } +} + +func getExpressionFromInvocation(argumentInfo *argumentListInfo) *ast.Node { + if argumentInfo.invocation.callInvocation != nil { + return ast.GetInvokedExpression(argumentInfo.invocation.callInvocation.node) + } + return argumentInfo.invocation.typeArgsInvocation.called.AsNode() +} + +type candidateInfo struct { + candidates []*checker.Signature + resolvedSignature *checker.Signature +} + +type CandidateOrTypeInfo struct { + candidateInfo *candidateInfo + typeInfo *ast.Symbol +} + +func getCandidateOrTypeInfo(info *argumentListInfo, c *checker.Checker, sourceFile *ast.SourceFile, startingToken *ast.Node, onlyUseSyntacticOwners bool) *CandidateOrTypeInfo { + if info.invocation.callInvocation != nil { + if onlyUseSyntacticOwners && !isSyntacticOwner(startingToken, info.invocation.callInvocation.node, sourceFile) { + return nil + } + resolvedSignature, candidates := checker.GetResolvedSignatureForSignatureHelp(info.invocation.callInvocation.node, info.argumentCount, c) + return &CandidateOrTypeInfo{ + candidateInfo: &candidateInfo{ + candidates: candidates, + resolvedSignature: resolvedSignature, + }, + } + } + if info.invocation.typeArgsInvocation != nil { + called := info.invocation.typeArgsInvocation.called.AsNode() + container := called + if ast.IsIdentifier(called) { + container = called.Parent + } + if onlyUseSyntacticOwners && !containsPrecedingToken(startingToken, sourceFile, container) { + return nil + } + candidates := getPossibleGenericSignatures(called, info.argumentCount, c) + if len(candidates) != 0 { + return &CandidateOrTypeInfo{ + candidateInfo: &candidateInfo{ + candidates: candidates, + resolvedSignature: candidates[0], + }, + } + } + symbol := c.GetSymbolAtLocation(called) + return &CandidateOrTypeInfo{ + typeInfo: symbol, + } + } + if info.invocation.contextualInvocation != nil { + return &CandidateOrTypeInfo{ + candidateInfo: &candidateInfo{ + candidates: []*checker.Signature{info.invocation.contextualInvocation.signature}, + resolvedSignature: info.invocation.contextualInvocation.signature, + }, + } + } + return nil // return Debug.assertNever(invocation); +} + +func isSyntacticOwner(startingToken *ast.Node, node *ast.Node, sourceFile *ast.SourceFile) bool { // !!! not tested + if !ast.IsCallOrNewExpression(node) { + return false + } + invocationChildren := getTokensFromNode(node, sourceFile) + switch startingToken.Kind { + case ast.KindOpenParenToken: + return containsNode(invocationChildren, startingToken) + case ast.KindCommaToken: + return containsNode(invocationChildren, startingToken) + // !!! + // const containingList = findContainingList(startingToken); + // return !!containingList && contains(invocationChildren, containingList); + case ast.KindLessThanToken: + return containsPrecedingToken(startingToken, sourceFile, node.AsCallExpression().Expression) + default: + return false + } +} + +func containsPrecedingToken(startingToken *ast.Node, sourceFile *ast.SourceFile, container *ast.Node) bool { + pos := startingToken.Pos() + // There's a possibility that `startingToken.parent` contains only `startingToken` and + // missing nodes, none of which are valid to be returned by `findPrecedingToken`. In that + // case, the preceding token we want is actually higher up the tree—almost definitely the + // next parent, but theoretically the situation with missing nodes might be happening on + // multiple nested levels. + currentParent := startingToken.Parent + for currentParent != nil { + precedingToken := astnav.FindPrecedingToken(sourceFile, pos) + if precedingToken != nil { + return RangeContainsRange(container.Loc, precedingToken.Loc) + } + currentParent = currentParent.Parent + } + // return Debug.fail("Could not find preceding token"); + return false +} + +func getContainingArgumentInfo(node *ast.Node, sourceFile *ast.SourceFile, checker *checker.Checker, isManuallyInvoked bool, position int) *argumentListInfo { + for n := node; !ast.IsSourceFile(n) && (isManuallyInvoked || !ast.IsBlock(n)); n = n.Parent { + // If the node is not a subspan of its parent, this is a big problem. + // There have been crashes that might be caused by this violation. + // Debug.assert(rangeContainsRange(n.parent, n), "Not a subspan", () => `Child: ${Debug.formatSyntaxKind(n.kind)}, parent: ${Debug.formatSyntaxKind(n.parent.kind)}`); + argumentInfo := getImmediatelyContainingArgumentOrContextualParameterInfo(n, position, sourceFile, checker) + if argumentInfo != nil { + return argumentInfo + } + } + return nil +} + +func getImmediatelyContainingArgumentOrContextualParameterInfo(node *ast.Node, position int, sourceFile *ast.SourceFile, checker *checker.Checker) *argumentListInfo { + result := tryGetParameterInfo(node, sourceFile, checker) + if result == nil { + return getImmediatelyContainingArgumentInfo(node, position, sourceFile, checker) + } + return result +} + +type argumentListInfo struct { + isTypeParameterList bool + invocation *invocation + argumentsRange core.TextRange + argumentIndex *int + /** argumentCount is the *apparent* number of arguments. */ + argumentCount int +} + +// Returns relevant information for the argument list and the current argument if we are +// in the argument of an invocation; returns undefined otherwise. +func getImmediatelyContainingArgumentInfo(node *ast.Node, position int, sourceFile *ast.SourceFile, c *checker.Checker) *argumentListInfo { + parent := node.Parent + if ast.IsCallOrNewExpression(parent) { + // There are 3 cases to handle: + // 1. The token introduces a list, and should begin a signature help session + // 2. The token is either not associated with a list, or ends a list, so the session should end + // 3. The token is buried inside a list, and should give signature help + // + // The following are examples of each: + // + // Case 1: + // foo<#T, U>(#a, b) -> The token introduces a list, and should begin a signature help session + // Case 2: + // fo#o#(a, b)# -> The token is either not associated with a list, or ends a list, so the session should end + // Case 3: + // foo(a#, #b#) -> The token is buried inside a list, and should give signature help + // Find out if 'node' is an argument, a type argument, or neither + // const info = getArgumentOrParameterListInfo(node, position, sourceFile, checker); + list, argumentIndex, argumentCount, argumentSpan := getArgumentOrParameterListInfo(node, sourceFile, c) + isTypeParameterList := false + parentTypeArgumentList := parent.TypeArgumentList() + if parentTypeArgumentList != nil { + if parentTypeArgumentList.Pos() == list.Pos() { + isTypeParameterList = true + } + } + return &argumentListInfo{ + isTypeParameterList: isTypeParameterList, + invocation: &invocation{callInvocation: &callInvocation{node: parent}}, + argumentsRange: argumentSpan, + argumentIndex: argumentIndex, + argumentCount: argumentCount, + } + } else if isNoSubstitutionTemplateLiteral(node) && isTaggedTemplateExpression(parent) { + // Check if we're actually inside the template; + // otherwise we'll fall out and return undefined. + if isInsideTemplateLiteral(node, position, sourceFile) { + return getArgumentListInfoForTemplate(parent.AsTaggedTemplateExpression(), ptrTo(0), sourceFile) + } + return nil + } else if isTemplateHead(node) && parent.Parent.Kind == ast.KindTaggedTemplateExpression { + templateExpression := parent.AsTemplateExpression() + tagExpression := templateExpression.Parent.AsTaggedTemplateExpression() + + argumentIndex := ptrTo(1) + if isInsideTemplateLiteral(node, position, sourceFile) { + argumentIndex = ptrTo(0) + } + return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile) + } else if ast.IsTemplateSpan(parent) && isTaggedTemplateExpression(parent.Parent.Parent) { + templateSpan := parent + tagExpression := parent.Parent.Parent + + // If we're just after a template tail, don't show signature help. + if isTemplateTail(node) && !isInsideTemplateLiteral(node, position, sourceFile) { + return nil + } + + spanIndex := ast.IndexOfNode(templateSpan.Parent.AsTemplateExpression().TemplateSpans.Nodes, templateSpan) + argumentIndex := getArgumentIndexForTemplatePiece(spanIndex, templateSpan, position, sourceFile) + + return getArgumentListInfoForTemplate(tagExpression.AsTaggedTemplateExpression(), argumentIndex, sourceFile) + } else if ast.IsJsxOpeningLikeElement(parent) { + // Provide a signature help for JSX opening element or JSX self-closing element. + // This is not guarantee that JSX tag-name is resolved into stateless function component. (that is done in "getSignatureHelpItems") + // i.e + // export function MainButton(props: ButtonProps, context: any): JSX.Element { ... } + // = node.getStart(), "Assumed 'position' could not occur before node."); + if ast.IsTemplateLiteralToken(node) { + if isInsideTemplateLiteral(node, position, sourceFile) { + return ptrTo(0) + } + return ptrTo(spanIndex + 2) + } + return ptrTo(spanIndex + 1) +} + +func getAdjustedNode(node *ast.Node) *ast.Node { + switch node.Kind { + case ast.KindOpenParenToken, ast.KindCommaToken: + return node + default: + return ast.FindAncestor(node.Parent, func(n *ast.Node) bool { + if ast.IsParameter(n) { + return true + } else if ast.IsBindingElement(n) || ast.IsObjectBindingPattern(n) || ast.IsArrayBindingPattern(n) { + return false + } + return false + }) + } +} + +type contextualSignatureLocationInfo struct { + contextualType *checker.Type + argumentIndex *int + argumentCount int + argumentsSpan core.TextRange +} + +func getSpreadElementCount(node *ast.SpreadElement, c *checker.Checker) int { + spreadType := c.GetTypeAtLocation(node.Expression) + if checker.IsTupleType(spreadType) { + tupleType := spreadType.Target().AsTupleType() + if tupleType == nil { + return 0 + } + elementFlags := tupleType.ElementFlags() + fixedLength := tupleType.FixedLength() + if fixedLength == 0 { + return 0 + } + + firstOptionalIndex := core.FindIndex(elementFlags, func(f checker.ElementFlags) bool { + return (f&checker.ElementFlagsRequired == 0) + }) + if firstOptionalIndex < 0 { + return fixedLength + } + return firstOptionalIndex + } + return 0 +} + +func getArgumentIndex(node *ast.Node, arguments *ast.NodeList, sourceFile *ast.SourceFile, c *checker.Checker) *int { + return getArgumentIndexOrCount(getTokenFromNodeList(arguments, node.Parent, sourceFile), node, c) +} + +func getArgumentCount(node *ast.Node, arguments *ast.NodeList, sourceFile *ast.SourceFile, c *checker.Checker) int { + argumentCount := getArgumentIndexOrCount(getTokenFromNodeList(arguments, node.Parent, sourceFile), nil, c) + if argumentCount == nil { + return 0 + } + return *argumentCount +} + +func getArgumentIndexOrCount(arguments []*ast.Node, node *ast.Node, c *checker.Checker) *int { + var argumentIndex *int = nil + skipComma := false + for _, arg := range arguments { + if node != nil && arg == node { + if argumentIndex == nil { + argumentIndex = ptrTo(0) + } + if !skipComma && arg.Kind == ast.KindCommaToken { + *argumentIndex++ + } + return argumentIndex + } + if ast.IsSpreadElement(arg) { + if argumentIndex == nil { + argumentIndex = ptrTo(getSpreadElementCount(arg.AsSpreadElement(), c)) + } else { + argumentIndex = ptrTo(*argumentIndex + getSpreadElementCount(arg.AsSpreadElement(), c)) + } + skipComma = true + continue + } + if arg.Kind != ast.KindCommaToken { + if argumentIndex == nil { + argumentIndex = ptrTo(0) + } + *argumentIndex++ + skipComma = true + continue + } + if skipComma { + skipComma = false + continue + } + if argumentIndex == nil { + argumentIndex = ptrTo(0) + } + *argumentIndex++ + } + if node != nil { + return argumentIndex + } + // The argument count for a list is normally the number of non-comma children it has. + // For example, if you have "Foo(a,b)" then there will be three children of the arg + // list 'a' '' 'b'. So, in this case the arg count will be 2. However, there + // is a small subtlety. If you have "Foo(a,)", then the child list will just have + // 'a' ''. So, in the case where the last child is a comma, we increase the + // arg count by one to compensate. + argumentCount := argumentIndex + if len(arguments) > 0 && arguments[len(arguments)-1].Kind == ast.KindCommaToken { + if argumentIndex == nil { + argumentIndex = ptrTo(0) + } + argumentCount = ptrTo(*argumentIndex + 1) + } + return argumentCount +} + +func getArgumentOrParameterListInfo(node *ast.Node, sourceFile *ast.SourceFile, c *checker.Checker) (*ast.NodeList, *int, int, core.TextRange) { + arguments, argumentIndex := getArgumentOrParameterListAndIndex(node, sourceFile, c) + argumentCount := getArgumentCount(node, arguments, sourceFile, c) + argumentSpan := getApplicableSpanForArguments(arguments, node, sourceFile) + return arguments, argumentIndex, argumentCount, argumentSpan +} + +func getApplicableSpanForArguments(argumentList *ast.NodeList, node *ast.Node, sourceFile *ast.SourceFile) core.TextRange { + // We use full start and skip trivia on the end because we want to include trivia on + // both sides. For example, + // + // foo( /*comment */ a, b, c /*comment*/ ) + // | | + // + // The applicable span is from the first bar to the second bar (inclusive, + // but not including parentheses) + if argumentList == nil && node != nil { + // If the user has just opened a list, and there are no arguments. + // For example, foo( ) + // | | + return core.NewTextRange(node.End(), scanner.SkipTrivia(sourceFile.Text(), node.End())) + } + applicableSpanStart := argumentList.Pos() + applicableSpanEnd := scanner.SkipTrivia(sourceFile.Text(), argumentList.End()) + return core.NewTextRange(applicableSpanStart, applicableSpanEnd) +} + +func getArgumentOrParameterListAndIndex(node *ast.Node, sourceFile *ast.SourceFile, c *checker.Checker) (*ast.NodeList, *int) { + if node.Kind == ast.KindLessThanToken || node.Kind == ast.KindOpenParenToken { + // Find the list that starts right *after* the < or ( token. + // If the user has just opened a list, consider this item 0. + list := getChildListThatStartsWithOpenerToken(node.Parent, node) + return list, ptrTo(0) + } else { + // findListItemInfo can return undefined if we are not in parent's argument list + // or type argument list. This includes cases where the cursor is: + // - To the right of the closing parenthesis, non-substitution template, or template tail. + // - Between the type arguments and the arguments (greater than token) + // - On the target of the call (parent.func) + // - On the 'new' keyword in a 'new' expression + var arguments *ast.NodeList + switch node.Parent.Kind { + case ast.KindCallExpression: + arguments = node.Parent.AsCallExpression().Arguments + case ast.KindNewExpression: + arguments = node.Parent.AsNewExpression().Arguments + case ast.KindParenthesizedExpression: + arguments = node.Parent.AsParenthesizedExpression().ExpressionBase.NodeBase.Node.ArgumentList() // !!! + case ast.KindMethodDeclaration: + arguments = node.Parent.AsMethodDeclaration().FunctionLikeWithBodyBase.Parameters + case ast.KindFunctionExpression: + arguments = node.Parent.AsFunctionExpression().FunctionLikeWithBodyBase.Parameters + case ast.KindArrowFunction: + arguments = node.Parent.AsArrowFunction().FunctionLikeWithBodyBase.Parameters + } + // Find the index of the argument that contains the node. + argumentIndex := getArgumentIndex(node, arguments, sourceFile, c) + return arguments, argumentIndex + } +} + +func getChildListThatStartsWithOpenerToken(parent *ast.Node, openerToken *ast.Node) *ast.NodeList { //!!! + if ast.IsCallExpression(parent) { + parentCallExpression := parent.AsCallExpression() + if openerToken.Kind == ast.KindLessThanToken { + return parentCallExpression.TypeArgumentList() + } + return parentCallExpression.Arguments + } else if ast.IsNewExpression(parent) { + parentNewExpression := parent.AsNewExpression() + if openerToken.Kind == ast.KindLessThanToken { + return parentNewExpression.TypeArgumentList() + } + return parentNewExpression.Arguments + } + return nil +} + +func tryGetParameterInfo(startingToken *ast.Node, sourceFile *ast.SourceFile, c *checker.Checker) *argumentListInfo { + node := getAdjustedNode(startingToken) + if node == nil { + return nil + } + info := getContextualSignatureLocationInfo(node, sourceFile, c) + if info == nil { + return nil + } + + // for optional function condition + nonNullableContextualType := c.GetNonNullableType(info.contextualType) + if nonNullableContextualType == nil { + return nil + } + + symbol := nonNullableContextualType.Symbol() + if symbol == nil { + return nil + } + + signatures := c.GetSignaturesOfType(nonNullableContextualType, checker.SignatureKindCall) + if signatures == nil || signatures[len(signatures)-1] == nil { + return nil + } + signature := signatures[len(signatures)-1] + + contextualInvocation := &contextualInvocation{ + signature: signature, + node: startingToken, + symbol: chooseBetterSymbol(symbol), + } + return &argumentListInfo{ + isTypeParameterList: false, + invocation: &invocation{contextualInvocation: contextualInvocation}, + argumentsRange: info.argumentsSpan, + argumentIndex: info.argumentIndex, + argumentCount: info.argumentCount, + } +} + +func chooseBetterSymbol(s *ast.Symbol) *ast.Symbol { + if s.Name == ast.InternalSymbolNameType { + for _, d := range s.Declarations { + if ast.IsFunctionTypeNode(d) && ast.CanHaveSymbol(d.Parent) { + return d.Parent.Symbol() + } + } + } + return s +} + +func getContextualSignatureLocationInfo(node *ast.Node, sourceFile *ast.SourceFile, c *checker.Checker) *contextualSignatureLocationInfo { + parent := node.Parent + switch parent.Kind { + case ast.KindParenthesizedExpression, ast.KindMethodDeclaration, ast.KindFunctionExpression, ast.KindArrowFunction: + _, argumentIndex, argumentCount, argumentSpan := getArgumentOrParameterListInfo(node, sourceFile, c) + + var contextualType *checker.Type + if ast.IsMethodDeclaration(parent) { + contextualType = c.GetContextualTypeForObjectLiteralElement(parent, checker.ContextFlagsNone) + } else { + contextualType = c.GetContextualType(parent, checker.ContextFlagsNone) + } + if contextualType != nil { + return &contextualSignatureLocationInfo{ + contextualType: contextualType, + argumentIndex: argumentIndex, + argumentCount: argumentCount, + argumentsSpan: argumentSpan, + } + } + return nil + case ast.KindBinaryExpression: + highestBinary := getHighestBinary(parent.AsBinaryExpression()) + contextualType := c.GetContextualType(highestBinary.AsNode(), checker.ContextFlagsNone) + argumentIndex := ptrTo(0) + if node.Kind != ast.KindOpenParenToken { + argumentIndex = ptrTo(countBinaryExpressionParameters(parent.AsBinaryExpression()) - 1) + argumentCount := countBinaryExpressionParameters(highestBinary) + if contextualType != nil { + return &contextualSignatureLocationInfo{ + contextualType: contextualType, + argumentIndex: argumentIndex, + argumentCount: argumentCount, + argumentsSpan: core.NewTextRange(parent.Pos(), parent.End()), + } + } + return nil + } + } + return nil +} + +func getHighestBinary(b *ast.BinaryExpression) *ast.BinaryExpression { + if ast.IsBinaryExpression(b.Parent) { + return getHighestBinary(b.Parent.AsBinaryExpression()) + } + return b +} + +func countBinaryExpressionParameters(b *ast.BinaryExpression) int { + if ast.IsBinaryExpression(b.Left) { + return countBinaryExpressionParameters(b.Left.AsBinaryExpression()) + 1 + } + return 2 +} + +func getTokensFromNode(node *ast.Node, sourceFile *ast.SourceFile) []*ast.Node { + if node == nil { + return nil + } + var children []*ast.Node + current := node + left := node.Pos() + scanner := scanner.GetScannerForSourceFile(sourceFile, left) + for left < current.End() { + token := scanner.Token() + tokenFullStart := scanner.TokenFullStart() + tokenEnd := scanner.TokenEnd() + children = append(children, sourceFile.GetOrCreateToken(token, tokenFullStart, tokenEnd, current)) + left = tokenEnd + scanner.Scan() + } + return children +} + +func getTokenFromNodeList(nodeList *ast.NodeList, nodeListParent *ast.Node, sourceFile *ast.SourceFile) []*ast.Node { + if nodeList == nil || nodeListParent == nil { + return nil + } + left := nodeList.Pos() + nodeListIndex := 0 + var tokens []*ast.Node + for left < nodeList.End() { + if len(nodeList.Nodes) > nodeListIndex && left == nodeList.Nodes[nodeListIndex].Pos() { + tokens = append(tokens, nodeList.Nodes[nodeListIndex]) + left = nodeList.Nodes[nodeListIndex].End() + nodeListIndex++ + } else { + scanner := scanner.GetScannerForSourceFile(sourceFile, left) + token := scanner.Token() + tokenFullStart := scanner.TokenFullStart() + tokenEnd := scanner.TokenEnd() + tokens = append(tokens, sourceFile.GetOrCreateToken(token, tokenFullStart, tokenEnd, nodeListParent)) + left = tokenEnd + } + } + return tokens +} + +func containsNode(nodes []*ast.Node, node *ast.Node) bool { + for i := range nodes { + if nodes[i] == node { + return true + } + } + return false +} + +func getArgumentListInfoForTemplate(tagExpression *ast.TaggedTemplateExpression, argumentIndex *int, sourceFile *ast.SourceFile) *argumentListInfo { + // argumentCount is either 1 or (numSpans + 1) to account for the template strings array argument. + argumentCount := 1 + if !isNoSubstitutionTemplateLiteral(tagExpression.Template) { + argumentCount = len(tagExpression.Template.AsTemplateExpression().TemplateSpans.Nodes) + 1 + } + // if (argumentIndex !== 0) { + // Debug.assertLessThan(argumentIndex, argumentCount); + // } + return &argumentListInfo{ + isTypeParameterList: false, + invocation: &invocation{callInvocation: &callInvocation{node: tagExpression.AsNode()}}, + argumentIndex: argumentIndex, + argumentCount: argumentCount, + argumentsRange: getApplicableRangeForTaggedTemplate(tagExpression, sourceFile), + } +} + +func getApplicableRangeForTaggedTemplate(taggedTemplate *ast.TaggedTemplateExpression, sourceFile *ast.SourceFile) core.TextRange { + template := taggedTemplate.Template + applicableSpanStart := scanner.GetTokenPosOfNode(template, sourceFile, false) + applicableSpanEnd := template.End() + + // We need to adjust the end position for the case where the template does not have a tail. + // Otherwise, we will not show signature help past the expression. + // For example, + // + // ` ${ 1 + 1 foo(10) + // | | + // This is because a Missing node has no width. However, what we actually want is to include trivia + // leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail. + if template.Kind == ast.KindTemplateExpression { + templateSpans := template.AsTemplateExpression().TemplateSpans + lastSpan := templateSpans.Nodes[len(templateSpans.Nodes)-1] + if lastSpan.AsTemplateSpan().Literal.End()-lastSpan.AsTemplateSpan().Literal.Pos() == 0 { + applicableSpanEnd = scanner.SkipTrivia(sourceFile.Text(), applicableSpanEnd) + } + } + + return core.NewTextRange(applicableSpanStart, applicableSpanEnd-applicableSpanStart) +} diff --git a/internal/ls/signaturehelp_test.go b/internal/ls/signaturehelp_test.go new file mode 100644 index 0000000000..33a6e2aafe --- /dev/null +++ b/internal/ls/signaturehelp_test.go @@ -0,0 +1,1057 @@ +package ls_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/bundled" + "github.com/microsoft/typescript-go/internal/fourslash" + "github.com/microsoft/typescript-go/internal/ls" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/testutil/projecttestutil" + "gotest.tools/v3/assert" +) + +type verifySignatureHelpOptions struct { + docComment string + text string + parameterSpan string + parameterCount int + activeParameter *lsproto.Nullable[uint32] + // triggerReason ls.SignatureHelpTriggerReason + // tags?: ReadonlyArray; +} + +func TestSignatureHelp(t *testing.T) { + t.Parallel() + if !bundled.Embedded { + // Without embedding, we'd need to read all of the lib files out from disk into the MapFS. + // Just skip this for now. + t.Skip("bundled files are not embedded") + } + + testCases := []struct { + title string + input string + expected map[string]verifySignatureHelpOptions + }{ + { + title: "SignatureHelpCallExpressions", + input: `function fnTest(str: string, num: number) { } +fnTest(/*1*/'', /*2*/5);`, + expected: map[string]verifySignatureHelpOptions{ + "1": { + text: `fnTest(str: string, num: number): void`, + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "str: string", + }, + "2": { + text: `fnTest(str: string, num: number): void`, + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 1}, + parameterSpan: "num: number", + }, + }, + }, + { + title: "SignatureHelp_contextual", + input: `interface I { + m(n: number, s: string): void; + m2: () => void; +} +declare function takesObj(i: I): void; +takesObj({ m: (/*takesObj0*/) }); +takesObj({ m(/*takesObj1*/) }); +takesObj({ m: function(/*takesObj2*/) }); +takesObj({ m2: (/*takesObj3*/) }) +declare function takesCb(cb: (n: number, s: string, b: boolean) => void): void; +takesCb((/*contextualParameter1*/)); +takesCb((/*contextualParameter1b*/) => {}); +takesCb((n, /*contextualParameter2*/)); +takesCb((n, s, /*contextualParameter3*/)); +takesCb((n,/*contextualParameter3_2*/ s, b)); +takesCb((n, s, b, /*contextualParameter4*/)) +type Cb = () => void; +const cb: Cb = (/*contextualTypeAlias*/ +const cb2: () => void = (/*contextualFunctionType*/)`, + expected: map[string]verifySignatureHelpOptions{ + "takesObj0": { + text: "m(n: number, s: string): void", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "n: number", + }, + "takesObj1": { + text: "m(n: number, s: string): void", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "n: number", + }, + "takesObj2": { + text: "m(n: number, s: string): void", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "n: number", + }, + "takesObj3": { + text: "m2(): void", + parameterCount: 0, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "", + }, + "contextualParameter1": { + text: "cb(n: number, s: string, b: boolean): void", + parameterCount: 3, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "n: number", + }, + "contextualParameter1b": { + text: "cb(n: number, s: string, b: boolean): void", + parameterCount: 3, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "n: number", + }, + "contextualParameter2": { + text: "cb(n: number, s: string, b: boolean): void", + parameterCount: 3, + activeParameter: &lsproto.Nullable[uint32]{Value: 1}, + parameterSpan: "s: string", + }, + "contextualParameter3": { + text: "cb(n: number, s: string, b: boolean): void", + parameterCount: 3, + activeParameter: &lsproto.Nullable[uint32]{Value: 2}, + parameterSpan: "b: boolean", + }, + "contextualParameter3_2": { + text: "cb(n: number, s: string, b: boolean): void", + parameterCount: 3, + activeParameter: &lsproto.Nullable[uint32]{Value: 1}, + parameterSpan: "s: string", + }, + "contextualParameter4": { + text: "cb(n: number, s: string, b: boolean): void", + parameterCount: 3, + activeParameter: &lsproto.Nullable[uint32]{Value: 3}, + parameterSpan: "", + }, + "contextualTypeAlias": { + text: "Cb(): void", + parameterCount: 0, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "", + }, + "contextualFunctionType": { + text: "cb2(): void", + parameterCount: 0, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "", + }, + }, + }, + { + title: "signatureHelpAnonymousFunction", + input: `var anonymousFunctionTest = function(n: number, s: string): (a: number, b: string) => string { + return null; +} +anonymousFunctionTest(5, "")(/*anonymousFunction1*/1, /*anonymousFunction2*/"");`, + expected: map[string]verifySignatureHelpOptions{ + "anonymousFunction1": { + text: `(a: number, b: string): string`, + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "a: number", + }, + "anonymousFunction2": { + text: `(a: number, b: string): string`, + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 1}, + parameterSpan: "b: string", + }, + }, + }, + { + title: "signatureHelpAtEOFs", + input: `function Foo(arg1: string, arg2: string) { +} + +Foo(/**/`, + expected: map[string]verifySignatureHelpOptions{ + "": { + text: "Foo(arg1: string, arg2: string): void", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "arg1: string", + }, + }, + }, + { + title: "signatureHelpBeforeSemicolon1", + input: `function Foo(arg1: string, arg2: string) { +} + +Foo(/**/;`, + expected: map[string]verifySignatureHelpOptions{ + "": { + text: "Foo(arg1: string, arg2: string): void", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "arg1: string", + }, + }, + }, + { + title: "signatureHelpCallExpression", + input: `function fnTest(str: string, num: number) { } +fnTest(/*1*/'', /*2*/5);`, + expected: map[string]verifySignatureHelpOptions{ + "1": { + text: `fnTest(str: string, num: number): void`, + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "str: string", + }, + "2": { + text: `fnTest(str: string, num: number): void`, + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 1}, + parameterSpan: "num: number", + }, + }, + }, + { + title: "signatureHelpConstructExpression", + input: `class sampleCls { constructor(str: string, num: number) { } } +var x = new sampleCls(/*1*/"", /*2*/5);`, + expected: map[string]verifySignatureHelpOptions{ + "1": { + text: "sampleCls(str: string, num: number): sampleCls", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "str: string", + }, + "2": { + text: "sampleCls(str: string, num: number): sampleCls", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 1}, + parameterSpan: "num: number", + }, + }, + }, + { + title: "signatureHelpConstructorInheritance", + input: `class base { +constructor(s: string); +constructor(n: number); +constructor(a: any) { } +} +class B1 extends base { } +class B2 extends B1 { } +class B3 extends B2 { + constructor() { + super(/*indirectSuperCall*/3); + } +}`, + expected: map[string]verifySignatureHelpOptions{ + "indirectSuperCall": { + text: "B2(n: number): B2", + parameterCount: 1, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "n: number", + }, + }, + }, + { + title: "signatureHelpConstructorOverload", + input: `class clsOverload { constructor(); constructor(test: string); constructor(test?: string) { } } +var x = new clsOverload(/*1*/); +var y = new clsOverload(/*2*/'');`, + expected: map[string]verifySignatureHelpOptions{ + "1": { + text: "clsOverload(): clsOverload", + parameterCount: 0, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + }, + "2": { + text: "clsOverload(test: string): clsOverload", + parameterCount: 1, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "test: string", + }, + }, + }, + { + title: "signatureHelpEmptyLists", + input: `function Foo(arg1: string, arg2: string) { + } + + Foo(/*1*/); + function Bar(arg1: string, arg2: string) { } + Bar();`, + expected: map[string]verifySignatureHelpOptions{ + "1": { + text: "Foo(arg1: string, arg2: string): void", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "arg1: string", + }, + "2": { + text: "Bar(arg1: string, arg2: string): void", + parameterCount: 1, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "T", + }, + }, + }, + { + title: "signatureHelpExpandedRestTuples", + input: `export function complex(item: string, another: string, ...rest: [] | [settings: object, errorHandler: (err: Error) => void] | [errorHandler: (err: Error) => void, ...mixins: object[]]) { + +} + +complex(/*1*/); +complex("ok", "ok", /*2*/); +complex("ok", "ok", e => void e, {}, /*3*/);`, + + expected: map[string]verifySignatureHelpOptions{ + "1": { + text: "complex(item: string, another: string): void", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "item: string", + }, + "2": { + text: "complex(item: string, another: string, settings: object, errorHandler: (err: Error) => void): void", + parameterCount: 4, + activeParameter: &lsproto.Nullable[uint32]{Value: 2}, + parameterSpan: "settings: object", + }, + "3": { + text: "complex(item: string, another: string, errorHandler: (err: Error) => void, ...mixins: object[]): void", + parameterCount: 4, + activeParameter: &lsproto.Nullable[uint32]{Value: 3}, + parameterSpan: "...mixins: object[]", + }, + }, + }, + { + title: "signatureHelpExpandedRestUnlabeledTuples", + input: `export function complex(item: string, another: string, ...rest: [] | [object, (err: Error) => void] | [(err: Error) => void, ...object[]]) { + +} + +complex(/*1*/); +complex("ok", "ok", /*2*/); +complex("ok", "ok", e => void e, {}, /*3*/);`, + expected: map[string]verifySignatureHelpOptions{ + "1": { + text: "complex(item: string, another: string): void", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "item: string", + }, + "2": { + text: "complex(item: string, another: string, rest_0: object, rest_1: (err: Error) => void): void", + parameterCount: 4, + activeParameter: &lsproto.Nullable[uint32]{Value: 2}, + parameterSpan: "rest_0: object", + }, + "3": { + text: "complex(item: string, another: string, rest_0: (err: Error) => void, ...rest: object[]): void", + parameterCount: 4, + activeParameter: &lsproto.Nullable[uint32]{Value: 3}, + parameterSpan: "...rest: object[]", + }, + }, + }, + { + title: "signatureHelpExpandedTuplesArgumentIndex", + input: `function foo(...args: [string, string] | [number, string, string] +) { + +} +foo(123/*1*/,) +foo(""/*2*/, ""/*3*/) +foo(123/*4*/, ""/*5*/, ) +foo(123/*6*/, ""/*7*/, ""/*8*/)`, + expected: map[string]verifySignatureHelpOptions{ + "1": { + text: "foo(args_0: string, args_1: string): void", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "args_0: string", + }, + "2": { + text: "foo(args_0: string, args_1: string): void", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "args_0: string", + }, + "3": { + text: "foo(args_0: string, args_1: string): void", + parameterCount: 2, + activeParameter: &lsproto.Nullable[uint32]{Value: 1}, + parameterSpan: "args_1: string", + }, + "4": { + text: "foo(args_0: number, args_1: string, args_2: string): void", + parameterCount: 3, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "args_0: number", + }, + "5": { + text: "foo(args_0: number, args_1: string, args_2: string): void", + parameterCount: 3, + activeParameter: &lsproto.Nullable[uint32]{Value: 1}, + parameterSpan: "args_1: string", + }, + "6": { + text: "foo(args_0: number, args_1: string, args_2: string): void", + parameterCount: 3, + activeParameter: &lsproto.Nullable[uint32]{Value: 0}, + parameterSpan: "args_0: number", + }, + "7": { + text: "foo(args_0: number, args_1: string, args_2: string): void", + parameterCount: 3, + activeParameter: &lsproto.Nullable[uint32]{Value: 1}, + parameterSpan: "args_1: string", + }, + "8": { + text: "foo(args_0: number, args_1: string, args_2: string): void", + parameterCount: 3, + activeParameter: &lsproto.Nullable[uint32]{Value: 2}, + parameterSpan: "args_2: string", + }, + }, + }, + { + title: "signatureHelpExplicitTypeArguments", + input: `declare function f(x: T, y: U): T; +f(/*1*/); +f(/*2*/); +f(/*3*/); +f(/*4*/); + +interface A { a: number } +interface B extends A { b: string } +declare function g(x: T, y: U, z: V): T; +declare function h(x: T, y: U, z: V): T; +declare function j(x: T, y: U, z: V): T; +g(/*5*/); +h(/*6*/); +j(/*7*/); +g(/*8*/); +h(/*9*/); +j(/*10*/);`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "f(x: number, y: string): number", parameterCount: 2, activeParameter: &lsproto.Nullable[uint32]{Value: 0}, parameterSpan: "x: number"}, + "2": {text: "f(x: boolean, y: string): boolean", parameterCount: 2, parameterSpan: "x: boolean", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + // too few -- fill in rest with default + "3": {text: "f(x: number, y: string): number", parameterCount: 2, parameterSpan: "x: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + // too many -- ignore extra type arguments + "4": {text: "f(x: number, y: string): number", parameterCount: 2, parameterSpan: "x: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + + // not matched signature and no type arguments + "5": {text: "g(x: unknown, y: unknown, z: B): unknown", parameterCount: 3, parameterSpan: "x: unknown", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "6": {text: "h(x: unknown, y: unknown, z: A): unknown", parameterCount: 3, parameterSpan: "x: unknown", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "7": {text: "j(x: unknown, y: unknown, z: B): unknown", parameterCount: 3, parameterSpan: "x: unknown", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + // not matched signature and too few type arguments + "8": {text: "g(x: number, y: unknown, z: B): number", parameterCount: 3, parameterSpan: "x: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "9": {text: "h(x: number, y: unknown, z: A): number", parameterCount: 3, parameterSpan: "x: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "10": {text: "j(x: number, y: unknown, z: B): number", parameterCount: 3, parameterSpan: "x: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpForOptionalMethods", + input: `interface Obj { + optionalMethod?: (current: any) => any; +}; + +const o: Obj = { + optionalMethod(/*1*/) { + return {}; + } +};`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "optionalMethod(current: any): any", parameterCount: 1, parameterSpan: "current: any", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpForSuperCalls", + input: `class A { } +class B extends A { } +class C extends B { + constructor() { + super(/*1*/ // sig help here? + } +} +class A2 { } +class B2 extends A2 { + constructor(x:number) {} +} +class C2 extends B2 { + constructor() { + super(/*2*/ // sig help here? + } +}`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "B(): B", parameterCount: 0, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "2": {text: "B2(x: number): B2", parameterCount: 1, parameterSpan: "x: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpFunctionOverload", + input: `function functionOverload(); +function functionOverload(test: string); +function functionOverload(test?: string) { } +functionOverload(/*functionOverload1*/); +functionOverload(""/*functionOverload2*/);`, + expected: map[string]verifySignatureHelpOptions{ + "functionOverload1": {text: "functionOverload(): any", parameterCount: 0, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "functionOverload2": {text: "functionOverload(test: string): any", parameterCount: 1, parameterSpan: "test: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpFunctionParameter", + input: `function parameterFunction(callback: (a: number, b: string) => void) { + callback(/*parameterFunction1*/5, /*parameterFunction2*/""); +}`, + expected: map[string]verifySignatureHelpOptions{ + "parameterFunction1": {text: "callback(a: number, b: string): void", parameterCount: 2, parameterSpan: "a: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "parameterFunction2": {text: "callback(a: number, b: string): void", parameterCount: 2, parameterSpan: "b: string", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpImplicitConstructor", + input: `class ImplicitConstructor { +} +var implicitConstructor = new ImplicitConstructor(/*1*/);`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "ImplicitConstructor(): ImplicitConstructor", parameterCount: 0, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpInCallback", + input: `declare function forEach(f: () => void); +forEach(/*1*/() => { +});`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "forEach(f: () => void): any", parameterCount: 1, parameterSpan: "f: () => void", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpIncompleteCalls", + input: `module IncompleteCalls { + class Foo { + public f1() { } + public f2(n: number): number { return 0; } + public f3(n: number, s: string) : string { return ""; } + } + var x = new Foo(); + x.f1(); + x.f2(5); + x.f3(5, ""); + x.f1(/*incompleteCalls1*/ + x.f2(5,/*incompleteCalls2*/ + x.f3(5,/*incompleteCalls3*/ +}`, + expected: map[string]verifySignatureHelpOptions{ + "incompleteCalls1": {text: "f1(): void", parameterCount: 0, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "incompleteCalls2": {text: "f2(n: number): number", parameterCount: 1, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "incompleteCalls3": {text: "f3(n: number, s: string): string", parameterCount: 2, parameterSpan: "s: string", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpCompleteGenericsCall", + input: `function foo(x: number, callback: (x: T) => number) { +} +foo(/*1*/`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "foo(x: number, callback: (x: unknown) => number): void", parameterCount: 2, parameterSpan: "x: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpInference", + input: `declare function f(a: T, b: T, c: T): void; +f("x", /**/);`, + expected: map[string]verifySignatureHelpOptions{ + "": {text: `f(a: "x", b: "x", c: "x"): void`, parameterCount: 3, parameterSpan: `b: "x"`, activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpInParenthetical", + input: `class base { constructor (public n: number, public y: string) { } } +(new base(/*1*/ +(new base(0, /*2*/`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "base(n: number, y: string): base", parameterCount: 2, parameterSpan: "n: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "2": {text: "base(n: number, y: string): base", parameterCount: 2, parameterSpan: "y: string", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpLeadingRestTuple", + input: `export function leading(...args: [...names: string[], allCaps: boolean]): void { +} + +leading(/*1*/); +leading("ok", /*2*/); +leading("ok", "ok", /*3*/);`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "leading(...names: string[], allCaps: boolean): void", parameterCount: 2, parameterSpan: "allCaps: boolean", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "2": {text: "leading(...names: string[], allCaps: boolean): void", parameterCount: 2, parameterSpan: "allCaps: boolean", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "3": {text: "leading(...names: string[], allCaps: boolean): void", parameterCount: 2, parameterSpan: "allCaps: boolean", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpNoArguments", + input: `function foo(n: number): string { +} +foo(/**/`, + expected: map[string]verifySignatureHelpOptions{ + "": {text: "foo(n: number): string", parameterCount: 1, parameterSpan: "n: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpObjectLiteral", + input: `var objectLiteral = { n: 5, s: "", f: (a: number, b: string) => "" }; +objectLiteral.f(/*objectLiteral1*/4, /*objectLiteral2*/"");`, + expected: map[string]verifySignatureHelpOptions{ + "objectLiteral1": {text: "f(a: number, b: string): string", parameterCount: 2, parameterSpan: "a: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "objectLiteral2": {text: "f(a: number, b: string): string", parameterCount: 2, parameterSpan: "b: string", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpOnNestedOverloads", + input: `declare function fn(x: string); +declare function fn(x: string, y: number); +declare function fn2(x: string); +declare function fn2(x: string, y: number); +fn('', fn2(/*1*/ +fn2('', fn2('',/*2*/`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "fn2(x: string): any", parameterCount: 1, parameterSpan: "x: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "2": {text: "fn2(x: string, y: number): any", parameterCount: 2, parameterSpan: "y: number", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpOnOverloadOnConst", + input: `function x1(x: 'hi'); +function x1(y: 'bye'); +function x1(z: string); +function x1(a: any) { +} + +x1(''/*1*/); +x1('hi'/*2*/); +x1('bye'/*3*/);`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: `x1(z: string): any`, parameterCount: 1, parameterSpan: "z: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "2": {text: `x1(x: "hi"): any`, parameterCount: 1, parameterSpan: `x: "hi"`, activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "3": {text: `x1(y: "bye"): any`, parameterCount: 1, parameterSpan: `y: "bye"`, activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpOnOverloads", + input: `declare function fn(x: string); +declare function fn(x: string, y: number); +fn(/*1*/ +fn('',/*2*/)`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "fn(x: string): any", parameterCount: 1, parameterSpan: "x: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "2": {text: "fn(x: string, y: number): any", parameterCount: 2, parameterSpan: "y: number", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpOnOverloadsDifferentArity1", + input: `declare function f(s: string); +declare function f(n: number); +declare function f(s: string, b: boolean); +declare function f(n: number, b: boolean) +f(1/*1*/`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "f(n: number): any", parameterCount: 1, parameterSpan: "n: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpOnOverloadsDifferentArity1_1", + input: `declare function f(s: string); +declare function f(n: number); +declare function f(s: string, b: boolean); +declare function f(n: number, b: boolean) +f(1, /*1*/`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "f(n: number, b: boolean): any", parameterCount: 2, parameterSpan: "b: boolean", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpOnOverloadsDifferentArity2", + input: `declare function f(s: string); +declare function f(n: number); +declare function f(s: string, b: boolean); +declare function f(n: number, b: boolean); + +f(1/*1*/ var`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "f(n: number): any", parameterCount: 1, parameterSpan: "n: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpOnOverloadsDifferentArity2_2", + input: `declare function f(s: string); +declare function f(n: number); +declare function f(s: string, b: boolean); +declare function f(n: number, b: boolean); + +f(1, /*1*/var`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "f(n: number, b: boolean): any", parameterCount: 2, parameterSpan: "b: boolean", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpOnOverloadsDifferentArity3_1", + input: `declare function f(); +declare function f(s: string); +declare function f(s: string, b: boolean); +declare function f(n: number, b: boolean); + +f(/*1*/`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "f(): any", parameterCount: 0, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpOnOverloadsDifferentArity3_2", + input: `declare function f(); +declare function f(s: string); +declare function f(s: string, b: boolean); +declare function f(n: number, b: boolean); + +f(x, /*1*/`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "f(s: string, b: boolean): any", parameterCount: 2, parameterSpan: "b: boolean", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpOnSuperWhenMembersAreNotResolved", + input: `class A { } +class B extends A { constructor(public x: string) { } } +class C extends B { + constructor() { + super(/*1*/ + } +}`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "B(x: string): B", parameterCount: 1, parameterSpan: "x: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpOnTypePredicates", + input: `function f1(a: any): a is number {} +function f2(a: any): a is T {} +function f3(a: any, ...b): a is number {} +f1(/*1*/) +f2(/*2*/) +f3(/*3*/)`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "f1(a: any): a is number", parameterCount: 1, parameterSpan: "a: any", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "2": {text: "f2(a: any): a is unknown", parameterCount: 1, parameterSpan: "a: any", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "3": {text: "f3(a: any, ...b: any[]): a is number", parameterCount: 2, parameterSpan: "a: any", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpOptionalCall", + input: `function fnTest(str: string, num: number) { } +fnTest?.(/*1*/);`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "fnTest(str: string, num: number): void", parameterCount: 2, parameterSpan: "str: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHepSimpleConstructorCall", + input: `class ConstructorCall { + constructor(str: string, num: number) { + } +} +var x = new ConstructorCall(/*constructorCall1*/1,/*constructorCall2*/2);`, + expected: map[string]verifySignatureHelpOptions{ + "constructorCall1": {text: "ConstructorCall(str: string, num: number): ConstructorCall", parameterCount: 2, parameterSpan: "str: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "constructorCall2": {text: "ConstructorCall(str: string, num: number): ConstructorCall", parameterCount: 2, parameterSpan: "num: number", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpSimpleFunctionCall", + input: `function functionCall(str: string, num: number) { +} +functionCall(/*functionCall1*/); +functionCall("", /*functionCall2*/1);`, + expected: map[string]verifySignatureHelpOptions{ + "functionCall1": {text: "functionCall(str: string, num: number): void", parameterCount: 2, parameterSpan: "str: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "functionCall2": {text: "functionCall(str: string, num: number): void", parameterCount: 2, parameterSpan: "num: number", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpSimpleSuperCall", + input: `class SuperCallBase { + constructor(b: boolean) { + } +} +class SuperCall extends SuperCallBase { + constructor() { + super(/*superCall*/); + } +}`, + expected: map[string]verifySignatureHelpOptions{ + "superCall": {text: "SuperCallBase(b: boolean): SuperCallBase", parameterCount: 1, parameterSpan: "b: boolean", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpSuperConstructorOverload", + input: `class SuperOverloadBase { + constructor(); + constructor(test: string); + constructor(test?: string) { + } +} +class SuperOverLoad1 extends SuperOverloadBase { + constructor() { + super(/*superOverload1*/); + } +} +class SuperOverLoad2 extends SuperOverloadBase { + constructor() { + super(""/*superOverload2*/); + } +}`, + expected: map[string]verifySignatureHelpOptions{ + "superOverload1": {text: "SuperOverloadBase(): SuperOverloadBase", parameterCount: 0, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "superOverload2": {text: "SuperOverloadBase(test: string): SuperOverloadBase", parameterCount: 1, parameterSpan: "test: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpTrailingRestTuple", + input: `export function leading(allCaps: boolean, ...names: string[]): void { +} + +leading(/*1*/); +leading(false, /*2*/); +leading(false, "ok", /*3*/);`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "leading(allCaps: boolean, ...names: string[]): void", parameterCount: 2, parameterSpan: "allCaps: boolean", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "2": {text: "leading(allCaps: boolean, ...names: string[]): void", parameterCount: 2, parameterSpan: "...names: string[]", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "3": {text: "leading(allCaps: boolean, ...names: string[]): void", parameterCount: 2, parameterSpan: "...names: string[]", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + }, + }, + { + title: "signatureHelpWithInvalidArgumentList1", + input: `function foo(a) { } +foo(hello my name /**/is`, + expected: map[string]verifySignatureHelpOptions{ + "": {text: "foo(a: any): void", parameterCount: 1, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 2}}, + }, + }, + { + title: "signatureHelpAfterParameter", + input: `type Type = (a, b, c) => void +const a: Type = (a/*1*/, b/*2*/) => {} +const b: Type = function (a/*3*/, b/*4*/) {} +const c: Type = ({ /*5*/a: { b/*6*/ }}/*7*/ = { }/*8*/, [b/*9*/]/*10*/, .../*11*/c/*12*/) => {}`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "a: any", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "2": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "b: any", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "3": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "a: any", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "4": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "b: any", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "5": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "a: any", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "6": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "a: any", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "7": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "a: any", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "8": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "a: any", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "9": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "b: any", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "10": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "b: any", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "11": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "c: any", activeParameter: &lsproto.Nullable[uint32]{Value: 2}}, + "12": {text: "Type(a: any, b: any, c: any): void", parameterCount: 3, parameterSpan: "c: any", activeParameter: &lsproto.Nullable[uint32]{Value: 2}}, + }, + }, + { + title: "signaturehelpCallExpressionTuples", + input: `function fnTest(str: string, num: number) { } +declare function wrap(fn: (...a: A) => R) : (...a: A) => R; +var fnWrapped = wrap(fnTest); +fnWrapped(/*1*/'', /*2*/5); +function fnTestVariadic (str: string, ...num: number[]) { } +var fnVariadicWrapped = wrap(fnTestVariadic); +fnVariadicWrapped(/*3*/'', /*4*/5); +function fnNoParams () { } +var fnNoParamsWrapped = wrap(fnNoParams); +fnNoParamsWrapped(/*5*/);`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "fnWrapped(str: string, num: number): void", parameterCount: 2, parameterSpan: "str: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "2": {text: "fnWrapped(str: string, num: number): void", parameterCount: 2, parameterSpan: "num: number", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "3": {text: "fnVariadicWrapped(str: string, ...num: number[]): void", parameterCount: 2, parameterSpan: "str: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "4": {text: "fnVariadicWrapped(str: string, ...num: number[]): void", parameterCount: 2, parameterSpan: "...num: number[]", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "5": {text: "fnNoParamsWrapped(): void", parameterCount: 0, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpConstructorCallParamProperties", + input: `class Circle { + constructor(private radius: number) { + } +} +var a = new Circle(/**/`, + expected: map[string]verifySignatureHelpOptions{ + "": {text: "Circle(radius: number): Circle", parameterCount: 1, parameterSpan: "radius: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpInRecursiveType", + input: `type Tail = + ((...args: T) => any) extends ((head: any, ...tail: infer R) => any) ? R : never; + +type Reverse = _Reverse; + +type _Reverse = { + 1: Result, + 0: _Reverse, 0>, +}[Source extends [] ? 1 : 0]; + +type Foo = Reverse<[0,/**/]>;`, + expected: map[string]verifySignatureHelpOptions{ + "": {text: "Reverse", parameterCount: 1, parameterSpan: "List extends any[]", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpRestArgs1", + input: `function fn(a: number, b: number, c: number) {} +const a = [1, 2] as const; +const b = [1] as const; + +fn(...a, /*1*/); +fn(/*2*/, ...a); + +fn(...b, /*3*/); +fn(/*4*/, ...b, /*5*/);`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "fn(a: number, b: number, c: number): void", parameterCount: 3, parameterSpan: "c: number", activeParameter: &lsproto.Nullable[uint32]{Value: 2}}, + "2": {text: "fn(a: number, b: number, c: number): void", parameterCount: 3, parameterSpan: "a: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "3": {text: "fn(a: number, b: number, c: number): void", parameterCount: 3, parameterSpan: "b: number", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "4": {text: "fn(a: number, b: number, c: number): void", parameterCount: 3, parameterSpan: "a: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "5": {text: "fn(a: number, b: number, c: number): void", parameterCount: 3, parameterSpan: "c: number", activeParameter: &lsproto.Nullable[uint32]{Value: 2}}, + }, + }, + { + title: "signatureHelpSkippedArgs1", + input: `function fn(a: number, b: number, c: number) {} +fn(/*1*/, /*2*/, /*3*/, /*4*/, /*5*/);`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "fn(a: number, b: number, c: number): void", parameterCount: 3, parameterSpan: "a: number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "2": {text: "fn(a: number, b: number, c: number): void", parameterCount: 3, parameterSpan: "b: number", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "3": {text: "fn(a: number, b: number, c: number): void", parameterCount: 3, parameterSpan: "c: number", activeParameter: &lsproto.Nullable[uint32]{Value: 2}}, + "4": {text: "fn(a: number, b: number, c: number): void", parameterCount: 3, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 3}}, + "5": {text: "fn(a: number, b: number, c: number): void", parameterCount: 3, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 4}}, + }, + }, + { + title: "signatureHelpTypeArguments", + input: `declare function f(a: number, b: string, c: boolean): void; // ignored, not generic +declare function f(): void; +declare function f(): void; +declare function f(): void; +f(): void; + new(): void; + new(): void; +}; +new C(): void", parameterCount: 1, parameterSpan: "T extends number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "f1": {text: "f(): void", parameterCount: 2, parameterSpan: "U", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "f2": {text: "f(): void", parameterCount: 3, parameterSpan: "V extends string", activeParameter: &lsproto.Nullable[uint32]{Value: 2}}, + "C0": {text: "C(): void", parameterCount: 1, parameterSpan: "T extends number", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "C1": {text: "C(): void", parameterCount: 2, parameterSpan: "U", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "C2": {text: "C(): void", parameterCount: 3, parameterSpan: "V extends string", activeParameter: &lsproto.Nullable[uint32]{Value: 2}}, + }, + }, + { + title: "signatureHelpTypeArguments2", + input: `function f(a: number, b: string, c: boolean): void { } +f(a: number, b: string, c: boolean): void", parameterCount: 4, parameterSpan: "T", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + "f1": {text: "f(a: number, b: string, c: boolean): void", parameterCount: 4, parameterSpan: "U", activeParameter: &lsproto.Nullable[uint32]{Value: 1}}, + "f2": {text: "f(a: number, b: string, c: boolean): void", parameterCount: 4, parameterSpan: "V", activeParameter: &lsproto.Nullable[uint32]{Value: 2}}, + "f3": {text: "f(a: number, b: string, c: boolean): void", parameterCount: 4, parameterSpan: "W", activeParameter: &lsproto.Nullable[uint32]{Value: 3}}, + }, + }, + { + title: "signatureHelpTypeParametersNotVariadic", + input: `declare function f(a: any, ...b: any[]): any; +f(1, 2);`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "f<>(a: any, ...b: any[]): any", parameterCount: 0, parameterSpan: "", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + { + title: "signatureHelpWithUnknown", + input: `eval(\/*1*/`, + expected: map[string]verifySignatureHelpOptions{ + "1": {text: "eval(x: string): any", parameterCount: 1, parameterSpan: "x: string", activeParameter: &lsproto.Nullable[uint32]{Value: 0}}, + }, + }, + } + + for _, testCase := range testCases { + t.Run(testCase.title, func(t *testing.T) { + t.Parallel() + runSignatureHelpTest(t, testCase.input, testCase.expected) + }) + } +} + +func runSignatureHelpTest(t *testing.T, input string, expected map[string]verifySignatureHelpOptions) { + testData := fourslash.ParseTestData(t, input, "/mainFile.ts") + file := testData.Files[0].Filename + markerPositions := testData.MarkerPositions + ctx := projecttestutil.WithRequestID(t.Context()) + languageService, done := createLanguageService(ctx, file, map[string]any{ + file: testData.Files[0].Content, + }) + defer done() + context := &lsproto.SignatureHelpContext{ + TriggerKind: lsproto.SignatureHelpTriggerKindInvoked, + TriggerCharacter: nil, + } + ptrTrue := ptrTo(true) + capabilities := &lsproto.SignatureHelpClientCapabilities{ + SignatureInformation: &lsproto.ClientSignatureInformationOptions{ + ActiveParameterSupport: ptrTrue, + NoActiveParameterSupport: ptrTrue, + ParameterInformation: &lsproto.ClientSignatureParameterInformationOptions{ + LabelOffsetSupport: ptrTrue, + }, + }, + } + preferences := &ls.UserPreferences{} + for markerName, expectedResult := range expected { + marker, ok := markerPositions[markerName] + if !ok { + t.Fatalf("No marker found for '%s'", markerName) + } + result := languageService.ProvideSignatureHelp(ctx, ls.FileNameToDocumentURI(file), marker.LSPosition, context, capabilities, preferences) + assert.Equal(t, expectedResult.text, result.Signatures[*result.ActiveSignature].Label) + assert.Equal(t, expectedResult.parameterCount, len(*result.Signatures[*result.ActiveSignature].Parameters)) + assert.DeepEqual(t, expectedResult.activeParameter, result.ActiveParameter) + // Checking the parameter span that will be highlighted in the editor + if expectedResult.activeParameter != nil && int(expectedResult.activeParameter.Value) < expectedResult.parameterCount { + assert.Equal(t, expectedResult.parameterSpan, *(*result.Signatures[*result.ActiveSignature].Parameters)[int(result.ActiveParameter.Value)].Label.String) + } + } +} diff --git a/internal/ls/types.go b/internal/ls/types.go index 67c5028d80..226202d504 100644 --- a/internal/ls/types.go +++ b/internal/ls/types.go @@ -1,15 +1,8 @@ package ls -import "github.com/microsoft/typescript-go/internal/core" - -type TextChange struct { - core.TextRange - NewText string -} - -func (t TextChange) ApplyTo(text string) string { - return text[:t.Pos()] + t.NewText + text[t.End():] -} +import ( + "github.com/microsoft/typescript-go/internal/core" +) type Location struct { FileName string diff --git a/internal/ls/utilities.go b/internal/ls/utilities.go index aa5d535fd2..d22b7b4fad 100644 --- a/internal/ls/utilities.go +++ b/internal/ls/utilities.go @@ -1,7 +1,9 @@ package ls import ( + "cmp" "fmt" + "slices" "strings" "github.com/microsoft/typescript-go/internal/ast" @@ -10,10 +12,31 @@ import ( "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/jsnum" "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/lsutil" "github.com/microsoft/typescript-go/internal/scanner" "github.com/microsoft/typescript-go/internal/stringutil" ) +// Implements a cmp.Compare like function for two lsproto.Position +// ComparePositions(pos, other) == cmp.Compare(pos, other) +func ComparePositions(pos, other lsproto.Position) int { + if lineComp := cmp.Compare(pos.Line, other.Line); lineComp != 0 { + return lineComp + } + return cmp.Compare(pos.Line, other.Line) +} + +// Implements a cmp.Compare like function for two *lsproto.Range +// CompareRanges(lsRange, other) == cmp.Compare(lsrange, other) +// +// Range.Start is compared before Range.End +func CompareRanges(lsRange, other *lsproto.Range) int { + if startComp := ComparePositions(lsRange.Start, other.Start); startComp != 0 { + return startComp + } + return ComparePositions(lsRange.End, other.End) +} + var quoteReplacer = strings.NewReplacer("'", `\'`, `\"`, `"`) func IsInString(sourceFile *ast.SourceFile, position int, previousToken *ast.Node) bool { @@ -59,143 +82,59 @@ func tryGetImportFromModuleSpecifier(node *ast.StringLiteralLike) *ast.Node { return nil } -// !!! -func isInComment(file *ast.SourceFile, position int, tokenAtPosition *ast.Node) *ast.CommentRange { - return nil -} - -// Replaces last(node.getChildren(sourceFile)) -func getLastChild(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node { - lastChildNode := getLastVisitedChild(node, sourceFile) - if ast.IsJSDocSingleCommentNode(node) { - return nil - } - var tokenStartPos int - if lastChildNode != nil { - tokenStartPos = lastChildNode.End() - } else { - tokenStartPos = node.Pos() - } - var lastToken *ast.Node - scanner := scanner.GetScannerForSourceFile(sourceFile, tokenStartPos) - for startPos := tokenStartPos; startPos < node.End(); { - tokenKind := scanner.Token() - tokenFullStart := scanner.TokenFullStart() - tokenEnd := scanner.TokenEnd() - lastToken = sourceFile.GetOrCreateToken(tokenKind, tokenFullStart, tokenEnd, node) - startPos = tokenEnd - scanner.Scan() - } - return core.IfElse(lastToken != nil, lastToken, lastChildNode) -} - -func getLastToken(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node { - if node == nil { - return nil +func isModuleSpecifierLike(node *ast.Node) bool { + if !ast.IsStringLiteralLike(node) { + return false } - if ast.IsTokenKind(node.Kind) || ast.IsIdentifier(node) { - return nil + if ast.IsVariableDeclarationInitializedToRequire(node.Parent) || ast.IsImportCall(node.Parent) { + return node.Parent.AsCallExpression().Arguments.Nodes[0] == node } - assertHasRealPosition(node) + return node.Parent.Kind == ast.KindExternalModuleReference || + node.Parent.Kind == ast.KindImportDeclaration || + node.Parent.Kind == ast.KindJSImportDeclaration +} - lastChild := getLastChild(node, sourceFile) - if lastChild == nil { +func getNonModuleSymbolOfMergedModuleSymbol(symbol *ast.Symbol) *ast.Symbol { + if len(symbol.Declarations) == 0 || (symbol.Flags&(ast.SymbolFlagsModule|ast.SymbolFlagsTransient)) == 0 { return nil } - if lastChild.Kind < ast.KindFirstNode { - return lastChild - } else { - return getLastToken(lastChild, sourceFile) + if decl := core.Find(symbol.Declarations, func(d *ast.Node) bool { return !ast.IsSourceFile(d) && !ast.IsModuleDeclaration(d) }); decl != nil { + return decl.Symbol() } + return nil } -// Gets the last visited child of the given node. -// NOTE: This doesn't include unvisited tokens; for this, use `getLastChild` or `getLastToken`. -func getLastVisitedChild(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node { - var lastChild *ast.Node - - visitNode := func(n *ast.Node, _ *ast.NodeVisitor) *ast.Node { - if !(n == nil || node.Flags&ast.NodeFlagsReparsed != 0) { - lastChild = n - } - return n - } - visitNodeList := func(nodeList *ast.NodeList, _ *ast.NodeVisitor) *ast.NodeList { - if nodeList != nil && len(nodeList.Nodes) > 0 && !ast.IsJSDocSingleCommentNodeList(node, nodeList) { - for i := len(nodeList.Nodes) - 1; i >= 0; i-- { - if nodeList.Nodes[i].Flags&ast.NodeFlagsReparsed == 0 { - lastChild = nodeList.Nodes[i] - break - } - } +func getLocalSymbolForExportSpecifier(referenceLocation *ast.Identifier, referenceSymbol *ast.Symbol, exportSpecifier *ast.ExportSpecifier, ch *checker.Checker) *ast.Symbol { + if isExportSpecifierAlias(referenceLocation, exportSpecifier) { + if symbol := ch.GetExportSpecifierLocalTargetSymbol(exportSpecifier.AsNode()); symbol != nil { + return symbol } - return nodeList } - - nodeVisitor := ast.NewNodeVisitor(core.Identity, nil, ast.NodeVisitorHooks{ - VisitNode: visitNode, - VisitToken: visitNode, - VisitNodes: visitNodeList, - VisitModifiers: func(modifiers *ast.ModifierList, visitor *ast.NodeVisitor) *ast.ModifierList { - if modifiers != nil { - visitNodeList(&modifiers.NodeList, visitor) - } - return modifiers - }, - }) - - astnav.VisitEachChildAndJSDoc(node, sourceFile, nodeVisitor) - return lastChild + return referenceSymbol } -func getFirstToken(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node { - if ast.IsIdentifier(node) || ast.IsTokenKind(node.Kind) { - return nil +func isExportSpecifierAlias(referenceLocation *ast.Identifier, exportSpecifier *ast.ExportSpecifier) bool { + // Debug.assert(exportSpecifier.PropertyName == referenceLocation || exportSpecifier.Name == referenceLocation); + if !(exportSpecifier.PropertyName == referenceLocation.AsNode() || exportSpecifier.Name() == referenceLocation.AsNode()) { + panic("referenceLocation is not export specifier name or property name") } - assertHasRealPosition(node) - var firstChild *ast.Node - node.ForEachChild(func(n *ast.Node) bool { - if n == nil || node.Flags&ast.NodeFlagsReparsed != 0 { - return false - } - firstChild = n - return true - }) - - var tokenEndPosition int - if firstChild != nil { - tokenEndPosition = firstChild.Pos() + propertyName := exportSpecifier.PropertyName + if propertyName != nil { + // Given `export { foo as bar } [from "someModule"]`: It's an alias at `foo`, but at `bar` it's a new symbol. + return propertyName == referenceLocation.AsNode() } else { - tokenEndPosition = node.End() + // `export { foo } from "foo"` is a re-export. + // `export { foo };` is not a re-export, it creates an alias for the local variable `foo`. + return exportSpecifier.Parent.Parent.AsExportDeclaration().ModuleSpecifier == nil } - scanner := scanner.GetScannerForSourceFile(sourceFile, node.Pos()) - var firstToken *ast.Node - if node.Pos() < tokenEndPosition { - tokenKind := scanner.Token() - tokenFullStart := scanner.TokenFullStart() - tokenEnd := scanner.TokenEnd() - firstToken = sourceFile.GetOrCreateToken(tokenKind, tokenFullStart, tokenEnd, node) - } - - if firstToken != nil { - return firstToken - } - if firstChild == nil { - return nil - } - if firstChild.Kind < ast.KindFirstNode { - return firstChild - } - return getFirstToken(firstChild, sourceFile) } -func assertHasRealPosition(node *ast.Node) { - if ast.PositionIsSynthesized(node.Pos()) || ast.PositionIsSynthesized(node.End()) { - panic("Node must have a real position for this operation.") - } +// !!! formatting function +func isInComment(file *ast.SourceFile, position int, tokenAtPosition *ast.Node) *ast.CommentRange { + return nil } func hasChildOfKind(containingNode *ast.Node, kind ast.Kind, sourceFile *ast.SourceFile) bool { @@ -263,14 +202,183 @@ type PossibleTypeArgumentInfo struct { nTypeArguments int } -// !!! signature help +// Get info for an expression like `f <` that may be the start of type arguments. func getPossibleTypeArgumentsInfo(tokenIn *ast.Node, sourceFile *ast.SourceFile) *PossibleTypeArgumentInfo { + // This is a rare case, but one that saves on a _lot_ of work if true - if the source file has _no_ `<` character, + // then there obviously can't be any type arguments - no expensive brace-matching backwards scanning required + if strings.LastIndexByte(sourceFile.Text(), '<') == -1 { + return nil + } + + token := tokenIn + // This function determines if the node could be a type argument position + // When editing, it is common to have an incomplete type argument list (e.g. missing ">"), + // so the tree can have any shape depending on the tokens before the current node. + // Instead, scanning for an identifier followed by a "<" before current node + // will typically give us better results than inspecting the tree. + // Note that we also balance out the already provided type arguments, arrays, object literals while doing so. + remainingLessThanTokens := 0 + nTypeArguments := 0 + for token != nil { + switch token.Kind { + case ast.KindLessThanToken: + // Found the beginning of the generic argument expression + token = astnav.FindPrecedingToken(sourceFile, token.Pos()) + if token != nil && token.Kind == ast.KindQuestionDotToken { + token = astnav.FindPrecedingToken(sourceFile, token.Pos()) + } + if token == nil || !ast.IsIdentifier(token) { + return nil + } + if remainingLessThanTokens == 0 { + if ast.IsDeclarationName(token) { + return nil + } + return &PossibleTypeArgumentInfo{ + called: token, + nTypeArguments: nTypeArguments, + } + } + remainingLessThanTokens-- + break + case ast.KindGreaterThanGreaterThanGreaterThanToken: + remainingLessThanTokens = +3 + break + case ast.KindGreaterThanGreaterThanToken: + remainingLessThanTokens = +2 + break + case ast.KindGreaterThanToken: + remainingLessThanTokens++ + break + case ast.KindCloseBraceToken: + // This can be object type, skip until we find the matching open brace token + // Skip until the matching open brace token + token = findPrecedingMatchingToken(token, ast.KindOpenBraceToken, sourceFile) + if token == nil { + return nil + } + break + case ast.KindCloseParenToken: + // This can be object type, skip until we find the matching open brace token + // Skip until the matching open brace token + token = findPrecedingMatchingToken(token, ast.KindOpenParenToken, sourceFile) + if token == nil { + return nil + } + break + case ast.KindCloseBracketToken: + // This can be object type, skip until we find the matching open brace token + // Skip until the matching open brace token + token = findPrecedingMatchingToken(token, ast.KindOpenBracketToken, sourceFile) + if token == nil { + return nil + } + break + + // Valid tokens in a type name. Skip. + case ast.KindCommaToken: + nTypeArguments++ + break + case ast.KindEqualsGreaterThanToken, ast.KindIdentifier, ast.KindStringLiteral, ast.KindNumericLiteral, + ast.KindBigIntLiteral, ast.KindTrueKeyword, ast.KindFalseKeyword, ast.KindTypeOfKeyword, ast.KindExtendsKeyword, + ast.KindKeyOfKeyword, ast.KindDotToken, ast.KindBarToken, ast.KindQuestionToken, ast.KindColonToken: + break + default: + if ast.IsTypeNode(token) { + break + } + // Invalid token in type + return nil + } + token = astnav.FindPrecedingToken(sourceFile, token.Pos()) + } return nil } -// !!! signature help -func getPossibleGenericSignatures(called *ast.Expression, typeArgumentCount int, checker *checker.Checker) []*checker.Signature { - return nil +func isNameOfModuleDeclaration(node *ast.Node) bool { + if node.Parent.Kind != ast.KindModuleDeclaration { + return false + } + return node.Parent.Name() == node +} + +func isExpressionOfExternalModuleImportEqualsDeclaration(node *ast.Node) bool { + return ast.IsExternalModuleImportEqualsDeclaration(node.Parent.Parent) && ast.GetExternalModuleImportEqualsDeclarationExpression(node.Parent.Parent) == node +} + +func isNamespaceReference(node *ast.Node) bool { + return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node) +} + +func isQualifiedNameNamespaceReference(node *ast.Node) bool { + root := node + isLastClause := true + if root.Parent.Kind == ast.KindQualifiedName { + for root.Parent != nil && root.Parent.Kind == ast.KindQualifiedName { + root = root.Parent + } + + isLastClause = root.AsQualifiedName().Right == node + } + + return root.Parent.Kind == ast.KindTypeReference && !isLastClause +} + +func isPropertyAccessNamespaceReference(node *ast.Node) bool { + root := node + isLastClause := true + if root.Parent.Kind == ast.KindPropertyAccessExpression { + for root.Parent != nil && root.Parent.Kind == ast.KindPropertyAccessExpression { + root = root.Parent + } + + isLastClause = root.Name() == node + } + + if !isLastClause && root.Parent.Kind == ast.KindExpressionWithTypeArguments && root.Parent.Parent.Kind == ast.KindHeritageClause { + decl := root.Parent.Parent.Parent + return (decl.Kind == ast.KindClassDeclaration && root.Parent.Parent.AsHeritageClause().Token == ast.KindImplementsKeyword) || + (decl.Kind == ast.KindInterfaceDeclaration && root.Parent.Parent.AsHeritageClause().Token == ast.KindExtendsKeyword) + } + + return false +} + +func isThis(node *ast.Node) bool { + switch node.Kind { + case ast.KindThisKeyword: + // case ast.KindThisType: TODO: GH#9267 + return true + case ast.KindIdentifier: + // 'this' as a parameter + return node.AsIdentifier().Text == "this" && node.Parent.Kind == ast.KindParameter + default: + return false + } +} + +func isTypeReference(node *ast.Node) bool { + if ast.IsRightSideOfQualifiedNameOrPropertyAccess(node) { + node = node.Parent + } + + switch node.Kind { + case ast.KindThisKeyword: + return !ast.IsExpressionNode(node) + case ast.KindThisType: + return true + } + + switch node.Parent.Kind { + case ast.KindTypeReference: + return true + case ast.KindImportType: + return !node.Parent.AsImportTypeNode().IsTypeOf + case ast.KindExpressionWithTypeArguments: + return ast.IsPartOfTypeNode(node.Parent) + } + + return false } func isInRightSideOfInternalImportEqualsDeclaration(node *ast.Node) bool { @@ -316,103 +424,6 @@ func getQuotePreference(file *ast.SourceFile, preferences *UserPreferences) quot return quotePreferenceDouble } -func positionIsASICandidate(pos int, context *ast.Node, file *ast.SourceFile) bool { - contextAncestor := ast.FindAncestorOrQuit(context, func(ancestor *ast.Node) ast.FindAncestorResult { - if ancestor.End() != pos { - return ast.FindAncestorQuit - } - - return ast.ToFindAncestorResult(syntaxMayBeASICandidate(ancestor.Kind)) - }) - - return contextAncestor != nil && nodeIsASICandidate(contextAncestor, file) -} - -func syntaxMayBeASICandidate(kind ast.Kind) bool { - return syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) || - syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) || - syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) || - syntaxRequiresTrailingSemicolonOrASI(kind) -} - -func syntaxRequiresTrailingCommaOrSemicolonOrASI(kind ast.Kind) bool { - return kind == ast.KindCallSignature || - kind == ast.KindConstructSignature || - kind == ast.KindIndexSignature || - kind == ast.KindPropertySignature || - kind == ast.KindMethodSignature -} - -func syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind ast.Kind) bool { - return kind == ast.KindFunctionDeclaration || - kind == ast.KindConstructor || - kind == ast.KindMethodDeclaration || - kind == ast.KindGetAccessor || - kind == ast.KindSetAccessor -} - -func syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind ast.Kind) bool { - return kind == ast.KindModuleDeclaration -} - -func syntaxRequiresTrailingSemicolonOrASI(kind ast.Kind) bool { - return kind == ast.KindVariableStatement || - kind == ast.KindExpressionStatement || - kind == ast.KindDoStatement || - kind == ast.KindContinueStatement || - kind == ast.KindBreakStatement || - kind == ast.KindReturnStatement || - kind == ast.KindThrowStatement || - kind == ast.KindDebuggerStatement || - kind == ast.KindPropertyDeclaration || - kind == ast.KindTypeAliasDeclaration || - kind == ast.KindImportDeclaration || - kind == ast.KindImportEqualsDeclaration || - kind == ast.KindExportDeclaration || - kind == ast.KindNamespaceExportDeclaration || - kind == ast.KindExportAssignment -} - -func nodeIsASICandidate(node *ast.Node, file *ast.SourceFile) bool { - lastToken := getLastToken(node, file) - if lastToken != nil && lastToken.Kind == ast.KindSemicolonToken { - return false - } - - if syntaxRequiresTrailingCommaOrSemicolonOrASI(node.Kind) { - if lastToken != nil && lastToken.Kind == ast.KindCommaToken { - return false - } - } else if syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(node.Kind) { - lastChild := getLastChild(node, file) - if lastChild != nil && ast.IsModuleBlock(lastChild) { - return false - } - } else if syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(node.Kind) { - lastChild := getLastChild(node, file) - if lastChild != nil && ast.IsFunctionBlock(lastChild) { - return false - } - } else if !syntaxRequiresTrailingSemicolonOrASI(node.Kind) { - return false - } - - // See comment in parser's `parseDoStatement` - if node.Kind == ast.KindDoStatement { - return true - } - - topNode := ast.FindAncestor(node, func(ancestor *ast.Node) bool { return ancestor.Parent == nil }) - nextToken := astnav.FindNextToken(node, topNode, file) - if nextToken == nil || nextToken.Kind == ast.KindCloseBraceToken { - return true - } - - startLine, _ := scanner.GetLineAndCharacterOfPosition(file, node.End()) - endLine, _ := scanner.GetLineAndCharacterOfPosition(file, astnav.GetStartOfNode(nextToken, file, false /*includeJSDoc*/)) - return startLine != endLine -} - func isNonContextualKeyword(token ast.Kind) bool { return ast.IsKeywordKind(token) && !ast.IsContextualKeyword(token) } @@ -424,15 +435,15 @@ func probablyUsesSemicolons(file *ast.SourceFile) bool { var visit func(node *ast.Node) bool visit = func(node *ast.Node) bool { - if syntaxRequiresTrailingSemicolonOrASI(node.Kind) { - lastToken := getLastToken(node, file) + if lsutil.SyntaxRequiresTrailingSemicolonOrASI(node.Kind) { + lastToken := lsutil.GetLastToken(node, file) if lastToken != nil && lastToken.Kind == ast.KindSemicolonToken { withSemicolon++ } else { withoutSemicolon++ } - } else if syntaxRequiresTrailingCommaOrSemicolonOrASI(node.Kind) { - lastToken := getLastToken(node, file) + } else if lsutil.SyntaxRequiresTrailingCommaOrSemicolonOrASI(node.Kind) { + lastToken := lsutil.GetLastToken(node, file) if lastToken != nil && lastToken.Kind == ast.KindSemicolonToken { withSemicolon++ } else if lastToken != nil && lastToken.Kind != ast.KindCommaToken { @@ -540,12 +551,121 @@ func literalIsName(node *ast.NumericOrStringLikeLiteral) bool { ast.IsLiteralComputedPropertyDeclarationName(node) } +func isLiteralNameOfPropertyDeclarationOrIndexAccess(node *ast.Node) bool { + // utilities + switch node.Parent.Kind { + case ast.KindPropertyDeclaration, + ast.KindPropertySignature, + ast.KindPropertyAssignment, + ast.KindEnumMember, + ast.KindMethodDeclaration, + ast.KindMethodSignature, + ast.KindGetAccessor, + ast.KindSetAccessor, + ast.KindModuleDeclaration: + return ast.GetNameOfDeclaration(node.Parent) == node + case ast.KindElementAccessExpression: + return node.Parent.AsElementAccessExpression().ArgumentExpression == node + case ast.KindComputedPropertyName: + return true + case ast.KindLiteralType: + return node.Parent.Parent.Kind == ast.KindIndexedAccessType + default: + return false + } +} + +func isObjectBindingElementWithoutPropertyName(bindingElement *ast.Node) bool { + return bindingElement.Kind == ast.KindBindingElement && + bindingElement.Parent.Kind == ast.KindObjectBindingPattern && + bindingElement.Name().Kind == ast.KindIdentifier && + bindingElement.PropertyName() == nil +} + func isArgumentOfElementAccessExpression(node *ast.Node) bool { return node != nil && node.Parent != nil && node.Parent.Kind == ast.KindElementAccessExpression && node.Parent.AsElementAccessExpression().ArgumentExpression == node } +func isRightSideOfPropertyAccess(node *ast.Node) bool { + return node.Parent.Kind == ast.KindPropertyAccessExpression && node.Parent.Name() == node +} + +func isStaticSymbol(symbol *ast.Symbol) bool { + if symbol.ValueDeclaration == nil { + return false + } + modifierFlags := symbol.ValueDeclaration.ModifierFlags() + return modifierFlags&ast.ModifierFlagsStatic != 0 +} + +func isImplementation(node *ast.Node) bool { + if node.Flags&ast.NodeFlagsAmbient != 0 { + return !(node.Kind == ast.KindInterfaceDeclaration || node.Kind == ast.KindTypeAliasDeclaration) + } + if ast.IsVariableLike(node) { + return ast.HasInitializer(node) + } + if ast.IsFunctionLikeDeclaration(node) { + return node.Body() != nil + } + return ast.IsClassLike(node) || ast.IsModuleOrEnumDeclaration(node) +} + +func isImplementationExpression(node *ast.Node) bool { + switch node.Kind { + case ast.KindParenthesizedExpression: + return isImplementationExpression(node.Expression()) + case ast.KindArrowFunction, ast.KindFunctionExpression, ast.KindObjectLiteralExpression, ast.KindClassExpression, ast.KindArrayLiteralExpression: + return true + default: + return false + } +} + +func isArrayLiteralOrObjectLiteralDestructuringPattern(node *ast.Node) bool { + if node.Kind == ast.KindArrayLiteralExpression || node.Kind == ast.KindObjectLiteralExpression { + // [a,b,c] from: + // [a, b, c] = someExpression; + if node.Parent.Kind == ast.KindBinaryExpression && node.Parent.AsBinaryExpression().Left == node && node.Parent.AsBinaryExpression().OperatorToken.Kind == ast.KindEqualsToken { + return true + } + + // [a, b, c] from: + // for([a, b, c] of expression) + if node.Parent.Kind == ast.KindForOfStatement && node.Parent.AsForInOrOfStatement().Initializer == node { + return true + } + + // [a, b, c] of + // [x, [a, b, c] ] = someExpression + // or + // {x, a: {a, b, c} } = someExpression + if isArrayLiteralOrObjectLiteralDestructuringPattern(core.IfElse(node.Parent.Kind == ast.KindPropertyAssignment, node.Parent.Parent, node.Parent)) { + return true + } + } + + return false +} + +func isReadonlyTypeOperator(node *ast.Node) bool { + return node.Kind == ast.KindReadonlyKeyword && node.Parent.Kind == ast.KindTypeOperator && node.Parent.AsTypeOperatorNode().Operator == ast.KindReadonlyKeyword +} + +func isJumpStatementTarget(node *ast.Node) bool { + return node.Kind == ast.KindIdentifier && ast.IsBreakOrContinueStatement(node.Parent) && node.Parent.Label() == node +} + +func isLabelOfLabeledStatement(node *ast.Node) bool { + return node.Kind == ast.KindIdentifier && node.Parent.Kind == ast.KindLabeledStatement && node.Parent.Label() == node +} + +func findReferenceInPosition(refs []*ast.FileReference, pos int) *ast.FileReference { + return core.Find(refs, func(ref *ast.FileReference) bool { return ref.TextRange.ContainsInclusive(pos) }) +} + func isTagName(node *ast.Node) bool { return node.Parent != nil && ast.IsJSDocTag(node.Parent) && node.Parent.TagName() == node } @@ -702,7 +822,7 @@ func isCompletedNode(n *ast.Node, sourceFile *ast.SourceFile) bool { // Checks if node ends with 'expectedLastToken'. // If child at position 'length - 1' is 'SemicolonToken' it is skipped and 'expectedLastToken' is compared with child at position 'length - 2'. func nodeEndsWith(n *ast.Node, expectedLastToken ast.Kind, sourceFile *ast.SourceFile) bool { - lastChildNode := getLastVisitedChild(n, sourceFile) + lastChildNode := lsutil.GetLastVisitedChild(n, sourceFile) var lastNodeAndTokens []*ast.Node var tokenStartPos int if lastChildNode != nil { @@ -733,6 +853,475 @@ func nodeEndsWith(n *ast.Node, expectedLastToken ast.Kind, sourceFile *ast.Sourc return false } +func getContainingNodeIfInHeritageClause(node *ast.Node) *ast.Node { + if node.Kind == ast.KindIdentifier || node.Kind == ast.KindPropertyAccessExpression { + return getContainingNodeIfInHeritageClause(node.Parent) + } + if node.Kind == ast.KindExpressionWithTypeArguments && (ast.IsClassLike(node.Parent.Parent) || node.Parent.Parent.Kind == ast.KindInterfaceDeclaration) { + return node.Parent.Parent + } + return nil +} + +func getContainerNode(node *ast.Node) *ast.Node { + for parent := node.Parent; parent != nil; parent = parent.Parent { + switch parent.Kind { + case ast.KindSourceFile, ast.KindMethodDeclaration, ast.KindMethodSignature, ast.KindFunctionDeclaration, ast.KindFunctionExpression, + ast.KindGetAccessor, ast.KindSetAccessor, ast.KindClassDeclaration, ast.KindInterfaceDeclaration, ast.KindEnumDeclaration, ast.KindModuleDeclaration: + return parent + } + } + return nil +} + +func getAdjustedLocation(node *ast.Node, forRename bool, sourceFile *ast.SourceFile) *ast.Node { + // todo: check if this function needs to be changed for jsdoc updates + + parent := node.Parent + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/ [|name|] ... + // /**/import [|name|] = ... + // + // NOTE: If the node is a modifier, we don't adjust its location if it is the `default` modifier as that is handled + // specially by `getSymbolAtLocation`. + isModifier := func(node *ast.Node) bool { + if ast.IsModifier(node) && (forRename || node.Kind != ast.KindDefaultKeyword) { + return ast.CanHaveModifiers(parent) && slices.Contains(parent.Modifiers().NodeList.Nodes, node) + } + switch node.Kind { + case ast.KindClassKeyword: + return ast.IsClassDeclaration(parent) || ast.IsClassExpression(node) + case ast.KindFunctionKeyword: + return ast.IsFunctionDeclaration(parent) || ast.IsFunctionExpression(node) + case ast.KindInterfaceKeyword: + return ast.IsInterfaceDeclaration(parent) + case ast.KindEnumKeyword: + return ast.IsEnumDeclaration(parent) + case ast.KindTypeKeyword: + return ast.IsTypeAliasDeclaration(parent) + case ast.KindNamespaceKeyword, ast.KindModuleKeyword: + return ast.IsModuleDeclaration(parent) + case ast.KindImportKeyword: + return ast.IsImportEqualsDeclaration(parent) + case ast.KindGetKeyword: + return ast.IsGetAccessorDeclaration(parent) + case ast.KindSetKeyword: + return ast.IsSetAccessorDeclaration(parent) + } + return false + } + if isModifier(node) { + if sourceFile == nil { + sourceFile = ast.GetSourceFileOfNode(node) + } + if location := getAdjustedLocationForDeclaration(parent, forRename, sourceFile); location != nil { + return location + } + } + + // /**/ ... + if parent.Kind == ast.KindTypeParameter { + if constraint := parent.AsTypeParameter().Constraint; constraint != nil && constraint.Kind == ast.KindTypeReference { + return constraint.AsTypeReference().TypeName + } + } + // ... T /**/extends [|U|] ? ... + if parent.Kind == ast.KindConditionalType { + if extendsType := parent.AsConditionalTypeNode().ExtendsType; extendsType != nil && extendsType.Kind == ast.KindTypeReference { + return extendsType.AsTypeReference().TypeName + } + } + } + // ... T extends /**/infer [|U|] ? ... + if node.Kind == ast.KindInferKeyword && parent.Kind == ast.KindInferType { + return parent.AsInferTypeNode().TypeParameter.Name() + } + // { [ [|K|] /**/in keyof T]: ... } + if node.Kind == ast.KindInKeyword && parent.Kind == ast.KindTypeParameter && parent.Parent.Kind == ast.KindMappedType { + return parent.Name() + } + // /**/keyof [|T|] + if node.Kind == ast.KindKeyOfKeyword && parent.Kind == ast.KindTypeOperator && parent.AsTypeOperatorNode().Operator == ast.KindKeyOfKeyword { + if parentType := parent.Type(); parentType != nil && parentType.Kind == ast.KindTypeReference { + return parentType.AsTypeReferenceNode().TypeName + } + } + // /**/readonly [|name|][] + if node.Kind == ast.KindReadonlyKeyword && parent.Kind == ast.KindTypeOperator && parent.AsTypeOperatorNode().Operator == ast.KindReadonlyKeyword { + if parentType := parent.Type(); parentType != nil && parentType.Kind == ast.KindArrayType && parentType.AsArrayTypeNode().ElementType.Kind == ast.KindTypeReference { + return parentType.AsArrayTypeNode().ElementType.AsTypeReferenceNode().TypeName + } + } + + if !forRename { + // /**/new [|name|] + // /**/void [|name|] + // /**/void obj.[|name|] + // /**/typeof [|name|] + // /**/typeof obj.[|name|] + // /**/await [|name|] + // /**/await obj.[|name|] + // /**/yield [|name|] + // /**/yield obj.[|name|] + // /**/delete obj.[|name|] + if node.Kind == ast.KindNewKeyword && parent.Kind == ast.KindNewExpression || + node.Kind == ast.KindVoidKeyword && parent.Kind == ast.KindVoidExpression || + node.Kind == ast.KindTypeOfKeyword && parent.Kind == ast.KindTypeOfExpression || + node.Kind == ast.KindAwaitKeyword && parent.Kind == ast.KindAwaitExpression || + node.Kind == ast.KindYieldKeyword && parent.Kind == ast.KindYieldExpression || + node.Kind == ast.KindDeleteKeyword && parent.Kind == ast.KindDeleteExpression { + if expr := parent.Expression(); expr != nil { + return ast.SkipOuterExpressions(expr, ast.OEKAll) + } + } + + // left /**/in [|name|] + // left /**/instanceof [|name|] + if (node.Kind == ast.KindInKeyword || node.Kind == ast.KindInstanceOfKeyword) && parent.Kind == ast.KindBinaryExpression && parent.AsBinaryExpression().OperatorToken == node { + return ast.SkipOuterExpressions(parent.AsBinaryExpression().Right, ast.OEKAll) + } + + // left /**/as [|name|] + if node.Kind == ast.KindAsKeyword && parent.Kind == ast.KindAsExpression { + if asExprType := parent.Type(); asExprType != nil && asExprType.Kind == ast.KindTypeReference { + return asExprType.AsTypeReferenceNode().TypeName + } + } + + // for (... /**/in [|name|]) + // for (... /**/of [|name|]) + if node.Kind == ast.KindInKeyword && parent.Kind == ast.KindForInStatement || + node.Kind == ast.KindOfKeyword && parent.Kind == ast.KindForOfStatement { + return ast.SkipOuterExpressions(parent.AsForInOrOfStatement().Expression, ast.OEKAll) + } + } + + return node +} + +func getAdjustedLocationForDeclaration(node *ast.Node, forRename bool, sourceFile *ast.SourceFile) *ast.Node { + if node.Name() != nil { + return node.Name() + } + if forRename { + return nil + } + switch node.Kind { + case ast.KindClassDeclaration, ast.KindFunctionDeclaration: + // for class and function declarations, use the `default` modifier + // when the declaration is unnamed. + if node.Modifiers() != nil { + return core.Find(node.Modifiers().NodeList.Nodes, func(*ast.Node) bool { return node.Kind == ast.KindDefaultKeyword }) + } + case ast.KindClassExpression: + // for class expressions, use the `class` keyword when the class is unnamed + return findChildOfKind(node, ast.KindClassKeyword, sourceFile) + case ast.KindFunctionExpression: + // for function expressions, use the `function` keyword when the function is unnamed + return findChildOfKind(node, ast.KindFunctionKeyword, sourceFile) + case ast.KindConstructor: + return node + } + return nil +} + +func getAdjustedLocationForImportDeclaration(node *ast.ImportDeclaration, forRename bool) *ast.Node { + if node.ImportClause != nil { + if name := node.ImportClause.Name(); name != nil { + if node.ImportClause.AsImportClause().NamedBindings != nil { + // do not adjust if we have both a name and named bindings + return nil + } + // /**/import [|name|] from ...; + // import /**/type [|name|] from ...; + return node.ImportClause.Name() + } + + // /**/import { [|name|] } from ...; + // /**/import { propertyName as [|name|] } from ...; + // /**/import * as [|name|] from ...; + // import /**/type { [|name|] } from ...; + // import /**/type { propertyName as [|name|] } from ...; + // import /**/type * as [|name|] from ...; + if namedBindings := node.ImportClause.AsImportClause().NamedBindings; namedBindings != nil { + if namedBindings.Kind == ast.KindNamedImports { + // do nothing if there is more than one binding + elements := namedBindings.AsNamedImports().Elements + if len(elements.Nodes) != 1 { + return nil + } + return elements.Nodes[0].Name() + } else if namedBindings.Kind == ast.KindNamespaceImport { + return namedBindings.Name() + } + } + } + if !forRename { + // /**/import "[|module|]"; + // /**/import ... from "[|module|]"; + // import /**/type ... from "[|module|]"; + return node.ModuleSpecifier + } + return nil +} + +func getAdjustedLocationForExportDeclaration(node *ast.ExportDeclaration, forRename bool) *ast.Node { + if node.ExportClause != nil { + // /**/export { [|name|] } ... + // /**/export { propertyName as [|name|] } ... + // /**/export * as [|name|] ... + // export /**/type { [|name|] } from ... + // export /**/type { propertyName as [|name|] } from ... + // export /**/type * as [|name|] ... + if node.ExportClause.Kind == ast.KindNamedExports { + // do nothing if there is more than one binding + elements := node.ExportClause.AsNamedExports().Elements + if len(elements.Nodes) != 1 { + return nil + } + return elements.Nodes[0].Name() + } else if node.ExportClause.Kind == ast.KindNamespaceExport { + return node.ExportClause.Name() + } + } + if !forRename { + // /**/export * from "[|module|]"; + // export /**/type * from "[|module|]"; + return node.ModuleSpecifier + } + return nil +} + +func getMeaningFromLocation(node *ast.Node) ast.SemanticMeaning { + // todo: check if this function needs to be changed for jsdoc updates + + node = getAdjustedLocation(node, false /*forRename*/, nil) + parent := node.Parent + if node.Kind == ast.KindSourceFile { + return ast.SemanticMeaningValue + } else if ast.NodeKindIs(node, ast.KindExportAssignment, ast.KindExportSpecifier, ast.KindExternalModuleReference, ast.KindImportSpecifier, ast.KindImportClause) || parent.Kind == ast.KindImportEqualsDeclaration && node == parent.Name() { + return ast.SemanticMeaningAll + } else if isInRightSideOfInternalImportEqualsDeclaration(node) { + // import a = |b|; // Namespace + // import a = |b.c|; // Value, type, namespace + // import a = |b.c|.d; // Namespace + name := node + if node.Kind != ast.KindQualifiedName { + name = core.IfElse(node.Parent.Kind == ast.KindQualifiedName && node.Parent.AsQualifiedName().Right == node, node.Parent, nil) + } + if name == nil || name.Parent.Kind == ast.KindImportEqualsDeclaration { + return ast.SemanticMeaningNamespace + } + return ast.SemanticMeaningAll + } else if ast.IsDeclarationName(node) { + return getMeaningFromDeclaration(parent) + } else if ast.IsEntityName(node) && ast.FindAncestor(node, func(*ast.Node) bool { + return node.Kind == ast.KindJSDocNameReference || ast.IsJSDocLinkLike(node) || node.Kind == ast.KindJSDocMemberName + }) != nil { + return ast.SemanticMeaningAll + } else if isTypeReference(node) { + return ast.SemanticMeaningType + } else if isNamespaceReference(node) { + return ast.SemanticMeaningNamespace + } else if parent.Kind == ast.KindTypeParameter { + return ast.SemanticMeaningType + } else if parent.Kind == ast.KindLiteralType { + // This might be T["name"], which is actually referencing a property and not a type. So allow both meanings. + return ast.SemanticMeaningType | ast.SemanticMeaningValue + } else { + return ast.SemanticMeaningValue + } +} + +func getMeaningFromDeclaration(node *ast.Node) ast.SemanticMeaning { + switch node.Kind { + case ast.KindVariableDeclaration, ast.KindCommonJSExport, ast.KindParameter, ast.KindBindingElement, + ast.KindPropertyDeclaration, ast.KindPropertySignature, ast.KindPropertyAssignment, ast.KindShorthandPropertyAssignment, + ast.KindMethodDeclaration, ast.KindMethodSignature, ast.KindConstructor, ast.KindGetAccessor, ast.KindSetAccessor, + ast.KindFunctionDeclaration, ast.KindFunctionExpression, ast.KindArrowFunction, ast.KindCatchClause, ast.KindJsxAttribute: + return ast.SemanticMeaningValue + + case ast.KindTypeParameter, ast.KindInterfaceDeclaration, ast.KindTypeAliasDeclaration, ast.KindJSTypeAliasDeclaration, ast.KindTypeLiteral: + return ast.SemanticMeaningType + + case ast.KindEnumMember, ast.KindClassDeclaration: + return ast.SemanticMeaningValue | ast.SemanticMeaningType + + case ast.KindModuleDeclaration: + if ast.IsAmbientModule(node) { + return ast.SemanticMeaningNamespace | ast.SemanticMeaningValue + } else if ast.GetModuleInstanceState(node) == ast.ModuleInstanceStateInstantiated { + return ast.SemanticMeaningNamespace | ast.SemanticMeaningValue + } else { + return ast.SemanticMeaningNamespace + } + + case ast.KindEnumDeclaration, ast.KindNamedImports, ast.KindImportSpecifier, ast.KindImportEqualsDeclaration, ast.KindImportDeclaration, + ast.KindJSImportDeclaration, ast.KindExportAssignment, ast.KindJSExportAssignment, ast.KindExportDeclaration: + return ast.SemanticMeaningAll + + // An external module can be a Value + case ast.KindSourceFile: + return ast.SemanticMeaningNamespace | ast.SemanticMeaningValue + } + + return ast.SemanticMeaningAll +} + +func getIntersectingMeaningFromDeclarations(node *ast.Node, symbol *ast.Symbol, defaultMeaning ast.SemanticMeaning) ast.SemanticMeaning { + if node == nil { + return defaultMeaning + } + + meaning := getMeaningFromLocation(node) + declarations := symbol.Declarations + if len(declarations) == 0 { + return meaning + } + + lastIterationMeaning := meaning + + // !!! TODO check if the port is correct and the for loop is needed + iteration := func(m ast.SemanticMeaning) ast.SemanticMeaning { + for _, declaration := range declarations { + declarationMeaning := getMeaningFromDeclaration(declaration) + + if declarationMeaning&m != 0 { + m |= declarationMeaning + } + } + return m + } + meaning = iteration(meaning) + + for meaning != lastIterationMeaning { + // The result is order-sensitive, for instance if initialMeaning == Namespace, and declarations = [class, instantiated module] + // we need to consider both as the initialMeaning intersects with the module in the namespace space, and the module + // intersects with the class in the value space. + // To achieve that we will keep iterating until the result stabilizes. + + // Remember the last meaning + lastIterationMeaning = meaning + meaning = iteration(meaning) + } + + return meaning +} + // Returns the node in an `extends` or `implements` clause of a class or interface. func getAllSuperTypeNodes(node *ast.Node) []*ast.TypeNode { if ast.IsInterfaceDeclaration(node) { @@ -747,6 +1336,96 @@ func getAllSuperTypeNodes(node *ast.Node) []*ast.TypeNode { return nil } +func getParentSymbolsOfPropertyAccess(location *ast.Node, symbol *ast.Symbol, ch *checker.Checker) []*ast.Symbol { + propertyAccessExpression := core.IfElse(isRightSideOfPropertyAccess(location), location.Parent, nil) + if propertyAccessExpression == nil { + return nil + } + + lhsType := ch.GetTypeAtLocation(propertyAccessExpression.Expression()) + if lhsType == nil { + return nil + } + + var possibleSymbols []*checker.Type + if lhsType.Flags() != 0 { + possibleSymbols = lhsType.Types() + } else if lhsType.Symbol() != symbol.Parent { + possibleSymbols = []*checker.Type{lhsType} + } + + return core.MapNonNil(possibleSymbols, func(t *checker.Type) *ast.Symbol { + if t.Symbol() != nil && t.Symbol().Flags&(ast.SymbolFlagsClass|ast.SymbolFlagsInterface) != 0 { + return t.Symbol() + } + return nil + }) +} + +// Find symbol of the given property-name and add the symbol to the given result array +// @param symbol a symbol to start searching for the given propertyName +// @param propertyName a name of property to search for +// @param cb a cache of symbol from previous iterations of calling this function to prevent infinite revisiting of the same symbol. +// +// The value of previousIterationSymbol is undefined when the function is first called. +func getPropertySymbolsFromBaseTypes(symbol *ast.Symbol, propertyName string, checker *checker.Checker, cb func(base *ast.Symbol) *ast.Symbol) *ast.Symbol { + seen := core.Set[*ast.Symbol]{} + var recur func(*ast.Symbol) *ast.Symbol + recur = func(symbol *ast.Symbol) *ast.Symbol { + // Use `addToSeen` to ensure we don't infinitely recurse in this situation: + // interface C extends C { + // /*findRef*/propName: string; + // } + if symbol.Flags&(ast.SymbolFlagsClass|ast.SymbolFlagsInterface) == 0 || !seen.AddIfAbsent(symbol) { + return nil + } + + return core.FirstNonNil(symbol.Declarations, func(declaration *ast.Declaration) *ast.Symbol { + return core.FirstNonNil(getAllSuperTypeNodes(declaration), func(typeReference *ast.TypeNode) *ast.Symbol { + propertyType := checker.GetTypeAtLocation(typeReference) + if propertyType == nil || propertyType.Symbol() == nil { + return nil + } + propertySymbol := checker.GetPropertyOfType(propertyType, propertyName) + // Visit the typeReference as well to see if it directly or indirectly uses that property + if propertySymbol != nil { + if r := core.FirstNonNil(checker.GetRootSymbols(propertySymbol), cb); r != nil { + return r + } + } + return recur(propertyType.Symbol()) + }) + }) + } + return recur(symbol) +} + +func getPropertySymbolFromBindingElement(checker *checker.Checker, bindingElement *ast.Node) *ast.Symbol { + if typeOfPattern := checker.GetTypeAtLocation(bindingElement.Parent); typeOfPattern != nil { + return checker.GetPropertyOfType(typeOfPattern, bindingElement.Name().Text()) + } + return nil +} + +func getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol *ast.Symbol, checker *checker.Checker) *ast.Symbol { + bindingElement := ast.GetDeclarationOfKind(symbol, ast.KindBindingElement) + if bindingElement != nil && isObjectBindingElementWithoutPropertyName(bindingElement) { + return getPropertySymbolFromBindingElement(checker, bindingElement) + } + return nil +} + +func getTargetLabel(referenceNode *ast.Node, labelName string) *ast.Identifier { + // todo: rewrite as `ast.FindAncestor` + for referenceNode != nil { + if referenceNode.Kind == ast.KindLabeledStatement && referenceNode.AsLabeledStatement().Label.Text() == labelName { + return referenceNode.AsLabeledStatement().Label.AsIdentifier() + } + referenceNode = referenceNode.Parent + } + return nil +} + func skipConstraint(t *checker.Type, typeChecker *checker.Checker) *checker.Type { if t.IsTypeParameter() { c := typeChecker.GetBaseConstraintOfType(t) @@ -829,3 +1508,92 @@ func newCaseClauseTracker(typeChecker *checker.Checker, clauses []*ast.CaseOrDef } return c } + +func RangeContainsRange(r1 core.TextRange, r2 core.TextRange) bool { + return startEndContainsRange(r1.Pos(), r1.End(), r2) +} + +func startEndContainsRange(start int, end int, textRange core.TextRange) bool { + return start <= textRange.Pos() && end >= textRange.End() +} + +func getPossibleGenericSignatures(called *ast.Expression, typeArgumentCount int, c *checker.Checker) []*checker.Signature { + typeAtLocation := c.GetTypeAtLocation(called) + if ast.IsOptionalChain(called.Parent) { + typeAtLocation = removeOptionality(typeAtLocation, ast.IsOptionalChainRoot(called.Parent), true /*isOptionalChain*/, c) + } + var signatures []*checker.Signature + if ast.IsNewExpression(called.Parent) { + signatures = c.GetSignaturesOfType(typeAtLocation, checker.SignatureKindConstruct) + } else { + signatures = c.GetSignaturesOfType(typeAtLocation, checker.SignatureKindCall) + } + return core.Filter(signatures, func(s *checker.Signature) bool { + return s.TypeParameters() != nil && len(s.TypeParameters()) >= typeArgumentCount + }) +} + +func removeOptionality(t *checker.Type, isOptionalExpression bool, isOptionalChain bool, c *checker.Checker) *checker.Type { + if isOptionalExpression { + return c.GetNonNullableType(t) + } else if isOptionalChain { + return c.GetNonOptionalType(t) + } + return t +} + +func isNoSubstitutionTemplateLiteral(node *ast.Node) bool { + return node.Kind == ast.KindNoSubstitutionTemplateLiteral +} + +func isTaggedTemplateExpression(node *ast.Node) bool { + return node.Kind == ast.KindTaggedTemplateExpression +} + +func isInsideTemplateLiteral(node *ast.Node, position int, sourceFile *ast.SourceFile) bool { + return ast.IsTemplateLiteralKind(node.Kind) && (scanner.GetTokenPosOfNode(node, sourceFile, false) < position && position < node.End() || (ast.IsUnterminatedLiteral(node) && position == node.End())) +} + +// Pseudo-literals +func isTemplateHead(node *ast.Node) bool { + return node.Kind == ast.KindTemplateHead +} + +func isTemplateTail(node *ast.Node) bool { + return node.Kind == ast.KindTemplateTail +} + +func findPrecedingMatchingToken(token *ast.Node, matchingTokenKind ast.Kind, sourceFile *ast.SourceFile) *ast.Node { + closeTokenText := scanner.TokenToString(token.Kind) + matchingTokenText := scanner.TokenToString(matchingTokenKind) + // Text-scan based fast path - can be bamboozled by comments and other trivia, but often provides + // a good, fast approximation without too much extra work in the cases where it fails. + bestGuessIndex := strings.LastIndex(sourceFile.Text(), matchingTokenText) + if bestGuessIndex == -1 { + return nil // if the token text doesn't appear in the file, there can't be a match - super fast bail + } + // we can only use the textual result directly if we didn't have to count any close tokens within the range + if strings.LastIndex(sourceFile.Text(), closeTokenText) < bestGuessIndex { + nodeAtGuess := astnav.FindPrecedingToken(sourceFile, bestGuessIndex+1) + if nodeAtGuess != nil && nodeAtGuess.Kind == matchingTokenKind { + return nodeAtGuess + } + } + tokenKind := token.Kind + remainingMatchingTokens := 0 + for { + preceding := astnav.FindPrecedingToken(sourceFile, token.Pos()) + if preceding == nil { + return nil + } + token = preceding + if token.Kind == matchingTokenKind { + if remainingMatchingTokens == 0 { + return token + } + remainingMatchingTokens-- + } else if token.Kind == tokenKind { + remainingMatchingTokens++ + } + } +} diff --git a/internal/lsp/lsproto/_generate/generate.mjs b/internal/lsp/lsproto/_generate/generate.mjs index cf5688ca8d..7001a90565 100644 --- a/internal/lsp/lsproto/_generate/generate.mjs +++ b/internal/lsp/lsproto/_generate/generate.mjs @@ -634,8 +634,8 @@ function main() { fs.writeFileSync(out, generatedCode); // Format with gofmt - const gofmt = which.sync("gofmt"); - cp.execFileSync(gofmt, ["-w", out]); + const gofmt = which.sync("go"); + cp.execFileSync(gofmt, ["tool", "mvdan.cc/gofumpt", "-lang=go1.24", "-w", out]); console.log(`Successfully generated ${out}`); } diff --git a/internal/lsp/lsproto/lsp_generated.go b/internal/lsp/lsproto/lsp_generated.go index 13c547e48b..8dd88e9c94 100644 --- a/internal/lsp/lsproto/lsp_generated.go +++ b/internal/lsp/lsproto/lsp_generated.go @@ -983,8 +983,7 @@ type InitializeError struct { Retry bool `json:"retry"` } -type InitializedParams struct { -} +type InitializedParams struct{} // The parameters of a change configuration notification. type DidChangeConfigurationParams struct { diff --git a/internal/lsp/server.go b/internal/lsp/server.go index a16a09abc8..bcb303ccfc 100644 --- a/internal/lsp/server.go +++ b/internal/lsp/server.go @@ -22,8 +22,8 @@ import ( ) type ServerOptions struct { - In io.Reader - Out io.Writer + In Reader + Out Writer Err io.Writer Cwd string @@ -31,6 +31,8 @@ type ServerOptions struct { FS vfs.FS DefaultLibraryPath string TypingsLocation string + + ParsedFileCache project.ParsedFileCache } func NewServer(opts *ServerOptions) *Server { @@ -38,8 +40,8 @@ func NewServer(opts *ServerOptions) *Server { panic("Cwd is required") } return &Server{ - r: lsproto.NewBaseReader(opts.In), - w: lsproto.NewBaseWriter(opts.Out), + r: opts.In, + w: opts.Out, stderr: opts.Err, requestQueue: make(chan *lsproto.RequestMessage, 100), outgoingQueue: make(chan *lsproto.Message, 100), @@ -50,6 +52,7 @@ func NewServer(opts *ServerOptions) *Server { fs: opts.FS, defaultLibraryPath: opts.DefaultLibraryPath, typingsLocation: opts.TypingsLocation, + parsedFileCache: opts.ParsedFileCache, } } @@ -63,9 +66,60 @@ type pendingClientRequest struct { cancel context.CancelFunc } -type Server struct { +type Reader interface { + Read() (*lsproto.Message, error) +} + +type Writer interface { + Write(msg *lsproto.Message) error +} + +type lspReader struct { r *lsproto.BaseReader +} + +type lspWriter struct { w *lsproto.BaseWriter +} + +func (r *lspReader) Read() (*lsproto.Message, error) { + data, err := r.r.Read() + if err != nil { + return nil, err + } + + req := &lsproto.Message{} + if err := json.Unmarshal(data, req); err != nil { + return nil, fmt.Errorf("%w: %w", lsproto.ErrInvalidRequest, err) + } + + return req, nil +} + +func ToReader(r io.Reader) Reader { + return &lspReader{r: lsproto.NewBaseReader(r)} +} + +func (w *lspWriter) Write(msg *lsproto.Message) error { + data, err := json.Marshal(msg) + if err != nil { + return fmt.Errorf("failed to marshal message: %w", err) + } + return w.w.Write(data) +} + +func ToWriter(w io.Writer) Writer { + return &lspWriter{w: lsproto.NewBaseWriter(w)} +} + +var ( + _ Reader = (*lspReader)(nil) + _ Writer = (*lspWriter)(nil) +) + +type Server struct { + r Reader + w Writer stderr io.Writer @@ -91,6 +145,12 @@ type Server struct { watchers core.Set[project.WatcherHandle] logger *project.Logger projectService *project.Service + + // enables tests to share a cache of parsed source files + parsedFileCache project.ParsedFileCache + + // !!! temporary; remove when we have `handleDidChangeConfiguration`/implicit project config support + compilerOptionsForInferredProjects *core.CompilerOptions } // FS implements project.ServiceHost. @@ -194,9 +254,20 @@ func (s *Server) Run() error { g, ctx := errgroup.WithContext(ctx) g.Go(func() error { return s.dispatchLoop(ctx) }) g.Go(func() error { return s.writeLoop(ctx) }) - g.Go(func() error { return s.readLoop(ctx) }) - if err := g.Wait(); err != nil && !errors.Is(err, io.EOF) { + // Don't run readLoop in the group, as it blocks on stdin read and cannot be cancelled. + readLoopErr := make(chan error, 1) + g.Go(func() error { + select { + case <-ctx.Done(): + return ctx.Err() + case err := <-readLoopErr: + return err + } + }) + go func() { readLoopErr <- s.readLoop(ctx) }() + + if err := g.Wait(); err != nil && !errors.Is(err, io.EOF) && ctx.Err() != nil { return err } return nil @@ -204,6 +275,9 @@ func (s *Server) Run() error { func (s *Server) readLoop(ctx context.Context) error { for { + if err := ctx.Err(); err != nil { + return err + } msg, err := s.read() if err != nil { if errors.Is(err, lsproto.ErrInvalidRequest) { @@ -254,17 +328,7 @@ func (s *Server) cancelRequest(rawID lsproto.IntegerOrString) { } func (s *Server) read() (*lsproto.Message, error) { - data, err := s.r.Read() - if err != nil { - return nil, err - } - - req := &lsproto.Message{} - if err := json.Unmarshal(data, req); err != nil { - return nil, fmt.Errorf("%w: %w", lsproto.ErrInvalidRequest, err) - } - - return req, nil + return s.r.Read() } func (s *Server) dispatchLoop(ctx context.Context) error { @@ -288,6 +352,14 @@ func (s *Server) dispatchLoop(ctx context.Context) error { } handle := func() { + defer func() { + if r := recover(); r != nil { + stack := debug.Stack() + s.Log("panic handling request", req.Method, r, string(stack)) + // !!! send something back to client + lspExit() + } + }() if err := s.handleRequestOrNotification(requestCtx, req); err != nil { if errors.Is(err, io.EOF) { lspExit() @@ -318,11 +390,7 @@ func (s *Server) writeLoop(ctx context.Context) error { case <-ctx.Done(): return ctx.Err() case msg := <-s.outgoingQueue: - data, err := json.Marshal(msg) - if err != nil { - return fmt.Errorf("failed to marshal message: %w", err) - } - if err := s.w.Write(data); err != nil { + if err := s.w.Write(msg); err != nil { return fmt.Errorf("failed to write message: %w", err) } } @@ -410,6 +478,16 @@ func (s *Server) handleRequestOrNotification(ctx context.Context, req *lsproto.R return s.handleDefinition(ctx, req) case *lsproto.CompletionParams: return s.handleCompletion(ctx, req) + case *lsproto.ReferenceParams: + return s.handleReferences(ctx, req) + case *lsproto.SignatureHelpParams: + return s.handleSignatureHelp(ctx, req) + case *lsproto.DocumentFormattingParams: + return s.handleDocumentFormat(ctx, req) + case *lsproto.DocumentRangeFormattingParams: + return s.handleDocumentRangeFormat(ctx, req) + case *lsproto.DocumentOnTypeFormattingParams: + return s.handleDocumentOnTypeFormat(ctx, req) default: switch req.Method { case lsproto.MethodShutdown: @@ -462,6 +540,9 @@ func (s *Server) handleInitialize(req *lsproto.RequestMessage) { DefinitionProvider: &lsproto.BooleanOrDefinitionOptions{ Boolean: ptrTo(true), }, + ReferencesProvider: &lsproto.BooleanOrReferenceOptions{ + Boolean: ptrTo(true), + }, DiagnosticProvider: &lsproto.DiagnosticOptionsOrDiagnosticRegistrationOptions{ DiagnosticOptions: &lsproto.DiagnosticOptions{ InterFileDependencies: true, @@ -471,12 +552,25 @@ func (s *Server) handleInitialize(req *lsproto.RequestMessage) { TriggerCharacters: &ls.TriggerCharacters, // !!! other options }, + SignatureHelpProvider: &lsproto.SignatureHelpOptions{ + TriggerCharacters: &[]string{"(", ","}, + }, + DocumentFormattingProvider: &lsproto.BooleanOrDocumentFormattingOptions{ + Boolean: ptrTo(true), + }, + DocumentRangeFormattingProvider: &lsproto.BooleanOrDocumentRangeFormattingOptions{ + Boolean: ptrTo(true), + }, + DocumentOnTypeFormattingProvider: &lsproto.DocumentOnTypeFormattingOptions{ + FirstTriggerCharacter: "{", + MoreTriggerCharacter: &[]string{"}", ";", "\n"}, + }, }, }) } func (s *Server) handleInitialized(ctx context.Context, req *lsproto.RequestMessage) error { - if s.initializeParams.Capabilities.Workspace.DidChangeWatchedFiles != nil && *s.initializeParams.Capabilities.Workspace.DidChangeWatchedFiles.DynamicRegistration { + if shouldEnableWatch(s.initializeParams) { s.watchEnabled = true } @@ -489,7 +583,12 @@ func (s *Server) handleInitialized(ctx context.Context, req *lsproto.RequestMess ThrottleLimit: 5, NpmInstall: project.NpmInstall, }, + ParsedFileCache: s.parsedFileCache, }) + // !!! temporary; remove when we have `handleDidChangeConfiguration`/implicit project config support + if s.compilerOptionsForInferredProjects != nil { + s.projectService.SetCompilerOptionsForInferredProjects(s.compilerOptionsForInferredProjects) + } return nil } @@ -548,6 +647,23 @@ func (s *Server) handleHover(ctx context.Context, req *lsproto.RequestMessage) e return nil } +func (s *Server) handleSignatureHelp(ctx context.Context, req *lsproto.RequestMessage) error { + params := req.Params.(*lsproto.SignatureHelpParams) + project := s.projectService.EnsureDefaultProjectForURI(params.TextDocument.Uri) + languageService, done := project.GetLanguageServiceForRequest(ctx) + defer done() + signatureHelp := languageService.ProvideSignatureHelp( + ctx, + params.TextDocument.Uri, + params.Position, + params.Context, + s.initializeParams.Capabilities.TextDocument.SignatureHelp, + &ls.UserPreferences{}, + ) + s.sendResult(req.ID, signatureHelp) + return nil +} + func (s *Server) handleDefinition(ctx context.Context, req *lsproto.RequestMessage) error { params := req.Params.(*lsproto.DefinitionParams) project := s.projectService.EnsureDefaultProjectForURI(params.TextDocument.Uri) @@ -561,6 +677,26 @@ func (s *Server) handleDefinition(ctx context.Context, req *lsproto.RequestMessa return nil } +func (s *Server) handleReferences(ctx context.Context, req *lsproto.RequestMessage) error { + // findAllReferences + params := req.Params.(*lsproto.ReferenceParams) + project := s.projectService.EnsureDefaultProjectForURI(params.TextDocument.Uri) + languageService, done := project.GetLanguageServiceForRequest(ctx) + defer done() + // !!! remove this after find all references is fully ported/tested + defer func() { + if r := recover(); r != nil { + stack := debug.Stack() + s.Log("panic obtaining references:", r, string(stack)) + s.sendResult(req.ID, []*lsproto.Location{}) + } + }() + + locations := languageService.ProvideReferences(params) + s.sendResult(req.ID, locations) + return nil +} + func (s *Server) handleCompletion(ctx context.Context, req *lsproto.RequestMessage) error { params := req.Params.(*lsproto.CompletionParams) project := s.projectService.EnsureDefaultProjectForURI(params.TextDocument.Uri) @@ -580,7 +716,7 @@ func (s *Server) handleCompletion(ctx context.Context, req *lsproto.RequestMessa params.TextDocument.Uri, params.Position, params.Context, - s.initializeParams.Capabilities.TextDocument.Completion, + getCompletionClientCapabilities(s.initializeParams), &ls.UserPreferences{}) if err != nil { return err @@ -589,10 +725,99 @@ func (s *Server) handleCompletion(ctx context.Context, req *lsproto.RequestMessa return nil } +func (s *Server) handleDocumentFormat(ctx context.Context, req *lsproto.RequestMessage) error { + params := req.Params.(*lsproto.DocumentFormattingParams) + project := s.projectService.EnsureDefaultProjectForURI(params.TextDocument.Uri) + languageService, done := project.GetLanguageServiceForRequest(ctx) + defer done() + // !!! remove this after formatting is fully ported/tested + defer func() { + if r := recover(); r != nil { + stack := debug.Stack() + s.Log("panic on document format:", r, string(stack)) + s.sendResult(req.ID, []*lsproto.TextEdit{}) + } + }() + + res, err := languageService.ProvideFormatDocument( + ctx, + params.TextDocument.Uri, + params.Options, + ) + if err != nil { + return err + } + s.sendResult(req.ID, res) + return nil +} + +func (s *Server) handleDocumentRangeFormat(ctx context.Context, req *lsproto.RequestMessage) error { + params := req.Params.(*lsproto.DocumentRangeFormattingParams) + project := s.projectService.EnsureDefaultProjectForURI(params.TextDocument.Uri) + languageService, done := project.GetLanguageServiceForRequest(ctx) + defer done() + // !!! remove this after formatting is fully ported/tested + defer func() { + if r := recover(); r != nil { + stack := debug.Stack() + s.Log("panic on document range format:", r, string(stack)) + s.sendResult(req.ID, []*lsproto.TextEdit{}) + } + }() + + res, err := languageService.ProvideFormatDocumentRange( + ctx, + params.TextDocument.Uri, + params.Options, + params.Range, + ) + if err != nil { + return err + } + s.sendResult(req.ID, res) + return nil +} + +func (s *Server) handleDocumentOnTypeFormat(ctx context.Context, req *lsproto.RequestMessage) error { + params := req.Params.(*lsproto.DocumentOnTypeFormattingParams) + project := s.projectService.EnsureDefaultProjectForURI(params.TextDocument.Uri) + languageService, done := project.GetLanguageServiceForRequest(ctx) + defer done() + // !!! remove this after formatting is fully ported/tested + defer func() { + if r := recover(); r != nil { + stack := debug.Stack() + s.Log("panic on type format:", r, string(stack)) + s.sendResult(req.ID, []*lsproto.TextEdit{}) + } + }() + + res, err := languageService.ProvideFormatDocumentOnType( + ctx, + params.TextDocument.Uri, + params.Options, + params.Position, + params.Ch, + ) + if err != nil { + return err + } + s.sendResult(req.ID, res) + return nil +} + func (s *Server) Log(msg ...any) { fmt.Fprintln(s.stderr, msg...) } +// !!! temporary; remove when we have `handleDidChangeConfiguration`/implicit project config support +func (s *Server) SetCompilerOptionsForInferredProjects(options *core.CompilerOptions) { + s.compilerOptionsForInferredProjects = options + if s.projectService != nil { + s.projectService.SetCompilerOptionsForInferredProjects(options) + } +} + func isBlockingMethod(method lsproto.Method) bool { switch method { case lsproto.MethodInitialize, @@ -617,3 +842,18 @@ func ptrIsTrue(v *bool) bool { } return *v } + +func shouldEnableWatch(params *lsproto.InitializeParams) bool { + if params == nil || params.Capabilities == nil || params.Capabilities.Workspace == nil { + return false + } + return params.Capabilities.Workspace.DidChangeWatchedFiles != nil && + ptrIsTrue(params.Capabilities.Workspace.DidChangeWatchedFiles.DynamicRegistration) +} + +func getCompletionClientCapabilities(params *lsproto.InitializeParams) *lsproto.CompletionClientCapabilities { + if params == nil || params.Capabilities == nil || params.Capabilities.TextDocument == nil { + return nil + } + return params.Capabilities.TextDocument.Completion +} diff --git a/internal/lsutil/asi.go b/internal/lsutil/asi.go new file mode 100644 index 0000000000..08456f2739 --- /dev/null +++ b/internal/lsutil/asi.go @@ -0,0 +1,104 @@ +package lsutil + +import ( + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/astnav" + "github.com/microsoft/typescript-go/internal/scanner" +) + +func PositionIsASICandidate(pos int, context *ast.Node, file *ast.SourceFile) bool { + contextAncestor := ast.FindAncestorOrQuit(context, func(ancestor *ast.Node) ast.FindAncestorResult { + if ancestor.End() != pos { + return ast.FindAncestorQuit + } + + return ast.ToFindAncestorResult(SyntaxMayBeASICandidate(ancestor.Kind)) + }) + + return contextAncestor != nil && NodeIsASICandidate(contextAncestor, file) +} + +func SyntaxMayBeASICandidate(kind ast.Kind) bool { + return SyntaxRequiresTrailingCommaOrSemicolonOrASI(kind) || + SyntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) || + SyntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) || + SyntaxRequiresTrailingSemicolonOrASI(kind) +} + +func SyntaxRequiresTrailingCommaOrSemicolonOrASI(kind ast.Kind) bool { + return kind == ast.KindCallSignature || + kind == ast.KindConstructSignature || + kind == ast.KindIndexSignature || + kind == ast.KindPropertySignature || + kind == ast.KindMethodSignature +} + +func SyntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind ast.Kind) bool { + return kind == ast.KindFunctionDeclaration || + kind == ast.KindConstructor || + kind == ast.KindMethodDeclaration || + kind == ast.KindGetAccessor || + kind == ast.KindSetAccessor +} + +func SyntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind ast.Kind) bool { + return kind == ast.KindModuleDeclaration +} + +func SyntaxRequiresTrailingSemicolonOrASI(kind ast.Kind) bool { + return kind == ast.KindVariableStatement || + kind == ast.KindExpressionStatement || + kind == ast.KindDoStatement || + kind == ast.KindContinueStatement || + kind == ast.KindBreakStatement || + kind == ast.KindReturnStatement || + kind == ast.KindThrowStatement || + kind == ast.KindDebuggerStatement || + kind == ast.KindPropertyDeclaration || + kind == ast.KindTypeAliasDeclaration || + kind == ast.KindImportDeclaration || + kind == ast.KindImportEqualsDeclaration || + kind == ast.KindExportDeclaration || + kind == ast.KindNamespaceExportDeclaration || + kind == ast.KindExportAssignment +} + +func NodeIsASICandidate(node *ast.Node, file *ast.SourceFile) bool { + lastToken := GetLastToken(node, file) + if lastToken != nil && lastToken.Kind == ast.KindSemicolonToken { + return false + } + + if SyntaxRequiresTrailingCommaOrSemicolonOrASI(node.Kind) { + if lastToken != nil && lastToken.Kind == ast.KindCommaToken { + return false + } + } else if SyntaxRequiresTrailingModuleBlockOrSemicolonOrASI(node.Kind) { + lastChild := GetLastChild(node, file) + if lastChild != nil && ast.IsModuleBlock(lastChild) { + return false + } + } else if SyntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(node.Kind) { + lastChild := GetLastChild(node, file) + if lastChild != nil && ast.IsFunctionBlock(lastChild) { + return false + } + } else if !SyntaxRequiresTrailingSemicolonOrASI(node.Kind) { + return false + } + + // See comment in parser's `parseDoStatement` + if node.Kind == ast.KindDoStatement { + return true + } + + topNode := ast.FindAncestor(node, func(ancestor *ast.Node) bool { return ancestor.Parent == nil }) + nextToken := astnav.FindNextToken(node, topNode, file) + if nextToken == nil || nextToken.Kind == ast.KindCloseBraceToken { + return true + } + + startLine, _ := scanner.GetLineAndCharacterOfPosition(file, node.End()) + endLine, _ := scanner.GetLineAndCharacterOfPosition(file, astnav.GetStartOfNode(nextToken, file, false /*includeJSDoc*/)) + return startLine != endLine +} diff --git a/internal/lsutil/children.go b/internal/lsutil/children.go new file mode 100644 index 0000000000..651172d25a --- /dev/null +++ b/internal/lsutil/children.go @@ -0,0 +1,142 @@ +package lsutil + +import ( + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/astnav" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/scanner" +) + +// Replaces last(node.getChildren(sourceFile)) +func GetLastChild(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node { + lastChildNode := GetLastVisitedChild(node, sourceFile) + if ast.IsJSDocSingleCommentNode(node) { + return nil + } + var tokenStartPos int + if lastChildNode != nil { + tokenStartPos = lastChildNode.End() + } else { + tokenStartPos = node.Pos() + } + var lastToken *ast.Node + scanner := scanner.GetScannerForSourceFile(sourceFile, tokenStartPos) + for startPos := tokenStartPos; startPos < node.End(); { + tokenKind := scanner.Token() + tokenFullStart := scanner.TokenFullStart() + tokenEnd := scanner.TokenEnd() + lastToken = sourceFile.GetOrCreateToken(tokenKind, tokenFullStart, tokenEnd, node) + startPos = tokenEnd + scanner.Scan() + } + return core.IfElse(lastToken != nil, lastToken, lastChildNode) +} + +func GetLastToken(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node { + if node == nil { + return nil + } + + if ast.IsTokenKind(node.Kind) || ast.IsIdentifier(node) { + return nil + } + + AssertHasRealPosition(node) + + lastChild := GetLastChild(node, sourceFile) + if lastChild == nil { + return nil + } + + if lastChild.Kind < ast.KindFirstNode { + return lastChild + } else { + return GetLastToken(lastChild, sourceFile) + } +} + +// Gets the last visited child of the given node. +// NOTE: This doesn't include unvisited tokens; for this, use `getLastChild` or `getLastToken`. +func GetLastVisitedChild(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node { + var lastChild *ast.Node + + visitNode := func(n *ast.Node, _ *ast.NodeVisitor) *ast.Node { + if !(n == nil || node.Flags&ast.NodeFlagsReparsed != 0) { + lastChild = n + } + return n + } + visitNodeList := func(nodeList *ast.NodeList, _ *ast.NodeVisitor) *ast.NodeList { + if nodeList != nil && len(nodeList.Nodes) > 0 && !ast.IsJSDocSingleCommentNodeList(node, nodeList) { + for i := len(nodeList.Nodes) - 1; i >= 0; i-- { + if nodeList.Nodes[i].Flags&ast.NodeFlagsReparsed == 0 { + lastChild = nodeList.Nodes[i] + break + } + } + } + return nodeList + } + + nodeVisitor := ast.NewNodeVisitor(core.Identity, nil, ast.NodeVisitorHooks{ + VisitNode: visitNode, + VisitToken: visitNode, + VisitNodes: visitNodeList, + VisitModifiers: func(modifiers *ast.ModifierList, visitor *ast.NodeVisitor) *ast.ModifierList { + if modifiers != nil { + visitNodeList(&modifiers.NodeList, visitor) + } + return modifiers + }, + }) + + astnav.VisitEachChildAndJSDoc(node, sourceFile, nodeVisitor) + return lastChild +} + +func GetFirstToken(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node { + if ast.IsIdentifier(node) || ast.IsTokenKind(node.Kind) { + return nil + } + AssertHasRealPosition(node) + var firstChild *ast.Node + node.ForEachChild(func(n *ast.Node) bool { + if n == nil || node.Flags&ast.NodeFlagsReparsed != 0 { + return false + } + firstChild = n + return true + }) + + var tokenEndPosition int + if firstChild != nil { + tokenEndPosition = firstChild.Pos() + } else { + tokenEndPosition = node.End() + } + scanner := scanner.GetScannerForSourceFile(sourceFile, node.Pos()) + var firstToken *ast.Node + if node.Pos() < tokenEndPosition { + tokenKind := scanner.Token() + tokenFullStart := scanner.TokenFullStart() + tokenEnd := scanner.TokenEnd() + firstToken = sourceFile.GetOrCreateToken(tokenKind, tokenFullStart, tokenEnd, node) + } + + if firstToken != nil { + return firstToken + } + if firstChild == nil { + return nil + } + if firstChild.Kind < ast.KindFirstNode { + return firstChild + } + return GetFirstToken(firstChild, sourceFile) +} + +func AssertHasRealPosition(node *ast.Node) { + if ast.PositionIsSynthesized(node.Pos()) || ast.PositionIsSynthesized(node.End()) { + panic("Node must have a real position for this operation.") + } +} diff --git a/internal/module/types.go b/internal/module/types.go index 26328f85e1..073bf592f3 100644 --- a/internal/module/types.go +++ b/internal/module/types.go @@ -79,7 +79,7 @@ type ResolvedModule struct { } func (r *ResolvedModule) IsResolved() bool { - return r.ResolvedFileName != "" + return r != nil && r.ResolvedFileName != "" } type ResolvedTypeReferenceDirective struct { diff --git a/internal/modulespecifiers/preferences.go b/internal/modulespecifiers/preferences.go index 1bbcf4deab..ce11879329 100644 --- a/internal/modulespecifiers/preferences.go +++ b/internal/modulespecifiers/preferences.go @@ -14,7 +14,7 @@ func shouldAllowImportingTsExtension(compilerOptions *core.CompilerOptions, from return compilerOptions.GetAllowImportingTsExtensions() || len(fromFileName) > 0 && tspath.IsDeclarationFileName(fromFileName) } -func usesExtensionsOnImports(file *ast.SourceFile) bool { +func usesExtensionsOnImports(file SourceFileForSpecifierGeneration) bool { for _, ref := range file.Imports() { text := ref.Text() if tspath.PathIsRelative(text) && !tspath.FileExtensionIsOneOf(text, tspath.ExtensionsNotSupportingExtensionlessResolution) { @@ -26,7 +26,7 @@ func usesExtensionsOnImports(file *ast.SourceFile) bool { func inferPreference( resolutionMode core.ResolutionMode, - sourceFile *ast.SourceFile, + sourceFile SourceFileForSpecifierGeneration, moduleResolutionIsNodeNext bool, ) ModuleSpecifierEnding { usesJsExtensions := false @@ -69,7 +69,7 @@ func getModuleSpecifierEndingPreference( pref ImportModuleSpecifierEndingPreference, resolutionMode core.ResolutionMode, compilerOptions *core.CompilerOptions, - sourceFile *ast.SourceFile, + sourceFile SourceFileForSpecifierGeneration, ) ModuleSpecifierEnding { moduleResolution := compilerOptions.GetModuleResolutionKind() moduleResolutionIsNodeNext := core.ModuleResolutionKindNode16 <= moduleResolution && moduleResolution <= core.ModuleResolutionKindNodeNext @@ -114,7 +114,7 @@ func getPreferredEnding( prefs UserPreferences, host ModuleSpecifierGenerationHost, compilerOptions *core.CompilerOptions, - importingSourceFile *ast.SourceFile, + importingSourceFile SourceFileForSpecifierGeneration, oldImportSpecifier string, resolutionMode core.ResolutionMode, ) ModuleSpecifierEnding { @@ -127,8 +127,7 @@ func getPreferredEnding( } } if resolutionMode == core.ResolutionModeNone { - // !!! TODO: proper import resolution mode support - // resolutionMode = host.GetDefaultResolutionModeForFile(importingSourceFile, compilerOptions) + resolutionMode = host.GetDefaultResolutionModeForFile(importingSourceFile) } return getModuleSpecifierEndingPreference( prefs.ImportModuleSpecifierEndingPreference, @@ -148,7 +147,7 @@ func getModuleSpecifierPreferences( prefs UserPreferences, host ModuleSpecifierGenerationHost, compilerOptions *core.CompilerOptions, - importingSourceFile *ast.SourceFile, + importingSourceFile SourceFileForSpecifierGeneration, oldImportSpecifier string, ) ModuleSpecifierPreferences { excludes := prefs.AutoImportSpecifierExcludeRegexes @@ -181,18 +180,17 @@ func getModuleSpecifierPreferences( getAllowedEndingsInPreferredOrder := func(syntaxImpliedNodeFormat core.ResolutionMode) []ModuleSpecifierEnding { preferredEnding := filePreferredEnding - // !!! TODO: resolution mode support - // impliedNodeFormat := getDefaultResolutionModeForFile(importingSourceFile, host, compilerOptions); - // if impliedNodeFormat != syntaxImpliedNodeFormat { - // preferredEnding = getPreferredEnding( - // prefs, - // host, - // compilerOptions, - // importingSourceFile, - // oldImportSpecifier, - // syntaxImpliedNodeFormat, - // ) - // } + resolutionMode := host.GetDefaultResolutionModeForFile(importingSourceFile) + if resolutionMode != syntaxImpliedNodeFormat { + preferredEnding = getPreferredEnding( + prefs, + host, + compilerOptions, + importingSourceFile, + oldImportSpecifier, + syntaxImpliedNodeFormat, + ) + } moduleResolution := compilerOptions.GetModuleResolutionKind() moduleResolutionIsNodeNext := core.ModuleResolutionKindNode16 <= moduleResolution && moduleResolution <= core.ModuleResolutionKindNodeNext allowImportingTsExtension := shouldAllowImportingTsExtension(compilerOptions, importingSourceFile.FileName()) @@ -202,12 +200,6 @@ func getModuleSpecifierPreferences( } return []ModuleSpecifierEnding{ModuleSpecifierEndingJsExtension} } - // !!! Classic module resolution is dead? - // if (getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Classic) { - // return preferredEnding === ModuleSpecifierEnding.JsExtension - // ? [ModuleSpecifierEnding.JsExtension, ModuleSpecifierEnding.Index] - // : [ModuleSpecifierEnding.Index, ModuleSpecifierEnding.JsExtension]; - // } switch preferredEnding { case ModuleSpecifierEndingJsExtension: if allowImportingTsExtension { diff --git a/internal/modulespecifiers/specifiers.go b/internal/modulespecifiers/specifiers.go index 29965a3862..04f35504cc 100644 --- a/internal/modulespecifiers/specifiers.go +++ b/internal/modulespecifiers/specifiers.go @@ -9,6 +9,7 @@ import ( "github.com/microsoft/typescript-go/internal/collections" "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/module" + "github.com/microsoft/typescript-go/internal/outputpaths" "github.com/microsoft/typescript-go/internal/packagejson" "github.com/microsoft/typescript-go/internal/stringutil" "github.com/microsoft/typescript-go/internal/tspath" @@ -18,7 +19,7 @@ func GetModuleSpecifiers( moduleSymbol *ast.Symbol, checker CheckerShape, compilerOptions *core.CompilerOptions, - importingSourceFile *ast.SourceFile, + importingSourceFile SourceFileForSpecifierGeneration, host ModuleSpecifierGenerationHost, userPreferences UserPreferences, options ModuleSpecifierOptions, @@ -150,7 +151,7 @@ func getAllModulePathsWorker( allFileNames := make(map[string]ModulePath) paths := getEachFileNameOfModule(info.ImportingSourceFileName, importedFileName, host, true) for _, p := range paths { - allFileNames[p.Path] = p + allFileNames[p.FileName] = p } // Sort by paths closest to importing file Name directory @@ -222,7 +223,7 @@ func getEachFileNameOfModule( for _, p := range targets { if !(shouldFilterIgnoredPaths && containsIgnoredPath(p)) { results = append(results, ModulePath{ - Path: p, + FileName: p, IsInNodeModules: containsNodeModules(p), IsRedirect: referenceRedirect == p, }) @@ -265,7 +266,7 @@ func getEachFileNameOfModule( for _, p := range targets { if !(shouldFilterIgnoredPaths && containsIgnoredPath(p)) { results = append(results, ModulePath{ - Path: p, + FileName: p, IsInNodeModules: containsNodeModules(p), IsRedirect: referenceRedirect == p, }) @@ -279,7 +280,7 @@ func getEachFileNameOfModule( func computeModuleSpecifiers( modulePaths []ModulePath, compilerOptions *core.CompilerOptions, - importingSourceFile *ast.SourceFile, + importingSourceFile SourceFileForSpecifierGeneration, host ModuleSpecifierGenerationHost, userPreferences UserPreferences, options ModuleSpecifierOptions, @@ -288,29 +289,39 @@ func computeModuleSpecifiers( info := getInfo(importingSourceFile.FileName(), host) preferences := getModuleSpecifierPreferences(userPreferences, host, compilerOptions, importingSourceFile, "") - // !!! TODO: getFileIncludeReasons lookup based calculation - // const existingSpecifier = isFullSourceFile(importingSourceFile) && forEach(modulePaths, modulePath => - // forEach( - // host.getFileIncludeReasons().get(toPath(modulePath.path, host.getCurrentDirectory(), info.getCanonicalFileName)), - // reason => { - // if (reason.kind !== FileIncludeKind.Import || reason.file !== importingSourceFile.path) return undefined; - // // If the candidate import mode doesn't match the mode we're generating for, don't consider it - // // TODO: maybe useful to keep around as an alternative option for certain contexts where the mode is overridable - // const existingMode = host.getModeForResolutionAtIndex(importingSourceFile, reason.index); - // const targetMode = options.overrideImportMode ?? host.getDefaultResolutionModeForFile(importingSourceFile); - // if (existingMode !== targetMode && existingMode !== undefined && targetMode !== undefined) { - // return undefined; - // } - // const specifier = getModuleNameStringLiteralAt(importingSourceFile, reason.index).text; - // // If the preference is for non relative and the module specifier is relative, ignore it - // return preferences.relativePreference !== RelativePreference.NonRelative || !pathIsRelative(specifier) ? - // specifier : - // undefined; - // }, - // )); - // if (existingSpecifier) { - // return { kind: undefined, moduleSpecifiers: [existingSpecifier], computedWithoutCache: true }; - // } + var existingSpecifier string + for _, modulePath := range modulePaths { + targetPath := tspath.ToPath(modulePath.FileName, host.GetCurrentDirectory(), info.UseCaseSensitiveFileNames) + var existingImport *ast.StringLiteralLike + for _, importSpecifier := range importingSourceFile.Imports() { + resolvedModule := host.GetResolvedModuleFromModuleSpecifier(importingSourceFile, importSpecifier) + if resolvedModule.IsResolved() && tspath.ToPath(resolvedModule.ResolvedFileName, host.GetCurrentDirectory(), info.UseCaseSensitiveFileNames) == targetPath { + existingImport = importSpecifier + break + } + } + if existingImport != nil { + if preferences.relativePreference == RelativePreferenceNonRelative && tspath.PathIsRelative(existingImport.Text()) { + // If the preference is for non-relative and the module specifier is relative, ignore it + continue + } + existingMode := host.GetModeForUsageLocation(importingSourceFile, existingImport) + targetMode := options.OverrideImportMode + if targetMode == core.ResolutionModeNone { + targetMode = host.GetDefaultResolutionModeForFile(importingSourceFile) + } + if existingMode != targetMode && existingMode != core.ResolutionModeNone && targetMode != core.ResolutionModeNone { + // If the candidate import mode doesn't match the mode we're generating for, don't consider it + continue + } + existingSpecifier = existingImport.Text() + break + } + } + + if existingSpecifier != "" { + return []string{existingSpecifier} + } importedFileIsInNodeModules := core.Some(modulePaths, func(p ModulePath) bool { return p.IsInNodeModules }) @@ -338,13 +349,16 @@ func computeModuleSpecifiers( } } - // !!! TODO: proper resolutionMode support + importMode := options.OverrideImportMode + if importMode == core.ResolutionModeNone { + importMode = host.GetDefaultResolutionModeForFile(importingSourceFile) + } local := getLocalModuleSpecifier( - modulePath.Path, + modulePath.FileName, info, compilerOptions, host, - options.OverrideImportMode, /*|| importingSourceFile.impliedNodeFormat*/ + importMode, preferences, /*pathsOnly*/ modulePath.IsRedirect || len(specifier) > 0, ) @@ -368,7 +382,7 @@ func computeModuleSpecifiers( // 'node_modules', but we can't create a non-relative specifier (e.g. "@foo/bar/path/to/file"), // that means we had to go through a *sibling's* node_modules, not one we can access directly. // If some path to the file was in node_modules but another was not, this likely indicates that - // we have a monorepo structure with symlinks. In this case, the non-node_modules path is + // we have a monorepo structure with symlinks. In this case, the non-nodeModules path is // probably the realpath, e.g. "../bar/path/to/file", but a relative path to another package // in a monorepo is probably not portable. So, the module specifier we actually go with will be // the relative path through node_modules, so that the declaration emitter can produce a @@ -633,14 +647,14 @@ func tryGetModuleNameFromRootDirs( func tryGetModuleNameAsNodeModule( pathObj ModulePath, info Info, - importingSourceFile *ast.SourceFile, + importingSourceFile SourceFileForSpecifierGeneration, host ModuleSpecifierGenerationHost, options *core.CompilerOptions, userPreferences UserPreferences, packageNameOnly bool, overrideMode core.ResolutionMode, ) string { - parts := getNodeModulePathParts(pathObj.Path) + parts := getNodeModulePathParts(pathObj.FileName) if parts == nil { return "" } @@ -650,7 +664,7 @@ func tryGetModuleNameAsNodeModule( allowedEndings := preferences.getAllowedEndingsInPreferredOrder(core.ResolutionModeNone) caseSensitive := host.UseCaseSensitiveFileNames() - moduleSpecifier := pathObj.Path + moduleSpecifier := pathObj.FileName isPackageRootPath := false if !packageNameOnly { packageRootIndex := parts.PackageRootIndex @@ -674,7 +688,7 @@ func tryGetModuleNameAsNodeModule( return "" // File is under this package.json, but is not publicly exported - there's no way to name it via `node_modules` resolution } if verbatimFromExports { - return moduleFileName + return moduleFileToTry } //} if len(packageRootPath) > 0 { @@ -686,7 +700,7 @@ func tryGetModuleNameAsNodeModule( moduleFileName = moduleFileToTry } // try with next level of directory - packageRootIndex = core.IndexAfter(pathObj.Path, "/", packageRootIndex+1) + packageRootIndex = core.IndexAfter(pathObj.FileName, "/", packageRootIndex+1) if packageRootIndex == -1 { moduleSpecifier = processEnding(moduleFileName, allowedEndings, options, host) break @@ -709,13 +723,7 @@ func tryGetModuleNameAsNodeModule( // If the module was found in @types, get the actual Node package name nodeModulesDirectoryName := moduleSpecifier[parts.TopLevelPackageNameIndex+1:] - packageName := getPackageNameFromTypesPackageName(nodeModulesDirectoryName) - // For classic resolution, only allow importing from node_modules/@types, not other node_modules - // !!! classic resolution is dead? - // if options.GetModuleResolutionKind() == core.ModuleResolutionKindClassic && packageName == nodeModulesDirectoryName { - // return "" - // } - return packageName + return getPackageNameFromTypesPackageName(nodeModulesDirectoryName) } type pkgJsonDirAttemptResult struct { @@ -728,7 +736,7 @@ type pkgJsonDirAttemptResult struct { func tryDirectoryWithPackageJson( parts NodeModulePathParts, pathObj ModulePath, - importingSourceFile *ast.SourceFile, + importingSourceFile SourceFileForSpecifierGeneration, host ModuleSpecifierGenerationHost, overrideMode core.ResolutionMode, options *core.CompilerOptions, @@ -736,11 +744,11 @@ func tryDirectoryWithPackageJson( ) pkgJsonDirAttemptResult { rootIdx := parts.PackageRootIndex if rootIdx == -1 { - rootIdx = len(pathObj.Path) // TODO: possible strada bug? -1 in js slice removes characters from the end, in go it panics - js behavior seems unwanted here? + rootIdx = len(pathObj.FileName) // TODO: possible strada bug? -1 in js slice removes characters from the end, in go it panics - js behavior seems unwanted here? } - packageRootPath := pathObj.Path[0:rootIdx] + packageRootPath := pathObj.FileName[0:rootIdx] packageJsonPath := tspath.CombinePaths(packageRootPath, "package.json") - moduleFileToTry := pathObj.Path + moduleFileToTry := pathObj.FileName maybeBlockedByTypesVersions := false packageJson := host.GetPackageJsonInfo(packageJsonPath) if packageJson == nil { @@ -774,7 +782,7 @@ func tryDirectoryWithPackageJson( fromExports = tryGetModuleNameFromExports( options, host, - pathObj.Path, + pathObj.FileName, packageRootPath, packageName, packageJsonContent.Fields.Exports, @@ -789,7 +797,7 @@ func tryDirectoryWithPackageJson( } if packageJsonContent != nil && packageJsonContent.Fields.Exports.Type != packagejson.JSONValueTypeNotPresent { return pkgJsonDirAttemptResult{ - moduleFileToTry: pathObj.Path, + moduleFileToTry: pathObj.FileName, blockedByExports: true, } } @@ -800,7 +808,7 @@ func tryDirectoryWithPackageJson( versionPaths = packageJsonContent.GetVersionPaths(nil) } if versionPaths.GetPaths() != nil { - subModuleName := pathObj.Path[len(packageRootPath)+1:] + subModuleName := pathObj.FileName[len(packageRootPath)+1:] fromPaths := tryGetModuleNameFromPaths( subModuleName, versionPaths.GetPaths(), @@ -1098,14 +1106,13 @@ func tryGetModuleNameFromExportsOrImports( case packagejson.JSONValueTypeString: strValue := exports.Value.(string) - // !!! TODO: remapping to output locations // possible strada bug? Always uses compilerOptions of the host project, not those applicable to the targeted package.json! - // var outputFile string - // var declarationFile string - // if isImports { - // outputFile = getOutputJSFileNameWorker(targetFilePath, options) - // declarationFile = getOutputDeclarationFileNameWorker(targetFilePath, options) - // } + var outputFile string + var declarationFile string + if isImports { + outputFile = outputpaths.GetOutputJSFileNameWorker(targetFilePath, options, host) + declarationFile = outputpaths.GetOutputDeclarationFileNameWorker(targetFilePath, options, host) + } pathOrPattern := tspath.GetNormalizedAbsolutePath(tspath.CombinePaths(packageDirectory, strValue), "") var extensionSwappedTarget string @@ -1122,10 +1129,9 @@ func tryGetModuleNameFromExportsOrImports( switch mode { case MatchingModeExact: if len(extensionSwappedTarget) > 0 && tspath.ComparePaths(extensionSwappedTarget, pathOrPattern, compareOpts) == 0 || - tspath.ComparePaths(targetFilePath, pathOrPattern, compareOpts) == 0 { - // !!! TODO: import remapping to output locations - // outputFile && tspath.ComparePaths(outputFile, pathOrPattern, ignoreCase) === Comparison.EqualTo || - // declarationFile && tspath.ComparePaths((declarationFile, pathOrPattern, ignoreCase) === Comparison.EqualTo + tspath.ComparePaths(targetFilePath, pathOrPattern, compareOpts) == 0 || + len(outputFile) > 0 && tspath.ComparePaths(outputFile, pathOrPattern, compareOpts) == 0 || + len(declarationFile) > 0 && tspath.ComparePaths(declarationFile, pathOrPattern, compareOpts) == 0 { return packageName } case MatchingModeDirectory: @@ -1141,44 +1147,45 @@ func tryGetModuleNameFromExportsOrImports( fragment := tspath.GetRelativePathFromDirectory(pathOrPattern, targetFilePath, compareOpts) return tspath.GetNormalizedAbsolutePath(tspath.CombinePaths(tspath.CombinePaths(packageName, strValue), fragment), "") } - // !!! TODO: import remapping to output locations - // if (outputFile && containsPath(pathOrPattern, outputFile, compareOpts)) { - // const fragment = getRelativePathFromDirectory(pathOrPattern, outputFile, /*ignoreCase*/ false); - // return combinePaths(packageName, fragment) - // } - // if (declarationFile && containsPath(pathOrPattern, declarationFile, compareOpts)) { - // const fragment = changeFullExtension(getRelativePathFromDirectory(pathOrPattern, declarationFile, /*ignoreCase*/ false), getJSExtensionForFile(declarationFile, options)); - // return combinePaths(packageName, fragment) - // } + if len(outputFile) > 0 && tspath.ContainsPath(pathOrPattern, outputFile, compareOpts) { + fragment := tspath.GetRelativePathFromDirectory(pathOrPattern, outputFile, compareOpts) + return tspath.CombinePaths(packageName, fragment) + } + if len(declarationFile) > 0 && tspath.ContainsPath(pathOrPattern, declarationFile, compareOpts) { + fragment := tspath.GetRelativePathFromDirectory(pathOrPattern, declarationFile, compareOpts) + jsExtension := getJSExtensionForFile(declarationFile, options) + fragmentWithJsExtension := tspath.ChangeExtension(fragment, jsExtension) + return tspath.CombinePaths(packageName, fragmentWithJsExtension) + } case MatchingModePattern: starPos := strings.Index(pathOrPattern, "*") leadingSlice := pathOrPattern[0:starPos] trailingSlice := pathOrPattern[starPos+1:] caseSensitive := host.UseCaseSensitiveFileNames() - var starReplacement string if canTryTsExtension && stringutil.HasPrefix(targetFilePath, leadingSlice, caseSensitive) && stringutil.HasSuffix(targetFilePath, trailingSlice, caseSensitive) { - starReplacement = targetFilePath[len(leadingSlice) : len(targetFilePath)-len(trailingSlice)] + starReplacement := targetFilePath[len(leadingSlice) : len(targetFilePath)-len(trailingSlice)] + return replaceFirstStar(packageName, starReplacement) } if len(extensionSwappedTarget) > 0 && stringutil.HasPrefix(extensionSwappedTarget, leadingSlice, caseSensitive) && stringutil.HasSuffix(extensionSwappedTarget, trailingSlice, caseSensitive) { - starReplacement = extensionSwappedTarget[len(leadingSlice) : len(extensionSwappedTarget)-len(trailingSlice)] + starReplacement := extensionSwappedTarget[len(leadingSlice) : len(extensionSwappedTarget)-len(trailingSlice)] + return replaceFirstStar(packageName, starReplacement) } if !canTryTsExtension && stringutil.HasPrefix(targetFilePath, leadingSlice, caseSensitive) && stringutil.HasSuffix(targetFilePath, trailingSlice, caseSensitive) { - starReplacement = targetFilePath[len(leadingSlice) : len(targetFilePath)-len(trailingSlice)] + starReplacement := targetFilePath[len(leadingSlice) : len(targetFilePath)-len(trailingSlice)] + return replaceFirstStar(packageName, starReplacement) } - if len(starReplacement) == 0 { - return "" + if len(outputFile) > 0 && stringutil.HasPrefix(outputFile, leadingSlice, caseSensitive) && stringutil.HasSuffix(outputFile, trailingSlice, caseSensitive) { + starReplacement := outputFile[len(leadingSlice) : len(outputFile)-len(trailingSlice)] + return replaceFirstStar(packageName, starReplacement) + } + if len(declarationFile) > 0 && stringutil.HasPrefix(declarationFile, leadingSlice, caseSensitive) && stringutil.HasSuffix(declarationFile, trailingSlice, caseSensitive) { + starReplacement := declarationFile[len(leadingSlice) : len(declarationFile)-len(trailingSlice)] + substituted := replaceFirstStar(packageName, starReplacement) + jsExtension := tryGetJSExtensionForFile(declarationFile, options) + if len(jsExtension) > 0 { + return tspath.ChangeFullExtension(substituted, jsExtension) + } } - return replaceFirstStar(packageName, starReplacement) - // !!! TODO: import remapping to output locations - // if (outputFile && startsWith(outputFile, leadingSlice, ignoreCase) && endsWith(outputFile, trailingSlice, ignoreCase)) { - // const starReplacement = outputFile.slice(leadingSlice.length, outputFile.length - trailingSlice.length); - // } - // if (declarationFile && startsWith(declarationFile, leadingSlice, ignoreCase) && endsWith(declarationFile, trailingSlice, ignoreCase)) { - // const starReplacement = declarationFile.slice(leadingSlice.length, declarationFile.length - trailingSlice.length); - // const substituted = replaceFirstStar(packageName, starReplacement); - // const jsExtension = tryGetJSExtensionForFile(declarationFile, options); - // return jsExtension ? { moduleFileToTry: changeFullExtension(substituted, jsExtension) } : undefined; - // } } return "" case packagejson.JSONValueTypeArray: diff --git a/internal/modulespecifiers/types.go b/internal/modulespecifiers/types.go index 560d2090cf..14c26f1cdf 100644 --- a/internal/modulespecifiers/types.go +++ b/internal/modulespecifiers/types.go @@ -3,10 +3,19 @@ package modulespecifiers import ( "github.com/microsoft/typescript-go/internal/ast" "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/module" "github.com/microsoft/typescript-go/internal/packagejson" "github.com/microsoft/typescript-go/internal/tspath" ) +type SourceFileForSpecifierGeneration interface { + Path() tspath.Path + FileName() string + OriginalFileName() string + Imports() []*ast.StringLiteralLike + IsJS() bool +} + type CheckerShape interface { GetSymbolAtLocation(node *ast.Node) *ast.Symbol GetAliasedSymbol(symbol *ast.Symbol) *ast.Symbol @@ -24,7 +33,7 @@ const ( ) type ModulePath struct { - Path string + FileName string IsInNodeModules bool IsRedirect bool } @@ -38,6 +47,7 @@ type ModuleSpecifierGenerationHost interface { // GetModuleResolutionCache() any // !!! TODO: adapt new resolution cache model // GetSymlinkCache() any // !!! TODO: adapt new resolution cache model // GetFileIncludeReasons() any // !!! TODO: adapt new resolution cache model + CommonSourceDirectory() string GetGlobalTypingsCacheLocation() string UseCaseSensitiveFileNames() bool GetCurrentDirectory() string @@ -50,7 +60,9 @@ type ModuleSpecifierGenerationHost interface { GetNearestAncestorDirectoryWithPackageJson(dirname string) string GetPackageJsonInfo(pkgJsonPath string) PackageJsonInfo - GetDefaultResolutionModeForFile(file *ast.SourceFile) core.ResolutionMode + GetDefaultResolutionModeForFile(file ast.HasFileName) core.ResolutionMode + GetResolvedModuleFromModuleSpecifier(file ast.HasFileName, moduleSpecifier *ast.StringLiteralLike) *module.ResolvedModule + GetModeForUsageLocation(file ast.HasFileName, moduleSpecifier *ast.StringLiteralLike) core.ResolutionMode } type ImportModuleSpecifierPreference string diff --git a/internal/modulespecifiers/util.go b/internal/modulespecifiers/util.go index 0850ad8b34..6abb7d3605 100644 --- a/internal/modulespecifiers/util.go +++ b/internal/modulespecifiers/util.go @@ -22,7 +22,7 @@ func isNonGlobalAmbientModule(node *ast.Node) bool { func comparePathsByRedirectAndNumberOfDirectorySeparators(a ModulePath, b ModulePath) int { if a.IsRedirect == b.IsRedirect { - return strings.Count(a.Path, "/") - strings.Count(b.Path, "/") + return strings.Count(a.FileName, "/") - strings.Count(b.FileName, "/") } if a.IsRedirect { return 1 diff --git a/internal/outputpaths/outputpaths.go b/internal/outputpaths/outputpaths.go new file mode 100644 index 0000000000..360c3372d6 --- /dev/null +++ b/internal/outputpaths/outputpaths.go @@ -0,0 +1,201 @@ +package outputpaths + +import ( + "strings" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/tspath" +) + +type OutputPathsHost interface { + CommonSourceDirectory() string + GetCurrentDirectory() string + UseCaseSensitiveFileNames() bool +} + +type OutputPaths struct { + jsFilePath string + sourceMapFilePath string + declarationFilePath string + declarationMapPath string + buildInfoPath string +} + +// DeclarationFilePath implements declarations.OutputPaths. +func (o *OutputPaths) DeclarationFilePath() string { + return o.declarationFilePath +} + +// JsFilePath implements declarations.OutputPaths. +func (o *OutputPaths) JsFilePath() string { + return o.jsFilePath +} + +func (o *OutputPaths) SourceMapFilePath() string { + return o.sourceMapFilePath +} + +func (o *OutputPaths) DeclarationMapPath() string { + return o.declarationMapPath +} + +func (o *OutputPaths) BuildInfoPath() string { + return o.buildInfoPath +} + +func GetOutputPathsFor(sourceFile *ast.SourceFile, options *core.CompilerOptions, host OutputPathsHost, forceDtsEmit bool) *OutputPaths { + // !!! bundle not implemented, may be deprecated + ownOutputFilePath := getOwnEmitOutputFilePath(sourceFile.FileName(), options, host, GetOutputExtension(sourceFile.FileName(), options.Jsx)) + isJsonFile := ast.IsJsonSourceFile(sourceFile) + // If json file emits to the same location skip writing it, if emitDeclarationOnly skip writing it + isJsonEmittedToSameLocation := isJsonFile && + tspath.ComparePaths(sourceFile.FileName(), ownOutputFilePath, tspath.ComparePathsOptions{ + CurrentDirectory: host.GetCurrentDirectory(), + UseCaseSensitiveFileNames: host.UseCaseSensitiveFileNames(), + }) == 0 + paths := &OutputPaths{} + if options.EmitDeclarationOnly != core.TSTrue && !isJsonEmittedToSameLocation { + paths.jsFilePath = ownOutputFilePath + if !ast.IsJsonSourceFile(sourceFile) { + paths.sourceMapFilePath = getSourceMapFilePath(paths.jsFilePath, options) + } + } + if forceDtsEmit || options.GetEmitDeclarations() && !isJsonFile { + paths.declarationFilePath = GetDeclarationEmitOutputFilePath(sourceFile.FileName(), options, host) + if options.GetAreDeclarationMapsEnabled() { + paths.declarationMapPath = paths.declarationFilePath + ".map" + } + } + return paths +} + +func ForEachEmittedFile(host OutputPathsHost, options *core.CompilerOptions, action func(emitFileNames *OutputPaths, sourceFile *ast.SourceFile) bool, sourceFiles []*ast.SourceFile, forceDtsEmit bool) bool { + // !!! outFile not yet implemented, may be deprecated + for _, sourceFile := range sourceFiles { + if action(GetOutputPathsFor(sourceFile, options, host, forceDtsEmit), sourceFile) { + return true + } + } + return false +} + +func GetOutputJSFileNameWorker(inputFileName string, options *core.CompilerOptions, host OutputPathsHost) string { + return tspath.ChangeExtension( + getOutputPathWithoutChangingExtension(inputFileName, options.OutDir, host), + GetOutputExtension(inputFileName, options.Jsx), + ) +} + +func GetOutputDeclarationFileNameWorker(inputFileName string, options *core.CompilerOptions, host OutputPathsHost) string { + dir := options.DeclarationDir + if len(dir) == 0 { + dir = options.OutDir + } + return tspath.ChangeExtension( + getOutputPathWithoutChangingExtension(inputFileName, dir, host), + getDeclarationEmitExtensionForPath(inputFileName), + ) +} + +func GetOutputExtension(fileName string, jsx core.JsxEmit) string { + switch { + case tspath.FileExtensionIs(fileName, tspath.ExtensionJson): + return tspath.ExtensionJson + case jsx == core.JsxEmitPreserve && tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionJsx, tspath.ExtensionTsx}): + return tspath.ExtensionJsx + case tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionMts, tspath.ExtensionMjs}): + return tspath.ExtensionMjs + case tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionCts, tspath.ExtensionCjs}): + return tspath.ExtensionCjs + default: + return tspath.ExtensionJs + } +} + +func GetDeclarationEmitOutputFilePath(file string, options *core.CompilerOptions, host OutputPathsHost) string { + var outputDir *string + if len(options.DeclarationDir) > 0 { + outputDir = &options.DeclarationDir + } else if len(options.OutDir) > 0 { + outputDir = &options.OutDir + } + + var path string + if outputDir != nil { + path = getSourceFilePathInNewDirWorker(file, *outputDir, host.GetCurrentDirectory(), host.CommonSourceDirectory(), host.UseCaseSensitiveFileNames()) + } else { + path = file + } + declarationExtension := tspath.GetDeclarationEmitExtensionForPath(path) + return tspath.RemoveFileExtension(path) + declarationExtension +} + +func GetSourceFilePathInNewDir(fileName string, newDirPath string, currentDirectory string, commonSourceDirectory string, useCaseSensitiveFileNames bool) string { + sourceFilePath := tspath.GetNormalizedAbsolutePath(fileName, currentDirectory) + commonSourceDirectory = tspath.EnsureTrailingDirectorySeparator(commonSourceDirectory) + isSourceFileInCommonSourceDirectory := tspath.ContainsPath(commonSourceDirectory, sourceFilePath, tspath.ComparePathsOptions{ + UseCaseSensitiveFileNames: useCaseSensitiveFileNames, + CurrentDirectory: currentDirectory, + }) + if isSourceFileInCommonSourceDirectory { + sourceFilePath = sourceFilePath[len(commonSourceDirectory):] + } + return tspath.CombinePaths(newDirPath, sourceFilePath) +} + +func getOutputPathWithoutChangingExtension(inputFileName string, outputDirectory string, host OutputPathsHost) string { + if len(outputDirectory) > 0 { + return tspath.ResolvePath(outputDirectory, tspath.GetRelativePathFromDirectory(host.CommonSourceDirectory(), inputFileName, tspath.ComparePathsOptions{ + UseCaseSensitiveFileNames: host.UseCaseSensitiveFileNames(), + CurrentDirectory: host.GetCurrentDirectory(), + })) + } + return inputFileName +} + +func getSourceFilePathInNewDirWorker(fileName string, newDirPath string, currentDirectory string, commonSourceDirectory string, useCaseSensitiveFileNames bool) string { + sourceFilePath := tspath.GetNormalizedAbsolutePath(fileName, currentDirectory) + commonDir := tspath.GetCanonicalFileName(commonSourceDirectory, useCaseSensitiveFileNames) + canonFile := tspath.GetCanonicalFileName(sourceFilePath, useCaseSensitiveFileNames) + isSourceFileInCommonSourceDirectory := strings.HasPrefix(canonFile, commonDir) + if isSourceFileInCommonSourceDirectory { + sourceFilePath = sourceFilePath[len(commonSourceDirectory):] + } + return tspath.CombinePaths(newDirPath, sourceFilePath) +} + +func getOwnEmitOutputFilePath(fileName string, options *core.CompilerOptions, host OutputPathsHost, extension string) string { + var emitOutputFilePathWithoutExtension string + if len(options.OutDir) > 0 { + currentDirectory := host.GetCurrentDirectory() + emitOutputFilePathWithoutExtension = tspath.RemoveFileExtension(GetSourceFilePathInNewDir( + fileName, + options.OutDir, + currentDirectory, + host.CommonSourceDirectory(), + host.UseCaseSensitiveFileNames(), + )) + } else { + emitOutputFilePathWithoutExtension = tspath.RemoveFileExtension(fileName) + } + return emitOutputFilePathWithoutExtension + extension +} + +func getSourceMapFilePath(jsFilePath string, options *core.CompilerOptions) string { + if options.SourceMap.IsTrue() && !options.InlineSourceMap.IsTrue() { + return jsFilePath + ".map" + } + return "" +} + +func getDeclarationEmitExtensionForPath(fileName string) string { + if tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionMjs, tspath.ExtensionMts}) { + return tspath.ExtensionDmts + } else if tspath.FileExtensionIsOneOf(fileName, []string{tspath.ExtensionCjs, tspath.ExtensionCts}) { + return tspath.ExtensionDcts + } else if tspath.FileExtensionIs(fileName, tspath.ExtensionJson) { + return ".d.json.ts" + } + return tspath.ExtensionDts +} diff --git a/internal/printer/emitcontext.go b/internal/printer/emitcontext.go index 88f46df28e..8a79da4319 100644 --- a/internal/printer/emitcontext.go +++ b/internal/printer/emitcontext.go @@ -24,10 +24,6 @@ type EmitContext struct { varScopeStack core.Stack[*varScope] letScopeStack core.Stack[*varScope] emitHelpers collections.OrderedSet[*EmitHelper] - - isCustomPrologue func(node *ast.Statement) bool - isHoistedFunction func(node *ast.Statement) bool - isHoistedVariableStatement func(node *ast.Statement) bool } type varScope struct { @@ -38,12 +34,15 @@ type varScope struct { func NewEmitContext() *EmitContext { c := &EmitContext{} c.Factory = NewNodeFactory(c) - c.isCustomPrologue = c.isCustomPrologueWorker - c.isHoistedFunction = c.isHoistedFunctionWorker - c.isHoistedVariableStatement = c.isHoistedVariableStatementWorker return c } +func (c *EmitContext) Reset() { + *c = EmitContext{ + Factory: c.Factory, + } +} + func (c *EmitContext) onCreate(node *ast.Node) { node.Flags |= ast.NodeFlagsSynthesized } @@ -260,14 +259,14 @@ func (c *EmitContext) mergeEnvironment(statements []*ast.Statement, declarations // find standard prologues on left in the following order: standard directives, hoisted functions, hoisted variables, other custom leftStandardPrologueEnd := findSpanEnd(statements, ast.IsPrologueDirective, 0) - leftHoistedFunctionsEnd := findSpanEnd(statements, c.isHoistedFunction, leftStandardPrologueEnd) - leftHoistedVariablesEnd := findSpanEnd(statements, c.isHoistedVariableStatement, leftHoistedFunctionsEnd) + leftHoistedFunctionsEnd := findSpanEndWithEmitContext(c, statements, (*EmitContext).isHoistedFunction, leftStandardPrologueEnd) + leftHoistedVariablesEnd := findSpanEndWithEmitContext(c, statements, (*EmitContext).isHoistedVariableStatement, leftHoistedFunctionsEnd) // find standard prologues on right in the following order: standard directives, hoisted functions, hoisted variables, other custom rightStandardPrologueEnd := findSpanEnd(declarations, ast.IsPrologueDirective, 0) - rightHoistedFunctionsEnd := findSpanEnd(declarations, c.isHoistedFunction, rightStandardPrologueEnd) - rightHoistedVariablesEnd := findSpanEnd(declarations, c.isHoistedVariableStatement, rightHoistedFunctionsEnd) - rightCustomPrologueEnd := findSpanEnd(declarations, c.isCustomPrologue, rightHoistedVariablesEnd) + rightHoistedFunctionsEnd := findSpanEndWithEmitContext(c, declarations, (*EmitContext).isHoistedFunction, rightStandardPrologueEnd) + rightHoistedVariablesEnd := findSpanEndWithEmitContext(c, declarations, (*EmitContext).isHoistedVariableStatement, rightHoistedFunctionsEnd) + rightCustomPrologueEnd := findSpanEndWithEmitContext(c, declarations, (*EmitContext).isCustomPrologue, rightHoistedVariablesEnd) if rightCustomPrologueEnd != len(declarations) { panic("Expected declarations to be valid standard or custom prologues") } @@ -316,20 +315,20 @@ func (c *EmitContext) mergeEnvironment(statements []*ast.Statement, declarations return left, changed } -func (c *EmitContext) isCustomPrologueWorker(node *ast.Statement) bool { +func (c *EmitContext) isCustomPrologue(node *ast.Statement) bool { return c.EmitFlags(node)&EFCustomPrologue != 0 } -func (c *EmitContext) isHoistedFunctionWorker(node *ast.Statement) bool { - return c.isCustomPrologueWorker(node) && ast.IsFunctionDeclaration(node) +func (c *EmitContext) isHoistedFunction(node *ast.Statement) bool { + return c.isCustomPrologue(node) && ast.IsFunctionDeclaration(node) } func isHoistedVariable(node *ast.VariableDeclarationNode) bool { return ast.IsIdentifier(node.Name()) && node.Initializer() == nil } -func (c *EmitContext) isHoistedVariableStatementWorker(node *ast.Statement) bool { - return c.isCustomPrologueWorker(node) && +func (c *EmitContext) isHoistedVariableStatement(node *ast.Statement) bool { + return c.isCustomPrologue(node) && ast.IsVariableStatement(node) && core.Every(node.AsVariableStatement().DeclarationList.AsVariableDeclarationList().Declarations.Nodes, isHoistedVariable) } diff --git a/internal/printer/emithost.go b/internal/printer/emithost.go index 834889a8c3..6b0757472d 100644 --- a/internal/printer/emithost.go +++ b/internal/printer/emithost.go @@ -22,5 +22,6 @@ type EmitHost interface { CommonSourceDirectory() string IsEmitBlocked(file string) bool WriteFile(fileName string, text string, writeByteOrderMark bool, relatedSourceFiles []*ast.SourceFile, data *WriteFileData) error + GetEmitModuleFormatOfFile(file ast.HasFileName) core.ModuleKind GetEmitResolver(file *ast.SourceFile, skipDiagnostics bool) EmitResolver } diff --git a/internal/printer/utilities.go b/internal/printer/utilities.go index 695e27aeb1..6561a5a95a 100644 --- a/internal/printer/utilities.go +++ b/internal/printer/utilities.go @@ -728,6 +728,14 @@ func makeIdentifierFromModuleName(moduleName string) string { return builder.String() } +func findSpanEndWithEmitContext[T any](c *EmitContext, array []T, test func(c *EmitContext, value T) bool, start int) int { + i := start + for i < len(array) && test(c, array[i]) { + i++ + } + return i +} + func findSpanEnd[T any](array []T, test func(value T) bool, start int) int { i := start for i < len(array) && test(array[i]) { diff --git a/internal/project/ata.go b/internal/project/ata.go index a2daf41d0a..d27f8f9711 100644 --- a/internal/project/ata.go +++ b/internal/project/ata.go @@ -61,6 +61,12 @@ type TypingsInstaller struct { pendingRunRequestsMu sync.Mutex } +func (ti *TypingsInstaller) PendingRunRequestsCount() int { + ti.pendingRunRequestsMu.Lock() + defer ti.pendingRunRequestsMu.Unlock() + return len(ti.pendingRunRequests) +} + func (ti *TypingsInstaller) IsKnownTypesPackageName(p *Project, name string) bool { // We want to avoid looking this up in the registry as that is expensive. So first check that it's actually an NPM package. validationResult, _, _ := ValidatePackageName(name) @@ -139,7 +145,7 @@ func (ti *TypingsInstaller) EnqueueInstallTypingsRequest(p *Project, typingsInfo } func (ti *TypingsInstaller) discoverAndInstallTypings(p *Project, typingsInfo *TypingsInfo, fileNames []string, projectRootPath string) { - ti.init((p)) + ti.init(p) cachedTypingPaths, newTypingNames, filesToWatch := DiscoverTypings( p.FS(), @@ -240,24 +246,6 @@ func (ti *TypingsInstaller) invokeRoutineToInstallTypings( packageNames []string, success bool, ) { - ti.pendingRunRequestsMu.Lock() - pendingRequestsCount := len(ti.pendingRunRequests) - var nextRequest *PendingRequest - if pendingRequestsCount == 0 { - ti.inFlightRequestCount-- - } else { - nextRequest = ti.pendingRunRequests[0] - if pendingRequestsCount == 1 { - ti.pendingRunRequests = nil - } else { - ti.pendingRunRequests = ti.pendingRunRequests[1:] - } - } - ti.pendingRunRequestsMu.Unlock() - if nextRequest != nil { - ti.invokeRoutineToInstallTypings(nextRequest) - } - if success { p.Logf("ATA:: Installed typings %v", packageNames) var installedTypingFiles []string @@ -330,6 +318,25 @@ func (ti *TypingsInstaller) invokeRoutineToInstallTypings( Status: core.IfElse(success, "Success", "Fail"), } } + + ti.pendingRunRequestsMu.Lock() + pendingRequestsCount := len(ti.pendingRunRequests) + var nextRequest *PendingRequest + if pendingRequestsCount == 0 { + ti.inFlightRequestCount-- + } else { + nextRequest = ti.pendingRunRequests[0] + if pendingRequestsCount == 1 { + ti.pendingRunRequests = nil + } else { + ti.pendingRunRequests[0] = nil // ensure the request is GC'd + ti.pendingRunRequests = ti.pendingRunRequests[1:] + } + } + ti.pendingRunRequestsMu.Unlock() + if nextRequest != nil { + ti.invokeRoutineToInstallTypings(nextRequest) + } }, ) } diff --git a/internal/project/ata_test.go b/internal/project/ata_test.go index 499a7de284..b0ce457c55 100644 --- a/internal/project/ata_test.go +++ b/internal/project/ata_test.go @@ -3,6 +3,7 @@ package project_test import ( "slices" "testing" + "time" "github.com/microsoft/typescript-go/internal/bundled" "github.com/microsoft/typescript-go/internal/core" @@ -215,16 +216,12 @@ func TestAta(t *testing.T) { _, p2 := service.EnsureDefaultProjectForFile("/user/username/projects/project2/app.js") var installStatuses []project.TypingsInstallerStatus installStatuses = append(installStatuses, <-host.ServiceOptions.InstallStatus, <-host.ServiceOptions.InstallStatus) - // Order can be non deterministic since they both will run in parallel - assert.Assert(t, slices.Contains(installStatuses, project.TypingsInstallerStatus{ - RequestId: 1, - Project: p1, - Status: "Success", + // Order can be non deterministic since they both will run in parallel - not looking into request ID + assert.Assert(t, slices.ContainsFunc(installStatuses, func(s project.TypingsInstallerStatus) bool { + return s.Project == p1 && s.Status == "Success" })) - assert.Assert(t, slices.Contains(installStatuses, project.TypingsInstallerStatus{ - RequestId: 2, - Project: p2, - Status: "Success", + assert.Assert(t, slices.ContainsFunc(installStatuses, func(s project.TypingsInstallerStatus) bool { + return s.Project == p2 && s.Status == "Success" })) }) @@ -242,6 +239,7 @@ func TestAta(t *testing.T) { "typeAcquisition": { "include": ["grunt", "gulp", "commander"] }, }`, } + expectedP1First := true service, host := projecttestutil.Setup(files, &projecttestutil.TestTypingsInstaller{ TestTypingsInstallerOptions: projecttestutil.TestTypingsInstallerOptions{ PackageToFile: map[string]string{ @@ -250,7 +248,7 @@ func TestAta(t *testing.T) { "lodash": "declare const lodash: { x: number }", "cordova": "declare const cordova: { x: number }", "grunt": "declare const grunt: { x: number }", - "gulp": "declare const grunt: { x: number }", + "gulp": "declare const gulp: { x: number }", }, }, TypingsInstallerOptions: project.TypingsInstallerOptions{ @@ -258,23 +256,32 @@ func TestAta(t *testing.T) { }, }) + host.TestOptions.CheckBeforeNpmInstall = func(cwd string, npmInstallArgs []string) { + for { + pendingCount := service.TypingsInstaller().PendingRunRequestsCount() + if pendingCount == 1 { + if slices.Contains(npmInstallArgs, "@types/gulp@latest") { + expectedP1First = false + } + host.TestOptions.CheckBeforeNpmInstall = nil // Stop checking after first run + break + } + assert.NilError(t, t.Context().Err()) + time.Sleep(10 * time.Millisecond) + } + } + service.OpenFile("/user/username/projects/project1/app.js", files["/user/username/projects/project1/app.js"].(string), core.ScriptKindJS, "") service.OpenFile("/user/username/projects/project2/app.js", files["/user/username/projects/project2/app.js"].(string), core.ScriptKindJS, "") _, p1 := service.EnsureDefaultProjectForFile("/user/username/projects/project1/app.js") _, p2 := service.EnsureDefaultProjectForFile("/user/username/projects/project2/app.js") // Order is determinate since second install will run only after completing first one status := <-host.ServiceOptions.InstallStatus - assert.Equal(t, status, project.TypingsInstallerStatus{ - RequestId: 1, - Project: p1, - Status: "Success", - }) + assert.Equal(t, status.Project, core.IfElse(expectedP1First, p1, p2)) + assert.Equal(t, status.Status, "Success") status = <-host.ServiceOptions.InstallStatus - assert.Equal(t, status, project.TypingsInstallerStatus{ - RequestId: 2, - Project: p2, - Status: "Success", - }) + assert.Equal(t, status.Project, core.IfElse(expectedP1First, p2, p1)) + assert.Equal(t, status.Status, "Success") }) t.Run("discover from node_modules", func(t *testing.T) { diff --git a/internal/project/discovertypings.go b/internal/project/discovertypings.go index 8be8af1f18..bf8c2aac5a 100644 --- a/internal/project/discovertypings.go +++ b/internal/project/discovertypings.go @@ -69,7 +69,9 @@ func DiscoverTypings( } // add typings for unresolved imports - modules := slices.Compact(core.Map(typingsInfo.UnresolvedImports, core.NonRelativeModuleNameForTypingCache)) + modules := core.Map(typingsInfo.UnresolvedImports, core.NonRelativeModuleNameForTypingCache) + slices.Sort(modules) + modules = slices.Compact(modules) addInferredTypings(fs, log, inferredTypings, modules, "Inferred typings from unresolved imports") // Remove typings that the user has added to the exclude list diff --git a/internal/project/documentregistry.go b/internal/project/documentregistry.go index 3a2088fa87..7aab2f8b48 100644 --- a/internal/project/documentregistry.go +++ b/internal/project/documentregistry.go @@ -13,15 +13,13 @@ import ( type registryKey struct { core.SourceFileAffectingCompilerOptions - ast.SourceFileMetaData path tspath.Path scriptKind core.ScriptKind } -func newRegistryKey(options *core.CompilerOptions, path tspath.Path, scriptKind core.ScriptKind, metadata *ast.SourceFileMetaData) registryKey { +func newRegistryKey(options *core.CompilerOptions, path tspath.Path, scriptKind core.ScriptKind) registryKey { return registryKey{ SourceFileAffectingCompilerOptions: *options.SourceFileAffecting(), - SourceFileMetaData: *metadata, path: path, scriptKind: scriptKind, } @@ -29,6 +27,7 @@ func newRegistryKey(options *core.CompilerOptions, path tspath.Path, scriptKind type registryEntry struct { sourceFile *ast.SourceFile + version int refCount int mu sync.Mutex } @@ -40,9 +39,10 @@ type DocumentRegistryHooks struct { // The document registry represents a store of SourceFile objects that can be shared between // multiple LanguageService instances. type DocumentRegistry struct { - Options tspath.ComparePathsOptions - Hooks DocumentRegistryHooks - documents collections.SyncMap[registryKey, *registryEntry] + Options tspath.ComparePathsOptions + Hooks DocumentRegistryHooks + documents collections.SyncMap[registryKey, *registryEntry] + parsedFileCache ParsedFileCache } // AcquireDocument gets a SourceFile from the registry if it exists as the same version tracked @@ -56,18 +56,18 @@ type DocumentRegistry struct { // LanguageService instance over time, as well as across multiple instances. Here, we still // reuse files across multiple LanguageServices, but we only reuse them across Program updates // when the files haven't changed. -func (r *DocumentRegistry) AcquireDocument(scriptInfo *ScriptInfo, compilerOptions *core.CompilerOptions, metadata *ast.SourceFileMetaData, oldSourceFile *ast.SourceFile, oldCompilerOptions *core.CompilerOptions) *ast.SourceFile { - key := newRegistryKey(compilerOptions, scriptInfo.path, scriptInfo.scriptKind, metadata) - document := r.getDocumentWorker(scriptInfo, compilerOptions, metadata, key) +func (r *DocumentRegistry) AcquireDocument(scriptInfo *ScriptInfo, compilerOptions *core.CompilerOptions, oldSourceFile *ast.SourceFile, oldCompilerOptions *core.CompilerOptions) *ast.SourceFile { + key := newRegistryKey(compilerOptions, scriptInfo.path, scriptInfo.scriptKind) + document := r.getDocumentWorker(scriptInfo, compilerOptions, key) if oldSourceFile != nil && oldCompilerOptions != nil { - oldKey := newRegistryKey(oldCompilerOptions, scriptInfo.path, oldSourceFile.ScriptKind, oldSourceFile.Metadata) + oldKey := newRegistryKey(oldCompilerOptions, scriptInfo.path, oldSourceFile.ScriptKind) r.releaseDocumentWithKey(oldKey) } return document } func (r *DocumentRegistry) ReleaseDocument(file *ast.SourceFile, compilerOptions *core.CompilerOptions) { - key := newRegistryKey(compilerOptions, file.Path(), file.ScriptKind, file.Metadata) + key := newRegistryKey(compilerOptions, file.Path(), file.ScriptKind) r.releaseDocumentWithKey(key) } @@ -88,30 +88,30 @@ func (r *DocumentRegistry) releaseDocumentWithKey(key registryKey) { func (r *DocumentRegistry) getDocumentWorker( scriptInfo *ScriptInfo, compilerOptions *core.CompilerOptions, - metadata *ast.SourceFileMetaData, key registryKey, ) *ast.SourceFile { + scriptTarget := core.IfElse(scriptInfo.scriptKind == core.ScriptKindJSON, core.ScriptTargetJSON, compilerOptions.GetEmitScriptTarget()) scriptInfoVersion := scriptInfo.Version() scriptInfoText := scriptInfo.Text() if entry, ok := r.documents.Load(key); ok { // We have an entry for this file. However, it may be for a different version of // the script snapshot. If so, update it appropriately. - if entry.sourceFile.Version != scriptInfoVersion { - sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, compilerOptions.SourceFileAffecting(), metadata, scanner.JSDocParsingModeParseAll) - sourceFile.Version = scriptInfoVersion + if entry.version != scriptInfoVersion { + sourceFile := r.getParsedFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, scriptTarget, compilerOptions) entry.mu.Lock() defer entry.mu.Unlock() entry.sourceFile = sourceFile + entry.version = scriptInfoVersion } entry.refCount++ return entry.sourceFile } else { // Have never seen this file with these settings. Create a new source file for it. - sourceFile := parser.ParseSourceFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, compilerOptions.SourceFileAffecting(), metadata, scanner.JSDocParsingModeParseAll) - sourceFile.Version = scriptInfoVersion + sourceFile := r.getParsedFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, scriptTarget, compilerOptions) entry, _ := r.documents.LoadOrStore(key, ®istryEntry{ sourceFile: sourceFile, refCount: 0, + version: scriptInfoVersion, }) entry.mu.Lock() defer entry.mu.Unlock() @@ -120,7 +120,50 @@ func (r *DocumentRegistry) getDocumentWorker( } } +func (r *DocumentRegistry) getFileVersion(file *ast.SourceFile, options *core.CompilerOptions) int { + key := newRegistryKey(options, file.Path(), file.ScriptKind) + if entry, ok := r.documents.Load(key); ok && entry.sourceFile == file { + return entry.version + } + return -1 +} + +func (r *DocumentRegistry) getParsedFile( + fileName string, + path tspath.Path, + sourceText string, + scriptTarget core.ScriptTarget, + options *core.CompilerOptions, +) *ast.SourceFile { + if r.parsedFileCache != nil { + if file := r.parsedFileCache.GetFile(fileName, path, sourceText, scriptTarget, *options.SourceFileAffecting()); file != nil { + return file + } + } + file := parser.ParseSourceFile(fileName, path, sourceText, scriptTarget, scanner.JSDocParsingModeParseAll) + if r.parsedFileCache != nil { + r.parsedFileCache.CacheFile(fileName, path, sourceText, scriptTarget, *options.SourceFileAffecting(), file) + } + return file +} + // size should only be used for testing. func (r *DocumentRegistry) size() int { return r.documents.Size() } + +type ParsedFileCache interface { + GetFile(fileName string, + path tspath.Path, + text string, + scriptTarget core.ScriptTarget, + options core.SourceFileAffectingCompilerOptions, + ) *ast.SourceFile + CacheFile(fileName string, + path tspath.Path, + text string, + scriptTarget core.ScriptTarget, + options core.SourceFileAffectingCompilerOptions, + sourceFile *ast.SourceFile, + ) +} diff --git a/internal/project/project.go b/internal/project/project.go index 5732435786..a3b660f6d1 100644 --- a/internal/project/project.go +++ b/internal/project/project.go @@ -15,12 +15,16 @@ import ( "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/ls" "github.com/microsoft/typescript-go/internal/lsp/lsproto" + "github.com/microsoft/typescript-go/internal/module" "github.com/microsoft/typescript-go/internal/tsoptions" "github.com/microsoft/typescript-go/internal/tspath" "github.com/microsoft/typescript-go/internal/vfs" + "github.com/microsoft/typescript-go/internal/vfs/cachedvfs" ) //go:generate go tool golang.org/x/tools/cmd/stringer -type=Kind -output=project_stringer_generated.go +//go:generate go tool mvdan.cc/gofumpt -lang=go1.24 -w project_stringer_generated.go + const hr = "-----------------------------------------------" var projectNamer = &namer{} @@ -44,7 +48,7 @@ type snapshot struct { func (s *snapshot) GetLineMap(fileName string) *ls.LineMap { file := s.program.GetSourceFile(fileName) scriptInfo := s.project.host.GetScriptInfoByPath(file.Path()) - if file.Version == scriptInfo.Version() { + if s.project.getFileVersion(file, s.program.Options()) == scriptInfo.Version() { return scriptInfo.LineMap() } return ls.ComputeLineStarts(file.Text()) @@ -72,6 +76,7 @@ const ( type ProjectHost interface { tsoptions.ParseConfigHost + module.ResolutionHost NewLine() string DefaultLibraryPath() string TypingsInstaller() *TypingsInstaller @@ -102,8 +107,8 @@ func setIsEqualTo(arr1 []string, arr2 []string) bool { if slices.Equal(arr1, arr2) { return true } - compact1 := slices.Compact(arr1) - compact2 := slices.Compact(arr2) + compact1 := slices.Clone(arr1) + compact2 := slices.Clone(arr2) slices.Sort(compact1) slices.Sort(compact2) return slices.Equal(compact1, compact2) @@ -120,7 +125,7 @@ func typeAcquisitionChanged(opt1 *core.TypeAcquisition, opt2 *core.TypeAcquisiti var _ compiler.CompilerHost = (*Project)(nil) type Project struct { - host ProjectHost + host *projectHostWithCachedFS name string kind Kind @@ -147,6 +152,7 @@ type Project struct { compilerOptions *core.CompilerOptions typeAcquisition *core.TypeAcquisition parsedCommandLine *tsoptions.ParsedCommandLine + programConfig *tsoptions.ParsedCommandLine program *compiler.Program checkerPool *checkerPool @@ -165,11 +171,16 @@ type Project struct { typingsWatchInvoked atomic.Bool } -func NewConfiguredProject(configFileName string, configFilePath tspath.Path, host ProjectHost) *Project { +func NewConfiguredProject( + configFileName string, + configFilePath tspath.Path, + host ProjectHost, +) *Project { project := NewProject(configFileName, KindConfigured, tspath.GetDirectoryPath(configFileName), host) project.configFileName = configFileName project.configFilePath = configFilePath project.initialLoadPending = true + project.pendingReload = PendingReloadFull client := host.Client() if host.IsWatchEnabled() && client != nil { project.rootFilesWatch = newWatchedFiles(project, lsproto.WatchKindChange|lsproto.WatchKindCreate|lsproto.WatchKindDelete, core.Identity, "root files") @@ -177,7 +188,12 @@ func NewConfiguredProject(configFileName string, configFilePath tspath.Path, hos return project } -func NewInferredProject(compilerOptions *core.CompilerOptions, currentDirectory string, projectRootPath tspath.Path, host ProjectHost) *Project { +func NewInferredProject( + compilerOptions *core.CompilerOptions, + currentDirectory string, + projectRootPath tspath.Path, + host ProjectHost, +) *Project { project := NewProject(projectNamer.next("/dev/null/inferredProject"), KindInferred, currentDirectory, host) project.rootPath = projectRootPath project.compilerOptions = compilerOptions @@ -185,21 +201,24 @@ func NewInferredProject(compilerOptions *core.CompilerOptions, currentDirectory } func NewProject(name string, kind Kind, currentDirectory string, host ProjectHost) *Project { + cachedHost := newProjectHostWithCachedFS(host) + host.Log(fmt.Sprintf("Creating %sProject: %s, currentDirectory: %s", kind.String(), name, currentDirectory)) project := &Project{ - host: host, + host: cachedHost, name: name, kind: kind, currentDirectory: currentDirectory, rootFileNames: &collections.OrderedMap[tspath.Path, string]{}, + dirty: true, } project.comparePathsOptions = tspath.ComparePathsOptions{ CurrentDirectory: currentDirectory, - UseCaseSensitiveFileNames: host.FS().UseCaseSensitiveFileNames(), + UseCaseSensitiveFileNames: project.host.FS().UseCaseSensitiveFileNames(), } - client := host.Client() - if host.IsWatchEnabled() && client != nil { - globMapper := createResolutionLookupGlobMapper(host) + client := project.host.Client() + if project.host.IsWatchEnabled() && client != nil { + globMapper := createResolutionLookupGlobMapper(project.host) project.failedLookupsWatch = newWatchedFiles(project, lsproto.WatchKindCreate, globMapper, "failed lookup") project.affectingLocationsWatch = newWatchedFiles(project, lsproto.WatchKindChange|lsproto.WatchKindCreate|lsproto.WatchKindDelete, globMapper, "affecting location") project.typingsFilesWatch = newWatchedFiles(project, lsproto.WatchKindChange|lsproto.WatchKindCreate|lsproto.WatchKindDelete, globMapperForTypingsInstaller, "typings installer files") @@ -209,6 +228,24 @@ func NewProject(name string, kind Kind, currentDirectory string, host ProjectHos return project } +type projectHostWithCachedFS struct { + ProjectHost + fs *cachedvfs.FS +} + +func newProjectHostWithCachedFS(host ProjectHost) *projectHostWithCachedFS { + newHost := &projectHostWithCachedFS{ + ProjectHost: host, + fs: cachedvfs.From(host.FS()), + } + newHost.fs.DisableAndClearCache() + return newHost +} + +func (p *projectHostWithCachedFS) FS() vfs.FS { + return p.fs +} + // FS implements compiler.CompilerHost. func (p *Project) FS() vfs.FS { return p.host.FS() @@ -233,7 +270,7 @@ func (p *Project) GetCompilerOptions() *core.CompilerOptions { } // GetSourceFile implements compiler.CompilerHost. -func (p *Project) GetSourceFile(fileName string, path tspath.Path, metadata *ast.SourceFileMetaData) *ast.SourceFile { +func (p *Project) GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile { scriptKind := p.getScriptKind(fileName) if scriptInfo := p.getOrCreateScriptInfoAndAttachToProject(fileName, scriptKind); scriptInfo != nil { var ( @@ -242,17 +279,17 @@ func (p *Project) GetSourceFile(fileName string, path tspath.Path, metadata *ast ) if p.program != nil { oldSourceFile = p.program.GetSourceFileByPath(scriptInfo.path) - oldCompilerOptions = p.program.GetCompilerOptions() + oldCompilerOptions = p.program.Options() } - return p.host.DocumentRegistry().AcquireDocument(scriptInfo, p.compilerOptions, metadata, oldSourceFile, oldCompilerOptions) + return p.host.DocumentRegistry().AcquireDocument(scriptInfo, p.compilerOptions, oldSourceFile, oldCompilerOptions) } return nil } // Updates the program if needed. func (p *Project) GetProgram() *compiler.Program { - p.updateGraph() - return p.program + program, _ := p.updateGraph() + return program } // NewLine implements compiler.CompilerHost. @@ -262,7 +299,7 @@ func (p *Project) NewLine() string { // Trace implements compiler.CompilerHost. func (p *Project) Trace(msg string) { - p.Log(msg) + p.host.Log(msg) } // GetDefaultLibraryPath implements compiler.CompilerHost. @@ -291,6 +328,9 @@ func (p *Project) GetLanguageServiceForRequest(ctx context.Context) (*ls.Languag panic("context must already have a request ID") } program := p.GetProgram() + if program == nil { + panic("must have gced by other request") + } checkerPool := p.checkerPool snapshot := &snapshot{ project: p, @@ -361,6 +401,16 @@ func (p *Project) updateWatchers(ctx context.Context) { p.affectingLocationsWatch.update(ctx, affectingLocationGlobs) } +func (p *Project) tryInvokeWildCardDirectories(fileName string, path tspath.Path) bool { + if p.kind == KindConfigured { + if p.rootFileNames.Has(path) || p.parsedCommandLine.MatchesFileName(fileName) { + p.SetPendingReload(PendingReloadFileNames) + return true + } + } + return false +} + // onWatchEventForNilScriptInfo is fired for watch events that are not the // project tsconfig, and do not have a ScriptInfo for the associated file. // This could be a case of one of the following: @@ -370,14 +420,9 @@ func (p *Project) updateWatchers(ctx context.Context) { // part of the project, e.g., a .js file in a project without --allowJs. func (p *Project) onWatchEventForNilScriptInfo(fileName string) { path := p.toPath(fileName) - if p.kind == KindConfigured { - if p.rootFileNames.Has(path) || p.parsedCommandLine.MatchesFileName(fileName) { - p.pendingReload = PendingReloadFileNames - p.markAsDirty() - return - } + if p.tryInvokeWildCardDirectories(fileName, path) { + return } - if _, ok := p.failedLookupsWatch.data[path]; ok { p.markAsDirty() } else if _, ok := p.affectingLocationsWatch.data[path]; ok { @@ -429,6 +474,15 @@ func (p *Project) MarkFileAsDirty(path tspath.Path) { } } +func (p *Project) SetPendingReload(level PendingReload) { + p.mu.Lock() + defer p.mu.Unlock() + if level > p.pendingReload { + p.pendingReload = level + p.markAsDirtyLocked() + } +} + func (p *Project) markAsDirty() { p.mu.Lock() defer p.mu.Unlock() @@ -452,17 +506,19 @@ func (p *Project) onFileAddedOrRemoved() { // Returns true if the set of files in has changed. NOTE: this is the // opposite of the return value in Strada, which was frequently inverted, // as in `updateProjectIfDirty()`. -func (p *Project) updateGraph() bool { +func (p *Project) updateGraph() (*compiler.Program, bool) { p.mu.Lock() defer p.mu.Unlock() - if !p.dirty { - return false + if !p.dirty || p.isClosed() { + return p.program, false } + p.host.fs.Enable() + defer p.host.fs.DisableAndClearCache() + start := time.Now() p.Log("Starting updateGraph: Project: " + p.name) - var writeFileNames bool oldProgram := p.program p.initialLoadPending = false @@ -470,13 +526,15 @@ func (p *Project) updateGraph() bool { switch p.pendingReload { case PendingReloadFileNames: p.parsedCommandLine = tsoptions.ReloadFileNamesOfParsedCommandLine(p.parsedCommandLine, p.host.FS()) - writeFileNames = p.setRootFiles(p.parsedCommandLine.FileNames()) + p.setRootFiles(p.parsedCommandLine.FileNames()) + p.programConfig = nil + p.pendingReload = PendingReloadNone case PendingReloadFull: - if err := p.loadConfig(); err != nil { + err := p.LoadConfig() + if err != nil { panic(fmt.Sprintf("failed to reload config: %v", err)) } } - p.pendingReload = PendingReloadNone } oldProgramReused := p.updateProgram() @@ -484,7 +542,7 @@ func (p *Project) updateGraph() bool { p.hasAddedorRemovedFiles.Store(false) p.dirty = false p.dirtyFilePath = "" - if writeFileNames { + if hasAddedOrRemovedFiles { p.Log(p.print(true /*writeFileNames*/, true /*writeFileExplanation*/, false /*writeFileVersionAndText*/, &strings.Builder{})) } else if p.program != oldProgram { p.Log("Different program with same set of root files") @@ -493,7 +551,8 @@ func (p *Project) updateGraph() bool { if oldProgram != nil { for _, oldSourceFile := range oldProgram.GetSourceFiles() { if p.program.GetSourceFileByPath(oldSourceFile.Path()) == nil { - p.host.DocumentRegistry().ReleaseDocument(oldSourceFile, oldProgram.GetCompilerOptions()) + p.host.DocumentRegistry().ReleaseDocument(oldSourceFile, oldProgram.Options()) + p.detachScriptInfoIfNotInferredRoot(oldSourceFile.Path()) } } } @@ -503,7 +562,7 @@ func (p *Project) updateGraph() bool { p.updateWatchers(context.TODO()) } p.Logf("Finishing updateGraph: Project: %s version: %d in %s", p.name, p.version, time.Since(start)) - return true + return p.program, true } func (p *Project) updateProgram() bool { @@ -512,16 +571,40 @@ func (p *Project) updateProgram() bool { } var oldProgramReused bool if p.program == nil || p.dirtyFilePath == "" { - rootFileNames := p.GetRootFileNames() - compilerOptions := p.compilerOptions + if p.programConfig == nil { + // Get from config file = config file root files + typings files + if p.parsedCommandLine != nil { + // There are no typing files so use the parsed command line as is + if len(p.typingFiles) == 0 { + p.programConfig = p.parsedCommandLine + } else { + // Update the fileNames + parsedConfig := *p.parsedCommandLine.ParsedConfig + parsedConfig.FileNames = append(p.parsedCommandLine.FileNames(), p.typingFiles...) + p.programConfig = &tsoptions.ParsedCommandLine{ + ParsedConfig: &parsedConfig, + ConfigFile: p.parsedCommandLine.ConfigFile, + Errors: p.parsedCommandLine.Errors, + } + } + } else { + rootFileNames := p.GetRootFileNames() + compilerOptions := p.compilerOptions + p.programConfig = &tsoptions.ParsedCommandLine{ + ParsedConfig: &core.ParsedOptions{ + CompilerOptions: compilerOptions, + FileNames: rootFileNames, + }, + } + } + } var typingsLocation string if typeAcquisition := p.getTypeAcquisition(); typeAcquisition != nil && typeAcquisition.Enable.IsTrue() { typingsLocation = p.host.TypingsInstaller().TypingsLocation } p.program = compiler.NewProgram(compiler.ProgramOptions{ - RootFiles: rootFileNames, + Config: p.programConfig, Host: p, - Options: compilerOptions, TypingsLocation: typingsLocation, CreateCheckerPool: func(program *compiler.Program) compiler.CheckerPool { p.checkerPool = newCheckerPool(4, program, p.Log) @@ -681,7 +764,7 @@ func (p *Project) extractUnresolvedImportsFromSourceFile(file *ast.SourceFile, o func (p *Project) UpdateTypingFiles(typingsInfo *TypingsInfo, typingFiles []string) { p.mu.Lock() defer p.mu.Unlock() - if p.typingsInfo != typingsInfo { + if p.isClosed() || p.typingsInfo != typingsInfo { return } @@ -694,6 +777,7 @@ func (p *Project) UpdateTypingFiles(typingsInfo *TypingsInfo, typingFiles []stri if !slices.Equal(typingFiles, p.typingFiles) { // If typing files changed, then only schedule project update p.typingFiles = typingFiles + p.programConfig = nil // // Invalidate files with unresolved imports // this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile); @@ -710,6 +794,12 @@ func (p *Project) UpdateTypingFiles(typingsInfo *TypingsInfo, typingFiles []stri } func (p *Project) WatchTypingLocations(files []string) { + p.mu.Lock() + defer p.mu.Unlock() + if p.isClosed() { + return + } + client := p.host.Client() if !p.host.IsWatchEnabled() || client == nil { return @@ -777,22 +867,13 @@ func (p *Project) isRoot(info *ScriptInfo) bool { return p.rootFileNames.Has(info.path) } -func (p *Project) RemoveFile(info *ScriptInfo, fileExists bool, detachFromProject bool) { +func (p *Project) RemoveFile(info *ScriptInfo, fileExists bool) { p.mu.Lock() defer p.mu.Unlock() - p.removeFile(info, fileExists, detachFromProject) - p.markAsDirtyLocked() -} - -func (p *Project) removeFile(info *ScriptInfo, fileExists bool, detachFromProject bool) { - if p.isRoot(info) { - switch p.kind { - case KindInferred: - p.rootFileNames.Delete(info.path) - p.typeAcquisition = nil - case KindConfigured: - p.pendingReload = PendingReloadFileNames - } + if p.isRoot(info) && p.kind == KindInferred { + p.rootFileNames.Delete(info.path) + p.typeAcquisition = nil + p.programConfig = nil } p.onFileAddedOrRemoved() @@ -804,47 +885,34 @@ func (p *Project) removeFile(info *ScriptInfo, fileExists bool, detachFromProjec // this.resolutionCache.invalidateResolutionOfFile(info.path); // } // this.cachedUnresolvedImportsPerFile.delete(info.path); - if detachFromProject { - info.detachFromProject(p) - } + p.markAsDirtyLocked() } -func (p *Project) AddRoot(info *ScriptInfo) { +func (p *Project) AddInferredProjectRoot(info *ScriptInfo) { p.mu.Lock() defer p.mu.Unlock() - p.addRoot(info) - p.markAsDirtyLocked() -} - -func (p *Project) addRoot(info *ScriptInfo) { + if p.isRoot(info) { + panic("script info is already a root") + } + p.rootFileNames.Set(info.path, info.fileName) + p.programConfig = nil + p.typeAcquisition = nil // !!! // if p.kind == KindInferred { // p.host.startWatchingConfigFilesForInferredProjectRoot(info.path); // // handle JS toggling // } - if p.isRoot(info) { - panic("script info is already a root") - } - p.rootFileNames.Set(info.path, info.fileName) - if p.kind == KindInferred { - p.typeAcquisition = nil - } info.attachToProject(p) + p.markAsDirtyLocked() } func (p *Project) LoadConfig() error { - if err := p.loadConfig(); err != nil { - return err - } - p.markAsDirty() - return nil -} - -func (p *Project) loadConfig() error { if p.kind != KindConfigured { panic("loadConfig called on non-configured project") } + p.programConfig = nil + p.pendingReload = PendingReloadNone if configFileContent, ok := p.host.FS().ReadFile(p.configFileName); ok { configDir := tspath.GetDirectoryPath(p.configFileName) tsConfigSourceFile := tsoptions.NewTsconfigSourceFileFromFilePath(p.configFileName, p.configFilePath, configFileContent) @@ -881,43 +949,28 @@ func (p *Project) loadConfig() error { } // setRootFiles returns true if the set of root files has changed. -func (p *Project) setRootFiles(rootFileNames []string) bool { - var hasChanged bool +func (p *Project) setRootFiles(rootFileNames []string) { newRootScriptInfos := make(map[tspath.Path]struct{}, len(rootFileNames)) for _, file := range rootFileNames { - scriptKind := p.getScriptKind(file) path := p.toPath(file) // !!! updateNonInferredProjectFiles uses a fileExists check, which I guess // could be needed if a watcher fails? - scriptInfo := p.host.GetOrCreateScriptInfoForFile(file, path, scriptKind) newRootScriptInfos[path] = struct{}{} - isAlreadyRoot := p.rootFileNames.Has(path) - hasChanged = hasChanged || !isAlreadyRoot - - if !isAlreadyRoot && scriptInfo != nil { - p.addRoot(scriptInfo) - if scriptInfo.isOpen { - // !!! - // s.removeRootOfInferredProjectIfNowPartOfOtherProject(scriptInfo) - } - } else if !isAlreadyRoot { - p.rootFileNames.Set(path, file) - } + p.rootFileNames.Set(path, file) + // if !isAlreadyRoot { + // if scriptInfo.isOpen { + // !!!s.removeRootOfInferredProjectIfNowPartOfOtherProject(scriptInfo) + // } + // } } if p.rootFileNames.Size() > len(rootFileNames) { - hasChanged = true for root := range p.rootFileNames.Keys() { if _, ok := newRootScriptInfos[root]; !ok { - if info := p.host.GetScriptInfoByPath(root); info != nil { - p.removeFile(info, true /*fileExists*/, true /*detachFromProject*/) - } else { - p.rootFileNames.Delete(root) - } + p.rootFileNames.Delete(root) } } } - return hasChanged } func (p *Project) clearSourceMapperCache() { @@ -964,21 +1017,21 @@ func (p *Project) GetFileNames(excludeFilesFromExternalLibraries bool, excludeCo } func (p *Project) print(writeFileNames bool, writeFileExplanation bool, writeFileVersionAndText bool, builder *strings.Builder) string { - builder.WriteString(fmt.Sprintf("Project '%s' (%s)\n", p.name, p.kind.String())) + builder.WriteString(fmt.Sprintf("\nProject '%s' (%s)\n", p.name, p.kind.String())) if p.initialLoadPending { - builder.WriteString("\tFiles (0) InitialLoadPending\n") + builder.WriteString("\n\tFiles (0) InitialLoadPending\n") } else if p.program == nil { - builder.WriteString("\tFiles (0) NoProgram\n") + builder.WriteString("\n\tFiles (0) NoProgram\n") } else { sourceFiles := p.program.GetSourceFiles() - builder.WriteString(fmt.Sprintf("\tFiles (%d)\n", len(sourceFiles))) + options := p.program.Options() + builder.WriteString(fmt.Sprintf("\n\tFiles (%d)\n", len(sourceFiles))) if writeFileNames { for _, sourceFile := range sourceFiles { - builder.WriteString("\t\t" + sourceFile.FileName()) + builder.WriteString("\n\t\t" + sourceFile.FileName()) if writeFileVersionAndText { - builder.WriteString(fmt.Sprintf(" %d %s", sourceFile.Version, sourceFile.Text())) + builder.WriteString(fmt.Sprintf(" %d %s", p.getFileVersion(sourceFile, options), sourceFile.Text())) } - builder.WriteRune('\n') } // !!! // if writeFileExplanation {} @@ -988,6 +1041,10 @@ func (p *Project) print(writeFileNames bool, writeFileExplanation bool, writeFil return builder.String() } +func (p *Project) getFileVersion(file *ast.SourceFile, options *core.CompilerOptions) int { + return p.host.DocumentRegistry().getFileVersion(file, options) +} + func (p *Project) Log(s string) { p.host.Log(s) } @@ -996,8 +1053,62 @@ func (p *Project) Logf(format string, args ...interface{}) { p.Log(fmt.Sprintf(format, args...)) } +func (p *Project) detachScriptInfoIfNotInferredRoot(path tspath.Path) { + // We might not find the script info in case its not associated with the project any more + // and project graph was not updated (eg delayed update graph in case of files changed/deleted on the disk) + if scriptInfo := p.host.GetScriptInfoByPath(path); scriptInfo != nil && + (p.kind != KindInferred || !p.isRoot(scriptInfo)) { + scriptInfo.detachFromProject(p) + } +} + func (p *Project) Close() { - // !!! + p.mu.Lock() + defer p.mu.Unlock() + + if p.program != nil { + for _, sourceFile := range p.program.GetSourceFiles() { + p.host.DocumentRegistry().ReleaseDocument(sourceFile, p.program.Options()) + // Detach script info if its not root or is root of non inferred project + p.detachScriptInfoIfNotInferredRoot(sourceFile.Path()) + } + p.program = nil + } + + if p.kind == KindInferred { + // Release root script infos for inferred projects. + for path := range p.rootFileNames.Keys() { + if info := p.host.GetScriptInfoByPath(path); info != nil { + info.detachFromProject(p) + } + } + } + p.rootFileNames = nil + p.parsedCommandLine = nil + p.programConfig = nil + p.checkerPool = nil + p.unresolvedImportsPerFile = nil + p.unresolvedImports = nil + p.typingsInfo = nil + p.typingFiles = nil + + // Clean up file watchers waiting for missing files + client := p.host.Client() + if p.host.IsWatchEnabled() && client != nil { + ctx := context.Background() + if p.rootFilesWatch != nil { + p.rootFilesWatch.update(ctx, nil) + } + + p.failedLookupsWatch.update(ctx, nil) + p.affectingLocationsWatch.update(ctx, nil) + p.typingsFilesWatch.update(ctx, nil) + p.typingsDirectoryWatch.update(ctx, nil) + } +} + +func (p *Project) isClosed() bool { + return p.rootFileNames == nil } func formatFileList(files []string, linePrefix string, groupSuffix string) string { diff --git a/internal/project/projectlifetime_test.go b/internal/project/projectlifetime_test.go new file mode 100644 index 0000000000..60994c9170 --- /dev/null +++ b/internal/project/projectlifetime_test.go @@ -0,0 +1,168 @@ +package project_test + +import ( + "testing" + + "github.com/microsoft/typescript-go/internal/bundled" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/testutil/projecttestutil" + "github.com/microsoft/typescript-go/internal/tspath" + "gotest.tools/v3/assert" +) + +func TestProjectLifetime(t *testing.T) { + t.Parallel() + if !bundled.Embedded { + t.Skip("bundled files are not embedded") + } + t.Run("configured project", func(t *testing.T) { + t.Parallel() + files := map[string]any{ + "/home/projects/TS/p1/tsconfig.json": `{ + "compilerOptions": { + "noLib": true, + "module": "nodenext", + "strict": true + }, + "include": ["src"] + }`, + "/home/projects/TS/p1/src/index.ts": `import { x } from "./x";`, + "/home/projects/TS/p1/src/x.ts": `export const x = 1;`, + "/home/projects/TS/p1/config.ts": `let x = 1, y = 2;`, + "/home/projects/TS/p2/tsconfig.json": `{ + "compilerOptions": { + "noLib": true, + "module": "nodenext", + "strict": true + }, + "include": ["src"] + }`, + "/home/projects/TS/p2/src/index.ts": `import { x } from "./x";`, + "/home/projects/TS/p2/src/x.ts": `export const x = 1;`, + "/home/projects/TS/p2/config.ts": `let x = 1, y = 2;`, + "/home/projects/TS/p3/tsconfig.json": `{ + "compilerOptions": { + "noLib": true, + "module": "nodenext", + "strict": true + }, + "include": ["src"] + }`, + "/home/projects/TS/p3/src/index.ts": `import { x } from "./x";`, + "/home/projects/TS/p3/src/x.ts": `export const x = 1;`, + "/home/projects/TS/p3/config.ts": `let x = 1, y = 2;`, + } + service, host := projecttestutil.Setup(files, nil) + assert.Equal(t, len(service.Projects()), 0) + service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") + service.OpenFile("/home/projects/TS/p2/src/index.ts", files["/home/projects/TS/p2/src/index.ts"].(string), core.ScriptKindTS, "") + assert.Equal(t, len(service.Projects()), 2) + assert.Assert(t, service.ConfiguredProject(tspath.ToPath("/home/projects/TS/p1/tsconfig.json", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) != nil) + assert.Assert(t, service.ConfiguredProject(tspath.ToPath("/home/projects/TS/p2/tsconfig.json", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) != nil) + assert.Equal(t, len(host.ClientMock.WatchFilesCalls()), 2) + + service.CloseFile("/home/projects/TS/p1/src/index.ts") + service.OpenFile("/home/projects/TS/p3/src/index.ts", files["/home/projects/TS/p3/src/index.ts"].(string), core.ScriptKindTS, "") + assert.Equal(t, len(service.Projects()), 2) + assert.Assert(t, service.ConfiguredProject(tspath.ToPath("/home/projects/TS/p1/tsconfig.json", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.ConfiguredProject(tspath.ToPath("/home/projects/TS/p2/tsconfig.json", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) != nil) + assert.Assert(t, service.ConfiguredProject(tspath.ToPath("/home/projects/TS/p3/tsconfig.json", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) != nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p1/src/index.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p1/src/x.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Equal(t, len(host.ClientMock.WatchFilesCalls()), 3) + assert.Equal(t, len(host.ClientMock.UnwatchFilesCalls()), 1) + + service.CloseFile("/home/projects/TS/p2/src/index.ts") + service.CloseFile("/home/projects/TS/p3/src/index.ts") + service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") + assert.Assert(t, service.ConfiguredProject(tspath.ToPath("/home/projects/TS/p1/tsconfig.json", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) != nil) + assert.Assert(t, service.ConfiguredProject(tspath.ToPath("/home/projects/TS/p2/tsconfig.json", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.ConfiguredProject(tspath.ToPath("/home/projects/TS/p3/tsconfig.json", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p2/src/index.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p2/src/x.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p3/src/index.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p3/src/x.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Equal(t, len(host.ClientMock.WatchFilesCalls()), 4) + assert.Equal(t, len(host.ClientMock.UnwatchFilesCalls()), 3) + }) + + t.Run("inferred projects", func(t *testing.T) { + t.Parallel() + files := map[string]any{ + "/home/projects/TS/p1/src/index.ts": `import { x } from "./x";`, + "/home/projects/TS/p1/src/x.ts": `export const x = 1;`, + "/home/projects/TS/p1/config.ts": `let x = 1, y = 2;`, + "/home/projects/TS/p2/src/index.ts": `import { x } from "./x";`, + "/home/projects/TS/p2/src/x.ts": `export const x = 1;`, + "/home/projects/TS/p2/config.ts": `let x = 1, y = 2;`, + "/home/projects/TS/p3/src/index.ts": `import { x } from "./x";`, + "/home/projects/TS/p3/src/x.ts": `export const x = 1;`, + "/home/projects/TS/p3/config.ts": `let x = 1, y = 2;`, + } + service, host := projecttestutil.Setup(files, nil) + assert.Equal(t, len(service.Projects()), 0) + service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "/home/projects/TS/p1") + service.OpenFile("/home/projects/TS/p2/src/index.ts", files["/home/projects/TS/p2/src/index.ts"].(string), core.ScriptKindTS, "/home/projects/TS/p2") + assert.Equal(t, len(service.Projects()), 2) + assert.Assert(t, service.InferredProject(tspath.ToPath("/home/projects/TS/p1", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) != nil) + assert.Assert(t, service.InferredProject(tspath.ToPath("/home/projects/TS/p2", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) != nil) + + service.CloseFile("/home/projects/TS/p1/src/index.ts") + service.OpenFile("/home/projects/TS/p3/src/index.ts", files["/home/projects/TS/p3/src/index.ts"].(string), core.ScriptKindTS, "/home/projects/TS/p3") + assert.Equal(t, len(service.Projects()), 2) + assert.Assert(t, service.InferredProject(tspath.ToPath("/home/projects/TS/p1", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.InferredProject(tspath.ToPath("/home/projects/TS/p2", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) != nil) + assert.Assert(t, service.InferredProject(tspath.ToPath("/home/projects/TS/p3", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) != nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p1/src/index.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + + service.CloseFile("/home/projects/TS/p2/src/index.ts") + service.CloseFile("/home/projects/TS/p3/src/index.ts") + service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "/home/projects/TS/p1") + assert.Assert(t, service.InferredProject(tspath.ToPath("/home/projects/TS/p1", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) != nil) + assert.Assert(t, service.InferredProject(tspath.ToPath("/home/projects/TS/p2", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.InferredProject(tspath.ToPath("/home/projects/TS/p3", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p2/src/index.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p3/src/index.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + }) + + t.Run("unrooted inferred projects", func(t *testing.T) { + t.Parallel() + files := map[string]any{ + "/home/projects/TS/p1/src/index.ts": `import { x } from "./x";`, + "/home/projects/TS/p1/src/x.ts": `export const x = 1;`, + "/home/projects/TS/p1/config.ts": `let x = 1, y = 2;`, + "/home/projects/TS/p2/src/index.ts": `import { x } from "./x";`, + "/home/projects/TS/p2/src/x.ts": `export const x = 1;`, + "/home/projects/TS/p2/config.ts": `let x = 1, y = 2;`, + "/home/projects/TS/p3/src/index.ts": `import { x } from "./x";`, + "/home/projects/TS/p3/src/x.ts": `export const x = 1;`, + "/home/projects/TS/p3/config.ts": `let x = 1, y = 2;`, + } + service, host := projecttestutil.Setup(files, nil) + assert.Equal(t, len(service.Projects()), 0) + service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") + service.OpenFile("/home/projects/TS/p2/src/index.ts", files["/home/projects/TS/p2/src/index.ts"].(string), core.ScriptKindTS, "") + assert.Equal(t, len(service.Projects()), 1) + assert.Assert(t, service.InferredProject(tspath.Path("")) != nil) + + service.CloseFile("/home/projects/TS/p1/src/index.ts") + service.OpenFile("/home/projects/TS/p3/src/index.ts", files["/home/projects/TS/p3/src/index.ts"].(string), core.ScriptKindTS, "") + assert.Equal(t, len(service.Projects()), 1) + assert.Assert(t, service.InferredProject(tspath.Path("")) != nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p1/src/index.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + + service.CloseFile("/home/projects/TS/p2/src/index.ts") + service.CloseFile("/home/projects/TS/p3/src/index.ts") + service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") + assert.Assert(t, service.InferredProject(tspath.Path("")) != nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p2/src/index.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p3/src/index.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + + service.CloseFile("/home/projects/TS/p1/src/index.ts") + service.OpenFile("/home/projects/TS/p2/src/index.ts", files["/home/projects/TS/p2/src/index.ts"].(string), core.ScriptKindTS, "/home/projects/TS/p2") + assert.Equal(t, len(service.Projects()), 1) + assert.Assert(t, service.InferredProject(tspath.Path("")) == nil) + assert.Assert(t, service.GetScriptInfoByPath(tspath.ToPath("/home/projects/TS/p1/src/index.ts", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) == nil) + assert.Assert(t, service.InferredProject(tspath.ToPath("/home/projects/TS/p2", host.GetCurrentDirectory(), host.FS().UseCaseSensitiveFileNames())) != nil) + }) +} diff --git a/internal/project/scriptinfo.go b/internal/project/scriptinfo.go index 2e6206c3db..f54c672772 100644 --- a/internal/project/scriptinfo.go +++ b/internal/project/scriptinfo.go @@ -2,6 +2,7 @@ package project import ( "slices" + "sync" "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/ls" @@ -21,12 +22,12 @@ type ScriptInfo struct { version int lineMap *ls.LineMap - isOpen bool pendingReloadFromDisk bool matchesDiskText bool deferredDelete bool - containingProjects []*Project + containingProjectsMu sync.RWMutex + containingProjects []*Project fs vfs.FS } @@ -69,6 +70,12 @@ func (s *ScriptInfo) Version() int { return s.version } +func (s *ScriptInfo) ContainingProjects() []*Project { + s.containingProjectsMu.RLock() + defer s.containingProjectsMu.RUnlock() + return slices.Clone(s.containingProjects) +} + func (s *ScriptInfo) reloadIfNeeded() { if s.pendingReloadFromDisk { if newText, ok := s.fs.ReadFile(s.fileName); ok { @@ -78,7 +85,6 @@ func (s *ScriptInfo) reloadIfNeeded() { } func (s *ScriptInfo) open(newText string) { - s.isOpen = true s.pendingReloadFromDisk = false if newText != s.text { s.setText(newText) @@ -95,11 +101,19 @@ func (s *ScriptInfo) SetTextFromDisk(newText string) { } func (s *ScriptInfo) close(fileExists bool) { - s.isOpen = false if fileExists && !s.pendingReloadFromDisk && !s.matchesDiskText { s.pendingReloadFromDisk = true s.markContainingProjectsAsDirty() } + + s.containingProjectsMu.Lock() + defer s.containingProjectsMu.Unlock() + for _, project := range slices.Clone(s.containingProjects) { + if project.kind == KindInferred && project.isRoot(s) { + project.RemoveFile(s, fileExists) + s.detachFromProjectLocked(project) + } + } } func (s *ScriptInfo) setText(newText string) { @@ -109,6 +123,8 @@ func (s *ScriptInfo) setText(newText string) { } func (s *ScriptInfo) markContainingProjectsAsDirty() { + s.containingProjectsMu.RLock() + defer s.containingProjectsMu.RUnlock() for _, project := range s.containingProjects { project.MarkFileAsDirty(s.path) } @@ -117,18 +133,30 @@ func (s *ScriptInfo) markContainingProjectsAsDirty() { // attachToProject attaches the script info to the project if it's not already attached // and returns true if the script info was newly attached. func (s *ScriptInfo) attachToProject(project *Project) bool { - if !s.isAttached(project) { - s.containingProjects = append(s.containingProjects, project) - if project.compilerOptions.PreserveSymlinks != core.TSTrue { - s.ensureRealpath(project.FS()) - } - project.onFileAddedOrRemoved() - return true + if s.isAttached(project) { + return false + } + s.containingProjectsMu.Lock() + if s.isAttachedLocked(project) { + s.containingProjectsMu.Unlock() + return false + } + s.containingProjects = append(s.containingProjects, project) + s.containingProjectsMu.Unlock() + if project.compilerOptions.PreserveSymlinks != core.TSTrue { + s.ensureRealpath(project) } - return false + project.onFileAddedOrRemoved() + return true } func (s *ScriptInfo) isAttached(project *Project) bool { + s.containingProjectsMu.RLock() + defer s.containingProjectsMu.RUnlock() + return s.isAttachedLocked(project) +} + +func (s *ScriptInfo) isAttachedLocked(project *Project) bool { return slices.Contains(s.containingProjects, project) } @@ -136,6 +164,8 @@ func (s *ScriptInfo) isOrphan() bool { if s.deferredDelete { return true } + s.containingProjectsMu.RLock() + defer s.containingProjectsMu.RUnlock() for _, project := range s.containingProjects { if !project.isOrphan() { return false @@ -144,18 +174,14 @@ func (s *ScriptInfo) isOrphan() bool { return true } -func (s *ScriptInfo) editContent(change ls.TextChange) { +func (s *ScriptInfo) editContent(change core.TextChange) { s.setText(change.ApplyTo(s.Text())) s.markContainingProjectsAsDirty() } -func (s *ScriptInfo) ensureRealpath(fs vfs.FS) { +func (s *ScriptInfo) ensureRealpath(project *Project) { if s.realpath == "" { - if len(s.containingProjects) == 0 { - panic("scriptInfo must be attached to a project before calling ensureRealpath") - } - realpath := fs.Realpath(string(s.path)) - project := s.containingProjects[0] + realpath := project.FS().Realpath(string(s.path)) s.realpath = project.toPath(realpath) if s.realpath != s.path { project.host.OnDiscoveredSymlink(s) @@ -171,17 +197,25 @@ func (s *ScriptInfo) getRealpathIfDifferent() (tspath.Path, bool) { } func (s *ScriptInfo) detachAllProjects() { + s.containingProjectsMu.Lock() + defer s.containingProjectsMu.Unlock() for _, project := range s.containingProjects { // !!! // if (isConfiguredProject(p)) { // p.getCachedDirectoryStructureHost().addOrDeleteFile(this.fileName, this.path, FileWatcherEventKind.Deleted); // } - project.RemoveFile(s, false /*fileExists*/, false /*detachFromProject*/) + project.RemoveFile(s, false /*fileExists*/) } s.containingProjects = nil } func (s *ScriptInfo) detachFromProject(project *Project) { + s.containingProjectsMu.Lock() + defer s.containingProjectsMu.Unlock() + s.detachFromProjectLocked(project) +} + +func (s *ScriptInfo) detachFromProjectLocked(project *Project) { if index := slices.Index(s.containingProjects, project); index != -1 { s.containingProjects = slices.Delete(s.containingProjects, index, index+1) } @@ -194,3 +228,11 @@ func (s *ScriptInfo) delayReloadNonMixedContentFile() { s.pendingReloadFromDisk = true s.markContainingProjectsAsDirty() } + +func (s *ScriptInfo) containedByDeferredClosedProject() bool { + s.containingProjectsMu.RLock() + defer s.containingProjectsMu.RUnlock() + return slices.ContainsFunc(s.containingProjects, func(project *Project) bool { + return project.deferredClose + }) +} diff --git a/internal/project/service.go b/internal/project/service.go index 3ec6f02f94..1bde0ae22e 100644 --- a/internal/project/service.go +++ b/internal/project/service.go @@ -4,6 +4,8 @@ import ( "context" "errors" "fmt" + "maps" + "runtime" "strings" "sync" @@ -23,17 +25,13 @@ const ( projectLoadKindReload ) -type assignProjectResult struct { - configFileName string - retainProjects map[*Project]projectLoadKind - // configFileErrors []*ast.Diagnostic -} - type ServiceOptions struct { TypingsInstallerOptions Logger *Logger PositionEncoding lsproto.PositionEncodingKind WatchEnabled bool + + ParsedFileCache ParsedFileCache } var _ ProjectHost = (*Service)(nil) @@ -44,18 +42,18 @@ type Service struct { comparePathsOptions tspath.ComparePathsOptions converters *ls.Converters + projectsMu sync.RWMutex configuredProjects map[tspath.Path]*Project - // unrootedInferredProject is the inferred project for files opened without a projectRootDirectory - // (e.g. dynamic files) - unrootedInferredProject *Project // inferredProjects is the list of all inferred projects, including the unrootedInferredProject // if it exists - inferredProjects []*Project + inferredProjects map[tspath.Path]*Project + + documentRegistry *DocumentRegistry + scriptInfosMu sync.RWMutex + scriptInfos map[tspath.Path]*ScriptInfo + openFiles map[tspath.Path]string // values are projectRootPath, if provided + configFileForOpenFiles map[tspath.Path]string // default config project for open files !!! todo solution and project reference handling - documentRegistry *DocumentRegistry - scriptInfosMu sync.RWMutex - scriptInfos map[tspath.Path]*ScriptInfo - openFiles map[tspath.Path]string // values are projectRootPath, if provided // Contains all the deleted script info's version information so that // it does not reset when creating script info again filenameToScriptInfoVersion map[tspath.Path]int @@ -63,6 +61,8 @@ type Service struct { realpathToScriptInfos map[tspath.Path]map[*ScriptInfo]struct{} typingsInstaller *TypingsInstaller + + compilerOptionsForInferredProjects *core.CompilerOptions } func NewService(host ServiceHost, options ServiceOptions) *Service { @@ -78,15 +78,18 @@ func NewService(host ServiceHost, options ServiceOptions) *Service { }, configuredProjects: make(map[tspath.Path]*Project), + inferredProjects: make(map[tspath.Path]*Project), documentRegistry: &DocumentRegistry{ Options: tspath.ComparePathsOptions{ UseCaseSensitiveFileNames: host.FS().UseCaseSensitiveFileNames(), CurrentDirectory: host.GetCurrentDirectory(), }, + parsedFileCache: options.ParsedFileCache, }, scriptInfos: make(map[tspath.Path]*ScriptInfo), openFiles: make(map[tspath.Path]string), + configFileForOpenFiles: make(map[tspath.Path]string), filenameToScriptInfoVersion: make(map[tspath.Path]int), realpathToScriptInfos: make(map[tspath.Path]map[*ScriptInfo]struct{}), } @@ -108,6 +111,10 @@ func (s *Service) Log(msg string) { s.options.Logger.Info(msg) } +func (s *Service) Trace(msg string) { + s.Log(msg) +} + func (s *Service) HasLevel(level LogLevel) bool { return s.options.Logger.HasLevel(level) } @@ -168,14 +175,36 @@ func (s *Service) IsWatchEnabled() bool { } func (s *Service) Projects() []*Project { + s.projectsMu.RLock() + defer s.projectsMu.RUnlock() projects := make([]*Project, 0, len(s.configuredProjects)+len(s.inferredProjects)) for _, project := range s.configuredProjects { projects = append(projects, project) } - projects = append(projects, s.inferredProjects...) + for _, project := range s.inferredProjects { + projects = append(projects, project) + } return projects } +func (s *Service) ConfiguredProject(path tspath.Path) *Project { + s.projectsMu.RLock() + defer s.projectsMu.RUnlock() + if project, ok := s.configuredProjects[path]; ok { + return project + } + return nil +} + +func (s *Service) InferredProject(rootPath tspath.Path) *Project { + s.projectsMu.RLock() + defer s.projectsMu.RUnlock() + if project, ok := s.inferredProjects[rootPath]; ok { + return project + } + return nil +} + func (s *Service) GetScriptInfo(fileName string) *ScriptInfo { return s.GetScriptInfoByPath(s.toPath(fileName)) } @@ -189,16 +218,26 @@ func (s *Service) GetScriptInfoByPath(path tspath.Path) *ScriptInfo { return nil } +func (s *Service) isOpenFile(info *ScriptInfo) bool { + _, ok := s.openFiles[info.path] + return ok +} + func (s *Service) OpenFile(fileName string, fileContent string, scriptKind core.ScriptKind, projectRootPath string) { path := s.toPath(fileName) existing := s.GetScriptInfoByPath(path) info := s.getOrCreateOpenScriptInfo(fileName, path, fileContent, scriptKind, projectRootPath) if existing == nil && info != nil && !info.isDynamic { - // !!! - // s.tryInvokeWildcardDirectories(info) + // Invoke wild card directory watcher to ensure that the file presence is reflected + s.projectsMu.RLock() + for _, project := range s.configuredProjects { + project.tryInvokeWildCardDirectories(fileName, info.path) + } + s.projectsMu.RUnlock() } result := s.assignProjectToOpenedScriptInfo(info) - s.cleanupProjectsAndScriptInfos(result.retainProjects, []tspath.Path{info.path}) + s.cleanupProjectsAndScriptInfos(info, result) + s.printMemoryUsage() s.printProjects() } @@ -210,12 +249,12 @@ func (s *Service) ChangeFile(document lsproto.VersionedTextDocumentIdentifier, c return fmt.Errorf("file %s not found", fileName) } - textChanges := make([]ls.TextChange, len(changes)) + textChanges := make([]core.TextChange, len(changes)) for i, change := range changes { if partialChange := change.TextDocumentContentChangePartial; partialChange != nil { textChanges[i] = s.converters.FromLSPTextChange(scriptInfo, partialChange) } else if wholeChange := change.TextDocumentContentChangeWholeDocument; wholeChange != nil { - textChanges[i] = ls.TextChange{ + textChanges[i] = core.TextChange{ TextRange: core.NewTextRange(0, len(scriptInfo.Text())), NewText: wholeChange.Text, } @@ -232,12 +271,8 @@ func (s *Service) CloseFile(fileName string) { if info := s.GetScriptInfoByPath(s.toPath(fileName)); info != nil { fileExists := !info.isDynamic && s.host.FS().FileExists(info.fileName) info.close(fileExists) - for _, project := range info.containingProjects { - if project.kind == KindInferred && project.isRoot(info) { - project.RemoveFile(info, fileExists, true /*detachFromProject*/) - } - } delete(s.openFiles, info.path) + delete(s.configFileForOpenFiles, info.path) if !fileExists { s.handleDeletedFile(info, false /*deferredDelete*/) } @@ -281,6 +316,8 @@ func (s *Service) SourceFileCount() int { } func (s *Service) OnWatchedFilesChanged(ctx context.Context, changes []*lsproto.FileEvent) error { + s.projectsMu.RLock() + defer s.projectsMu.RUnlock() for _, change := range changes { fileName := ls.DocumentURIToFileName(change.Uri) path := s.toPath(fileName) @@ -332,20 +369,23 @@ func (s *Service) onConfigFileChanged(project *Project, changeKind lsproto.FileC } if !project.deferredClose { - project.pendingReload = PendingReloadFull - project.markAsDirty() + project.SetPendingReload(PendingReloadFull) } return nil } func (s *Service) ensureProjectStructureUpToDate() { var hasChanges bool + s.projectsMu.RLock() for _, project := range s.configuredProjects { - hasChanges = project.updateGraph() || hasChanges + _, updated := project.updateGraph() + hasChanges = updated || hasChanges } for _, project := range s.inferredProjects { - hasChanges = project.updateGraph() || hasChanges + _, updated := project.updateGraph() + hasChanges = updated || hasChanges } + s.projectsMu.RUnlock() if hasChanges { s.ensureProjectForOpenFiles() } @@ -366,27 +406,30 @@ func (s *Service) ensureProjectForOpenFiles() { // !!! s.removeRootOfInferredProjectIfNowPartOfOtherProject(info) } } + s.projectsMu.RLock() for _, project := range s.inferredProjects { project.updateGraph() } + s.projectsMu.RUnlock() s.Log("After ensureProjectForOpenFiles:") s.printProjects() } -func (s *Service) applyChangesToFile(info *ScriptInfo, changes []ls.TextChange) { +func (s *Service) applyChangesToFile(info *ScriptInfo, changes []core.TextChange) { for _, change := range changes { info.editContent(change) } } func (s *Service) handleDeletedFile(info *ScriptInfo, deferredDelete bool) { - if info.isOpen { + if s.isOpenFile(info) { panic("cannot delete an open file") } // !!! // s.handleSourceMapProjects(info) + containingProjects := info.ContainingProjects() info.detachAllProjects() if deferredDelete { info.delayReloadNonMixedContentFile() @@ -394,15 +437,19 @@ func (s *Service) handleDeletedFile(info *ScriptInfo, deferredDelete bool) { } else { s.deleteScriptInfo(info) } - s.updateProjectGraphs(info.containingProjects, false /*clearSourceMapperCache*/) + s.updateProjectGraphs(containingProjects, false /*clearSourceMapperCache*/) } func (s *Service) deleteScriptInfo(info *ScriptInfo) { - if info.isOpen { + if s.isOpenFile(info) { panic("cannot delete an open file") } s.scriptInfosMu.Lock() defer s.scriptInfosMu.Unlock() + s.deleteScriptInfoLocked(info) +} + +func (s *Service) deleteScriptInfoLocked(info *ScriptInfo) { delete(s.scriptInfos, info.path) s.filenameToScriptInfoVersion[info.path] = info.version // !!! @@ -501,13 +548,15 @@ func (s *Service) configFileExists(configFilename string) bool { } func (s *Service) getConfigFileNameForFile(info *ScriptInfo, findFromCacheOnly bool) string { - // !!! - // const fromCache = this.getConfigFileNameForFileFromCache(info, findFromCacheOnly); - // if (fromCache !== undefined) return fromCache || undefined; - // if (findFromCacheOnly) return undefined; - // - // !!! - // good grief, this is convoluted. I'm skipping so much stuff right now + configName, ok := s.configFileForOpenFiles[info.path] + if ok { + return configName + } + + if findFromCacheOnly { + return "" + } + projectRootPath := s.openFiles[info.path] if info.isDynamic { return "" @@ -532,6 +581,10 @@ func (s *Service) getConfigFileNameForFile(info *ScriptInfo, findFromCacheOnly b return "", false }) s.logf("getConfigFileNameForFile:: File: %s ProjectRootPath: %s:: Result: %s", info.fileName, s.openFiles[info.path], fileName) + + if _, ok := s.openFiles[info.path]; ok { + s.configFileForOpenFiles[info.path] = fileName + } return fileName } @@ -540,6 +593,8 @@ func (s *Service) findDefaultConfiguredProject(scriptInfo *ScriptInfo) *Project } func (s *Service) findConfiguredProjectByName(configFilePath tspath.Path, includeDeferredClosedProjects bool) *Project { + s.projectsMu.RLock() + defer s.projectsMu.RUnlock() if result, ok := s.configuredProjects[configFilePath]; ok { if includeDeferredClosedProjects || !result.deferredClose { return result @@ -549,6 +604,9 @@ func (s *Service) findConfiguredProjectByName(configFilePath tspath.Path, includ } func (s *Service) createConfiguredProject(configFileName string, configFilePath tspath.Path) *Project { + s.projectsMu.Lock() + defer s.projectsMu.Unlock() + // !!! config file existence cache stuff omitted project := NewConfiguredProject(configFileName, configFilePath, s) s.configuredProjects[configFilePath] = project @@ -568,7 +626,7 @@ func (s *Service) findCreateOrReloadConfiguredProject(configFileName string, pro if project == nil { project = s.createConfiguredProject(configFileName, configFilePath) } - s.loadConfiguredProject(project) + project.updateGraph() default: panic("unhandled projectLoadKind") } @@ -592,13 +650,13 @@ func (s *Service) tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptIn return result } -func (s *Service) assignProjectToOpenedScriptInfo(info *ScriptInfo) assignProjectResult { - var result assignProjectResult +func (s *Service) assignProjectToOpenedScriptInfo(info *ScriptInfo) *Project { + // !!! todo retain projects list when its multiple projects that are looked up + var result *Project if project := s.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(info, projectLoadKindCreate); project != nil { - result.configFileName = project.configFileName - // result.configFileErrors = project.getAllProjectErrors() + result = project } - for _, project := range info.containingProjects { + for _, project := range info.ContainingProjects() { project.updateGraph() } if info.isOrphan() { @@ -613,70 +671,189 @@ func (s *Service) assignProjectToOpenedScriptInfo(info *ScriptInfo) assignProjec return result } -func (s *Service) cleanupProjectsAndScriptInfos(toRetainConfiguredProjects map[*Project]projectLoadKind, openFilesWithRetainedConfiguredProject []tspath.Path) { - // !!! +func (s *Service) cleanupProjectsAndScriptInfos(openInfo *ScriptInfo, retainedByOpenFile *Project) { + // This was postponed from closeOpenFile to after opening next file, + // so that we can reuse the project if we need to right away + // Remove all the non marked projects + s.cleanupConfiguredProjects(openInfo, retainedByOpenFile) + + // Remove orphan inferred projects now that we have reused projects + // We need to create a duplicate because we cant guarantee order after removal + s.projectsMu.RLock() + inferredProjects := maps.Clone(s.inferredProjects) + s.projectsMu.RUnlock() + for _, inferredProject := range inferredProjects { + if inferredProject.isOrphan() { + s.removeProject(inferredProject) + } + } + + // Delete the orphan files here because there might be orphan script infos (which are not part of project) + // when some file/s were closed which resulted in project removal. + // It was then postponed to cleanup these script infos so that they can be reused if + // the file from that old project is reopened because of opening file from here. + s.removeOrphanScriptInfos() +} + +func (s *Service) cleanupConfiguredProjects(openInfo *ScriptInfo, retainedByOpenFile *Project) { + s.projectsMu.RLock() + toRemoveProjects := maps.Clone(s.configuredProjects) + s.projectsMu.RUnlock() + + // !!! handle declarationMap + retainConfiguredProject := func(project *Project) { + if _, ok := toRemoveProjects[project.configFilePath]; !ok { + return + } + delete(toRemoveProjects, project.configFilePath) + // // Keep original projects used + // markOriginalProjectsAsUsed(project); + // // Keep all the references alive + // forEachReferencedProject(project, retainConfiguredProject); + } + + if retainedByOpenFile != nil { + retainConfiguredProject(retainedByOpenFile) + } + + // Everything needs to be retained, fast path to skip all the work + if len(toRemoveProjects) == 0 { + return + } + + // Retain default configured project for open script info + for path := range s.openFiles { + if path == openInfo.path { + continue + } + info := s.GetScriptInfoByPath(path) + // We want to retain the projects for open file if they are pending updates so deferredClosed projects are ok + result := s.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( + info, + projectLoadKindFind, + ) + if result != nil { + retainConfiguredProject(result) + // Everything needs to be retained, fast path to skip all the work + if len(toRemoveProjects) == 0 { + return + } + } + } + + // !!! project references + + for _, project := range toRemoveProjects { + s.removeProject(project) + } +} + +func (s *Service) removeProject(project *Project) { + s.Log("remove Project:: " + project.name) + s.Log(project.print( /*writeProjectFileNames*/ true /*writeFileExplaination*/, true /*writeFileVersionAndText*/, false, &strings.Builder{})) + s.projectsMu.Lock() + switch project.kind { + case KindConfigured: + delete(s.configuredProjects, project.configFilePath) + case KindInferred: + delete(s.inferredProjects, project.rootPath) + } + s.projectsMu.Unlock() + project.Close() +} + +func (s *Service) removeOrphanScriptInfos() { + s.scriptInfosMu.Lock() + defer s.scriptInfosMu.Unlock() + + toRemoveScriptInfos := maps.Clone(s.scriptInfos) + + for _, info := range s.scriptInfos { + if info.deferredDelete { + continue + } + + // If script info is not open and orphan, remove it + if !s.isOpenFile(info) && + info.isOrphan() && + // !scriptInfoIsContainedByBackgroundProject(info) && + !info.containedByDeferredClosedProject() { + // !!! dts map related infos and code + continue + } + // Retain this script info + delete(toRemoveScriptInfos, info.path) + } + + // if there are not projects that include this script info - delete it + for _, info := range toRemoveScriptInfos { + s.deleteScriptInfoLocked(info) + } } -func (s *Service) assignOrphanScriptInfoToInferredProject(info *ScriptInfo, projectRootDirectory string) { +func (s *Service) assignOrphanScriptInfoToInferredProject(info *ScriptInfo, projectRootDirectory string) *Project { if !info.isOrphan() { panic("scriptInfo is not orphan") } project := s.getOrCreateInferredProjectForProjectRootPath(info, projectRootDirectory) - if project == nil { - project = s.getOrCreateUnrootedInferredProject() - } - - project.AddRoot(info) + project.AddInferredProjectRoot(info) project.updateGraph() + return project // !!! old code ensures that scriptInfo is only part of one project } -func (s *Service) getOrCreateUnrootedInferredProject() *Project { - if s.unrootedInferredProject == nil { - s.unrootedInferredProject = s.createInferredProject(s.host.GetCurrentDirectory(), "") +func (s *Service) getOrCreateInferredProjectForProjectRootPath(info *ScriptInfo, projectRootDirectory string) *Project { + project := s.getInferredProjectForProjectRootPath(info, projectRootDirectory) + if project != nil { + return project } - return s.unrootedInferredProject + if projectRootDirectory != "" { + return s.createInferredProject(projectRootDirectory, s.toPath(projectRootDirectory)) + } + return s.createInferredProject(s.host.GetCurrentDirectory(), "") } -func (s *Service) getOrCreateInferredProjectForProjectRootPath(info *ScriptInfo, projectRootDirectory string) *Project { - if info.isDynamic && projectRootDirectory == "" { +func (s *Service) getInferredProjectForProjectRootPath(info *ScriptInfo, projectRootDirectory string) *Project { + s.projectsMu.RLock() + defer s.projectsMu.RUnlock() + if projectRootDirectory != "" { + projectRootPath := s.toPath(projectRootDirectory) + if project, ok := s.inferredProjects[projectRootPath]; ok { + return project + } return nil } - if projectRootDirectory != "" { - projectRootPath := s.toPath(projectRootDirectory) + if !info.isDynamic { + var bestMatch *Project for _, project := range s.inferredProjects { - if project.rootPath == projectRootPath { - return project + if project.rootPath != "" && + tspath.ContainsPath(string(project.rootPath), string(info.path), s.comparePathsOptions) && + (bestMatch == nil || len(bestMatch.rootPath) <= len(project.rootPath)) { + bestMatch = project } } - return s.createInferredProject(projectRootDirectory, projectRootPath) - } - var bestMatch *Project - for _, project := range s.inferredProjects { - if project.rootPath == "" { - continue + if bestMatch != nil { + return bestMatch } - if !tspath.ContainsPath(string(project.rootPath), string(info.path), s.comparePathsOptions) { - continue - } - if bestMatch != nil && len(bestMatch.rootPath) > len(project.rootPath) { - continue - } - bestMatch = project } - return bestMatch + // unrooted inferred project if no best match found + if unrootedProject, ok := s.inferredProjects[""]; ok { + return unrootedProject + } + return nil } func (s *Service) getDefaultProjectForScript(scriptInfo *ScriptInfo) *Project { - switch len(scriptInfo.containingProjects) { + containingProjects := scriptInfo.ContainingProjects() + switch len(containingProjects) { case 0: panic("scriptInfo must be attached to a project before calling getDefaultProject") case 1: - project := scriptInfo.containingProjects[0] + project := containingProjects[0] if project.deferredClose || project.kind == KindAutoImportProvider || project.kind == KindAuxiliary { panic("scriptInfo must be attached to a non-background project before calling getDefaultProject") } @@ -693,13 +870,13 @@ func (s *Service) getDefaultProjectForScript(scriptInfo *ScriptInfo) *Project { var firstNonSourceOfProjectReferenceRedirect *Project var defaultConfiguredProject *Project - for index, project := range scriptInfo.containingProjects { + for index, project := range containingProjects { if project.kind == KindConfigured { if project.deferredClose { continue } // !!! if !project.isSourceOfProjectReferenceRedirect(scriptInfo.fileName) { - if defaultConfiguredProject == nil && index != len(scriptInfo.containingProjects)-1 { + if defaultConfiguredProject == nil && index != len(containingProjects)-1 { defaultConfiguredProject = s.findDefaultConfiguredProject(scriptInfo) } if defaultConfiguredProject == project { @@ -733,22 +910,31 @@ func (s *Service) getDefaultProjectForScript(scriptInfo *ScriptInfo) *Project { } func (s *Service) createInferredProject(currentDirectory string, projectRootPath tspath.Path) *Project { - compilerOptions := core.CompilerOptions{ - AllowJs: core.TSTrue, - Module: core.ModuleKindESNext, - ModuleResolution: core.ModuleResolutionKindBundler, - Target: core.ScriptTargetES2022, - Jsx: core.JsxEmitReactJSX, - AllowImportingTsExtensions: core.TSTrue, - StrictNullChecks: core.TSTrue, - StrictFunctionTypes: core.TSTrue, - SourceMap: core.TSTrue, - ESModuleInterop: core.TSTrue, - AllowNonTsExtensions: core.TSTrue, - ResolveJsonModule: core.TSTrue, - } - project := NewInferredProject(&compilerOptions, currentDirectory, projectRootPath, s) - s.inferredProjects = append(s.inferredProjects, project) + s.projectsMu.Lock() + defer s.projectsMu.Unlock() + if existingProject, ok := s.inferredProjects[projectRootPath]; ok { + return existingProject + } + + compilerOptions := s.compilerOptionsForInferredProjects + if compilerOptions == nil { + compilerOptions = &core.CompilerOptions{ + AllowJs: core.TSTrue, + Module: core.ModuleKindESNext, + ModuleResolution: core.ModuleResolutionKindBundler, + Target: core.ScriptTargetES2022, + Jsx: core.JsxEmitReactJSX, + AllowImportingTsExtensions: core.TSTrue, + StrictNullChecks: core.TSTrue, + StrictFunctionTypes: core.TSTrue, + SourceMap: core.TSTrue, + ESModuleInterop: core.TSTrue, + AllowNonTsExtensions: core.TSTrue, + ResolveJsonModule: core.TSTrue, + } + } + project := NewInferredProject(compilerOptions, currentDirectory, projectRootPath, s) + s.inferredProjects[project.rootPath] = project return project } @@ -756,34 +942,50 @@ func (s *Service) toPath(fileName string) tspath.Path { return tspath.ToPath(fileName, s.host.GetCurrentDirectory(), s.host.FS().UseCaseSensitiveFileNames()) } -func (s *Service) loadConfiguredProject(project *Project) { - if err := project.LoadConfig(); err != nil { - panic(fmt.Errorf("failed to load project %q: %w", project.configFileName, err)) - } -} - func (s *Service) printProjects() { if !s.options.Logger.HasLevel(LogLevelNormal) { return } var builder strings.Builder + s.projectsMu.RLock() for _, project := range s.configuredProjects { project.print(false /*writeFileNames*/, false /*writeFileExpanation*/, false /*writeFileVersionAndText*/, &builder) + builder.WriteRune('\n') } for _, project := range s.inferredProjects { project.print(false /*writeFileNames*/, false /*writeFileExpanation*/, false /*writeFileVersionAndText*/, &builder) + builder.WriteRune('\n') } + s.projectsMu.RUnlock() - builder.WriteString("Open files: ") + builder.WriteString("Open files:") for path, projectRootPath := range s.openFiles { info := s.GetScriptInfoByPath(path) - builder.WriteString(fmt.Sprintf("\tFileName: %s ProjectRootPath: %s", info.fileName, projectRootPath)) - builder.WriteString("\t\tProjects: " + strings.Join(core.Map(info.containingProjects, func(project *Project) string { return project.name }), ", ")) + builder.WriteString(fmt.Sprintf("\n\tFileName: %s ProjectRootPath: %s", info.fileName, projectRootPath)) + builder.WriteString("\n\t\tProjects: " + strings.Join(core.Map(info.ContainingProjects(), func(project *Project) string { return project.name }), ", ")) } + builder.WriteString("\n" + hr) s.Log(builder.String()) } func (s *Service) logf(format string, args ...any) { s.Log(fmt.Sprintf(format, args...)) } + +func (s *Service) printMemoryUsage() { + runtime.GC() // Force garbage collection to get accurate memory stats + var memStats runtime.MemStats + runtime.ReadMemStats(&memStats) + s.logf("MemoryStats:\n\tAlloc: %v KB\n\tSys: %v KB\n\tNumGC: %v", memStats.Alloc/1024, memStats.Sys/1024, memStats.NumGC) +} + +// !!! per root compiler options +func (s *Service) SetCompilerOptionsForInferredProjects(compilerOptions *core.CompilerOptions) { + s.compilerOptionsForInferredProjects = compilerOptions + + // !!! set compiler options for all inferred projects + // for _, project := range s.inferredProjects { + // project.SetCompilerOptions(compilerOptions) + // } +} diff --git a/internal/project/service_test.go b/internal/project/service_test.go index 0364598d65..ae8ec4d525 100644 --- a/internal/project/service_test.go +++ b/internal/project/service_test.go @@ -168,6 +168,8 @@ func TestService(t *testing.T) { service, _ := projecttestutil.Setup(files, nil) service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") assert.Check(t, service.GetScriptInfo("/home/projects/TS/p1/y.ts") == nil) + // Avoid using initial file set after this point + files = nil //nolint:ineffassign err := service.ChangeFile( lsproto.VersionedTextDocumentIdentifier{ @@ -214,6 +216,8 @@ func TestService(t *testing.T) { _, project := service.EnsureDefaultProjectForFile("/home/projects/TS/p1/src/index.ts") programBefore := project.GetProgram() assert.Equal(t, len(programBefore.GetSourceFiles()), 2) + // Avoid using initial file set after this point + files = nil //nolint:ineffassign err := service.ChangeFile( lsproto.VersionedTextDocumentIdentifier{ @@ -242,15 +246,16 @@ func TestService(t *testing.T) { ) assert.NilError(t, err) - files["/home/projects/TS/p1/tsconfig.json"] = `{ + err = host.FS().WriteFile("/home/projects/TS/p1/tsconfig.json", `{ "compilerOptions": { "noLib": true, "module": "nodenext", "strict": true, }, "include": ["./**/*"] - }` - host.ReplaceFS(files) + }`, false) + assert.NilError(t, err) + err = service.OnWatchedFilesChanged(t.Context(), []*lsproto.FileEvent{ { Type: lsproto.FileChangeTypeChanged, @@ -270,23 +275,25 @@ func TestService(t *testing.T) { t.Parallel() t.Run("delete a file, close it, recreate it", func(t *testing.T) { t.Parallel() - service, host := projecttestutil.Setup(defaultFiles, nil) - service.OpenFile("/home/projects/TS/p1/src/x.ts", defaultFiles["/home/projects/TS/p1/src/x.ts"].(string), core.ScriptKindTS, "") - service.OpenFile("/home/projects/TS/p1/src/index.ts", defaultFiles["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") + files := maps.Clone(defaultFiles) + service, host := projecttestutil.Setup(files, nil) + service.OpenFile("/home/projects/TS/p1/src/x.ts", files["/home/projects/TS/p1/src/x.ts"].(string), core.ScriptKindTS, "") + service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") assert.Equal(t, service.SourceFileCount(), 2) + // Avoid using initial file set after this point + files = nil //nolint:ineffassign - files := maps.Clone(defaultFiles) - delete(files, "/home/projects/TS/p1/src/x.ts") - host.ReplaceFS(files) + assert.NilError(t, host.FS().Remove("/home/projects/TS/p1/src/x.ts")) service.CloseFile("/home/projects/TS/p1/src/x.ts") assert.Check(t, service.GetScriptInfo("/home/projects/TS/p1/src/x.ts") == nil) assert.Check(t, service.Projects()[0].GetProgram().GetSourceFile("/home/projects/TS/p1/src/x.ts") == nil) assert.Equal(t, service.SourceFileCount(), 1) - files["/home/projects/TS/p1/src/x.ts"] = `` - host.ReplaceFS(files) - service.OpenFile("/home/projects/TS/p1/src/x.ts", files["/home/projects/TS/p1/src/x.ts"].(string), core.ScriptKindTS, "") + err := host.FS().WriteFile("/home/projects/TS/p1/src/x.ts", "", false) + assert.NilError(t, err) + + service.OpenFile("/home/projects/TS/p1/src/x.ts", "", core.ScriptKindTS, "") assert.Equal(t, service.GetScriptInfo("/home/projects/TS/p1/src/x.ts").Text(), "") assert.Check(t, service.Projects()[0].GetProgram().GetSourceFile("/home/projects/TS/p1/src/x.ts") != nil) assert.Equal(t, service.Projects()[0].GetProgram().GetSourceFile("/home/projects/TS/p1/src/x.ts").Text(), "") @@ -300,19 +307,22 @@ func TestService(t *testing.T) { files := maps.Clone(defaultFiles) delete(files, "/home/projects/TS/p1/tsconfig.json") service, host := projecttestutil.Setup(files, nil) - service.OpenFile("/home/projects/TS/p1/src/x.ts", defaultFiles["/home/projects/TS/p1/src/x.ts"].(string), core.ScriptKindTS, "") - service.OpenFile("/home/projects/TS/p1/src/index.ts", defaultFiles["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") + service.OpenFile("/home/projects/TS/p1/src/x.ts", files["/home/projects/TS/p1/src/x.ts"].(string), core.ScriptKindTS, "") + service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") + // Avoid using initial file set after this point + files = nil //nolint:ineffassign - delete(files, "/home/projects/TS/p1/src/x.ts") - host.ReplaceFS(files) + err := host.FS().Remove("/home/projects/TS/p1/src/x.ts") + assert.NilError(t, err) service.CloseFile("/home/projects/TS/p1/src/x.ts") assert.Check(t, service.GetScriptInfo("/home/projects/TS/p1/src/x.ts") == nil) assert.Check(t, service.Projects()[0].GetProgram().GetSourceFile("/home/projects/TS/p1/src/x.ts") == nil) - files["/home/projects/TS/p1/src/x.ts"] = `` - host.ReplaceFS(files) - service.OpenFile("/home/projects/TS/p1/src/x.ts", files["/home/projects/TS/p1/src/x.ts"].(string), core.ScriptKindTS, "") + err = host.FS().WriteFile("/home/projects/TS/p1/src/x.ts", "", false) + assert.NilError(t, err) + + service.OpenFile("/home/projects/TS/p1/src/x.ts", "", core.ScriptKindTS, "") assert.Equal(t, service.GetScriptInfo("/home/projects/TS/p1/src/x.ts").Text(), "") assert.Check(t, service.Projects()[0].GetProgram().GetSourceFile("/home/projects/TS/p1/src/x.ts") != nil) assert.Equal(t, service.Projects()[0].GetProgram().GetSourceFile("/home/projects/TS/p1/src/x.ts").Text(), "") @@ -338,6 +348,8 @@ func TestService(t *testing.T) { service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") service.OpenFile("/home/projects/TS/p2/src/index.ts", files["/home/projects/TS/p2/src/index.ts"].(string), core.ScriptKindTS, "") assert.Equal(t, len(service.Projects()), 2) + // Avoid using initial file set after this point + files = nil //nolint:ineffassign _, p1 := service.EnsureDefaultProjectForFile("/home/projects/TS/p1/src/index.ts") _, p2 := service.EnsureDefaultProjectForFile("/home/projects/TS/p2/src/index.ts") assert.Equal( @@ -361,6 +373,8 @@ func TestService(t *testing.T) { service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") service.OpenFile("/home/projects/TS/p2/src/index.ts", files["/home/projects/TS/p2/src/index.ts"].(string), core.ScriptKindTS, "") assert.Equal(t, len(service.Projects()), 2) + // Avoid using initial file set after this point + files = nil //nolint:ineffassign _, p1 := service.EnsureDefaultProjectForFile("/home/projects/TS/p1/src/index.ts") _, p2 := service.EnsureDefaultProjectForFile("/home/projects/TS/p2/src/index.ts") x1 := p1.GetProgram().GetSourceFile("/home/projects/TS/p1/src/x.ts") @@ -375,15 +389,18 @@ func TestService(t *testing.T) { t.Run("change open file", func(t *testing.T) { t.Parallel() - service, host := projecttestutil.Setup(defaultFiles, nil) - service.OpenFile("/home/projects/TS/p1/src/x.ts", defaultFiles["/home/projects/TS/p1/src/x.ts"].(string), core.ScriptKindTS, "") - service.OpenFile("/home/projects/TS/p1/src/index.ts", defaultFiles["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") + files := maps.Clone(defaultFiles) + service, host := projecttestutil.Setup(files, nil) + service.OpenFile("/home/projects/TS/p1/src/x.ts", files["/home/projects/TS/p1/src/x.ts"].(string), core.ScriptKindTS, "") + service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") _, project := service.EnsureDefaultProjectForFile("/home/projects/TS/p1/src/index.ts") programBefore := project.GetProgram() + // Avoid using initial file set after this point + files = nil //nolint:ineffassign + + err := host.FS().WriteFile("/home/projects/TS/p1/src/x.ts", `export const x = 2;`, false) + assert.NilError(t, err) - files := maps.Clone(defaultFiles) - files["/home/projects/TS/p1/src/x.ts"] = `export const x = 2;` - host.ReplaceFS(files) assert.NilError(t, service.OnWatchedFilesChanged(t.Context(), []*lsproto.FileEvent{ { Type: lsproto.FileChangeTypeChanged, @@ -396,14 +413,17 @@ func TestService(t *testing.T) { t.Run("change closed program file", func(t *testing.T) { t.Parallel() - service, host := projecttestutil.Setup(defaultFiles, nil) - service.OpenFile("/home/projects/TS/p1/src/index.ts", defaultFiles["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") + files := maps.Clone(defaultFiles) + service, host := projecttestutil.Setup(files, nil) + service.OpenFile("/home/projects/TS/p1/src/index.ts", files["/home/projects/TS/p1/src/index.ts"].(string), core.ScriptKindTS, "") _, project := service.EnsureDefaultProjectForFile("/home/projects/TS/p1/src/index.ts") programBefore := project.GetProgram() + // Avoid using initial file set after this point + files = nil //nolint:ineffassign + + err := host.FS().WriteFile("/home/projects/TS/p1/src/x.ts", `export const x = 2;`, false) + assert.NilError(t, err) - files := maps.Clone(defaultFiles) - files["/home/projects/TS/p1/src/x.ts"] = `export const x = 2;` - host.ReplaceFS(files) assert.NilError(t, service.OnWatchedFilesChanged(t.Context(), []*lsproto.FileEvent{ { Type: lsproto.FileChangeTypeChanged, @@ -435,14 +455,14 @@ func TestService(t *testing.T) { program := project.GetProgram() assert.Equal(t, len(program.GetSemanticDiagnostics(projecttestutil.WithRequestID(t.Context()), program.GetSourceFile("/home/projects/TS/p1/src/index.ts"))), 0) - filesCopy := maps.Clone(files) - filesCopy["/home/projects/TS/p1/tsconfig.json"] = `{ + err := host.FS().WriteFile("/home/projects/TS/p1/tsconfig.json", `{ "compilerOptions": { "noLib": false, "strict": true } - }` - host.ReplaceFS(filesCopy) + }`, false) + assert.NilError(t, err) + assert.NilError(t, service.OnWatchedFilesChanged(t.Context(), []*lsproto.FileEvent{ { Type: lsproto.FileChangeTypeChanged, @@ -472,9 +492,9 @@ func TestService(t *testing.T) { program := project.GetProgram() assert.Equal(t, len(program.GetSemanticDiagnostics(projecttestutil.WithRequestID(t.Context()), program.GetSourceFile("/home/projects/TS/p1/src/index.ts"))), 0) - filesCopy := maps.Clone(files) - delete(filesCopy, "/home/projects/TS/p1/src/x.ts") - host.ReplaceFS(filesCopy) + err := host.FS().Remove("/home/projects/TS/p1/src/x.ts") + assert.NilError(t, err) + assert.NilError(t, service.OnWatchedFilesChanged(t.Context(), []*lsproto.FileEvent{ { Type: lsproto.FileChangeTypeDeleted, @@ -505,9 +525,9 @@ func TestService(t *testing.T) { program := project.GetProgram() assert.Equal(t, len(program.GetSemanticDiagnostics(projecttestutil.WithRequestID(t.Context()), program.GetSourceFile("/home/projects/TS/p1/src/x.ts"))), 0) - filesCopy := maps.Clone(files) - delete(filesCopy, "/home/projects/TS/p1/src/index.ts") - host.ReplaceFS(filesCopy) + err := host.FS().Remove("/home/projects/TS/p1/src/index.ts") + assert.NilError(t, err) + assert.NilError(t, service.OnWatchedFilesChanged(t.Context(), []*lsproto.FileEvent{ { Type: lsproto.FileChangeTypeDeleted, @@ -543,27 +563,27 @@ func TestService(t *testing.T) { { Kind: ptrTo(lsproto.WatchKindCreate | lsproto.WatchKindChange | lsproto.WatchKindDelete), GlobPattern: lsproto.GlobPattern{ - Pattern: ptrTo("/home/projects/TS/p1/tsconfig.json"), + Pattern: ptrTo("/home/projects/TS/p1/src/index.ts"), }, }, { Kind: ptrTo(lsproto.WatchKindCreate | lsproto.WatchKindChange | lsproto.WatchKindDelete), GlobPattern: lsproto.GlobPattern{ - Pattern: ptrTo("/home/projects/TS/p1/src/index.ts"), + Pattern: ptrTo("/home/projects/TS/p1/src/y.ts"), }, }, { Kind: ptrTo(lsproto.WatchKindCreate | lsproto.WatchKindChange | lsproto.WatchKindDelete), GlobPattern: lsproto.GlobPattern{ - Pattern: ptrTo("/home/projects/TS/p1/src/y.ts"), + Pattern: ptrTo("/home/projects/TS/p1/tsconfig.json"), }, }, }) // Add the missing file - filesCopy := maps.Clone(files) - filesCopy["/home/projects/TS/p1/src/y.ts"] = `export const y = 1;` - host.ReplaceFS(filesCopy) + err := host.FS().WriteFile("/home/projects/TS/p1/src/y.ts", `export const y = 1;`, false) + assert.NilError(t, err) + assert.NilError(t, service.OnWatchedFilesChanged(t.Context(), []*lsproto.FileEvent{ { Type: lsproto.FileChangeTypeCreated, @@ -602,9 +622,9 @@ func TestService(t *testing.T) { })) // Add a new file through failed lookup watch - filesCopy := maps.Clone(files) - filesCopy["/home/projects/TS/p1/src/z.ts"] = `export const z = 1;` - host.ReplaceFS(filesCopy) + err := host.FS().WriteFile("/home/projects/TS/p1/src/z.ts", `export const z = 1;`, false) + assert.NilError(t, err) + assert.NilError(t, service.OnWatchedFilesChanged(t.Context(), []*lsproto.FileEvent{ { Type: lsproto.FileChangeTypeCreated, @@ -638,9 +658,10 @@ func TestService(t *testing.T) { assert.Equal(t, len(program.GetSemanticDiagnostics(projecttestutil.WithRequestID(t.Context()), program.GetSourceFile("/home/projects/TS/p1/src/index.ts"))), 1) // Add a new file through wildcard watch - filesCopy := maps.Clone(files) - filesCopy["/home/projects/TS/p1/src/a.ts"] = `const a = 1;` - host.ReplaceFS(filesCopy) + + err := host.FS().WriteFile("/home/projects/TS/p1/src/a.ts", `const a = 1;`, false) + assert.NilError(t, err) + assert.NilError(t, service.OnWatchedFilesChanged(t.Context(), []*lsproto.FileEvent{ { Type: lsproto.FileChangeTypeCreated, diff --git a/internal/project/watch.go b/internal/project/watch.go index 9e24466bf8..d55f874d7a 100644 --- a/internal/project/watch.go +++ b/internal/project/watch.go @@ -44,30 +44,27 @@ func newWatchedFiles[T any]( } func (w *watchedFiles[T]) update(ctx context.Context, newData T) { - if updated, err := w.updateWorker(ctx, newData); err != nil { - w.p.Log(fmt.Sprintf("Failed to update %s watch: %v\n%s", w.watchType, err, formatFileList(w.globs, "\t", hr))) - } else if updated { - w.p.Logf("%s watches updated %s:\n%s", w.watchType, w.watcherID, formatFileList(w.globs, "\t", hr)) - } -} - -func (w *watchedFiles[T]) updateWorker(ctx context.Context, newData T) (updated bool, err error) { newGlobs := w.getGlobs(newData) + newGlobs = slices.Clone(newGlobs) + slices.Sort(newGlobs) + w.data = newData if slices.Equal(w.globs, newGlobs) { - return false, nil + return } w.globs = newGlobs if w.watcherID != "" { - if err = w.p.host.Client().UnwatchFiles(ctx, w.watcherID); err != nil { - return false, err + if err := w.p.host.Client().UnwatchFiles(ctx, w.watcherID); err != nil { + w.p.Log(fmt.Sprintf("%s:: Failed to unwatch %s watch: %s, err: %v newGlobs that are not updated: \n%s", w.p.name, w.watchType, w.watcherID, err, formatFileList(w.globs, "\t", hr))) + return } + w.p.Logf("%s:: %s watches unwatch %s", w.p.name, w.watchType, w.watcherID) } w.watcherID = "" if len(newGlobs) == 0 { - return true, nil + return } watchers := make([]*lsproto.FileSystemWatcher, 0, len(newGlobs)) @@ -81,14 +78,16 @@ func (w *watchedFiles[T]) updateWorker(ctx context.Context, newData T) (updated } watcherID, err := w.p.host.Client().WatchFiles(ctx, watchers) if err != nil { - return false, err + w.p.Log(fmt.Sprintf("%s:: Failed to update %s watch: %v\n%s", w.p.name, w.watchType, err, formatFileList(w.globs, "\t", hr))) + return } w.watcherID = watcherID - return true, nil + w.p.Logf("%s:: %s watches updated %s:\n%s", w.p.name, w.watchType, w.watcherID, formatFileList(w.globs, "\t", hr)) + return } func globMapperForTypingsInstaller(data map[tspath.Path]string) []string { - return slices.Sorted(maps.Values(data)) + return slices.AppendSeq(make([]string, 0, len(data)), maps.Values(data)) } func createResolutionLookupGlobMapper(host ProjectHost) func(data map[tspath.Path]string) []string { @@ -136,7 +135,6 @@ func createResolutionLookupGlobMapper(host ProjectHost) func(data map[tspath.Pat globs = append(globs, dir+"/"+fileGlobPattern) } } - slices.Sort(globs) timeTaken := time.Since(start) host.Log(fmt.Sprintf("createGlobMapper took %s to create %d globs for %d failed lookups", timeTaken, len(globs), len(data))) diff --git a/internal/scanner/scanner.go b/internal/scanner/scanner.go index d691bc08e1..4a79ca8d70 100644 --- a/internal/scanner/scanner.go +++ b/internal/scanner/scanner.go @@ -327,6 +327,13 @@ func (s *Scanner) ResetPos(pos int) { s.tokenStart = pos } +func (s *Scanner) ResetTokenState(pos int) { + s.ResetPos(pos) + s.token = ast.KindUnknown + s.tokenValue = "" + s.tokenFlags = ast.TokenFlagsNone +} + func (scanner *Scanner) SetSkipJSDocLeadingAsterisks(skip bool) { if skip { scanner.skipJSDocLeadingAsterisks += 1 @@ -1497,12 +1504,12 @@ func (s *Scanner) scanTemplateAndSetTokenValue(shouldEmitInvalidEscapeError bool startedWithBacktick := s.char() == '`' s.pos++ start := s.pos - contents := "" + b := strings.Builder{} var token ast.Kind for { ch := s.char() if ch < 0 || ch == '`' { - contents += s.text[start:s.pos] + b.WriteString(s.text[start:s.pos]) if ch == '`' { s.pos++ } else { @@ -1513,32 +1520,32 @@ func (s *Scanner) scanTemplateAndSetTokenValue(shouldEmitInvalidEscapeError bool break } if ch == '$' && s.charAt(1) == '{' { - contents += s.text[start:s.pos] + b.WriteString(s.text[start:s.pos]) s.pos += 2 token = core.IfElse(startedWithBacktick, ast.KindTemplateHead, ast.KindTemplateMiddle) break } if ch == '\\' { - contents += s.text[start:s.pos] - contents += s.scanEscapeSequence(EscapeSequenceScanningFlagsString | core.IfElse(shouldEmitInvalidEscapeError, EscapeSequenceScanningFlagsReportErrors, 0)) + b.WriteString(s.text[start:s.pos]) + b.WriteString(s.scanEscapeSequence(EscapeSequenceScanningFlagsString | core.IfElse(shouldEmitInvalidEscapeError, EscapeSequenceScanningFlagsReportErrors, 0))) start = s.pos continue } // Speculated ECMAScript 6 Spec 11.8.6.1: // and LineTerminatorSequences are normalized to for Template Values if ch == '\r' { - contents += s.text[start:s.pos] + b.WriteString(s.text[start:s.pos]) s.pos++ if s.char() == '\n' { s.pos++ } - contents += "\n" + b.WriteString("\n") start = s.pos continue } s.pos++ } - s.tokenValue = contents + s.tokenValue = b.String() return token } @@ -2086,13 +2093,14 @@ func SkipTriviaEx(text string, pos int, options *SkipTriviaOptions) int { options = &SkipTriviaOptions{} } + textLen := len(text) canConsumeStar := false // Keep in sync with couldStartTrivia for { ch, size := utf8.DecodeRuneInString(text[pos:]) switch ch { case '\r': - if text[pos+1] == '\n' { + if pos+1 < textLen && text[pos+1] == '\n' { pos++ } fallthrough @@ -2110,10 +2118,10 @@ func SkipTriviaEx(text string, pos int, options *SkipTriviaOptions) int { if options.StopAtComments { break } - if pos+1 < len(text) { + if pos+1 < textLen { if text[pos+1] == '/' { pos += 2 - for pos < len(text) { + for pos < textLen { ch, size := utf8.DecodeRuneInString(text[pos:]) if stringutil.IsLineBreak(ch) { break @@ -2125,8 +2133,8 @@ func SkipTriviaEx(text string, pos int, options *SkipTriviaOptions) int { } if text[pos+1] == '*' { pos += 2 - for pos < len(text) { - if text[pos] == '*' && text[pos+1] == '/' { + for pos < textLen { + if text[pos] == '*' && (pos+1 < textLen) && text[pos+1] == '/' { pos += 2 break } diff --git a/internal/testrunner/compiler_runner.go b/internal/testrunner/compiler_runner.go index f09a987296..c0a3f636f4 100644 --- a/internal/testrunner/compiler_runner.go +++ b/internal/testrunner/compiler_runner.go @@ -1,4 +1,4 @@ -package runner +package testrunner import ( "fmt" @@ -255,19 +255,19 @@ func newCompilerTest( units := testCaseContentWithConfig.testUnitData var toBeCompiled []*harnessutil.TestFile var otherFiles []*harnessutil.TestFile - var tsConfigOptions core.CompilerOptions + var tsConfig *tsoptions.ParsedCommandLine hasNonDtsFiles := core.Some( units, func(unit *testUnit) bool { return !tspath.FileExtensionIs(unit.name, tspath.ExtensionDts) }) var tsConfigFiles []*harnessutil.TestFile if testCaseContentWithConfig.tsConfig != nil { - tsConfigOptions = *testCaseContentWithConfig.tsConfig.ParsedConfig.CompilerOptions + tsConfig = testCaseContentWithConfig.tsConfig tsConfigFiles = []*harnessutil.TestFile{ createHarnessTestFile(testCaseContentWithConfig.tsConfigFileUnitData, currentDirectory), } for _, unit := range units { if slices.Contains( - testCaseContentWithConfig.tsConfig.ParsedConfig.FileNames, + tsConfig.ParsedConfig.FileNames, tspath.GetNormalizedAbsolutePath(unit.name, currentDirectory), ) { toBeCompiled = append(toBeCompiled, createHarnessTestFile(unit, currentDirectory)) @@ -303,7 +303,7 @@ func newCompilerTest( toBeCompiled, otherFiles, harnessConfig, - &tsConfigOptions, + tsConfig, currentDirectory, testCaseContentWithConfig.symlinks, ) @@ -344,6 +344,25 @@ func (c *compilerTest) verifyDiagnostics(t *testing.T, suiteName string, isSubmo Subfolder: suiteName, IsSubmodule: isSubmodule, IsSubmoduleAccepted: c.containsUnsupportedOptions(), + DiffFixupOld: func(old string) string { + var sb strings.Builder + sb.Grow(len(old)) + + for line := range strings.SplitSeq(old, "\n") { + const ( + relativePrefixNew = "==== " + relativePrefixOld = relativePrefixNew + "./" + ) + if rest, ok := strings.CutPrefix(line, relativePrefixOld); ok { + line = relativePrefixNew + rest + } + + sb.WriteString(line) + sb.WriteString("\n") + } + + return sb.String()[:sb.Len()-1] + }, }) }) } diff --git a/internal/testrunner/compiler_runner_test.go b/internal/testrunner/compiler_runner_test.go index 910e00b942..cfa7c4aca4 100644 --- a/internal/testrunner/compiler_runner_test.go +++ b/internal/testrunner/compiler_runner_test.go @@ -1,4 +1,4 @@ -package runner +package testrunner import ( "testing" diff --git a/internal/testrunner/runner.go b/internal/testrunner/runner.go index f50d4f98c2..1da212add7 100644 --- a/internal/testrunner/runner.go +++ b/internal/testrunner/runner.go @@ -1,4 +1,4 @@ -package runner +package testrunner import "testing" diff --git a/internal/testrunner/test_case_parser.go b/internal/testrunner/test_case_parser.go index 8bd1f20194..e22e35aab7 100644 --- a/internal/testrunner/test_case_parser.go +++ b/internal/testrunner/test_case_parser.go @@ -1,4 +1,4 @@ -package runner +package testrunner import ( "regexp" @@ -24,9 +24,8 @@ type rawCompilerSettings map[string]string // All the necessary information to turn a multi file test into useful units for later compilation type testUnit struct { - content string - name string - originalFilePath string + content string + name string } type testCaseContent struct { @@ -42,19 +41,87 @@ var optionRegex = regexp.MustCompile(`(?m)^\/{2}\s*@(\w+)\s*:\s*([^\r\n]*)`) // Regex for parsing @link option var linkRegex = regexp.MustCompile(`(?m)^\/{2}\s*@link\s*:\s*([^\r\n]*)\s*->\s*([^\r\n]*)`) +// File-specific directives used by fourslash tests +var fourslashDirectives = []string{"emitthisfile"} + // Given a test file containing // @FileName directives, // return an array of named units of code to be added to an existing compiler instance. func makeUnitsFromTest(code string, fileName string) testCaseContent { + testUnits, symlinks, currentDirectory, _ := ParseTestFilesAndSymlinks( + code, + fileName, + func(filename string, content string, fileOptions map[string]string) *testUnit { + return &testUnit{content: content, name: filename} + }, + ) + if currentDirectory == "" { + currentDirectory = srcFolder + } + + // unit tests always list files explicitly + allFiles := make(map[string]string) + for _, data := range testUnits { + allFiles[tspath.GetNormalizedAbsolutePath(data.name, currentDirectory)] = data.content + } + parseConfigHost := tsoptionstest.NewVFSParseConfigHost(allFiles, currentDirectory, true /*useCaseSensitiveFileNames*/) + + // check if project has tsconfig.json in the list of files + var tsConfig *tsoptions.ParsedCommandLine + var tsConfigFileUnitData *testUnit + for i, data := range testUnits { + if harnessutil.GetConfigNameFromFileName(data.name) != "" { + configFileName := tspath.GetNormalizedAbsolutePath(data.name, currentDirectory) + path := tspath.ToPath(data.name, parseConfigHost.GetCurrentDirectory(), parseConfigHost.Vfs.UseCaseSensitiveFileNames()) + configJson := parser.ParseJSONText(configFileName, path, data.content) + tsConfigSourceFile := &tsoptions.TsConfigSourceFile{ + SourceFile: configJson, + } + configDir := tspath.GetDirectoryPath(configFileName) + tsConfig = tsoptions.ParseJsonSourceFileConfigFileContent( + tsConfigSourceFile, + parseConfigHost, + configDir, + nil, /*existingOptions*/ + configFileName, + nil, /*resolutionStack*/ + nil, /*extraFileExtensions*/ + nil /*extendedConfigCache*/) + tsConfigFileUnitData = data + + // delete tsconfig file entry from the list + testUnits = slices.Delete(testUnits, i, i+1) + break + } + } + + return testCaseContent{ + testUnitData: testUnits, + tsConfig: tsConfig, + tsConfigFileUnitData: tsConfigFileUnitData, + symlinks: symlinks, + } +} + +// Given a test file containing // @FileName and // @symlink directives, +// return an array of named units of code to be added to an existing compiler instance, +// along with a map of symlinks and the current directory. +func ParseTestFilesAndSymlinks[T any]( + code string, + fileName string, + parseFile func(filename string, content string, fileOptions map[string]string) T, +) (units []T, symlinks map[string]string, currentDir string, globalOptions map[string]string) { // List of all the subfiles we've parsed out - var testUnits []*testUnit + var testUnits []T lines := lineDelimiter.Split(code, -1) // Stuff related to the subfile we're parsing var currentFileContent strings.Builder var currentFileName string - currentDirectory := srcFolder - symlinks := make(map[string]string) + var currentDirectory string + currentFileOptions := make(map[string]string) + symlinks = make(map[string]string) + globalOptions = make(map[string]string) for _, line := range lines { ok := parseSymlinkFromTest(line, symlinks) @@ -69,22 +136,30 @@ func makeUnitsFromTest(code string, fileName string) testCaseContent { currentDirectory = metaDataValue } if metaDataName != "filename" { + if slices.Contains(fourslashDirectives, metaDataName) { + // File-specific option + currentFileOptions[metaDataName] = metaDataValue + } else { + // Global option + if existingValue, ok := globalOptions[metaDataName]; ok && existingValue != metaDataValue { + // !!! This would break existing submodule tests + // panic("Duplicate global option: " + metaDataName) + } + globalOptions[metaDataName] = metaDataValue + } continue } // New metadata statement after having collected some code to go with the previous metadata if currentFileName != "" { // Store result file - newTestFile := &testUnit{ - content: currentFileContent.String(), - name: currentFileName, - originalFilePath: fileName, - } + newTestFile := parseFile(currentFileName, currentFileContent.String(), currentFileOptions) testUnits = append(testUnits, newTestFile) // Reset local data currentFileContent.Reset() currentFileName = metaDataValue + currentFileOptions = make(map[string]string) } else { // First metadata marker in the file currentFileName = strings.TrimSpace(testMetaData[2]) @@ -110,55 +185,10 @@ func makeUnitsFromTest(code string, fileName string) testCaseContent { } // EOF, push whatever remains - newTestFile2 := &testUnit{ - content: currentFileContent.String(), - name: currentFileName, - originalFilePath: fileName, - } + newTestFile2 := parseFile(currentFileName, currentFileContent.String(), currentFileOptions) testUnits = append(testUnits, newTestFile2) - // unit tests always list files explicitly - allFiles := make(map[string]string) - for _, data := range testUnits { - allFiles[tspath.GetNormalizedAbsolutePath(data.name, currentDirectory)] = data.content - } - parseConfigHost := tsoptionstest.NewVFSParseConfigHost(allFiles, currentDirectory, true /*useCaseSensitiveFileNames*/) - - // check if project has tsconfig.json in the list of files - var tsConfig *tsoptions.ParsedCommandLine - var tsConfigFileUnitData *testUnit - for i, data := range testUnits { - if harnessutil.GetConfigNameFromFileName(data.name) != "" { - configFileName := tspath.GetNormalizedAbsolutePath(data.name, currentDirectory) - path := tspath.ToPath(data.name, parseConfigHost.GetCurrentDirectory(), parseConfigHost.Vfs.UseCaseSensitiveFileNames()) - configJson := parser.ParseJSONText(configFileName, path, data.content) - tsConfigSourceFile := &tsoptions.TsConfigSourceFile{ - SourceFile: configJson, - } - configDir := tspath.GetDirectoryPath(configFileName) - tsConfig = tsoptions.ParseJsonSourceFileConfigFileContent( - tsConfigSourceFile, - parseConfigHost, - configDir, - nil, /*existingOptions*/ - configFileName, - nil, /*resolutionStack*/ - nil, /*extraFileExtensions*/ - nil /*extendedConfigCache*/) - tsConfigFileUnitData = data - - // delete tsconfig file entry from the list - testUnits = slices.Delete(testUnits, i, i+1) - break - } - } - - return testCaseContent{ - testUnitData: testUnits, - tsConfig: tsConfig, - tsConfigFileUnitData: tsConfigFileUnitData, - symlinks: symlinks, - } + return testUnits, symlinks, currentDirectory, globalOptions } func extractCompilerSettings(content string) rawCompilerSettings { diff --git a/internal/testrunner/test_case_parser_test.go b/internal/testrunner/test_case_parser_test.go index 0c211dc335..148061c771 100644 --- a/internal/testrunner/test_case_parser_test.go +++ b/internal/testrunner/test_case_parser_test.go @@ -1,4 +1,4 @@ -package runner +package testrunner import ( "testing" @@ -20,14 +20,12 @@ function bar() { return "b"; }` testUnit1 := &testUnit{ content: `function foo() { return "a"; } // normal comment`, - name: "firstFile.ts", - originalFilePath: "simpleTest.ts", + name: "firstFile.ts", } testUnit2 := &testUnit{ content: `// some other comment function bar() { return "b"; }`, - name: "secondFile.ts", - originalFilePath: "simpleTest.ts", + name: "secondFile.ts", } testContent := testCaseContent{ testUnitData: []*testUnit{testUnit1, testUnit2}, diff --git a/internal/testutil/harnessutil/harnessutil.go b/internal/testutil/harnessutil/harnessutil.go index 5831164e0a..7cc51ed90c 100644 --- a/internal/testutil/harnessutil/harnessutil.go +++ b/internal/testutil/harnessutil/harnessutil.go @@ -20,6 +20,7 @@ import ( "github.com/microsoft/typescript-go/internal/collections" "github.com/microsoft/typescript-go/internal/compiler" "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/outputpaths" "github.com/microsoft/typescript-go/internal/parser" "github.com/microsoft/typescript-go/internal/repo" "github.com/microsoft/typescript-go/internal/scanner" @@ -79,13 +80,13 @@ func CompileFiles( inputFiles []*TestFile, otherFiles []*TestFile, testConfig TestConfiguration, - tsconfigOptions *core.CompilerOptions, + tsconfig *tsoptions.ParsedCommandLine, currentDirectory string, symlinks map[string]string, ) *CompilationResult { var compilerOptions core.CompilerOptions - if tsconfigOptions != nil { - compilerOptions = *tsconfigOptions + if tsconfig != nil { + compilerOptions = *tsconfig.ParsedConfig.CompilerOptions } // Set default options for tests if compilerOptions.NewLine == core.NewLineKindNone { @@ -102,7 +103,7 @@ func CompileFiles( setOptionsFromTestConfig(t, testConfig, &compilerOptions, &harnessOptions) } - return CompileFilesEx(t, inputFiles, otherFiles, &harnessOptions, &compilerOptions, currentDirectory, symlinks) + return CompileFilesEx(t, inputFiles, otherFiles, &harnessOptions, &compilerOptions, currentDirectory, symlinks, tsconfig) } func CompileFilesEx( @@ -113,6 +114,7 @@ func CompileFilesEx( compilerOptions *core.CompilerOptions, currentDirectory string, symlinks map[string]string, + tsconfig *tsoptions.ParsedCommandLine, ) *CompilationResult { var programFileNames []string for _, file := range inputFiles { @@ -206,13 +208,26 @@ func CompileFilesEx( fs = NewOutputRecorderFS(fs) host := createCompilerHost(fs, bundled.LibPath(), compilerOptions, currentDirectory) - result := compileFilesWithHost(host, programFileNames, compilerOptions, harnessOptions) + var configFile *tsoptions.TsConfigSourceFile + var errors []*ast.Diagnostic + if tsconfig != nil { + configFile = tsconfig.ConfigFile + errors = tsconfig.Errors + } + result := compileFilesWithHost(host, &tsoptions.ParsedCommandLine{ + ParsedConfig: &core.ParsedOptions{ + CompilerOptions: compilerOptions, + FileNames: programFileNames, + }, + ConfigFile: configFile, + Errors: errors, + }, harnessOptions) result.Symlinks = symlinks result.Repeat = func(testConfig TestConfiguration) *CompilationResult { newHarnessOptions := *harnessOptions newCompilerOptions := *compilerOptions setOptionsFromTestConfig(t, testConfig, &newCompilerOptions, &newHarnessOptions) - return CompileFilesEx(t, inputFiles, otherFiles, &newHarnessOptions, &newCompilerOptions, currentDirectory, symlinks) + return CompileFilesEx(t, inputFiles, otherFiles, &newHarnessOptions, &newCompilerOptions, currentDirectory, symlinks, tsconfig) } return result } @@ -242,6 +257,23 @@ var testLibFolderMap = sync.OnceValue(func() map[string]any { return testfs }) +func SetCompilerOptionsFromTestConfig(t *testing.T, testConfig TestConfiguration, compilerOptions *core.CompilerOptions) { + for name, value := range testConfig { + if name == "typescriptversion" { + continue + } + + commandLineOption := getCommandLineOption(name) + if commandLineOption != nil { + parsedValue := getOptionValue(t, commandLineOption, value) + errors := tsoptions.ParseCompilerOptions(commandLineOption.Name, parsedValue, compilerOptions) + if len(errors) > 0 { + t.Fatalf("Error parsing value '%s' for compiler option '%s'.", value, commandLineOption.Name) + } + } + } +} + func setOptionsFromTestConfig(t *testing.T, testConfig TestConfiguration, compilerOptions *core.CompilerOptions, harnessOptions *HarnessOptions) { for name, value := range testConfig { if name == "typescriptversion" { @@ -435,28 +467,42 @@ type cachedCompilerHost struct { options *core.CompilerOptions } -var sourceFileCache collections.SyncMap[sourceFileCacheKey, *ast.SourceFile] +var sourceFileCache collections.SyncMap[SourceFileCacheKey, *ast.SourceFile] -type sourceFileCacheKey struct { +type SourceFileCacheKey struct { core.SourceFileAffectingCompilerOptions - ast.SourceFileMetaData fileName string path tspath.Path languageVersion core.ScriptTarget text string } -func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path, metadata *ast.SourceFileMetaData) *ast.SourceFile { - text, _ := h.FS().ReadFile(fileName) - sourceAffecting := h.options.SourceFileAffecting() - - key := sourceFileCacheKey{ - SourceFileAffectingCompilerOptions: *sourceAffecting, - SourceFileMetaData: *metadata, +func GetSourceFileCacheKey( + options core.SourceFileAffectingCompilerOptions, + fileName string, + path tspath.Path, + languageVersion core.ScriptTarget, + text string, +) SourceFileCacheKey { + return SourceFileCacheKey{ + SourceFileAffectingCompilerOptions: options, fileName: fileName, path: path, + languageVersion: languageVersion, text: text, } +} + +func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile { + text, _ := h.FS().ReadFile(fileName) + + key := GetSourceFileCacheKey( + *h.options.SourceFileAffecting(), + fileName, + path, + languageVersion, + text, + ) if cached, ok := sourceFileCache.Load(key); ok { return cached @@ -468,7 +514,7 @@ func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path, me sourceFile = parser.ParseJSONText(fileName, path, text) } else { // !!! JSDocParsingMode - sourceFile = parser.ParseSourceFile(fileName, path, text, sourceAffecting, metadata, scanner.JSDocParsingModeParseAll) + sourceFile = parser.ParseSourceFile(fileName, path, text, languageVersion, scanner.JSDocParsingModeParseAll) } result, _ := sourceFileCache.LoadOrStore(key, sourceFile) @@ -484,8 +530,7 @@ func createCompilerHost(fs vfs.FS, defaultLibraryPath string, options *core.Comp func compileFilesWithHost( host compiler.CompilerHost, - rootFiles []string, - options *core.CompilerOptions, + config *tsoptions.ParsedCommandLine, harnessOptions *HarnessOptions, ) *CompilationResult { // !!! @@ -544,17 +589,17 @@ func compileFilesWithHost( // ), // ] : postErrors; ctx := context.Background() - program := createProgram(host, options, rootFiles) + program := createProgram(host, config) var diagnostics []*ast.Diagnostic diagnostics = append(diagnostics, program.GetSyntacticDiagnostics(ctx, nil)...) diagnostics = append(diagnostics, program.GetSemanticDiagnostics(ctx, nil)...) diagnostics = append(diagnostics, program.GetGlobalDiagnostics(ctx)...) - if options.GetEmitDeclarations() { + if config.CompilerOptions().GetEmitDeclarations() { diagnostics = append(diagnostics, program.GetDeclarationDiagnostics(ctx, nil)...) } emitResult := program.Emit(compiler.EmitOptions{}) - return newCompilationResult(options, program, emitResult, diagnostics, harnessOptions) + return newCompilationResult(config.CompilerOptions(), program, emitResult, diagnostics, harnessOptions) } type CompilationResult struct { @@ -623,7 +668,7 @@ func newCompilationResult( input := &TestFile{UnitName: sourceFile.FileName(), Content: sourceFile.Text()} c.inputs = append(c.inputs, input) if !tspath.IsDeclarationFileName(sourceFile.FileName()) { - extname := core.GetOutputExtension(sourceFile.FileName(), options.Jsx) + extname := outputpaths.GetOutputExtension(sourceFile.FileName(), options.Jsx) outputs := &CompilationOutput{ Inputs: []*TestFile{input}, JS: js.GetOrZero(c.getOutputPath(sourceFile.FileName(), extname)), @@ -676,7 +721,7 @@ func (c *CompilationResult) getOutputPath(path string, ext string) string { if c.Options.OutFile != "" { /// !!! options.OutFile not yet supported } else { - path = tspath.ResolvePath(c.Program.Host().GetCurrentDirectory(), path) + path = tspath.ResolvePath(c.Program.GetCurrentDirectory(), path) var outDir string if ext == ".d.ts" || ext == ".d.mts" || ext == ".d.cts" || (strings.HasSuffix(ext, ".ts") && strings.Contains(ext, ".d.")) { outDir = c.Options.DeclarationDir @@ -690,10 +735,10 @@ func (c *CompilationResult) getOutputPath(path string, ext string) string { common := c.Program.CommonSourceDirectory() if common != "" { path = tspath.GetRelativePathFromDirectory(common, path, tspath.ComparePathsOptions{ - UseCaseSensitiveFileNames: c.Program.Host().FS().UseCaseSensitiveFileNames(), - CurrentDirectory: c.Program.Host().GetCurrentDirectory(), + UseCaseSensitiveFileNames: c.Program.UseCaseSensitiveFileNames(), + CurrentDirectory: c.Program.GetCurrentDirectory(), }) - path = tspath.CombinePaths(tspath.ResolvePath(c.Program.Host().GetCurrentDirectory(), c.Options.OutDir), path) + path = tspath.CombinePaths(tspath.ResolvePath(c.Program.GetCurrentDirectory(), c.Options.OutDir), path) } } } @@ -726,7 +771,7 @@ func (c *CompilationResult) Outputs() []*TestFile { } func (c *CompilationResult) GetInputsAndOutputsForFile(path string) *CompilationOutput { - return c.inputsAndOutputs.GetOrZero(tspath.ResolvePath(c.Program.Host().GetCurrentDirectory(), path)) + return c.inputsAndOutputs.GetOrZero(tspath.ResolvePath(c.Program.GetCurrentDirectory(), path)) } func (c *CompilationResult) GetInputsForFile(path string) []*TestFile { @@ -789,16 +834,15 @@ func (c *CompilationResult) GetSourceMapRecord() string { return sourceMapRecorder.String() } -func createProgram(host compiler.CompilerHost, options *core.CompilerOptions, rootFiles []string) *compiler.Program { +func createProgram(host compiler.CompilerHost, config *tsoptions.ParsedCommandLine) *compiler.Program { var singleThreaded core.Tristate if testutil.TestProgramIsSingleThreaded() { singleThreaded = core.TSTrue } programOptions := compiler.ProgramOptions{ - RootFiles: rootFiles, + Config: config, Host: host, - Options: options, SingleThreaded: singleThreaded, } program := compiler.NewProgram(programOptions) diff --git a/internal/testutil/parsetestutil/parsetestutil.go b/internal/testutil/parsetestutil/parsetestutil.go index 76833960d0..880459327a 100644 --- a/internal/testutil/parsetestutil/parsetestutil.go +++ b/internal/testutil/parsetestutil/parsetestutil.go @@ -12,14 +12,10 @@ import ( "github.com/microsoft/typescript-go/internal/tspath" ) -var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ - EmitScriptTarget: core.ScriptTargetLatest, -} - // Simplifies parsing an input string into a SourceFile for testing purposes. func ParseTypeScript(text string, jsx bool) *ast.SourceFile { fileName := core.IfElse(jsx, "/main.tsx", "/main.ts") - file := parser.ParseSourceFile(fileName, tspath.Path(fileName), text, parseCompilerOptions, nil, scanner.JSDocParsingModeParseNone) + file := parser.ParseSourceFile(fileName, tspath.Path(fileName), text, core.ScriptTargetESNext, scanner.JSDocParsingModeParseNone) ast.SetParentInChildren(file.AsNode()) return file } diff --git a/internal/testutil/projecttestutil/clientmock_generated.go b/internal/testutil/projecttestutil/clientmock_generated.go index a19433ac8a..fd2f922223 100644 --- a/internal/testutil/projecttestutil/clientmock_generated.go +++ b/internal/testutil/projecttestutil/clientmock_generated.go @@ -84,9 +84,7 @@ func (mock *ClientMock) RefreshDiagnostics(ctx context.Context) error { mock.calls.RefreshDiagnostics = append(mock.calls.RefreshDiagnostics, callInfo) mock.lockRefreshDiagnostics.Unlock() if mock.RefreshDiagnosticsFunc == nil { - var ( - errOut error - ) + var errOut error return errOut } return mock.RefreshDiagnosticsFunc(ctx) @@ -121,9 +119,7 @@ func (mock *ClientMock) UnwatchFiles(ctx context.Context, handle project.Watcher mock.calls.UnwatchFiles = append(mock.calls.UnwatchFiles, callInfo) mock.lockUnwatchFiles.Unlock() if mock.UnwatchFilesFunc == nil { - var ( - errOut error - ) + var errOut error return errOut } return mock.UnwatchFilesFunc(ctx, handle) diff --git a/internal/testutil/projecttestutil/projecttestutil.go b/internal/testutil/projecttestutil/projecttestutil.go index bf6edf7072..204dee8d9e 100644 --- a/internal/testutil/projecttestutil/projecttestutil.go +++ b/internal/testutil/projecttestutil/projecttestutil.go @@ -7,9 +7,11 @@ import ( "slices" "strings" "sync" + "sync/atomic" "github.com/microsoft/typescript-go/internal/bundled" "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/lsp/lsproto" "github.com/microsoft/typescript-go/internal/project" "github.com/microsoft/typescript-go/internal/tspath" "github.com/microsoft/typescript-go/internal/vfs" @@ -17,10 +19,12 @@ import ( ) //go:generate go tool github.com/matryer/moq -stub -fmt goimports -pkg projecttestutil -out clientmock_generated.go ../../project Client +//go:generate go tool mvdan.cc/gofumpt -lang=go1.24 -w clientmock_generated.go type TestTypingsInstallerOptions struct { - TypesRegistry []string - PackageToFile map[string]string + TypesRegistry []string + PackageToFile map[string]string + CheckBeforeNpmInstall func(cwd string, npmInstallArgs []string) } type TestTypingsInstaller struct { @@ -35,7 +39,7 @@ type ProjectServiceHost struct { output strings.Builder logger *project.Logger ClientMock *ClientMock - testOptions *TestTypingsInstallerOptions + TestOptions *TestTypingsInstallerOptions ServiceOptions *project.ServiceOptions } @@ -80,16 +84,12 @@ func (p *ProjectServiceHost) Client() project.Client { return p.ClientMock } -func (p *ProjectServiceHost) ReplaceFS(files map[string]any) { - p.fs = bundled.WrapFS(vfstest.FromMap(files, false /*useCaseSensitiveFileNames*/)) -} - var _ project.ServiceHost = (*ProjectServiceHost)(nil) func Setup(files map[string]any, testOptions *TestTypingsInstaller) (*project.Service, *ProjectServiceHost) { host := newProjectServiceHost(files) if testOptions != nil { - host.testOptions = &testOptions.TestTypingsInstallerOptions + host.TestOptions = &testOptions.TestTypingsInstallerOptions } var throttleLimit int if testOptions != nil && testOptions.ThrottleLimit != 0 { @@ -112,7 +112,7 @@ func Setup(files map[string]any, testOptions *TestTypingsInstaller) (*project.Se } func (p *ProjectServiceHost) NpmInstall(cwd string, npmInstallArgs []string) ([]byte, error) { - if p.testOptions == nil { + if p.TestOptions == nil { return nil, nil } @@ -127,10 +127,14 @@ func (p *ProjectServiceHost) NpmInstall(cwd string, npmInstallArgs []string) ([] return nil, err } + if p.TestOptions.CheckBeforeNpmInstall != nil { + p.TestOptions.CheckBeforeNpmInstall(cwd, npmInstallArgs) + } + for _, atTypesPackageTs := range npmInstallArgs[2 : lenNpmInstallArgs-2] { // @types/packageName@TsVersionToUse packageName := atTypesPackageTs[7 : len(atTypesPackageTs)-len(project.TsVersionToUse)-1] - content, ok := p.testOptions.PackageToFile[packageName] + content, ok := p.TestOptions.PackageToFile[packageName] if !ok { return nil, fmt.Errorf("content not provided for %s", packageName) } @@ -187,12 +191,12 @@ func TypesRegistryConfig() map[string]string { func (p *ProjectServiceHost) createTypesRegistryFileContent() string { var builder strings.Builder builder.WriteString("{\n \"entries\": {") - for index, entry := range p.testOptions.TypesRegistry { + for index, entry := range p.TestOptions.TypesRegistry { appendTypesRegistryConfig(&builder, index, entry) } - index := len(p.testOptions.TypesRegistry) - for key := range p.testOptions.PackageToFile { - if !slices.Contains(p.testOptions.TypesRegistry, key) { + index := len(p.TestOptions.TypesRegistry) + for key := range p.TestOptions.PackageToFile { + if !slices.Contains(p.TestOptions.TypesRegistry, key) { appendTypesRegistryConfig(&builder, index, key) index++ } @@ -215,6 +219,10 @@ func newProjectServiceHost(files map[string]any) *ProjectServiceHost { defaultLibraryPath: bundled.LibPath(), ClientMock: &ClientMock{}, } + var watchCount atomic.Uint32 + host.ClientMock.WatchFilesFunc = func(_ context.Context, _ []*lsproto.FileSystemWatcher) (project.WatcherHandle, error) { + return project.WatcherHandle(fmt.Sprintf("#%d", watchCount.Add(1))), nil + } host.logger = project.NewLogger([]io.Writer{&host.output}, "", project.LogLevelVerbose) return host } diff --git a/internal/testutil/tsbaseline/js_emit_baseline.go b/internal/testutil/tsbaseline/js_emit_baseline.go index e542c51fa8..02e41c011d 100644 --- a/internal/testutil/tsbaseline/js_emit_baseline.go +++ b/internal/testutil/tsbaseline/js_emit_baseline.go @@ -65,10 +65,8 @@ func DoJSEmitBaseline( file.UnitName, tspath.Path(file.UnitName), file.Content, - options.SourceFileAffecting(), - nil, // TODO(jakebailey): what should this be? - scanner.JSDocParsingModeParseAll, - ) + options.GetEmitScriptTarget(), + scanner.JSDocParsingModeParseAll) if len(fileParseResult.Diagnostics()) > 0 { jsCode.WriteString(getErrorBaseline(t, []*harnessutil.TestFile{file}, fileParseResult.Diagnostics(), false /*pretty*/)) continue @@ -218,7 +216,7 @@ func prepareDeclarationCompilationContext( ////outFile := options.OutFile; ////if len(outFile) == 0 { if len(options.OutDir) != 0 { - sourceFilePath := tspath.GetNormalizedAbsolutePath(sourceFile.FileName(), result.Program.Host().GetCurrentDirectory()) + sourceFilePath := tspath.GetNormalizedAbsolutePath(sourceFile.FileName(), result.Program.GetCurrentDirectory()) sourceFilePath = strings.Replace(sourceFilePath, result.Program.CommonSourceDirectory(), "", 1) sourceFileName = tspath.CombinePaths(options.OutDir, sourceFilePath) } else { @@ -283,7 +281,8 @@ func compileDeclarationFiles(t *testing.T, context *declarationCompilationContex context.harnessSettings, context.options, context.currentDirectory, - symlinks) + symlinks, + nil) return &declarationCompilationResult{ context.declInputFiles, context.declOtherFiles, diff --git a/internal/testutil/tsbaseline/type_symbol_baseline.go b/internal/testutil/tsbaseline/type_symbol_baseline.go index aa676056e6..20ae35c4af 100644 --- a/internal/testutil/tsbaseline/type_symbol_baseline.go +++ b/internal/testutil/tsbaseline/type_symbol_baseline.go @@ -81,6 +81,14 @@ func DoTypeAndSymbolBaseline( } } + const ( + relativePrefixNew = "=== " + relativePrefixOld = relativePrefixNew + "./" + ) + if rest, ok := strings.CutPrefix(line, relativePrefixOld); ok { + line = relativePrefixNew + rest + } + sb.WriteString(line) sb.WriteString("\n") } @@ -338,6 +346,8 @@ func (walker *typeWriterWalker) writeTypeOrSymbol(node *ast.Node, isSymbolWalk b fileChecker, done := walker.getTypeCheckerForCurrentFile() defer done() + ctx := printer.NewEmitContext() + if !isSymbolWalk { // Don't try to get the type of something that's already a type. // Exception for `T` in `type T = something` because that may evaluate to some interesting type. @@ -374,7 +384,7 @@ func (walker *typeWriterWalker) writeTypeOrSymbol(node *ast.Node, isSymbolWalk b !isIntrinsicJsxTag(node, walker.currentSourceFile) { typeString = t.AsIntrinsicType().IntrinsicName() } else { - ctx := printer.NewEmitContext() + ctx.Reset() builder := checker.NewNodeBuilder(fileChecker, ctx) typeFormatFlags := checker.TypeFormatFlagsNoTruncation | checker.TypeFormatFlagsAllowUniqueESSymbolType | checker.TypeFormatFlagsGenerateNamesForShadowedTypeParams typeNode := builder.TypeToTypeNode(t, node.Parent, nodebuilder.Flags(typeFormatFlags&checker.TypeFormatFlagsNodeBuilderFlagsMask)|nodebuilder.FlagsIgnoreErrors, nodebuilder.InternalFlagsAllowUnresolvedNames, nil) @@ -406,7 +416,7 @@ func (walker *typeWriterWalker) writeTypeOrSymbol(node *ast.Node, isSymbolWalk b var symbolString strings.Builder symbolString.Grow(256) symbolString.WriteString("Symbol(") - symbolString.WriteString(fileChecker.SymbolToString(symbol)) + symbolString.WriteString(strings.ReplaceAll(fileChecker.SymbolToString(symbol), ast.InternalSymbolNamePrefix, "__")) count := 0 for _, declaration := range symbol.Declarations { if count >= 5 { diff --git a/internal/transformers/commonjsmodule.go b/internal/transformers/commonjsmodule.go index 90a876db1d..61a30189ac 100644 --- a/internal/transformers/commonjsmodule.go +++ b/internal/transformers/commonjsmodule.go @@ -12,25 +12,26 @@ import ( type CommonJSModuleTransformer struct { Transformer - topLevelVisitor *ast.NodeVisitor // visits statements at top level of a module - topLevelNestedVisitor *ast.NodeVisitor // visits nested statements at top level of a module - discardedValueVisitor *ast.NodeVisitor // visits expressions whose values would be discarded at runtime - assignmentPatternVisitor *ast.NodeVisitor // visits assignment patterns in a destructuring assignment - compilerOptions *core.CompilerOptions - resolver binder.ReferenceResolver - moduleKind core.ModuleKind - languageVersion core.ScriptTarget - currentSourceFile *ast.SourceFile - currentModuleInfo *externalModuleInfo - parentNode *ast.Node // used for ancestor tracking via pushNode/popNode to detect expression identifiers - currentNode *ast.Node // used for ancestor tracking via pushNode/popNode to detect expression identifiers -} - -func NewCommonJSModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver) *Transformer { + topLevelVisitor *ast.NodeVisitor // visits statements at top level of a module + topLevelNestedVisitor *ast.NodeVisitor // visits nested statements at top level of a module + discardedValueVisitor *ast.NodeVisitor // visits expressions whose values would be discarded at runtime + assignmentPatternVisitor *ast.NodeVisitor // visits assignment patterns in a destructuring assignment + compilerOptions *core.CompilerOptions + resolver binder.ReferenceResolver + getEmitModuleFormatOfFile func(file ast.HasFileName) core.ModuleKind + moduleKind core.ModuleKind + languageVersion core.ScriptTarget + currentSourceFile *ast.SourceFile + currentModuleInfo *externalModuleInfo + parentNode *ast.Node // used for ancestor tracking via pushNode/popNode to detect expression identifiers + currentNode *ast.Node // used for ancestor tracking via pushNode/popNode to detect expression identifiers +} + +func NewCommonJSModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver, getEmitModuleFormatOfFile func(file ast.HasFileName) core.ModuleKind) *Transformer { if resolver == nil { resolver = binder.NewReferenceResolver(compilerOptions, binder.ReferenceResolverHooks{}) } - tx := &CommonJSModuleTransformer{compilerOptions: compilerOptions, resolver: resolver} + tx := &CommonJSModuleTransformer{compilerOptions: compilerOptions, resolver: resolver, getEmitModuleFormatOfFile: getEmitModuleFormatOfFile} tx.topLevelVisitor = emitContext.NewNodeVisitor(tx.visitTopLevel) tx.topLevelNestedVisitor = emitContext.NewNodeVisitor(tx.visitTopLevelNested) tx.discardedValueVisitor = emitContext.NewNodeVisitor(tx.visitDiscardedValue) @@ -362,7 +363,7 @@ func (tx *CommonJSModuleTransformer) transformCommonJSModule(node *ast.SourceFil result := tx.factory.UpdateSourceFile(node, statementList).AsSourceFile() tx.emitContext.AddEmitHelper(result.AsNode(), tx.emitContext.ReadEmitHelpers()...) - externalHelpersImportDeclaration := createExternalHelpersImportDeclarationIfNeeded(tx.emitContext, result, tx.compilerOptions, false /*hasExportStarsToExportValues*/, false /*hasImportStar*/, false /*hasImportDefault*/) + externalHelpersImportDeclaration := createExternalHelpersImportDeclarationIfNeeded(tx.emitContext, result, tx.compilerOptions, tx.getEmitModuleFormatOfFile(node), false /*hasExportStarsToExportValues*/, false /*hasImportStar*/, false /*hasImportDefault*/) if externalHelpersImportDeclaration != nil { prologue, rest := tx.factory.SplitStandardPrologue(result.Statements.Nodes) custom, rest := tx.factory.SplitCustomPrologue(rest) @@ -1669,8 +1670,7 @@ func (tx *CommonJSModuleTransformer) visitCallExpression(node *ast.CallExpressio } func (tx *CommonJSModuleTransformer) shouldTransformImportCall() bool { - // !!! host.shouldTransformImportCall? - return shouldTransformImportCallWorker(tx.currentSourceFile, tx.compilerOptions) + return ast.ShouldTransformImportCall(tx.currentSourceFile.FileName(), tx.compilerOptions, tx.getEmitModuleFormatOfFile(tx.currentSourceFile)) } func (tx *CommonJSModuleTransformer) visitImportCallExpression(node *ast.CallExpression, rewriteOrShim bool) *ast.Node { @@ -1987,11 +1987,3 @@ func (tx *CommonJSModuleTransformer) getExports(name *ast.IdentifierNode) []*ast } return nil } - -func shouldTransformImportCallWorker(sourceFile *ast.SourceFile, options *core.CompilerOptions) bool { - moduleKind := options.GetEmitModuleKind() - if core.ModuleKindNode16 <= moduleKind && moduleKind <= core.ModuleKindNodeNext || moduleKind == core.ModuleKindPreserve { - return false - } - return ast.GetEmitModuleFormatOfFileWorker(sourceFile, options) < core.ModuleKindES2015 -} diff --git a/internal/transformers/commonjsmodule_test.go b/internal/transformers/commonjsmodule_test.go index c36b885079..045876f1c6 100644 --- a/internal/transformers/commonjsmodule_test.go +++ b/internal/transformers/commonjsmodule_test.go @@ -11,6 +11,10 @@ import ( "github.com/microsoft/typescript-go/internal/testutil/parsetestutil" ) +func fakeGetEmitModuleFormatOfFile(file ast.HasFileName) core.ModuleKind { + return core.ModuleKindNone +} + func TestCommonJSModuleTransformer(t *testing.T) { t.Parallel() data := []struct { @@ -1030,7 +1034,7 @@ exports.a = a;`, resolver := binder.NewReferenceResolver(&compilerOptions, binder.ReferenceResolverHooks{}) file = NewRuntimeSyntaxTransformer(emitContext, &compilerOptions, resolver).TransformSourceFile(file) - file = NewCommonJSModuleTransformer(emitContext, &compilerOptions, resolver).TransformSourceFile(file) + file = NewCommonJSModuleTransformer(emitContext, &compilerOptions, resolver, fakeGetEmitModuleFormatOfFile).TransformSourceFile(file) emittestutil.CheckEmit(t, emitContext, file, rec.output) }) } diff --git a/internal/transformers/declarations/transform.go b/internal/transformers/declarations/transform.go index a8aa849ce4..03010c2801 100644 --- a/internal/transformers/declarations/transform.go +++ b/internal/transformers/declarations/transform.go @@ -478,7 +478,7 @@ func (tx *DeclarationTransformer) visitDeclarationSubtree(input *ast.Node) *ast. case ast.KindJSDocTypeLiteral: result = tx.transformJSDocTypeLiteral(input.AsJSDocTypeLiteral()) case ast.KindJSDocPropertyTag: - result = tx.transformJSDocPropertyTag(input.AsJSDocPropertyTag()) + result = tx.transformJSDocPropertyTag(input.AsJSDocParameterOrPropertyTag()) case ast.KindJSDocAllType: result = tx.transformJSDocAllType(input.AsJSDocAllType()) case ast.KindJSDocNullableType: diff --git a/internal/transformers/esmodule.go b/internal/transformers/esmodule.go index 39000dbd1e..a10247abdb 100644 --- a/internal/transformers/esmodule.go +++ b/internal/transformers/esmodule.go @@ -11,11 +11,12 @@ import ( type ESModuleTransformer struct { Transformer - compilerOptions *core.CompilerOptions - resolver binder.ReferenceResolver - currentSourceFile *ast.SourceFile - importRequireStatements *importRequireStatements - helperNameSubstitutions map[string]*ast.IdentifierNode + compilerOptions *core.CompilerOptions + resolver binder.ReferenceResolver + getEmitModuleFormatOfFile func(file ast.HasFileName) core.ModuleKind + currentSourceFile *ast.SourceFile + importRequireStatements *importRequireStatements + helperNameSubstitutions map[string]*ast.IdentifierNode } type importRequireStatements struct { @@ -23,11 +24,11 @@ type importRequireStatements struct { requireHelperName *ast.IdentifierNode } -func NewESModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver) *Transformer { +func NewESModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver, getEmitModuleFormatOfFile func(file ast.HasFileName) core.ModuleKind) *Transformer { if resolver == nil { resolver = binder.NewReferenceResolver(compilerOptions, binder.ReferenceResolverHooks{}) } - tx := &ESModuleTransformer{compilerOptions: compilerOptions, resolver: resolver} + tx := &ESModuleTransformer{compilerOptions: compilerOptions, resolver: resolver, getEmitModuleFormatOfFile: getEmitModuleFormatOfFile} return tx.NewTransformer(tx.visit, emitContext) } @@ -64,7 +65,7 @@ func (tx *ESModuleTransformer) visitSourceFile(node *ast.SourceFile) *ast.Node { result := tx.visitor.VisitEachChild(node.AsNode()).AsSourceFile() tx.emitContext.AddEmitHelper(result.AsNode(), tx.emitContext.ReadEmitHelpers()...) - externalHelpersImportDeclaration := createExternalHelpersImportDeclarationIfNeeded(tx.emitContext, result, tx.compilerOptions, false /*hasExportStarsToExportValues*/, false /*hasImportStar*/, false /*hasImportDefault*/) + externalHelpersImportDeclaration := createExternalHelpersImportDeclarationIfNeeded(tx.emitContext, result, tx.compilerOptions, tx.getEmitModuleFormatOfFile(node), false /*hasExportStarsToExportValues*/, false /*hasImportStar*/, false /*hasImportDefault*/) if externalHelpersImportDeclaration != nil || tx.importRequireStatements != nil { prologue, rest := tx.factory.SplitStandardPrologue(result.Statements.Nodes) statements := slices.Clone(prologue) diff --git a/internal/transformers/esmodule_test.go b/internal/transformers/esmodule_test.go index f8b8d0d085..2e71653bc5 100644 --- a/internal/transformers/esmodule_test.go +++ b/internal/transformers/esmodule_test.go @@ -234,8 +234,9 @@ var __rewriteRelativeImportExtension;`, emitContext := printer.NewEmitContext() resolver := binder.NewReferenceResolver(&compilerOptions, binder.ReferenceResolverHooks{}) + file = NewRuntimeSyntaxTransformer(emitContext, &compilerOptions, resolver).TransformSourceFile(file) - file = NewESModuleTransformer(emitContext, &compilerOptions, resolver).TransformSourceFile(file) + file = NewESModuleTransformer(emitContext, &compilerOptions, resolver, fakeGetEmitModuleFormatOfFile).TransformSourceFile(file) emittestutil.CheckEmit(t, emitContext, file, rec.output) }) } diff --git a/internal/transformers/externalmoduleinfo.go b/internal/transformers/externalmoduleinfo.go index 9f7a8059df..927d7873dd 100644 --- a/internal/transformers/externalmoduleinfo.go +++ b/internal/transformers/externalmoduleinfo.go @@ -246,15 +246,24 @@ func (c *externalModuleInfoCollector) collectExportedVariableInfo(decl *ast.Node const externalHelpersModuleNameText = "tslib" -func createExternalHelpersImportDeclarationIfNeeded(emitContext *printer.EmitContext, sourceFile *ast.SourceFile, compilerOptions *core.CompilerOptions, hasExportStarsToExportValues bool, hasImportStar bool, hasImportDefault bool) *ast.Node /*ImportDeclaration | ImportEqualsDeclaration*/ { +func createExternalHelpersImportDeclarationIfNeeded(emitContext *printer.EmitContext, sourceFile *ast.SourceFile, compilerOptions *core.CompilerOptions, fileModuleKind core.ModuleKind, hasExportStarsToExportValues bool, hasImportStar bool, hasImportDefault bool) *ast.Node /*ImportDeclaration | ImportEqualsDeclaration*/ { if compilerOptions.ImportHelpers.IsTrue() && ast.IsEffectiveExternalModule(sourceFile, compilerOptions) { moduleKind := compilerOptions.GetEmitModuleKind() - // TODO(jakebailey): we've already done this; maybe save in the source file? - impliedModuleKind := ast.GetImpliedNodeFormatForEmitWorker(sourceFile, moduleKind) helpers := getImportedHelpers(emitContext, sourceFile) - if (moduleKind >= core.ModuleKindES2015 && moduleKind <= core.ModuleKindESNext) || - impliedModuleKind == core.ModuleKindESNext || - impliedModuleKind == core.ModuleKindNone && moduleKind == core.ModuleKindPreserve { + if fileModuleKind == core.ModuleKindCommonJS || fileModuleKind == core.ModuleKindNone && moduleKind == core.ModuleKindCommonJS { + // When we emit to a non-ES module, generate a synthetic `import tslib = require("tslib")` to be further transformed. + externalHelpersModuleName := getOrCreateExternalHelpersModuleNameIfNeeded(emitContext, sourceFile, compilerOptions, helpers, hasExportStarsToExportValues, hasImportStar || hasImportDefault, fileModuleKind) + if externalHelpersModuleName != nil { + externalHelpersImportDeclaration := emitContext.Factory.NewImportEqualsDeclaration( + nil, /*modifiers*/ + false, /*isTypeOnly*/ + externalHelpersModuleName, + emitContext.Factory.NewExternalModuleReference(emitContext.Factory.NewStringLiteral(externalHelpersModuleNameText)), + ) + emitContext.AddEmitFlags(externalHelpersImportDeclaration, printer.EFNeverApplyImportHelper|printer.EFCustomPrologue) + return externalHelpersImportDeclaration + } + } else { // When we emit as an ES module, generate an `import` declaration that uses named imports for helpers. // If we cannot determine the implied module kind under `module: preserve` we assume ESM. var helperNames []string @@ -287,19 +296,6 @@ func createExternalHelpersImportDeclarationIfNeeded(emitContext *printer.EmitCon nil, /*attributes*/ ) - emitContext.AddEmitFlags(externalHelpersImportDeclaration, printer.EFNeverApplyImportHelper|printer.EFCustomPrologue) - return externalHelpersImportDeclaration - } - } else { - // When we emit to a non-ES module, generate a synthetic `import tslib = require("tslib")` to be further transformed. - externalHelpersModuleName := getOrCreateExternalHelpersModuleNameIfNeeded(emitContext, sourceFile, compilerOptions, helpers, hasExportStarsToExportValues, hasImportStar || hasImportDefault) - if externalHelpersModuleName != nil { - externalHelpersImportDeclaration := emitContext.Factory.NewImportEqualsDeclaration( - nil, /*modifiers*/ - false, /*isTypeOnly*/ - externalHelpersModuleName, - emitContext.Factory.NewExternalModuleReference(emitContext.Factory.NewStringLiteral(externalHelpersModuleNameText)), - ) emitContext.AddEmitFlags(externalHelpersImportDeclaration, printer.EFNeverApplyImportHelper|printer.EFCustomPrologue) return externalHelpersImportDeclaration } @@ -318,7 +314,7 @@ func getImportedHelpers(emitContext *printer.EmitContext, sourceFile *ast.Source return helpers } -func getOrCreateExternalHelpersModuleNameIfNeeded(emitContext *printer.EmitContext, node *ast.SourceFile, compilerOptions *core.CompilerOptions, helpers []*printer.EmitHelper, hasExportStarsToExportValues bool, hasImportStarOrImportDefault bool) *ast.IdentifierNode { +func getOrCreateExternalHelpersModuleNameIfNeeded(emitContext *printer.EmitContext, node *ast.SourceFile, compilerOptions *core.CompilerOptions, helpers []*printer.EmitHelper, hasExportStarsToExportValues bool, hasImportStarOrImportDefault bool, fileModuleKind core.ModuleKind) *ast.IdentifierNode { externalHelpersModuleName := emitContext.GetExternalHelpersModuleName(node) if externalHelpersModuleName != nil { return externalHelpersModuleName @@ -326,7 +322,7 @@ func getOrCreateExternalHelpersModuleNameIfNeeded(emitContext *printer.EmitConte create := len(helpers) > 0 || (hasExportStarsToExportValues || compilerOptions.GetESModuleInterop() && hasImportStarOrImportDefault) && - ast.GetEmitModuleFormatOfFileWorker(node, compilerOptions) < core.ModuleKindSystem + fileModuleKind < core.ModuleKindSystem if create { externalHelpersModuleName = emitContext.Factory.NewUniqueName(externalHelpersModuleNameText) diff --git a/internal/transformers/impliedmodule.go b/internal/transformers/impliedmodule.go index df50386396..0ace66e810 100644 --- a/internal/transformers/impliedmodule.go +++ b/internal/transformers/impliedmodule.go @@ -9,17 +9,18 @@ import ( type ImpliedModuleTransformer struct { Transformer - compilerOptions *core.CompilerOptions - resolver binder.ReferenceResolver - cjsTransformer *Transformer - esmTransformer *Transformer + compilerOptions *core.CompilerOptions + resolver binder.ReferenceResolver + getEmitModuleFormatOfFile func(file ast.HasFileName) core.ModuleKind + cjsTransformer *Transformer + esmTransformer *Transformer } -func NewImpliedModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver) *Transformer { +func NewImpliedModuleTransformer(emitContext *printer.EmitContext, compilerOptions *core.CompilerOptions, resolver binder.ReferenceResolver, getEmitModuleFormatOfFile func(file ast.HasFileName) core.ModuleKind) *Transformer { if resolver == nil { resolver = binder.NewReferenceResolver(compilerOptions, binder.ReferenceResolverHooks{}) } - tx := &ImpliedModuleTransformer{compilerOptions: compilerOptions, resolver: resolver} + tx := &ImpliedModuleTransformer{compilerOptions: compilerOptions, resolver: resolver, getEmitModuleFormatOfFile: getEmitModuleFormatOfFile} return tx.NewTransformer(tx.visit, emitContext) } @@ -41,21 +42,15 @@ func (tx *ImpliedModuleTransformer) visitSourceFile(node *ast.SourceFile) *ast.N var transformer *Transformer if format >= core.ModuleKindES2015 { if tx.esmTransformer == nil { - tx.esmTransformer = NewESModuleTransformer(tx.emitContext, tx.compilerOptions, tx.resolver) + tx.esmTransformer = NewESModuleTransformer(tx.emitContext, tx.compilerOptions, tx.resolver, tx.getEmitModuleFormatOfFile) } transformer = tx.esmTransformer } else { if tx.cjsTransformer == nil { - tx.cjsTransformer = NewCommonJSModuleTransformer(tx.emitContext, tx.compilerOptions, tx.resolver) + tx.cjsTransformer = NewCommonJSModuleTransformer(tx.emitContext, tx.compilerOptions, tx.resolver, tx.getEmitModuleFormatOfFile) } transformer = tx.cjsTransformer } return transformer.TransformSourceFile(node).AsNode() } - -func (tx *ImpliedModuleTransformer) getEmitModuleFormatOfFile(node *ast.SourceFile) core.ModuleKind { - // !!! host.getEmitModuleFormatOfFile? - // TODO(jakebailey): inline - return ast.GetEmitModuleFormatOfFileWorker(node, tx.compilerOptions) -} diff --git a/internal/transformers/importelision_test.go b/internal/transformers/importelision_test.go index 3a7ae35730..63b12b8c89 100644 --- a/internal/transformers/importelision_test.go +++ b/internal/transformers/importelision_test.go @@ -19,12 +19,26 @@ type fakeProgram struct { singleThreaded bool compilerOptions *core.CompilerOptions files []*ast.SourceFile - getEmitModuleFormatOfFile func(sourceFile *ast.SourceFile) core.ModuleKind - getImpliedNodeFormatForEmit func(sourceFile *ast.SourceFile) core.ModuleKind - getResolvedModule func(currentSourceFile *ast.SourceFile, moduleReference string, mode core.ResolutionMode) *module.ResolvedModule + getEmitModuleFormatOfFile func(sourceFile ast.HasFileName) core.ModuleKind + getImpliedNodeFormatForEmit func(sourceFile ast.HasFileName) core.ModuleKind + getResolvedModule func(currentSourceFile ast.HasFileName, moduleReference string, mode core.ResolutionMode) *module.ResolvedModule getSourceFile func(FileName string) *ast.SourceFile } +// GetEmitSyntaxForUsageLocation implements checker.Program. +func (p *fakeProgram) GetEmitSyntaxForUsageLocation(sourceFile ast.HasFileName, usageLocation *ast.StringLiteralLike) core.ResolutionMode { + panic("unimplemented") +} + +// CommonSourceDirectory implements checker.Program. +func (p *fakeProgram) CommonSourceDirectory() string { + panic("unimplemented") +} + +func (p *fakeProgram) GetResolvedModuleFromModuleSpecifier(file ast.HasFileName, moduleSpecifier *ast.StringLiteralLike) *module.ResolvedModule { + panic("unimplemented") +} + func (p *fakeProgram) FileExists(path string) bool { return false } @@ -81,23 +95,23 @@ func (p *fakeProgram) BindSourceFiles() { wg.RunAndWait() } -func (p *fakeProgram) GetEmitModuleFormatOfFile(sourceFile *ast.SourceFile) core.ModuleKind { +func (p *fakeProgram) GetEmitModuleFormatOfFile(sourceFile ast.HasFileName) core.ModuleKind { return p.getEmitModuleFormatOfFile(sourceFile) } -func (p *fakeProgram) GetImpliedNodeFormatForEmit(sourceFile *ast.SourceFile) core.ModuleKind { +func (p *fakeProgram) GetImpliedNodeFormatForEmit(sourceFile ast.HasFileName) core.ModuleKind { return p.getImpliedNodeFormatForEmit(sourceFile) } -func (p *fakeProgram) GetDefaultResolutionModeForFile(sourceFile *ast.SourceFile) core.ResolutionMode { +func (p *fakeProgram) GetDefaultResolutionModeForFile(sourceFile ast.HasFileName) core.ResolutionMode { return p.getEmitModuleFormatOfFile(sourceFile) } -func (p *fakeProgram) GetModeForUsageLocation(sourceFile *ast.SourceFile, location *ast.Node) core.ResolutionMode { +func (p *fakeProgram) GetModeForUsageLocation(sourceFile ast.HasFileName, location *ast.Node) core.ResolutionMode { return p.getEmitModuleFormatOfFile(sourceFile) } -func (p *fakeProgram) GetResolvedModule(currentSourceFile *ast.SourceFile, moduleReference string, mode core.ResolutionMode) *module.ResolvedModule { +func (p *fakeProgram) GetResolvedModule(currentSourceFile ast.HasFileName, moduleReference string, mode core.ResolutionMode) *module.ResolvedModule { return p.getResolvedModule(currentSourceFile, moduleReference, mode) } @@ -105,6 +119,10 @@ func (p *fakeProgram) GetSourceFile(FileName string) *ast.SourceFile { return p.getSourceFile(FileName) } +func (p *fakeProgram) GetSourceFileMetaData(path tspath.Path) *ast.SourceFileMetaData { + return nil +} + func (p *fakeProgram) GetImportHelpersImportSpecifier(path tspath.Path) *ast.Node { return nil } @@ -169,10 +187,10 @@ func TestImportElision(t *testing.T) { singleThreaded: true, compilerOptions: compilerOptions, files: files, - getEmitModuleFormatOfFile: func(sourceFile *ast.SourceFile) core.ModuleKind { + getEmitModuleFormatOfFile: func(sourceFile ast.HasFileName) core.ModuleKind { return core.ModuleKindESNext }, - getImpliedNodeFormatForEmit: func(sourceFile *ast.SourceFile) core.ModuleKind { + getImpliedNodeFormatForEmit: func(sourceFile ast.HasFileName) core.ModuleKind { return core.ModuleKindESNext }, getSourceFile: func(fileName string) *ast.SourceFile { @@ -181,7 +199,7 @@ func TestImportElision(t *testing.T) { } return nil }, - getResolvedModule: func(currentSourceFile *ast.SourceFile, moduleReference string, mode core.ResolutionMode) *module.ResolvedModule { + getResolvedModule: func(currentSourceFile ast.HasFileName, moduleReference string, mode core.ResolutionMode) *module.ResolvedModule { if currentSourceFile == file && moduleReference == "other" { return &module.ResolvedModule{ ResolvedFileName: "other.ts", diff --git a/internal/transformers/transformer.go b/internal/transformers/transformer.go index 6866a8ace4..1bb1924a5b 100644 --- a/internal/transformers/transformer.go +++ b/internal/transformers/transformer.go @@ -42,11 +42,11 @@ func (tx *Transformer) TransformSourceFile(file *ast.SourceFile) *ast.SourceFile return tx.visitor.VisitSourceFile(file) } -func getModuleTransformer(emitContext *printer.EmitContext, options *core.CompilerOptions, resolver binder.ReferenceResolver) *Transformer { +func getModuleTransformer(emitContext *printer.EmitContext, options *core.CompilerOptions, resolver binder.ReferenceResolver, getEmitModuleFormatOfFile func(file ast.HasFileName) core.ModuleKind) *Transformer { switch options.GetEmitModuleKind() { case core.ModuleKindPreserve: // `ESModuleTransformer` contains logic for preserving CJS input syntax in `--module preserve` - return NewESModuleTransformer(emitContext, options, resolver) + return NewESModuleTransformer(emitContext, options, resolver, getEmitModuleFormatOfFile) case core.ModuleKindESNext, core.ModuleKindES2022, @@ -55,10 +55,10 @@ func getModuleTransformer(emitContext *printer.EmitContext, options *core.Compil core.ModuleKindNode16, core.ModuleKindNodeNext, core.ModuleKindCommonJS: - return NewImpliedModuleTransformer(emitContext, options, resolver) + return NewImpliedModuleTransformer(emitContext, options, resolver, getEmitModuleFormatOfFile) default: - return NewCommonJSModuleTransformer(emitContext, options, resolver) + return NewCommonJSModuleTransformer(emitContext, options, resolver, getEmitModuleFormatOfFile) } } @@ -106,6 +106,6 @@ func GetScriptTransformers(emitContext *printer.EmitContext, host printer.EmitHo // !!! transform other language targets // transform module syntax - tx = append(tx, getModuleTransformer(emitContext, options, referenceResolver)) + tx = append(tx, getModuleTransformer(emitContext, options, referenceResolver, host.GetEmitModuleFormatOfFile)) return tx } diff --git a/internal/transformers/utilities.go b/internal/transformers/utilities.go index fd1ff7f2fd..09868f85c6 100644 --- a/internal/transformers/utilities.go +++ b/internal/transformers/utilities.go @@ -6,6 +6,7 @@ import ( "github.com/microsoft/typescript-go/internal/ast" "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/jsnum" + "github.com/microsoft/typescript-go/internal/outputpaths" "github.com/microsoft/typescript-go/internal/printer" "github.com/microsoft/typescript-go/internal/tspath" ) @@ -119,6 +120,8 @@ func isIdentifierReference(name *ast.IdentifierNode, parent *ast.Node) bool { return parent.AsImportAttribute().Value == name case ast.KindJsxOpeningElement: return parent.AsJsxOpeningElement().TagName == name + case ast.KindJsxClosingElement: + return parent.AsJsxClosingElement().TagName == name default: return false } @@ -335,7 +338,7 @@ func rewriteModuleSpecifier(emitContext *printer.EmitContext, node *ast.Expressi if node == nil || !ast.IsStringLiteral(node) || !shouldRewriteModuleSpecifier(node.Text(), compilerOptions) { return node } - updatedText := tspath.ChangeExtension(node.Text(), core.GetOutputExtension(node.Text(), compilerOptions.Jsx)) + updatedText := tspath.ChangeExtension(node.Text(), outputpaths.GetOutputExtension(node.Text(), compilerOptions.Jsx)) if updatedText != node.Text() { updated := emitContext.Factory.NewStringLiteral(updatedText) // !!! set quote style diff --git a/internal/tsoptions/declscompiler.go b/internal/tsoptions/declscompiler.go index 6c541e40e7..4b32a19ab0 100644 --- a/internal/tsoptions/declscompiler.go +++ b/internal/tsoptions/declscompiler.go @@ -482,6 +482,23 @@ var commonOptionsWithBuild = []*CommandLineOption{ AffectsBuildInfo: true, AffectsSemanticDiagnostics: true, }, + { + Name: "erasableSyntaxOnly", + Kind: CommandLineOptionTypeBoolean, + Category: diagnostics.Interop_Constraints, + Description: diagnostics.Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript, + DefaultValueDescription: false, + AffectsBuildInfo: true, + AffectsSemanticDiagnostics: true, + }, + { + Name: "libReplacement", + Kind: CommandLineOptionTypeBoolean, + AffectsProgramStructure: true, + Category: diagnostics.Language_and_Environment, + Description: diagnostics.Enable_lib_replacement, + DefaultValueDescription: true, + }, // Strict Type Checks { diff --git a/internal/tsoptions/enummaps.go b/internal/tsoptions/enummaps.go index 8c960d806e..a5ac8be8f2 100644 --- a/internal/tsoptions/enummaps.go +++ b/internal/tsoptions/enummaps.go @@ -106,6 +106,8 @@ var libMap = collections.NewOrderedMapFromList([]collections.MapEntry[string, an {Key: "esnext.regexp", Value: "lib.es2024.regexp.d.ts"}, {Key: "esnext.string", Value: "lib.es2024.string.d.ts"}, {Key: "esnext.iterator", Value: "lib.esnext.iterator.d.ts"}, + {Key: "esnext.promise", Value: "lib.esnext.promise.d.ts"}, + {Key: "esnext.float16", Value: "lib.esnext.float16.d.ts"}, {Key: "decorators", Value: "lib.decorators.d.ts"}, {Key: "decorators.legacy", Value: "lib.decorators.legacy.d.ts"}, }) @@ -166,6 +168,7 @@ var moduleOptionMap = collections.NewOrderedMapFromList([]collections.MapEntry[s {Key: "es2022", Value: core.ModuleKindES2022}, {Key: "esnext", Value: core.ModuleKindESNext}, {Key: "node16", Value: core.ModuleKindNode16}, + {Key: "node18", Value: core.ModuleKindNode18}, {Key: "nodenext", Value: core.ModuleKindNodeNext}, {Key: "preserve", Value: core.ModuleKindPreserve}, }) diff --git a/internal/tsoptions/parsedcommandline.go b/internal/tsoptions/parsedcommandline.go index 02978664cf..373bfe0f27 100644 --- a/internal/tsoptions/parsedcommandline.go +++ b/internal/tsoptions/parsedcommandline.go @@ -17,7 +17,6 @@ type ParsedCommandLine struct { Errors []*ast.Diagnostic `json:"errors"` Raw any `json:"raw"` CompileOnSave *bool `json:"compileOnSave"` - // TypeAquisition *core.TypeAcquisition comparePathsOptions tspath.ComparePathsOptions wildcardDirectoriesOnce sync.Once diff --git a/internal/tsoptions/parsinghelpers.go b/internal/tsoptions/parsinghelpers.go index f69a269a91..f63cf68a7d 100644 --- a/internal/tsoptions/parsinghelpers.go +++ b/internal/tsoptions/parsinghelpers.go @@ -219,6 +219,8 @@ func parseCompilerOptions(key string, value any, allOptions *core.CompilerOption allOptions.Declaration = parseTristate(value) case "downlevelIteration": allOptions.DownlevelIteration = parseTristate(value) + case "erasableSyntaxOnly": + allOptions.ErasableSyntaxOnly = parseTristate(value) case "emitDeclarationOnly": allOptions.EmitDeclarationOnly = parseTristate(value) case "extendedDiagnostics": @@ -273,6 +275,8 @@ func parseCompilerOptions(key string, value any, allOptions *core.CompilerOption } else { allOptions.Lib = parseStringArray(value) } + case "libReplacement": + allOptions.LibReplacement = parseTristate(value) case "listEmittedFiles": allOptions.ListEmittedFiles = parseTristate(value) case "listFiles": diff --git a/internal/tsoptions/tsconfigparsing_test.go b/internal/tsoptions/tsconfigparsing_test.go index b8f66cb99b..7c99d8252f 100644 --- a/internal/tsoptions/tsconfigparsing_test.go +++ b/internal/tsoptions/tsconfigparsing_test.go @@ -899,6 +899,7 @@ func TestParseSrcCompiler(t *testing.T) { "performance.ts", "performanceCore.ts", "program.ts", + "programDiagnostics.ts", "resolutionCache.ts", "scanner.ts", "semver.ts", diff --git a/internal/tspath/extension.go b/internal/tspath/extension.go index 243530c067..cc30d48a66 100644 --- a/internal/tspath/extension.go +++ b/internal/tspath/extension.go @@ -159,3 +159,20 @@ func changeAnyExtension(path string, ext string, extensions []string, ignoreCase func ChangeExtension(path string, newExtension string) string { return changeAnyExtension(path, newExtension, extensionsToRemove /*ignoreCase*/, false) } + +// Like `changeAnyExtension`, but declaration file extensions are recognized +// and replaced starting from the `.d`. +// +// changeAnyExtension("file.d.ts", ".js") === "file.d.js" +// changeFullExtension("file.d.ts", ".js") === "file.js" +func ChangeFullExtension(path string, newExtension string) string { + declarationExtension := GetDeclarationFileExtension(path) + if declarationExtension != "" { + ext := newExtension + if !strings.HasPrefix(ext, ".") { + ext = "." + ext + } + return path[:len(path)-len(declarationExtension)] + ext + } + return ChangeExtension(path, newExtension) +} diff --git a/internal/tspath/path.go b/internal/tspath/path.go index 1fc4229152..caf1740cac 100644 --- a/internal/tspath/path.go +++ b/internal/tspath/path.go @@ -316,6 +316,14 @@ func ResolvePath(path string, paths ...string) string { return NormalizePath(combinedPath) } +func ResolveTripleslashReference(moduleName string, containingFile string) string { + basePath := GetDirectoryPath(containingFile) + if IsRootedDiskPath(moduleName) { + return NormalizePath(moduleName) + } + return NormalizePath(CombinePaths(basePath, moduleName)) +} + func GetNormalizedPathComponents(path string, currentDirectory string) []string { return reducePathComponents(GetPathComponents(path, currentDirectory)) } diff --git a/internal/vfs/cachedvfs/cachedvfs.go b/internal/vfs/cachedvfs/cachedvfs.go index 132c67bfaf..0e284fe043 100644 --- a/internal/vfs/cachedvfs/cachedvfs.go +++ b/internal/vfs/cachedvfs/cachedvfs.go @@ -1,12 +1,15 @@ package cachedvfs import ( + "sync/atomic" + "github.com/microsoft/typescript-go/internal/collections" "github.com/microsoft/typescript-go/internal/vfs" ) type FS struct { - fs vfs.FS + fs vfs.FS + enabled atomic.Bool directoryExistsCache collections.SyncMap[string, bool] fileExistsCache collections.SyncMap[string, bool] @@ -18,7 +21,19 @@ type FS struct { var _ vfs.FS = (*FS)(nil) func From(fs vfs.FS) *FS { - return &FS{fs: fs} + fsys := &FS{fs: fs} + fsys.enabled.Store(true) + return fsys +} + +func (fsys *FS) DisableAndClearCache() { + if fsys.enabled.CompareAndSwap(true, false) { + fsys.ClearCache() + } +} + +func (fsys *FS) Enable() { + fsys.enabled.Store(true) } func (fsys *FS) ClearCache() { @@ -30,29 +45,50 @@ func (fsys *FS) ClearCache() { } func (fsys *FS) DirectoryExists(path string) bool { - if ret, ok := fsys.directoryExistsCache.Load(path); ok { - return ret + if fsys.enabled.Load() { + if ret, ok := fsys.directoryExistsCache.Load(path); ok { + return ret + } } + ret := fsys.fs.DirectoryExists(path) - fsys.directoryExistsCache.Store(path, ret) + + if fsys.enabled.Load() { + fsys.directoryExistsCache.Store(path, ret) + } + return ret } func (fsys *FS) FileExists(path string) bool { - if ret, ok := fsys.fileExistsCache.Load(path); ok { - return ret + if fsys.enabled.Load() { + if ret, ok := fsys.fileExistsCache.Load(path); ok { + return ret + } } + ret := fsys.fs.FileExists(path) - fsys.fileExistsCache.Store(path, ret) + + if fsys.enabled.Load() { + fsys.fileExistsCache.Store(path, ret) + } + return ret } func (fsys *FS) GetAccessibleEntries(path string) vfs.Entries { - if ret, ok := fsys.getAccessibleEntriesCache.Load(path); ok { - return ret + if fsys.enabled.Load() { + if ret, ok := fsys.getAccessibleEntriesCache.Load(path); ok { + return ret + } } + ret := fsys.fs.GetAccessibleEntries(path) - fsys.getAccessibleEntriesCache.Store(path, ret) + + if fsys.enabled.Load() { + fsys.getAccessibleEntriesCache.Store(path, ret) + } + return ret } @@ -61,11 +97,18 @@ func (fsys *FS) ReadFile(path string) (contents string, ok bool) { } func (fsys *FS) Realpath(path string) string { - if ret, ok := fsys.realpathCache.Load(path); ok { - return ret + if fsys.enabled.Load() { + if ret, ok := fsys.realpathCache.Load(path); ok { + return ret + } } + ret := fsys.fs.Realpath(path) - fsys.realpathCache.Store(path, ret) + + if fsys.enabled.Load() { + fsys.realpathCache.Store(path, ret) + } + return ret } @@ -74,11 +117,18 @@ func (fsys *FS) Remove(path string) error { } func (fsys *FS) Stat(path string) vfs.FileInfo { - if ret, ok := fsys.statCache.Load(path); ok { - return ret.(vfs.FileInfo) + if fsys.enabled.Load() { + if ret, ok := fsys.statCache.Load(path); ok { + return ret.(vfs.FileInfo) + } } + ret := fsys.fs.Stat(path) - fsys.statCache.Store(path, ret) + + if fsys.enabled.Load() { + fsys.statCache.Store(path, ret) + } + return ret } diff --git a/internal/vfs/cachedvfs/cachedvfs_test.go b/internal/vfs/cachedvfs/cachedvfs_test.go index f74a42c870..a63b4b359f 100644 --- a/internal/vfs/cachedvfs/cachedvfs_test.go +++ b/internal/vfs/cachedvfs/cachedvfs_test.go @@ -34,6 +34,20 @@ func TestDirectoryExists(t *testing.T) { cached.DirectoryExists("/other/path") assert.Equal(t, 3, len(underlying.DirectoryExistsCalls())) + + cached.DisableAndClearCache() + cached.DirectoryExists("/some/path") + assert.Equal(t, 4, len(underlying.DirectoryExistsCalls())) + + cached.DirectoryExists("/some/path") + assert.Equal(t, 5, len(underlying.DirectoryExistsCalls())) + + cached.Enable() + cached.DirectoryExists("/some/path") + assert.Equal(t, 6, len(underlying.DirectoryExistsCalls())) + + cached.DirectoryExists("/some/path") + assert.Equal(t, 6, len(underlying.DirectoryExistsCalls())) } func TestFileExists(t *testing.T) { @@ -54,6 +68,20 @@ func TestFileExists(t *testing.T) { cached.FileExists("/other/path/file.txt") assert.Equal(t, 3, len(underlying.FileExistsCalls())) + + cached.DisableAndClearCache() + cached.FileExists("/some/path/file.txt") + assert.Equal(t, 4, len(underlying.FileExistsCalls())) + + cached.FileExists("/some/path/file.txt") + assert.Equal(t, 5, len(underlying.FileExistsCalls())) + + cached.Enable() + cached.FileExists("/some/path/file.txt") + assert.Equal(t, 6, len(underlying.FileExistsCalls())) + + cached.FileExists("/some/path/file.txt") + assert.Equal(t, 6, len(underlying.FileExistsCalls())) } func TestGetAccessibleEntries(t *testing.T) { @@ -74,6 +102,20 @@ func TestGetAccessibleEntries(t *testing.T) { cached.GetAccessibleEntries("/other/path") assert.Equal(t, 3, len(underlying.GetAccessibleEntriesCalls())) + + cached.DisableAndClearCache() + cached.GetAccessibleEntries("/some/path") + assert.Equal(t, 4, len(underlying.GetAccessibleEntriesCalls())) + + cached.GetAccessibleEntries("/some/path") + assert.Equal(t, 5, len(underlying.GetAccessibleEntriesCalls())) + + cached.Enable() + cached.GetAccessibleEntries("/some/path") + assert.Equal(t, 6, len(underlying.GetAccessibleEntriesCalls())) + + cached.GetAccessibleEntries("/some/path") + assert.Equal(t, 6, len(underlying.GetAccessibleEntriesCalls())) } func TestRealpath(t *testing.T) { @@ -94,6 +136,20 @@ func TestRealpath(t *testing.T) { cached.Realpath("/other/path") assert.Equal(t, 3, len(underlying.RealpathCalls())) + + cached.DisableAndClearCache() + cached.Realpath("/some/path") + assert.Equal(t, 4, len(underlying.RealpathCalls())) + + cached.Realpath("/some/path") + assert.Equal(t, 5, len(underlying.RealpathCalls())) + + cached.Enable() + cached.Realpath("/some/path") + assert.Equal(t, 6, len(underlying.RealpathCalls())) + + cached.Realpath("/some/path") + assert.Equal(t, 6, len(underlying.RealpathCalls())) } func TestStat(t *testing.T) { @@ -114,6 +170,20 @@ func TestStat(t *testing.T) { cached.Stat("/other/path") assert.Equal(t, 3, len(underlying.StatCalls())) + + cached.DisableAndClearCache() + cached.Stat("/some/path") + assert.Equal(t, 4, len(underlying.StatCalls())) + + cached.Stat("/some/path") + assert.Equal(t, 5, len(underlying.StatCalls())) + + cached.Enable() + cached.Stat("/some/path") + assert.Equal(t, 6, len(underlying.StatCalls())) + + cached.Stat("/some/path") + assert.Equal(t, 6, len(underlying.StatCalls())) } func TestReadFile(t *testing.T) { @@ -131,6 +201,20 @@ func TestReadFile(t *testing.T) { cached.ClearCache() cached.ReadFile("/some/path/file.txt") assert.Equal(t, 3, len(underlying.ReadFileCalls())) + + cached.DisableAndClearCache() + cached.ReadFile("/some/path/file.txt") + assert.Equal(t, 4, len(underlying.ReadFileCalls())) + + cached.ReadFile("/some/path/file.txt") + assert.Equal(t, 5, len(underlying.ReadFileCalls())) + + cached.Enable() + cached.ReadFile("/some/path/file.txt") + assert.Equal(t, 6, len(underlying.ReadFileCalls())) + + cached.ReadFile("/some/path/file.txt") + assert.Equal(t, 7, len(underlying.ReadFileCalls())) } func TestUseCaseSensitiveFileNames(t *testing.T) { @@ -148,6 +232,20 @@ func TestUseCaseSensitiveFileNames(t *testing.T) { cached.ClearCache() cached.UseCaseSensitiveFileNames() assert.Equal(t, 3, len(underlying.UseCaseSensitiveFileNamesCalls())) + + cached.DisableAndClearCache() + cached.UseCaseSensitiveFileNames() + assert.Equal(t, 4, len(underlying.UseCaseSensitiveFileNamesCalls())) + + cached.UseCaseSensitiveFileNames() + assert.Equal(t, 5, len(underlying.UseCaseSensitiveFileNamesCalls())) + + cached.Enable() + cached.UseCaseSensitiveFileNames() + assert.Equal(t, 6, len(underlying.UseCaseSensitiveFileNamesCalls())) + + cached.UseCaseSensitiveFileNames() + assert.Equal(t, 7, len(underlying.UseCaseSensitiveFileNamesCalls())) } func TestWalkDir(t *testing.T) { @@ -169,6 +267,20 @@ func TestWalkDir(t *testing.T) { cached.ClearCache() _ = cached.WalkDir("/some/path", walkFn) assert.Equal(t, 3, len(underlying.WalkDirCalls())) + + cached.DisableAndClearCache() + _ = cached.WalkDir("/some/path", walkFn) + assert.Equal(t, 4, len(underlying.WalkDirCalls())) + + _ = cached.WalkDir("/some/path", walkFn) + assert.Equal(t, 5, len(underlying.WalkDirCalls())) + + cached.Enable() + _ = cached.WalkDir("/some/path", walkFn) + assert.Equal(t, 6, len(underlying.WalkDirCalls())) + + _ = cached.WalkDir("/some/path", walkFn) + assert.Equal(t, 7, len(underlying.WalkDirCalls())) } func TestRemove(t *testing.T) { @@ -186,6 +298,20 @@ func TestRemove(t *testing.T) { cached.ClearCache() _ = cached.Remove("/some/path/file.txt") assert.Equal(t, 3, len(underlying.RemoveCalls())) + + cached.DisableAndClearCache() + _ = cached.Remove("/some/path/file.txt") + assert.Equal(t, 4, len(underlying.RemoveCalls())) + + _ = cached.Remove("/some/path/file.txt") + assert.Equal(t, 5, len(underlying.RemoveCalls())) + + cached.Enable() + _ = cached.Remove("/some/path/file.txt") + assert.Equal(t, 6, len(underlying.RemoveCalls())) + + _ = cached.Remove("/some/path/file.txt") + assert.Equal(t, 7, len(underlying.RemoveCalls())) } func TestWriteFile(t *testing.T) { @@ -208,4 +334,18 @@ func TestWriteFile(t *testing.T) { assert.Equal(t, "/some/path/file.txt", call.Path) assert.Equal(t, "third content", call.Data) assert.Equal(t, false, call.WriteByteOrderMark) + + cached.DisableAndClearCache() + _ = cached.WriteFile("/some/path/file.txt", "fourth content", false) + assert.Equal(t, 4, len(underlying.WriteFileCalls())) + + _ = cached.WriteFile("/some/path/file.txt", "fifth content", true) + assert.Equal(t, 5, len(underlying.WriteFileCalls())) + + cached.Enable() + _ = cached.WriteFile("/some/path/file.txt", "sixth content", false) + assert.Equal(t, 6, len(underlying.WriteFileCalls())) + + _ = cached.WriteFile("/some/path/file.txt", "seventh content", true) + assert.Equal(t, 7, len(underlying.WriteFileCalls())) } diff --git a/internal/vfs/vfs.go b/internal/vfs/vfs.go index 5bf8d03655..8bc95a0986 100644 --- a/internal/vfs/vfs.go +++ b/internal/vfs/vfs.go @@ -5,6 +5,7 @@ import ( ) //go:generate go tool github.com/matryer/moq -fmt goimports -out vfsmock/mock_generated.go -pkg vfsmock . FS +//go:generate go tool mvdan.cc/gofumpt -lang=go1.24 -w vfsmock/mock_generated.go // FS is a file system abstraction. type FS interface { diff --git a/internal/vfs/vfsmock/mock_generated.go b/internal/vfs/vfsmock/mock_generated.go index 5f5dcbdedb..f18d46dd4e 100644 --- a/internal/vfs/vfsmock/mock_generated.go +++ b/internal/vfs/vfsmock/mock_generated.go @@ -124,8 +124,7 @@ type FSMock struct { Path string } // UseCaseSensitiveFileNames holds details about calls to the UseCaseSensitiveFileNames method. - UseCaseSensitiveFileNames []struct { - } + UseCaseSensitiveFileNames []struct{} // WalkDir holds details about calls to the WalkDir method. WalkDir []struct { // Root is the root argument value. @@ -384,8 +383,7 @@ func (mock *FSMock) UseCaseSensitiveFileNames() bool { if mock.UseCaseSensitiveFileNamesFunc == nil { panic("FSMock.UseCaseSensitiveFileNamesFunc: method is nil but FS.UseCaseSensitiveFileNames was just called") } - callInfo := struct { - }{} + callInfo := struct{}{} mock.lockUseCaseSensitiveFileNames.Lock() mock.calls.UseCaseSensitiveFileNames = append(mock.calls.UseCaseSensitiveFileNames, callInfo) mock.lockUseCaseSensitiveFileNames.Unlock() @@ -396,10 +394,8 @@ func (mock *FSMock) UseCaseSensitiveFileNames() bool { // Check the length with: // // len(mockedFS.UseCaseSensitiveFileNamesCalls()) -func (mock *FSMock) UseCaseSensitiveFileNamesCalls() []struct { -} { - var calls []struct { - } +func (mock *FSMock) UseCaseSensitiveFileNamesCalls() []struct{} { + var calls []struct{} mock.lockUseCaseSensitiveFileNames.RLock() calls = mock.calls.UseCaseSensitiveFileNames mock.lockUseCaseSensitiveFileNames.RUnlock() From db2b13e033f2a6fe9cadc0c28a791a4f47d123d3 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 7 Jun 2025 14:51:30 -0700 Subject: [PATCH 12/12] Redo it --- internal/api/encoder/encoder_test.go | 9 +++- internal/ast/ast.go | 8 ++-- internal/ast/utilities.go | 7 ++- internal/astnav/tokens_test.go | 10 ++-- internal/binder/binder_test.go | 8 ++-- internal/compiler/fileloader.go | 10 ++-- internal/compiler/host.go | 6 +-- internal/compiler/program.go | 7 ++- internal/core/compileroptions.go | 18 ++++++++ internal/format/api_test.go | 10 +++- internal/fourslash/fourslash.go | 16 +++---- internal/parser/parser.go | 11 ++--- internal/project/documentregistry.go | 46 +++++++++++-------- internal/project/project.go | 18 ++++---- internal/testutil/harnessutil/harnessutil.go | 24 +++++----- .../testutil/parsetestutil/parsetestutil.go | 6 ++- .../testutil/tsbaseline/js_emit_baseline.go | 6 ++- 17 files changed, 133 insertions(+), 87 deletions(-) diff --git a/internal/api/encoder/encoder_test.go b/internal/api/encoder/encoder_test.go index ce616dfc26..d72fafe5ae 100644 --- a/internal/api/encoder/encoder_test.go +++ b/internal/api/encoder/encoder_test.go @@ -18,9 +18,13 @@ import ( "gotest.tools/v3/assert" ) +var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ + EmitScriptTarget: core.ScriptTargetLatest, +} + func TestEncodeSourceFile(t *testing.T) { t.Parallel() - sourceFile := parser.ParseSourceFile("/test.ts", "/test.ts", "import { bar } from \"bar\";\nexport function foo(a: string, b: string): any {}\nfoo();", core.ScriptTargetESNext, scanner.JSDocParsingModeParseAll) + sourceFile := parser.ParseSourceFile("/test.ts", "/test.ts", "import { bar } from \"bar\";\nexport function foo(a: string, b: string): any {}\nfoo();", parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) t.Run("baseline", func(t *testing.T) { t.Parallel() buf, err := encoder.EncodeSourceFile(sourceFile, "") @@ -42,7 +46,8 @@ func BenchmarkEncodeSourceFile(b *testing.B) { "/checker.ts", "/checker.ts", string(fileContent), - core.ScriptTargetESNext, + parseCompilerOptions, + nil, scanner.JSDocParsingModeParseAll, ) diff --git a/internal/ast/ast.go b/internal/ast/ast.go index 681e63c6e9..1e6e6de040 100644 --- a/internal/ast/ast.go +++ b/internal/ast/ast.go @@ -9981,6 +9981,8 @@ type SourceFile struct { CheckJsDirective *CheckJsDirective NodeCount int TextCount int + CommonJSModuleIndicator *Node + ExternalModuleIndicator *Node // Fields set by binder @@ -10003,11 +10005,7 @@ type SourceFile struct { tokenCacheMu sync.Mutex tokenCache map[core.TextRange]*Node - // !!! - - CommonJSModuleIndicator *Node - ExternalModuleIndicator *Node - JSGlobalAugmentations SymbolTable + JSGlobalAugmentations SymbolTable // !!! remove me } func (f *NodeFactory) NewSourceFile(text string, fileName string, path tspath.Path, statements *NodeList) *Node { diff --git a/internal/ast/utilities.go b/internal/ast/utilities.go index ffe50784b6..29988eb82f 100644 --- a/internal/ast/utilities.go +++ b/internal/ast/utilities.go @@ -2504,16 +2504,15 @@ func GetImpliedNodeFormatForFile(path string, packageJsonType string) core.Modul } func GetEmitModuleFormatOfFileWorker(fileName string, options *core.CompilerOptions, sourceFileMetaData *SourceFileMetaData) core.ModuleKind { - result := GetImpliedNodeFormatForEmitWorker(fileName, options, sourceFileMetaData) + result := GetImpliedNodeFormatForEmitWorker(fileName, options.GetEmitModuleKind(), sourceFileMetaData) if result != core.ModuleKindNone { return result } return options.GetEmitModuleKind() } -func GetImpliedNodeFormatForEmitWorker(fileName string, options *core.CompilerOptions, sourceFileMetaData *SourceFileMetaData) core.ResolutionMode { - moduleKind := options.GetEmitModuleKind() - if core.ModuleKindNode16 <= moduleKind && moduleKind <= core.ModuleKindNodeNext { +func GetImpliedNodeFormatForEmitWorker(fileName string, emitModuleKind core.ModuleKind, sourceFileMetaData *SourceFileMetaData) core.ResolutionMode { + if core.ModuleKindNode16 <= emitModuleKind && emitModuleKind <= core.ModuleKindNodeNext { if sourceFileMetaData == nil { return core.ModuleKindNone } diff --git a/internal/astnav/tokens_test.go b/internal/astnav/tokens_test.go index 7ccd674924..208b137d60 100644 --- a/internal/astnav/tokens_test.go +++ b/internal/astnav/tokens_test.go @@ -26,6 +26,10 @@ var testFiles = []string{ filepath.Join(repo.TypeScriptSubmodulePath, "src/services/mapCode.ts"), } +var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ + EmitScriptTarget: core.ScriptTargetLatest, +} + func TestGetTokenAtPosition(t *testing.T) { t.Parallel() repo.SkipIfNoTypeScriptSubmodule(t) @@ -53,7 +57,7 @@ func TestGetTokenAtPosition(t *testing.T) { return 0; } ` - file := parser.ParseSourceFile("/file.ts", "/file.ts", fileText, core.ScriptTargetLatest, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", fileText, parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) assert.Equal(t, astnav.GetTokenAtPosition(file, 0), astnav.GetTokenAtPosition(file, 0)) }) } @@ -88,7 +92,7 @@ func baselineTokens(t *testing.T, testName string, includeEOF bool, getTSTokens positions[i] = i } tsTokens := getTSTokens(string(fileText), positions) - file := parser.ParseSourceFile("/file.ts", "/file.ts", string(fileText), core.ScriptTargetLatest, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", string(fileText), parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) var output strings.Builder currentRange := core.NewTextRange(0, 0) @@ -421,7 +425,7 @@ export function isAnyDirectorySeparator(charCode: number): boolean { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { t.Parallel() - file := parser.ParseSourceFile("/file.ts", "/file.ts", testCase.fileContent, core.ScriptTargetLatest, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile("/file.ts", "/file.ts", testCase.fileContent, parseCompilerOptions, nil, scanner.JSDocParsingModeParseAll) token := astnav.FindPrecedingToken(file, testCase.position) assert.Equal(t, token.Kind, testCase.expectedKind) }) diff --git a/internal/binder/binder_test.go b/internal/binder/binder_test.go index 2058632879..776fc717f0 100644 --- a/internal/binder/binder_test.go +++ b/internal/binder/binder_test.go @@ -22,14 +22,14 @@ func BenchmarkBind(b *testing.B) { path := tspath.ToPath(fileName, "/", osvfs.FS().UseCaseSensitiveFileNames()) sourceText := f.ReadFile(b) + compilerOptions := &core.CompilerOptions{Target: core.ScriptTargetESNext, Module: core.ModuleKindNodeNext} + sourceAffecting := compilerOptions.SourceFileAffecting() + sourceFiles := make([]*ast.SourceFile, b.N) for i := range b.N { - sourceFiles[i] = parser.ParseSourceFile(fileName, path, sourceText, core.ScriptTargetESNext, scanner.JSDocParsingModeParseAll) + sourceFiles[i] = parser.ParseSourceFile(fileName, path, sourceText, sourceAffecting, nil, scanner.JSDocParsingModeParseAll) } - compilerOptions := &core.CompilerOptions{Target: core.ScriptTargetESNext, Module: core.ModuleKindNodeNext} - sourceAffecting := compilerOptions.SourceFileAffecting() - // The above parses do a lot of work; ensure GC is finished before we start collecting performance data. // GC must be called twice to allow things to settle. runtime.GC() diff --git a/internal/compiler/fileloader.go b/internal/compiler/fileloader.go index 53d6a35fa8..43fc7ec2a8 100644 --- a/internal/compiler/fileloader.go +++ b/internal/compiler/fileloader.go @@ -244,13 +244,13 @@ func (t *parseTask) start(loader *fileLoader) { } loader.wg.Queue(func() { - file := loader.parseSourceFile(t.normalizedFilePath) + t.metadata = loader.loadSourceFileMetaData(t.normalizedFilePath) + file := loader.parseSourceFile(t.normalizedFilePath, t.metadata) if file == nil { return } t.file = file - t.metadata = loader.loadSourceFileMetaData(file.FileName()) // !!! if noResolve, skip all of this t.subTasks = make([]*parseTask, 0, len(file.ReferencedFiles)+len(file.Imports())+len(file.ModuleAugmentations)) @@ -309,9 +309,9 @@ func (p *fileLoader) loadSourceFileMetaData(fileName string) *ast.SourceFileMeta } } -func (p *fileLoader) parseSourceFile(fileName string) *ast.SourceFile { +func (p *fileLoader) parseSourceFile(fileName string, metadata *ast.SourceFileMetaData) *ast.SourceFile { path := tspath.ToPath(fileName, p.opts.Host.GetCurrentDirectory(), p.opts.Host.FS().UseCaseSensitiveFileNames()) - sourceFile := p.opts.Host.GetSourceFile(fileName, path, p.opts.Config.CompilerOptions().GetEmitScriptTarget()) + sourceFile := p.opts.Host.GetSourceFile(fileName, path, p.opts.Config.CompilerOptions().SourceFileAffecting(), metadata) // TODO(jakebailey): cache :( return sourceFile } @@ -467,7 +467,7 @@ func getModeForTypeReferenceDirectiveInFile(ref *ast.FileReference, file *ast.So func getDefaultResolutionModeForFile(fileName string, meta *ast.SourceFileMetaData, options *core.CompilerOptions) core.ResolutionMode { if importSyntaxAffectsModuleResolution(options) { - return ast.GetImpliedNodeFormatForEmitWorker(fileName, options, meta) + return ast.GetImpliedNodeFormatForEmitWorker(fileName, options.GetEmitModuleKind(), meta) } else { return core.ResolutionModeNone } diff --git a/internal/compiler/host.go b/internal/compiler/host.go index 3db76b350a..efe187f0ad 100644 --- a/internal/compiler/host.go +++ b/internal/compiler/host.go @@ -16,7 +16,7 @@ type CompilerHost interface { GetCurrentDirectory() string NewLine() string Trace(msg string) - GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile + GetSourceFile(fileName string, path tspath.Path, options *core.SourceFileAffectingCompilerOptions, metadata *ast.SourceFileMetaData) *ast.SourceFile } type FileInfo struct { @@ -73,10 +73,10 @@ func (h *compilerHost) Trace(msg string) { //!!! TODO: implement } -func (h *compilerHost) GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile { +func (h *compilerHost) GetSourceFile(fileName string, path tspath.Path, options *core.SourceFileAffectingCompilerOptions, metadata *ast.SourceFileMetaData) *ast.SourceFile { text, _ := h.FS().ReadFile(fileName) if tspath.FileExtensionIs(fileName, tspath.ExtensionJson) { return parser.ParseJSONText(fileName, path, text) } - return parser.ParseSourceFile(fileName, path, text, languageVersion, scanner.JSDocParsingModeParseForTypeErrors) + return parser.ParseSourceFile(fileName, path, text, options, metadata, scanner.JSDocParsingModeParseForTypeErrors) } diff --git a/internal/compiler/program.go b/internal/compiler/program.go index a5a8b96800..c1088556a0 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -228,7 +228,9 @@ func NewProgram(opts ProgramOptions) *Program { // In addition to a new program, return a boolean indicating whether the data of the old program was reused. func (p *Program) UpdateProgram(changedFilePath tspath.Path) (*Program, bool) { oldFile := p.filesByPath[changedFilePath] - newFile := p.Host().GetSourceFile(oldFile.FileName(), changedFilePath, oldFile.LanguageVersion) + // TODO(jakebailey): is wrong because the new file may have new metadata? + metadata := p.sourceFileMetaDatas[changedFilePath] + newFile := p.Host().GetSourceFile(oldFile.FileName(), changedFilePath, p.Options().SourceFileAffecting(), metadata) if !canReplaceFileInProgram(oldFile, newFile) { return NewProgram(p.opts), false } @@ -262,6 +264,7 @@ func (p *Program) initCheckerPool() { } func canReplaceFileInProgram(file1 *ast.SourceFile, file2 *ast.SourceFile) bool { + // TODO(jakebailey): metadata?? return file1.FileName() == file2.FileName() && file1.Path() == file2.Path() && file1.LanguageVersion == file2.LanguageVersion && @@ -696,7 +699,7 @@ func (p *Program) GetEmitSyntaxForUsageLocation(sourceFile ast.HasFileName, loca } func (p *Program) GetImpliedNodeFormatForEmit(sourceFile ast.HasFileName) core.ResolutionMode { - return ast.GetImpliedNodeFormatForEmitWorker(sourceFile.FileName(), p.Options(), p.GetSourceFileMetaData(sourceFile.Path())) + return ast.GetImpliedNodeFormatForEmitWorker(sourceFile.FileName(), p.Options().GetEmitModuleKind(), p.GetSourceFileMetaData(sourceFile.Path())) } func (p *Program) GetModeForUsageLocation(sourceFile ast.HasFileName, location *ast.StringLiteralLike) core.ResolutionMode { diff --git a/internal/core/compileroptions.go b/internal/core/compileroptions.go index 76c9d27fd2..777915071b 100644 --- a/internal/core/compileroptions.go +++ b/internal/core/compileroptions.go @@ -183,6 +183,18 @@ func (options *CompilerOptions) GetModuleResolutionKind() ModuleResolutionKind { } } +func (options *CompilerOptions) GetEmitModuleDetectionKind() ModuleDetectionKind { + if options.ModuleDetection != ModuleDetectionKindNone { + return options.ModuleDetection + } + switch options.GetEmitModuleKind() { + case ModuleKindNode16, ModuleKindNodeNext: + return ModuleDetectionKindForce + default: + return ModuleDetectionKindAuto + } +} + func (options *CompilerOptions) GetResolvePackageJsonExports() bool { return options.ResolvePackageJsonExports.IsTrueOrUnknown() } @@ -306,7 +318,10 @@ type SourceFileAffectingCompilerOptions struct { AllowUnreachableCode Tristate AllowUnusedLabels Tristate BindInStrictMode bool + EmitModuleDetectionKind ModuleDetectionKind + EmitModuleKind ModuleKind EmitScriptTarget ScriptTarget + JsxEmit JsxEmit NoFallthroughCasesInSwitch Tristate ShouldPreserveConstEnums bool } @@ -316,7 +331,10 @@ func (options *CompilerOptions) SourceFileAffecting() *SourceFileAffectingCompil AllowUnreachableCode: options.AllowUnreachableCode, AllowUnusedLabels: options.AllowUnusedLabels, BindInStrictMode: options.AlwaysStrict.IsTrue() || options.Strict.IsTrue(), + EmitModuleDetectionKind: options.GetEmitModuleDetectionKind(), + EmitModuleKind: options.GetEmitModuleKind(), EmitScriptTarget: options.GetEmitScriptTarget(), + JsxEmit: options.Jsx, NoFallthroughCasesInSwitch: options.NoFallthroughCasesInSwitch, ShouldPreserveConstEnums: options.ShouldPreserveConstEnums(), } diff --git a/internal/format/api_test.go b/internal/format/api_test.go index f1ab160098..d60227f7dd 100644 --- a/internal/format/api_test.go +++ b/internal/format/api_test.go @@ -34,6 +34,10 @@ func applyBulkEdits(text string, edits []core.TextChange) string { return b.String() } +var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ + EmitScriptTarget: core.ScriptTargetLatest, +} + func TestFormat(t *testing.T) { t.Parallel() @@ -60,7 +64,8 @@ func TestFormat(t *testing.T) { "/checker.ts", "/checker.ts", text, - core.ScriptTargetESNext, + parseCompilerOptions, + nil, scanner.JSDocParsingModeParseAll, ) ast.SetParentInChildren(sourceFile.AsNode()) @@ -93,7 +98,8 @@ func BenchmarkFormat(b *testing.B) { "/checker.ts", "/checker.ts", text, - core.ScriptTargetESNext, + parseCompilerOptions, + nil, scanner.JSDocParsingModeParseAll, ) ast.SetParentInChildren(sourceFile.AsNode()) diff --git a/internal/fourslash/fourslash.go b/internal/fourslash/fourslash.go index 79061b65d0..d037864532 100644 --- a/internal/fourslash/fourslash.go +++ b/internal/fourslash/fourslash.go @@ -80,15 +80,15 @@ func (c *parsedFileCache) GetFile( fileName string, path tspath.Path, text string, - scriptTarget core.ScriptTarget, - options core.SourceFileAffectingCompilerOptions, + options *core.SourceFileAffectingCompilerOptions, + metadata *ast.SourceFileMetaData, ) *ast.SourceFile { key := harnessutil.GetSourceFileCacheKey( - options, fileName, path, - scriptTarget, text, + options, + metadata, ) cachedFile, ok := sourceFileCache.Load(key) @@ -102,16 +102,16 @@ func (c *parsedFileCache) CacheFile( fileName string, path tspath.Path, text string, - scriptTarget core.ScriptTarget, - options core.SourceFileAffectingCompilerOptions, + options *core.SourceFileAffectingCompilerOptions, + metadata *ast.SourceFileMetaData, sourceFile *ast.SourceFile, ) { key := harnessutil.GetSourceFileCacheKey( - options, fileName, path, - scriptTarget, text, + options, + metadata, ) sourceFileCache.Store(key, sourceFile) } diff --git a/internal/parser/parser.go b/internal/parser/parser.go index 43f0f7bff2..40119ea136 100644 --- a/internal/parser/parser.go +++ b/internal/parser/parser.go @@ -358,11 +358,10 @@ func (p *Parser) finishSourceFile(result *ast.SourceFile, isDeclarationFile bool result.TextCount = p.factory.TextCount() result.IdentifierCount = p.identifierCount result.SetJSDocCache(p.jsdocCache) - result.Metadata = p.metadata - result.ExternalModuleIndicator = getExternalModuleIndicator(result, p.options) + result.ExternalModuleIndicator = getExternalModuleIndicator(result, p.options, p.metadata) } -func getExternalModuleIndicator(file *ast.SourceFile, options *core.SourceFileAffectingCompilerOptions) *ast.Node { +func getExternalModuleIndicator(file *ast.SourceFile, options *core.SourceFileAffectingCompilerOptions, metadata *ast.SourceFileMetaData) *ast.Node { // All detection kinds start by checking this. if node := isFileProbablyExternalModule(file); node != nil { return node @@ -387,7 +386,7 @@ func getExternalModuleIndicator(file *ast.SourceFile, options *core.SourceFileAf return node } } - return isFileForcedToBeModuleByFormat(file, options) + return isFileForcedToBeModuleByFormat(file, options, metadata) default: return nil } @@ -427,11 +426,11 @@ func walkTreeForJSXTags(node *ast.Node) *ast.Node { var isFileForcedToBeModuleByFormatExtensions = []string{tspath.ExtensionCjs, tspath.ExtensionCts, tspath.ExtensionMjs, tspath.ExtensionMts} -func isFileForcedToBeModuleByFormat(file *ast.SourceFile, options *core.SourceFileAffectingCompilerOptions) *ast.Node { +func isFileForcedToBeModuleByFormat(file *ast.SourceFile, options *core.SourceFileAffectingCompilerOptions, metadata *ast.SourceFileMetaData) *ast.Node { // Excludes declaration files - they still require an explicit `export {}` or the like // for back compat purposes. The only non-declaration files _not_ forced to be a module are `.js` files // that aren't esm-mode (meaning not in a `type: module` scope). - if !file.IsDeclarationFile && (ast.GetImpliedNodeFormatForEmitWorker(file, options.EmitModuleKind) == core.ModuleKindESNext || tspath.FileExtensionIsOneOf(file.FileName(), isFileForcedToBeModuleByFormatExtensions)) { + if !file.IsDeclarationFile && (ast.GetImpliedNodeFormatForEmitWorker(file.FileName(), options.EmitModuleKind, metadata) == core.ModuleKindESNext || tspath.FileExtensionIsOneOf(file.FileName(), isFileForcedToBeModuleByFormatExtensions)) { return file.AsNode() } return nil diff --git a/internal/project/documentregistry.go b/internal/project/documentregistry.go index 7aab2f8b48..dc497f320d 100644 --- a/internal/project/documentregistry.go +++ b/internal/project/documentregistry.go @@ -13,13 +13,15 @@ import ( type registryKey struct { core.SourceFileAffectingCompilerOptions + ast.SourceFileMetaData path tspath.Path scriptKind core.ScriptKind } -func newRegistryKey(options *core.CompilerOptions, path tspath.Path, scriptKind core.ScriptKind) registryKey { +func newRegistryKey(options *core.CompilerOptions, path tspath.Path, scriptKind core.ScriptKind, metadata *ast.SourceFileMetaData) registryKey { return registryKey{ SourceFileAffectingCompilerOptions: *options.SourceFileAffecting(), + SourceFileMetaData: *metadata, path: path, scriptKind: scriptKind, } @@ -56,18 +58,18 @@ type DocumentRegistry struct { // LanguageService instance over time, as well as across multiple instances. Here, we still // reuse files across multiple LanguageServices, but we only reuse them across Program updates // when the files haven't changed. -func (r *DocumentRegistry) AcquireDocument(scriptInfo *ScriptInfo, compilerOptions *core.CompilerOptions, oldSourceFile *ast.SourceFile, oldCompilerOptions *core.CompilerOptions) *ast.SourceFile { - key := newRegistryKey(compilerOptions, scriptInfo.path, scriptInfo.scriptKind) - document := r.getDocumentWorker(scriptInfo, compilerOptions, key) +func (r *DocumentRegistry) AcquireDocument(scriptInfo *ScriptInfo, compilerOptions *core.CompilerOptions, metadata *ast.SourceFileMetaData, oldSourceFile *ast.SourceFile, oldCompilerOptions *core.CompilerOptions, oldMetadata *ast.SourceFileMetaData) *ast.SourceFile { + key := newRegistryKey(compilerOptions, scriptInfo.path, scriptInfo.scriptKind, metadata) + document := r.getDocumentWorker(scriptInfo, compilerOptions, metadata, key) if oldSourceFile != nil && oldCompilerOptions != nil { - oldKey := newRegistryKey(oldCompilerOptions, scriptInfo.path, oldSourceFile.ScriptKind) + oldKey := newRegistryKey(oldCompilerOptions, scriptInfo.path, oldSourceFile.ScriptKind, oldMetadata) r.releaseDocumentWithKey(oldKey) } return document } -func (r *DocumentRegistry) ReleaseDocument(file *ast.SourceFile, compilerOptions *core.CompilerOptions) { - key := newRegistryKey(compilerOptions, file.Path(), file.ScriptKind) +func (r *DocumentRegistry) ReleaseDocument(file *ast.SourceFile, compilerOptions *core.CompilerOptions, metadata *ast.SourceFileMetaData) { + key := newRegistryKey(compilerOptions, file.Path(), file.ScriptKind, metadata) r.releaseDocumentWithKey(key) } @@ -88,6 +90,7 @@ func (r *DocumentRegistry) releaseDocumentWithKey(key registryKey) { func (r *DocumentRegistry) getDocumentWorker( scriptInfo *ScriptInfo, compilerOptions *core.CompilerOptions, + metadata *ast.SourceFileMetaData, key registryKey, ) *ast.SourceFile { scriptTarget := core.IfElse(scriptInfo.scriptKind == core.ScriptKindJSON, core.ScriptTargetJSON, compilerOptions.GetEmitScriptTarget()) @@ -97,7 +100,7 @@ func (r *DocumentRegistry) getDocumentWorker( // We have an entry for this file. However, it may be for a different version of // the script snapshot. If so, update it appropriately. if entry.version != scriptInfoVersion { - sourceFile := r.getParsedFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, scriptTarget, compilerOptions) + sourceFile := r.getParsedFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, scriptTarget, compilerOptions, metadata) entry.mu.Lock() defer entry.mu.Unlock() entry.sourceFile = sourceFile @@ -107,7 +110,7 @@ func (r *DocumentRegistry) getDocumentWorker( return entry.sourceFile } else { // Have never seen this file with these settings. Create a new source file for it. - sourceFile := r.getParsedFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, scriptTarget, compilerOptions) + sourceFile := r.getParsedFile(scriptInfo.fileName, scriptInfo.path, scriptInfoText, scriptTarget, compilerOptions, metadata) entry, _ := r.documents.LoadOrStore(key, ®istryEntry{ sourceFile: sourceFile, refCount: 0, @@ -120,8 +123,8 @@ func (r *DocumentRegistry) getDocumentWorker( } } -func (r *DocumentRegistry) getFileVersion(file *ast.SourceFile, options *core.CompilerOptions) int { - key := newRegistryKey(options, file.Path(), file.ScriptKind) +func (r *DocumentRegistry) getFileVersion(file *ast.SourceFile, options *core.CompilerOptions, metadata *ast.SourceFileMetaData) int { + key := newRegistryKey(options, file.Path(), file.ScriptKind, metadata) if entry, ok := r.documents.Load(key); ok && entry.sourceFile == file { return entry.version } @@ -134,15 +137,16 @@ func (r *DocumentRegistry) getParsedFile( sourceText string, scriptTarget core.ScriptTarget, options *core.CompilerOptions, + metadata *ast.SourceFileMetaData, ) *ast.SourceFile { if r.parsedFileCache != nil { - if file := r.parsedFileCache.GetFile(fileName, path, sourceText, scriptTarget, *options.SourceFileAffecting()); file != nil { + if file := r.parsedFileCache.GetFile(fileName, path, sourceText, options.SourceFileAffecting(), metadata); file != nil { return file } } - file := parser.ParseSourceFile(fileName, path, sourceText, scriptTarget, scanner.JSDocParsingModeParseAll) + file := parser.ParseSourceFile(fileName, path, sourceText, options.SourceFileAffecting(), metadata, scanner.JSDocParsingModeParseAll) if r.parsedFileCache != nil { - r.parsedFileCache.CacheFile(fileName, path, sourceText, scriptTarget, *options.SourceFileAffecting(), file) + r.parsedFileCache.CacheFile(fileName, path, sourceText, options.SourceFileAffecting(), metadata, file) } return file } @@ -153,17 +157,19 @@ func (r *DocumentRegistry) size() int { } type ParsedFileCache interface { - GetFile(fileName string, + GetFile( + fileName string, path tspath.Path, text string, - scriptTarget core.ScriptTarget, - options core.SourceFileAffectingCompilerOptions, + options *core.SourceFileAffectingCompilerOptions, + metadata *ast.SourceFileMetaData, ) *ast.SourceFile - CacheFile(fileName string, + CacheFile( + fileName string, path tspath.Path, text string, - scriptTarget core.ScriptTarget, - options core.SourceFileAffectingCompilerOptions, + options *core.SourceFileAffectingCompilerOptions, + metadata *ast.SourceFileMetaData, sourceFile *ast.SourceFile, ) } diff --git a/internal/project/project.go b/internal/project/project.go index a3b660f6d1..42759b71c9 100644 --- a/internal/project/project.go +++ b/internal/project/project.go @@ -48,7 +48,7 @@ type snapshot struct { func (s *snapshot) GetLineMap(fileName string) *ls.LineMap { file := s.program.GetSourceFile(fileName) scriptInfo := s.project.host.GetScriptInfoByPath(file.Path()) - if s.project.getFileVersion(file, s.program.Options()) == scriptInfo.Version() { + if s.project.getFileVersion(file, s.program.Options(), s.program.GetSourceFileMetaData(file.Path())) == scriptInfo.Version() { return scriptInfo.LineMap() } return ls.ComputeLineStarts(file.Text()) @@ -270,18 +270,20 @@ func (p *Project) GetCompilerOptions() *core.CompilerOptions { } // GetSourceFile implements compiler.CompilerHost. -func (p *Project) GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile { +func (p *Project) GetSourceFile(fileName string, path tspath.Path, options *core.SourceFileAffectingCompilerOptions, metadata *ast.SourceFileMetaData) *ast.SourceFile { scriptKind := p.getScriptKind(fileName) if scriptInfo := p.getOrCreateScriptInfoAndAttachToProject(fileName, scriptKind); scriptInfo != nil { var ( oldSourceFile *ast.SourceFile oldCompilerOptions *core.CompilerOptions + oldMetadata *ast.SourceFileMetaData ) if p.program != nil { oldSourceFile = p.program.GetSourceFileByPath(scriptInfo.path) oldCompilerOptions = p.program.Options() + oldMetadata = p.program.GetSourceFileMetaData(scriptInfo.path) } - return p.host.DocumentRegistry().AcquireDocument(scriptInfo, p.compilerOptions, oldSourceFile, oldCompilerOptions) + return p.host.DocumentRegistry().AcquireDocument(scriptInfo, p.compilerOptions, metadata, oldSourceFile, oldCompilerOptions, oldMetadata) } return nil } @@ -551,7 +553,7 @@ func (p *Project) updateGraph() (*compiler.Program, bool) { if oldProgram != nil { for _, oldSourceFile := range oldProgram.GetSourceFiles() { if p.program.GetSourceFileByPath(oldSourceFile.Path()) == nil { - p.host.DocumentRegistry().ReleaseDocument(oldSourceFile, oldProgram.Options()) + p.host.DocumentRegistry().ReleaseDocument(oldSourceFile, oldProgram.Options(), oldProgram.GetSourceFileMetaData(oldSourceFile.Path())) p.detachScriptInfoIfNotInferredRoot(oldSourceFile.Path()) } } @@ -1030,7 +1032,7 @@ func (p *Project) print(writeFileNames bool, writeFileExplanation bool, writeFil for _, sourceFile := range sourceFiles { builder.WriteString("\n\t\t" + sourceFile.FileName()) if writeFileVersionAndText { - builder.WriteString(fmt.Sprintf(" %d %s", p.getFileVersion(sourceFile, options), sourceFile.Text())) + builder.WriteString(fmt.Sprintf(" %d %s", p.getFileVersion(sourceFile, options, p.program.GetSourceFileMetaData(sourceFile.Path())), sourceFile.Text())) } } // !!! @@ -1041,8 +1043,8 @@ func (p *Project) print(writeFileNames bool, writeFileExplanation bool, writeFil return builder.String() } -func (p *Project) getFileVersion(file *ast.SourceFile, options *core.CompilerOptions) int { - return p.host.DocumentRegistry().getFileVersion(file, options) +func (p *Project) getFileVersion(file *ast.SourceFile, options *core.CompilerOptions, metadata *ast.SourceFileMetaData) int { + return p.host.DocumentRegistry().getFileVersion(file, options, metadata) } func (p *Project) Log(s string) { @@ -1068,7 +1070,7 @@ func (p *Project) Close() { if p.program != nil { for _, sourceFile := range p.program.GetSourceFiles() { - p.host.DocumentRegistry().ReleaseDocument(sourceFile, p.program.Options()) + p.host.DocumentRegistry().ReleaseDocument(sourceFile, p.program.Options(), p.program.GetSourceFileMetaData(sourceFile.Path())) // Detach script info if its not root or is root of non inferred project p.detachScriptInfoIfNotInferredRoot(sourceFile.Path()) } diff --git a/internal/testutil/harnessutil/harnessutil.go b/internal/testutil/harnessutil/harnessutil.go index 7cc51ed90c..6611f03a95 100644 --- a/internal/testutil/harnessutil/harnessutil.go +++ b/internal/testutil/harnessutil/harnessutil.go @@ -471,37 +471,37 @@ var sourceFileCache collections.SyncMap[SourceFileCacheKey, *ast.SourceFile] type SourceFileCacheKey struct { core.SourceFileAffectingCompilerOptions - fileName string - path tspath.Path - languageVersion core.ScriptTarget - text string + ast.SourceFileMetaData + fileName string + path tspath.Path + text string } func GetSourceFileCacheKey( - options core.SourceFileAffectingCompilerOptions, fileName string, path tspath.Path, - languageVersion core.ScriptTarget, text string, + options *core.SourceFileAffectingCompilerOptions, + metadata *ast.SourceFileMetaData, ) SourceFileCacheKey { return SourceFileCacheKey{ - SourceFileAffectingCompilerOptions: options, + SourceFileAffectingCompilerOptions: *options, + SourceFileMetaData: *metadata, fileName: fileName, path: path, - languageVersion: languageVersion, text: text, } } -func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path, languageVersion core.ScriptTarget) *ast.SourceFile { +func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path, options *core.SourceFileAffectingCompilerOptions, metadata *ast.SourceFileMetaData) *ast.SourceFile { text, _ := h.FS().ReadFile(fileName) key := GetSourceFileCacheKey( - *h.options.SourceFileAffecting(), fileName, path, - languageVersion, text, + h.options.SourceFileAffecting(), + metadata, ) if cached, ok := sourceFileCache.Load(key); ok { @@ -514,7 +514,7 @@ func (h *cachedCompilerHost) GetSourceFile(fileName string, path tspath.Path, la sourceFile = parser.ParseJSONText(fileName, path, text) } else { // !!! JSDocParsingMode - sourceFile = parser.ParseSourceFile(fileName, path, text, languageVersion, scanner.JSDocParsingModeParseAll) + sourceFile = parser.ParseSourceFile(fileName, path, text, options, metadata, scanner.JSDocParsingModeParseAll) } result, _ := sourceFileCache.LoadOrStore(key, sourceFile) diff --git a/internal/testutil/parsetestutil/parsetestutil.go b/internal/testutil/parsetestutil/parsetestutil.go index 880459327a..76833960d0 100644 --- a/internal/testutil/parsetestutil/parsetestutil.go +++ b/internal/testutil/parsetestutil/parsetestutil.go @@ -12,10 +12,14 @@ import ( "github.com/microsoft/typescript-go/internal/tspath" ) +var parseCompilerOptions = &core.SourceFileAffectingCompilerOptions{ + EmitScriptTarget: core.ScriptTargetLatest, +} + // Simplifies parsing an input string into a SourceFile for testing purposes. func ParseTypeScript(text string, jsx bool) *ast.SourceFile { fileName := core.IfElse(jsx, "/main.tsx", "/main.ts") - file := parser.ParseSourceFile(fileName, tspath.Path(fileName), text, core.ScriptTargetESNext, scanner.JSDocParsingModeParseNone) + file := parser.ParseSourceFile(fileName, tspath.Path(fileName), text, parseCompilerOptions, nil, scanner.JSDocParsingModeParseNone) ast.SetParentInChildren(file.AsNode()) return file } diff --git a/internal/testutil/tsbaseline/js_emit_baseline.go b/internal/testutil/tsbaseline/js_emit_baseline.go index 02e41c011d..ea9d78be7a 100644 --- a/internal/testutil/tsbaseline/js_emit_baseline.go +++ b/internal/testutil/tsbaseline/js_emit_baseline.go @@ -65,8 +65,10 @@ func DoJSEmitBaseline( file.UnitName, tspath.Path(file.UnitName), file.Content, - options.GetEmitScriptTarget(), - scanner.JSDocParsingModeParseAll) + options.SourceFileAffecting(), + nil, // TODO(jakebailey): need to grab this somehow? + scanner.JSDocParsingModeParseAll, + ) if len(fileParseResult.Diagnostics()) > 0 { jsCode.WriteString(getErrorBaseline(t, []*harnessutil.TestFile{file}, fileParseResult.Diagnostics(), false /*pretty*/)) continue