/third_party/typescript/tests/cases/fourslash/ |
D | jsxAttributeSnippetCompletionClosed.ts | 56 var preferences: FourSlashInterface.UserPreferences = { variable 63 …{ marker: "1", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 64 …{ marker: "2", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 65 …{ marker: "3", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 66 …{ marker: "4", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 67 …{ marker: "5", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 68 …{ marker: "6", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 69 …{ marker: "7", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 70 …{ marker: "8", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 71 …{ marker: "9", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… [all …]
|
D | jsxAttributeSnippetCompletionUnclosed.ts | 56 var preferences: FourSlashInterface.UserPreferences = { variable 63 …{ marker: "1", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 64 …{ marker: "2", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 65 …{ marker: "3", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 66 …{ marker: "4", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 67 …{ marker: "5", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 68 …{ marker: "6", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 69 …{ marker: "7", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 70 …{ marker: "8", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… 71 …{ marker: "9", preferences, includes: { name: "className", insertText: "className={$1}", text: "(p… [all …]
|
D | completionsOverridingMethod.ts | 118 preferences: { 135 preferences: { 152 preferences: { 169 preferences: { 186 preferences: { 203 preferences: { 220 preferences: { 241 preferences: { 251 preferences: { 269 preferences: {
|
D | jsxTagNameCompletionClosed.ts | 41 var preferences: FourSlashInterface.UserPreferences = { variable 48 { marker: "1", preferences, includes: { name: "Foo", text: "const Foo: NestedInterface" } }, 49 { marker: "2", preferences, includes: { name: "Foo", text: "const Foo: NestedInterface" } }, 50 …{ marker: "3", preferences, includes: { name: "Foo", text: "(property) NestedInterface.Foo: Nested… 51 …{ marker: "4", preferences, includes: { name: "Foo", text: "(property) NestedInterface.Foo: Nested… 52 …{ marker: "5", preferences, includes: { name: "Foo", text: "(property) NestedInterface.Foo: Nested… 53 …{ marker: "6", preferences, includes: { name: "Foo", text: "(property) NestedInterface.Foo: Nested…
|
D | jsxTagNameCompletionUnclosed.ts | 41 var preferences: FourSlashInterface.UserPreferences = { variable 48 { marker: "1", preferences, includes: { name: "Foo", text: "const Foo: NestedInterface" } }, 49 { marker: "2", preferences, includes: { name: "Foo", text: "const Foo: NestedInterface" } }, 50 …{ marker: "3", preferences, includes: { name: "Foo", text: "(property) NestedInterface.Foo: Nested… 51 …{ marker: "4", preferences, includes: { name: "Foo", text: "(property) NestedInterface.Foo: Nested… 52 …{ marker: "5", preferences, includes: { name: "Foo", text: "(property) NestedInterface.Foo: Nested… 53 …{ marker: "6", preferences, includes: { name: "Foo", text: "(property) NestedInterface.Foo: Nested…
|
D | completionsImport_filteredByPackageJson_ambient.ts | 59 preferences: { 73 preferences: { 87 preferences: { 101 preferences: { 115 preferences: {
|
D | jsxTagNameCompletionUnderElementClosed.ts | 25 var preferences: FourSlashInterface.UserPreferences = { variable 32 …{ marker: "1", preferences, includes: { name: "button", text: "(property) JSX.IntrinsicElements.bu… 33 …{ marker: "2", preferences, includes: { name: "button", text: "(property) JSX.IntrinsicElements.bu… 34 …{ marker: "3", preferences, includes: { name: "button", text: "(property) JSX.IntrinsicElements.bu…
|
D | jsxTagNameCompletionUnderElementUnclosed.ts | 25 var preferences: FourSlashInterface.UserPreferences = { variable 32 …{ marker: "1", preferences, includes: { name: "button", text: "(property) JSX.IntrinsicElements.bu… 33 …{ marker: "2", preferences, includes: { name: "button", text: "(property) JSX.IntrinsicElements.bu… 34 …{ marker: "3", preferences, includes: { name: "button", text: "(property) JSX.IntrinsicElements.bu…
|
D | completionsObjectLiteralMethod1.ts | 37 preferences: { 63 preferences: { 104 preferences: { 120 preferences: { 146 preferences: { 173 preferences: {
|
D | completionsRecommended_import.ts | 21 const preferences: FourSlashInterface.UserPreferences = { includeCompletionsForModuleExports: true … constant 34 { marker: "b0", includes: classEntry(true), preferences }, 35 { marker: "b1", includes: classEntry(false), preferences }, 44 preferences,
|
D | completionsImport_keywords.ts | 19 const preferences: FourSlashInterface.UserPreferences = { includeCompletionsForModuleExports: true … constant 25 preferences, 31 preferences, 50 preferences,
|
D | completionsImport_uriStyleNodeCoreModules3.ts | 47 preferences: { 65 preferences: { 87 preferences: { 105 preferences: {
|
/third_party/typescript/src/server/ |
D | moduleSpecifierCache.ts | 12 get(fromFileName, toFileName, preferences, options) { 13 … if (!cache || currentKey !== key(fromFileName, preferences, options)) return undefined; 16 set(fromFileName, toFileName, preferences, options, modulePaths, moduleSpecifiers) { 17 …ensureCache(fromFileName, preferences, options).set(toFileName, createInfo(modulePaths, moduleSpec… 39 setModulePaths(fromFileName, toFileName, preferences, options, modulePaths) { 40 const cache = ensureCache(fromFileName, preferences, options); 49 …setBlockedByPackageJsonDependencies(fromFileName, toFileName, preferences, options, isBlockedByPac… 50 const cache = ensureCache(fromFileName, preferences, options); 74 …function ensureCache(fromFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOpt… 75 const newKey = key(fromFileName, preferences, options); [all …]
|
/third_party/typescript/src/services/ |
D | inlayHints.ts | 10 function shouldShowParameterNameHints(preferences: UserPreferences) { 11 …return preferences.includeInlayParameterNameHints === "literals" || preferences.includeInlayParame… 14 function shouldShowLiteralParameterNameHintsOnly(preferences: UserPreferences) { 15 return preferences.includeInlayParameterNameHints === "literals"; 19 const { file, program, span, cancellationToken, preferences } = context; constant 54 if (preferences.includeInlayVariableTypeHints && isVariableDeclaration(node)) { 57 … else if (preferences.includeInlayPropertyDeclarationTypeHints && isPropertyDeclaration(node)) { 60 else if (preferences.includeInlayEnumMemberValueHints && isEnumMember(node)) { 63 …else if (shouldShowParameterNameHints(preferences) && (isCallExpression(node) || isNewExpression(n… 67 …if (preferences.includeInlayFunctionParameterTypeHints && isFunctionLikeDeclaration(node) && hasCo… [all …]
|
D | completions.ts | 190 preferences: UserPreferences, 229 …const shouldResolveModuleSpecifier = needsFullResolution || preferences.allowIncompleteCompletions… 230 …const shouldGetModuleSpecifierFromCache = !shouldResolveModuleSpecifier && preferences.allowIncomp… 255 preferences: UserPreferences, 268 …if (preferences.includeCompletionsForImportStatements && preferences.includeCompletionsWithInsertT… 278 …const incompleteCompletionsCache = preferences.allowIncompleteCompletions ? host.getIncompleteComp… 280 …(incompleteCompletionsCache, sourceFile, previousToken, program, host, preferences, cancellationTo… 289 …Completions(sourceFile, position, previousToken, compilerOptions, host, program, log, preferences); 299 …getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, /*detailsEntry… 306 …mData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext,… [all …]
|
D | rename.ts | 3 …RenameInfo(program: Program, sourceFile: SourceFile, position: number, preferences: UserPreference… 6 …enameInfo = getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, program, preferences); 19 preferences: UserPreferences): RenameInfo | undefined { 51 …return preferences.allowRenameOfImportPath ? getRenameInfoForModule(node, sourceFile, symbol) : un… 55 …uldRenameNodeModules = wouldRenameInOtherNodeModules(sourceFile, symbol, typeChecker, preferences); 78 preferences: UserPreferences 80 if (!preferences.providePrefixAndSuffixTextForRename && symbol.flags & SymbolFlags.Alias) {
|
/third_party/typescript/src/testRunner/unittests/tsserver/ |
D | moduleSpecifierCache.ts | 101 … const preferences: UserPreferences = { importModuleSpecifierPreference: "project-relative" }; constant 104 …ureRequest, protocol.ConfigureResponse>(session, protocol.CommandTypes.Configure, { preferences }); 107 assert.isUndefined(getWithPreferences(preferences)); 111 assert.ok(getWithPreferences(preferences)); 115 preferences: { importModuleSpecifierEnding: "js" }, 118 assert.isUndefined(getWithPreferences(preferences)); 120 function getWithPreferences(preferences: UserPreferences) { 121 … return moduleSpecifierCache.get(bTs.path as Path, aTs.path as Path, preferences, {}); 133 preferences: {
|
D | rename.ts | 21 …session.getProjectService().setHostConfiguration({ preferences: { allowRenameOfImportPath: true } … 46 …session.getProjectService().setHostConfiguration({ preferences: { allowRenameOfImportPath: false }… 47 …jectService().setHostConfiguration({ file: "/b.ts", formatOptions: {}, preferences: { allowRenameO… 110 …session.getProjectService().setHostConfiguration({ preferences: { providePrefixAndSuffixTextForRen… 143 …session.getProjectService().setHostConfiguration({ preferences: { providePrefixAndSuffixTextForRen… 144 …jectService().setHostConfiguration({ file: "/a.ts", formatOptions: {}, preferences: { providePrefi… 184 …session.getProjectService().setHostConfiguration({ preferences: { providePrefixAndSuffixTextForRen… 222 …jectService().setHostConfiguration({ file: "/a.ts", formatOptions: {}, preferences: { providePrefi…
|
/third_party/typescript/src/services/codefixes/ |
D | fixInvalidJsxCharacters.ts | 15 const { sourceFile, preferences, span } = context; constant 16 …oExpression = textChanges.ChangeTracker.with(context, t => doChange(t, preferences, sourceFile, sp… 17 …oHtmlEntity = textChanges.ChangeTracker.with(context, t => doChange(t, preferences, sourceFile, sp… 25 …ontext, errorCodes, (changes, diagnostic) => doChange(changes, context.preferences, diagnostic.fil… 38 …function doChange(changes: textChanges.ChangeTracker, preferences: UserPreferences, sourceFile: So… 45 …acement = useHtmlEntity ? htmlEntity[character] : `{${quote(sourceFile, preferences, character)}}`;
|
D | fixNoPropertyAccessFromIndexSignature.ts | 12 const { sourceFile, span, preferences } = context; constant 14 …xtChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, property, preferences)); 18 …hange(changes, diag.file, getPropertyAccessExpression(diag.file, diag.start), context.preferences)) 21 …ChangeTracker, sourceFile: SourceFile, node: PropertyAccessExpression, preferences: UserPreference… 22 const quotePreference = getQuotePreference(sourceFile, preferences);
|
D | importFixes.ts | 20 const { errorCode, preferences, sourceFile, span, program } = context; constant 23 const quotePreference = getQuotePreference(sourceFile, preferences); 35 const { sourceFile, program, preferences, host, cancellationToken } = context; constant 36 …ImportAdderWorker(sourceFile, program, /*useAutoImportProvider*/ true, preferences, host, cancella… 52 …export function createImportAdder(sourceFile: SourceFile, program: Program, preferences: UserPrefe… 53 …mportAdderWorker(sourceFile, program, /*useAutoImportProvider*/ false, preferences, host, cancella… 62 …rceFile: SourceFile, program: Program, useAutoImportProvider: boolean, preferences: UserPreference… 86 …sourceFile, symbol, symbolName, /*isJsxTagName*/ false, program, host, preferences, cancellationTo… 88 … program, /*useNamespaceInfo*/ undefined, !!isValidTypeOnlyUseSite, useRequire, host, preferences); 200 const quotePreference = getQuotePreference(sourceFile, preferences); [all …]
|
D | fixClassDoesntImplementInheritedAbstractMember.ts | 13 … addMissingMembers(getClass(sourceFile, span.start), sourceFile, context, t, context.preferences)); 22 … addMissingMembers(classDeclaration, context.sourceFile, context, changes, context.preferences); 35 …xt: TypeConstructionContext, changeTracker: textChanges.ChangeTracker, preferences: UserPreference… 44 … const importAdder = createImportAdder(sourceFile, context.program, preferences, context.host); 45 …Declaration, abstractAndNonPrivateExtendsSymbols, sourceFile, context, preferences, importAdder, m…
|
D | fixAddMissingConstraint.ts | 19 const { sourceFile, span, program, preferences, host } = context; constant 23 …nges.ChangeTracker.with(context, t => addMissingConstraint(t, program, preferences, host, sourceFi… 28 const { program, preferences, host } = context; constant 36 … return addMissingConstraint(changes, program, preferences, host, diag.file, info); 78 …function addMissingConstraint(changes: textChanges.ChangeTracker, program: Program, preferences: U… 88 const importAdder = createImportAdder(sourceFile, program, preferences, host);
|
D | fixClassIncorrectlyImplementsInterface.ts | 14 …gDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, t, context.preferences)); 25 …larations(context, implementedTypeNode, diag.file, classDeclaration, changes, context.preferences); 46 preferences: UserPreferences, 66 … const importAdder = createImportAdder(sourceFile, context.program, preferences, context.host); 67 …, nonPrivateAndNotExistedInHeritageClauseMembers, sourceFile, context, preferences, importAdder, m…
|
D | useDefaultImport.ts | 11 …= textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, info, context.preferences)); 17 if (info) doChange(changes, diag.file, info, context.preferences); 39 …hanges: textChanges.ChangeTracker, sourceFile: SourceFile, info: Info, preferences: UserPreference… 40 …e, /*namedImports*/ undefined, info.moduleSpecifier, getQuotePreference(sourceFile, preferences)));
|