diff --git a/.eslintrc.json b/.eslintrc.json index 2ea9622d72e9d..8dd410735afca 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,7 +11,7 @@ "es6": true }, "plugins": [ - "@typescript-eslint", "jsdoc", "no-null", "import", "eslint-plugin-local" + "@typescript-eslint", "jsdoc", "no-null", "import", "eslint-plugin-local", "eslint-plugin-tsdoc" ], "overrides": [ // By default, the ESLint CLI only looks at .js files. But, it will also look at @@ -22,7 +22,13 @@ // // ESLint in VS Code will lint any opened file (so long as it's not eslintignore'd), so // that will work regardless of the below. - { "files": ["*.ts", "*.mts", "*.cts", "*.mjs", "*.cjs"] } + { "files": ["*.ts", "*.mts", "*.cts", "*.mjs", "*.cjs"] }, + { + "files": ["*.js", "*.mjs", "*.cjs"], + "rules": { + "tsdoc/syntax": "off" + } + } ], "rules": { "@typescript-eslint/adjacent-overload-signatures": "error", @@ -104,6 +110,9 @@ // eslint-plugin-jsdoc "jsdoc/check-alignment": "error", + + // eslint-plugin-tsdoc + "tsdoc/syntax": "error", // eslint "constructor-super": "error", diff --git a/package-lock.json b/package-lock.json index 1c07125ef1bb9..166aed5c0ae0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,6 +48,7 @@ "eslint-plugin-jsdoc": "^39.3.6", "eslint-plugin-local": "^1.0.0", "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-tsdoc": "^0.2.16", "fancy-log": "latest", "fs-extra": "^9.1.0", "glob": "latest", @@ -217,6 +218,37 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@microsoft/tsdoc": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.1.tgz", + "integrity": "sha512-6Wci+Tp3CgPt/B9B0a3J4s3yMgLNSku6w5TV6mN+61C71UqsRBv2FUibBf3tPGlNxebgPHMEUzKpb1ggE8KCKw==", + "dev": true + }, + "node_modules/@microsoft/tsdoc-config": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.16.1.tgz", + "integrity": "sha512-2RqkwiD4uN6MLnHFljqBlZIXlt/SaUT6cuogU1w2ARw4nKuuppSmR0+s+NC+7kXBQykd9zzu0P4HtBpZT5zBpQ==", + "dev": true, + "dependencies": { + "@microsoft/tsdoc": "0.14.1", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + } + }, + "node_modules/@microsoft/tsdoc-config/node_modules/resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "dependencies": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2513,6 +2545,16 @@ "eslint": ">=3.0.0" } }, + "node_modules/eslint-plugin-tsdoc": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.16.tgz", + "integrity": "sha512-F/RWMnyDQuGlg82vQEFHQtGyWi7++XJKdYNn0ulIbyMOFqYIjoJOUdE6olORxgwgLkpJxsCJpJbTHgxJ/ggfXw==", + "dev": true, + "dependencies": { + "@microsoft/tsdoc": "0.14.1", + "@microsoft/tsdoc-config": "0.16.1" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -4923,6 +4965,12 @@ "node": ">=0.10.0" } }, + "node_modules/jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", + "dev": true + }, "node_modules/js-sdsl": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz", @@ -8650,6 +8698,36 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@microsoft/tsdoc": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.1.tgz", + "integrity": "sha512-6Wci+Tp3CgPt/B9B0a3J4s3yMgLNSku6w5TV6mN+61C71UqsRBv2FUibBf3tPGlNxebgPHMEUzKpb1ggE8KCKw==", + "dev": true + }, + "@microsoft/tsdoc-config": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.16.1.tgz", + "integrity": "sha512-2RqkwiD4uN6MLnHFljqBlZIXlt/SaUT6cuogU1w2ARw4nKuuppSmR0+s+NC+7kXBQykd9zzu0P4HtBpZT5zBpQ==", + "dev": true, + "requires": { + "@microsoft/tsdoc": "0.14.1", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + }, + "dependencies": { + "resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "requires": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -10502,6 +10580,16 @@ "dev": true, "requires": {} }, + "eslint-plugin-tsdoc": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.16.tgz", + "integrity": "sha512-F/RWMnyDQuGlg82vQEFHQtGyWi7++XJKdYNn0ulIbyMOFqYIjoJOUdE6olORxgwgLkpJxsCJpJbTHgxJ/ggfXw==", + "dev": true, + "requires": { + "@microsoft/tsdoc": "0.14.1", + "@microsoft/tsdoc-config": "0.16.1" + } + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -12361,6 +12449,12 @@ "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true }, + "jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", + "dev": true + }, "js-sdsl": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz", diff --git a/package.json b/package.json index 0d80542b7fab5..2a460cf3f7960 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "eslint-plugin-jsdoc": "^39.3.6", "eslint-plugin-local": "^1.0.0", "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-tsdoc": "^0.2.16", "fancy-log": "latest", "fs-extra": "^9.1.0", "glob": "latest", diff --git a/scripts/buildProtocol.ts b/scripts/buildProtocol.ts index 2cc843d45785b..9a35e2488a1ae 100644 --- a/scripts/buildProtocol.ts +++ b/scripts/buildProtocol.ts @@ -124,7 +124,7 @@ function writeProtocolFile(outputFile: string, protocolTs: string, typeScriptSer /** * 1st pass - generate a program from protocol.ts and typescriptservices.d.ts and emit core version of protocol.d.ts with all internal members stripped - * @return text of protocol.d.t.s + * @returns text of protocol.d.t.s */ function getInitialDtsFileForProtocol() { const program = ts.createProgram([protocolTs, typeScriptServicesDts, path.join(typeScriptServicesDts, "../lib.es5.d.ts")], options); diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 1e347f9d81e15..367c02a6acc3f 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -2996,7 +2996,7 @@ namespace ts { } } - /** For `x.prototype = { p, ... }`, declare members p,... if `x` is function/class/{}, or not declared. */ + /** For `x.prototype = { p, ... }`, declare members p,... if `x` is function/class/`{}`, or not declared. */ function bindPrototypeAssignment(node: BindableStaticPropertyAssignmentExpression) { setParent(node.left, node); setParent(node.right, node); @@ -3067,8 +3067,8 @@ namespace ts { } /** - * For nodes like `x.y = z`, declare a member 'y' on 'x' if x is a function (or IIFE) or class or {}, or not declared. - * Also works for expression statements preceded by JSDoc, like / ** @type number * / x.y; + * For nodes like `x.y = z`, declare a member 'y' on 'x' if x is a function (or IIFE) or class or `{}`, or not declared. + * Also works for expression statements preceded by JSDoc, like `/ ** @type number * / x.y`; */ function bindStaticPropertyAssignment(node: BindableStaticNameExpression) { Debug.assert(!isIdentifier(node)); diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 6177713582859..dbc4bfbdfa6e1 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -973,7 +973,7 @@ namespace ts { } /** - * @param optionKey key of CommandLineOption to use to determine if the option should be serialized in tsbuildinfo + * @param optionKey - key of CommandLineOption to use to determine if the option should be serialized in tsbuildinfo */ function convertToProgramBuildInfoCompilerOptions(options: CompilerOptions, optionKey: "affectsBundleEmitBuildInfo" | "affectsMultiFileEmitBuildInfo") { let result: CompilerOptions | undefined; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f30f8e9d00a42..8b92978baf6a1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -229,7 +229,7 @@ namespace ts { Parameter, } - /** @param containingNode Node to check for parse error */ + /** @param containingNode - Node to check for parse error */ type AddUnusedDiagnostic = (containingNode: Node, type: UnusedKind, diagnostic: DiagnosticWithLocation) => void; const isNotOverloadAndNotAccessor = and(isNotOverload, isNotAccessor); @@ -1545,9 +1545,9 @@ namespace ts { /** * 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 + * @param parameter - a parameterDeclaration node + * @param parameterName - a name of the parameter to get the symbols for. + * @returns a tuple of two symbols */ function getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: __String): [Symbol, Symbol] { const constructorDeclaration = parameter.parent; @@ -1829,7 +1829,7 @@ namespace ts { * the nameNotFoundMessage argument is not undefined. Returns the resolved symbol, or undefined if no symbol with * the given name can be found. * - * @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters. + * @param isUse - If true, this will count towards --noUnusedLocals / --noUnusedParameters. */ function resolveName( location: Node | undefined, @@ -2658,6 +2658,7 @@ namespace ts { /** * An alias symbol is created by one of the following declarations: + * ``` * import = ... * import from ... * import * as from ... @@ -2670,6 +2671,7 @@ namespace ts { * {} * {name: } * const { x } = require ... + * ``` */ function isAliasSymbolDeclaration(node: Node): boolean { return node.kind === SyntaxKind.ImportEqualsDeclaration @@ -3238,10 +3240,10 @@ namespace ts { * JS-emitting expression, we can quickly determine if that symbol is effectively type-only * and issue an error if so. * - * @param aliasDeclaration The alias declaration not marked as type-only - * @param immediateTarget The symbol to which the alias declaration immediately resolves - * @param finalTarget The symbol to which the alias declaration ultimately resolves - * @param overwriteEmpty Checks `resolvesToSymbol` for type-only declarations even if `aliasDeclaration` + * @param aliasDeclaration - The alias declaration not marked as type-only + * @param immediateTarget - The symbol to which the alias declaration immediately resolves + * @param finalTarget - The symbol to which the alias declaration ultimately resolves + * @param overwriteEmpty - Checks `resolvesToSymbol` for type-only declarations even if `aliasDeclaration` * has already been marked as not resolving to a type-only alias. Used when recursively resolving qualified * names of import aliases, e.g. `import C = a.b.C`. If namespace `a` is not found to be type-only, the * import declaration will initially be marked as not resolving to a type-only symbol. But, namespace `b` @@ -4437,7 +4439,7 @@ namespace ts { return result; /** - * @param {ignoreQualification} boolean Set when a symbol is being looked for through the exports of another symbol (meaning we have a route to qualify it already) + * @param ignoreQualification - Set when a symbol is being looked for through the exports of another symbol (meaning we have a route to qualify it already) */ function getAccessibleSymbolChainFromSymbolTable(symbols: SymbolTable, ignoreQualification?: boolean, isLocalNameLookup?: boolean): Symbol[] | undefined { if (!pushIfUnique(visitedSymbolTables!, symbols)) { @@ -4650,10 +4652,10 @@ namespace ts { /** * Check if the given symbol in given enclosing declaration is accessible and mark all associated alias to be visible if requested * - * @param symbol a Symbol to check if accessible - * @param enclosingDeclaration a Node containing reference to the symbol - * @param meaning a SymbolFlags to check if such meaning of the symbol is accessible - * @param shouldComputeAliasToMakeVisible a boolean value to indicate whether to return aliases to be mark visible in case the symbol is accessible + * @param symbol - a Symbol to check if accessible + * @param enclosingDeclaration - a Node containing reference to the symbol + * @param meaning - a SymbolFlags to check if such meaning of the symbol is accessible + * @param shouldComputeAliasToMakeVisible - a boolean value to indicate whether to return aliases to be mark visible in case the symbol is accessible */ function isSymbolAccessible(symbol: Symbol | undefined, enclosingDeclaration: Node | undefined, meaning: SymbolFlags, shouldComputeAliasesToMakeVisible: boolean): SymbolAccessibilityResult { return isSymbolAccessibleWorker(symbol, enclosingDeclaration, meaning, shouldComputeAliasesToMakeVisible, /*allowModules*/ true); @@ -6175,7 +6177,7 @@ namespace ts { } return chain; - /** @param endOfChain Set to false for recursive calls; non-recursive calls should always output something. */ + /** @param endOfChain - Set to false for recursive calls; non-recursive calls should always output something. */ function getSymbolChain(symbol: Symbol, meaning: SymbolFlags, endOfChain: boolean): Symbol[] | undefined { let accessibleSymbolChain = getAccessibleSymbolChain(symbol, context.enclosingDeclaration, meaning, !!(context.flags & NodeBuilderFlags.UseOnlyExternalAliasing)); let parentSpecifiers: (string | undefined)[]; @@ -8708,8 +8710,8 @@ namespace ts { * In order to see if the same query has already been done before, the target object and the propertyName both * must match the one passed in. * - * @param target The symbol, type, or signature whose type is being queried - * @param propertyName The property name that should be used to query the target for its type + * @param target - The symbol, type, or signature whose type is being queried + * @param propertyName - The property name that should be used to query the target for its type */ function pushTypeResolution(target: TypeSystemEntity, propertyName: TypeSystemPropertyName): boolean { const resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName); @@ -11000,21 +11002,23 @@ namespace ts { * * For example, given: * + * ``` * const x = Symbol(); * * interface I { * [x]: number; * } + * ``` * * The binder gives the property `[x]: number` a special symbol with the name "__computed". * In the late-binding phase we can type-check the expression `x` and see that it has a * unique symbol type which we can then use as the name of the member. This allows users * to define custom symbols that can be used in the members of an object type. * - * @param parent The containing symbol for the member. - * @param earlySymbols The early-bound symbols of the parent. - * @param lateSymbols The late-bound symbols of the parent. - * @param decl The member to bind. + * @param parent - The containing symbol for the member. + * @param earlySymbols - The early-bound symbols of the parent. + * @param lateSymbols - The late-bound symbols of the parent. + * @param decl - The member to bind. */ function lateBindMember(parent: Symbol, earlySymbols: SymbolTable | undefined, lateSymbols: UnderscoreEscapedMap, decl: LateBoundDeclaration | LateBoundBinaryExpressionDeclaration) { Debug.assert(!!decl.symbol, "The member is expected to have a symbol."); @@ -11831,7 +11835,7 @@ namespace ts { } } - /** Resolve the members of a mapped type { [P in K]: T } */ + /** Resolve the members of a mapped type `{ [P in K]: T }` */ function resolveMappedTypeMembers(type: MappedType) { const members: SymbolTable = createSymbolTable(); let indexInfos: IndexInfo[] | undefined; @@ -12758,8 +12762,8 @@ namespace ts { * necessary, maps primitive types and type parameters are to their apparent types, and augments with properties from * Object and Function as appropriate. * - * @param type a type to look up property from - * @param name a name of property to look up in a given type + * @param type - a type to look up property from + * @param name - a name of property to look up in a given type */ function getPropertyOfType(type: Type, name: __String, skipObjectFunctionPropertyAugment?: boolean, includeTypeOnlyMembers?: boolean): Symbol | undefined { type = getReducedApparentType(type); @@ -12979,9 +12983,9 @@ namespace ts { * Fill in default types for unsupplied type arguments. If `typeArguments` is undefined * when a default type is supplied, a new array will be created and returned. * - * @param typeArguments The supplied type arguments. - * @param typeParameters The requested type parameters. - * @param minTypeArgumentCount The minimum number of required type arguments. + * @param typeArguments - The supplied type arguments. + * @param typeParameters - The requested type parameters. + * @param minTypeArgumentCount - The minimum number of required type arguments. */ function fillMissingTypeArguments(typeArguments: readonly Type[], typeParameters: readonly TypeParameter[] | undefined, minTypeArgumentCount: number, isJavaScriptImplicitAny: boolean): Type[]; function fillMissingTypeArguments(typeArguments: readonly Type[] | undefined, typeParameters: readonly TypeParameter[] | undefined, minTypeArgumentCount: number, isJavaScriptImplicitAny: boolean): Type[] | undefined; @@ -15332,7 +15336,7 @@ namespace ts { * rather than manufacturing the properties. We can't just fetch the `constraintType` since that would ignore mappings * and mapping the `constraintType` directly ignores how mapped types map _properties_ and not keys (thus ignoring subtype * reduction in the constraintType) when possible. - * @param noIndexSignatures Indicates if _string_ index signatures should be elided. (other index signatures are always reported) + * @param noIndexSignatures - Indicates if _string_ index signatures should be elided. (other index signatures are always reported) */ function getIndexTypeForMappedType(type: MappedType, stringsOnly: boolean, noIndexSignatures: boolean | undefined) { const typeParameter = getTypeParameterFromMappedType(type); @@ -18530,14 +18534,14 @@ namespace ts { /** * Checks if 'source' is related to 'target' (e.g.: is a assignable to). - * @param source The left-hand-side of the relation. - * @param target The right-hand-side of the relation. - * @param relation The relation considered. One of 'identityRelation', 'subtypeRelation', 'assignableRelation', or 'comparableRelation'. + * @param source - The left-hand-side of the relation. + * @param target - The right-hand-side of the relation. + * @param relation - The relation considered. One of 'identityRelation', 'subtypeRelation', 'assignableRelation', or 'comparableRelation'. * Used as both to determine which checks are performed and as a cache of previously computed results. - * @param errorNode The suggested node upon which all errors will be reported, if defined. This may or may not be the actual node used. - * @param headMessage If the error chain should be prepended by a head message, then headMessage will be used. - * @param containingMessageChain A chain of errors to prepend any new errors found. - * @param errorOutputContainer Return the diagnostic. Do not log if 'skipLogging' is truthy. + * @param errorNode - The suggested node upon which all errors will be reported, if defined. This may or may not be the actual node used. + * @param headMessage - If the error chain should be prepended by a head message, then headMessage will be used. + * @param containingMessageChain - A chain of errors to prepend any new errors found. + * @param errorOutputContainer - Return the diagnostic. Do not log if 'skipLogging' is truthy. */ function checkTypeRelatedTo( source: Type, @@ -21701,8 +21705,8 @@ namespace ts { * * @see narrowTypeByEquality * - * @param source - * @param target + * @param source - + * @param target - */ function isCoercibleUnderDoubleEquals(source: Type, target: Type): boolean { return ((source.flags & (TypeFlags.Number | TypeFlags.String | TypeFlags.BooleanLiteral)) !== 0) @@ -22226,7 +22230,7 @@ namespace ts { } /** - * Infer a suitable input type for a homomorphic mapped type { [P in keyof T]: X }. We construct + * Infer a suitable input type for a homomorphic mapped type `{ [P in keyof T]: X }`. We construct * an object type with the same set of properties as the source type, where the type of each * property is computed by inferring from the source property type to X for the type * variable T[P] (i.e. we treat the type T[P] as the type variable we're inferring for). @@ -22370,8 +22374,8 @@ namespace ts { /** * Tests whether the provided string can be parsed as a number. - * @param s The string to test. - * @param roundTripOnly Indicates the resulting number matches the input when converted back to a string. + * @param s - The string to test. + * @param roundTripOnly - Indicates the resulting number matches the input when converted back to a string. */ function isValidNumberString(s: string, roundTripOnly: boolean): boolean { if (s === "") return false; @@ -22380,7 +22384,7 @@ namespace ts { } /** - * @param text a valid bigint string excluding a trailing `n`, but including a possible prefix `-`. Use `isValidBigIntString(text, roundTripOnly)` before calling this function. + * @param text - a valid bigint string excluding a trailing `n`, but including a possible prefix `-`. Use `isValidBigIntString(text, roundTripOnly)` before calling this function. */ function parseBigIntLiteralType(text: string) { const negative = text.startsWith("-"); @@ -22390,8 +22394,8 @@ namespace ts { /** * Tests whether the provided string can be parsed as a bigint. - * @param s The string to test. - * @param roundTripOnly Indicates the resulting bigint matches the input when converted back to a string. + * @param s - The string to test. + * @param roundTripOnly - Indicates the resulting bigint matches the input when converted back to a string. */ function isValidBigIntString(s: string, roundTripOnly: boolean): boolean { if (s === "") return false; @@ -26310,7 +26314,7 @@ namespace ts { /** * Check if the given class-declaration extends null then return true. * Otherwise, return false - * @param classDecl a class declaration to check if it extends null + * @param classDecl - a class declaration to check if it extends null */ function classDeclarationExtendsNull(classDecl: ClassDeclaration): boolean { const classSymbol = getSymbolOfNode(classDecl); @@ -27495,7 +27499,7 @@ namespace ts { * - Use 'getContextualType' when you are simply going to propagate the result to the expression. * - Use 'getApparentTypeOfContextualType' when you're going to need the members of the type. * - * @param node the expression whose contextual type will be returned. + * @param node - the expression whose contextual type will be returned. * @returns the contextual type of an expression. */ function getContextualType(node: Expression, contextFlags: ContextFlags | undefined): Type | undefined { @@ -28398,9 +28402,9 @@ namespace ts { /** * Get attributes type of the JSX opening-like element. The result is from resolving "attributes" property of the opening-like element. * - * @param openingLikeElement a JSX opening-like element - * @param filter a function to remove attributes that will not participate in checking whether attributes are assignable - * @return an anonymous type (similar to the one returned by checkObjectLiteral) in which its properties are attributes property. + * @param openingLikeElement - a JSX opening-like element + * @param filter - a function to remove attributes that will not participate in checking whether attributes are assignable + * @returns an anonymous type (similar to the one returned by checkObjectLiteral) in which its properties are attributes property. * @remarks Because this function calls getSpreadType, it needs to use the same checks as checkObjectLiteral, * which also calls getSpreadType. */ @@ -28514,8 +28518,8 @@ namespace ts { /** * 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 + * @param symbol - a symbol of JsxAttributes containing attributes corresponding to attributesTable + * @param attributesTable - a symbol table of attributes property */ function createJsxAttributesType() { objectFlags |= freshObjectLiteralFlag; @@ -28560,7 +28564,7 @@ namespace ts { /** * Check attributes property of opening-like element. This function is called during chooseOverload to get call signature of a JSX opening-like element. * (See "checkApplicableSignatureForJsxOpeningLikeElement" for how the function is used) - * @param node a JSXAttributes to be resolved of its type + * @param node - a JSXAttributes to be resolved of its type */ function checkJsxAttributes(node: JsxAttributes, checkMode: CheckMode | undefined) { return createJsxAttributesTypeFromAttributesProperty(node.parent, checkMode); @@ -28676,7 +28680,7 @@ namespace ts { * Look into JSX namespace and then look for container with matching name as nameOfAttribPropContainer. * Get a single property from that container if existed. Report an error if there are more than one property. * - * @param nameOfAttribPropContainer a string of value JsxNames.ElementAttributesPropertyNameContainer or JsxNames.ElementChildrenAttributeNameContainer + * @param nameOfAttribPropContainer - a string of value JsxNames.ElementAttributesPropertyNameContainer or JsxNames.ElementChildrenAttributeNameContainer * if other string is given or the container doesn't exist, return undefined. */ function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer: __String, jsxNamespace: Symbol): __String | undefined { @@ -28806,7 +28810,7 @@ namespace ts { /** * Get attributes type of the given intrinsic opening-like Jsx element by resolving the tag name. * The function is intended to be called from a function which has checked that the opening element is an intrinsic element. - * @param node an intrinsic JSX opening-like element + * @param node - an intrinsic JSX opening-like element */ function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node: JsxOpeningLikeElement): Type { Debug.assert(isJsxIntrinsicIdentifier(node.tagName)); @@ -28925,9 +28929,9 @@ namespace ts { * (this means that 'toString', for example, is not usually a known property). * 4. In a union or intersection type, * a property is considered known if it is known in any constituent type. - * @param targetType a type to search a given name in - * @param name a property name to search - * @param isComparingJsxAttributes a boolean flag indicating whether we are searching in JsxAttributesType + * @param targetType - a type to search a given name in + * @param name - a property name to search + * @param isComparingJsxAttributes - a boolean flag indicating whether we are searching in JsxAttributesType */ function isKnownProperty(targetType: Type, name: __String, isComparingJsxAttributes: boolean): boolean { if (targetType.flags & TypeFlags.Object) { @@ -28995,10 +28999,10 @@ namespace ts { /** * Check whether the requested property access is valid. * Returns true if node is a valid property access, and false otherwise. - * @param node The node to be checked. - * @param isSuper True if the access is from `super.`. - * @param type The type of the object whose property is being accessed. (Not the type of the property.) - * @param prop The symbol for the property being accessed. + * @param node - The node to be checked. + * @param isSuper - True if the access is from `super.`. + * @param type - The type of the object whose property is being accessed. (Not the type of the property.) + * @param prop - The symbol for the property being accessed. */ function checkPropertyAccessibility( node: PropertyAccessExpression | QualifiedName | PropertyAccessExpression | VariableDeclaration | ParameterDeclaration | ImportTypeNode | PropertyAssignment | ShorthandPropertyAssignment | BindingElement, @@ -29015,12 +29019,12 @@ namespace ts { /** * Check whether the requested property can be accessed at the requested location. * Returns true if node is a valid property access, and false otherwise. - * @param location The location node where we want to check if the property is accessible. - * @param isSuper True if the access is from `super.`. - * @param writing True if this is a write property access, false if it is a read property access. - * @param containingType The type of the object whose property is being accessed. (Not the type of the property.) - * @param prop The symbol for the property being accessed. - * @param errorNode The node where we should report an invalid property access error, or undefined if we should not report errors. + * @param location - The location node where we want to check if the property is accessible. + * @param isSuper - True if the access is from `super.`. + * @param writing - True if this is a write property access, false if it is a read property access. + * @param containingType - The type of the object whose property is being accessed. (Not the type of the property.) + * @param prop - The symbol for the property being accessed. + * @param errorNode - The node where we should report an invalid property access error, or undefined if we should not report errors. */ function checkPropertyAccessibilityAtLocation(location: Node, isSuper: boolean, writing: boolean, @@ -29491,7 +29495,7 @@ namespace ts { /** * Determines whether a did-you-mean error should be a suggestion in an unchecked JS file. - * Only applies to unchecked JS files without checkJS, // @ts-check or // @ts-nocheck + * Only applies to unchecked JS files without checkJS, `// @ts-check` or `// @ts-nocheck` * It does not suggest when the suggestion: * - Is from a global file that is different from the reference file, or * - (optionally) Is a class, or is a this.x property access expression @@ -29921,13 +29925,13 @@ namespace ts { /** * Checks if an existing property access is valid for completions purposes. - * @param node a property access-like node where we want to check if we can access a property. + * @param node - a property access-like node where we want to check if we can access a property. * This node does not need to be an access of the property we are checking. * e.g. in completions, this node will often be an incomplete property access node, as in `foo.`. * Besides providing a location (i.e. scope) used to check property accessibility, we use this node for * computing whether this is a `super` property access. - * @param type the type whose property we are checking. - * @param property the accessed property's symbol. + * @param type - the type whose property we are checking. + * @param property - the accessed property's symbol. */ function isValidPropertyAccessForCompletions(node: PropertyAccessExpression | ImportTypeNode | QualifiedName, type: Type, property: Symbol): boolean { return isPropertyAccessible(node, @@ -29957,11 +29961,11 @@ namespace ts { * Checks if a property can be accessed in a location. * The location is given by the `node` parameter. * The node does not need to be a property access. - * @param node location where to check property accessibility - * @param isSuper whether to consider this a `super` property access, e.g. `super.foo`. - * @param isWrite whether this is a write access, e.g. `++foo.x`. - * @param containingType type where the property comes from. - * @param property property symbol. + * @param node - location where to check property accessibility + * @param isSuper - whether to consider this a `super` property access, e.g. `super.foo`. + * @param isWrite - whether this is a write access, e.g. `++foo.x`. + * @param containingType - type where the property comes from. + * @param property - property symbol. */ function isPropertyAccessible( node: Node, @@ -30496,9 +30500,9 @@ namespace ts { /** * Check if the given signature can possibly be a signature called by the JSX opening-like element. - * @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 + * @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 */ function checkApplicableSignatureForJsxOpeningLikeElement( node: JsxOpeningLikeElement, @@ -31963,10 +31967,10 @@ namespace ts { /** * Resolve a signature of a given call-like expression. - * @param node a call-like expression to try resolve a signature for - * @param candidatesOutArray an array of signature to be filled in by the function. It is passed by signature help in the language service; + * @param node - a call-like expression to try resolve a signature for + * @param candidatesOutArray - an array of signature to be filled in by the function. It is passed by signature help in the language service; * the function will fill it up with appropriate candidate signatures - * @return a signature of the call-like expression or undefined if one can't be found + * @returns a signature of the call-like expression or undefined if one can't be found */ function getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[] | undefined, checkMode?: CheckMode): Signature { const links = getNodeLinks(node); @@ -32107,7 +32111,7 @@ namespace ts { /** * Syntactically and semantically checks a call or new expression. - * @param node The call/new expression to be checked. + * @param node - The call/new expression to be checked. * @returns On success, the expression's signature's return type. On failure, anyType. */ function checkCallExpression(node: CallExpression | NewExpression, checkMode?: CheckMode): Type { @@ -36744,7 +36748,7 @@ namespace ts { /** * Gets the "promised type" of a promise. - * @param type The type of the promise. + * @param type - The type of the promise. * @remarks The "promised type" of a type is the type of the "value" parameter of the "onfulfilled" callback. */ function getPromisedTypeOfPromise(type: Type, errorNode?: Node, thisTypeForErrorOut?: { value?: Type }): Type | undefined { @@ -36830,8 +36834,8 @@ namespace ts { /** * Gets the "awaited type" of a type. - * @param type The type to await. - * @param withAlias When `true`, wraps the "awaited type" in `Awaited` if needed. + * @param type - The type to await. + * @param withAlias - When `true`, wraps the "awaited type" in `Awaited` if needed. * @remarks The "awaited type" of an expression is its "promised type" if the expression is a * Promise-like type; otherwise, it is the type of the expression. This is used to reflect * The runtime behavior of the `await` keyword. @@ -37088,7 +37092,7 @@ namespace ts { * that in turn supplies a `resolve` function as one of its arguments and results in an * object with a callable `then` signature. * - * @param node The signature to check + * @param node - The signature to check */ function checkAsyncFunctionReturnType(node: FunctionLikeDeclaration | MethodSignature, returnTypeNode: TypeNode) { // As part of our emit for an async function, we will need to emit the entity name of @@ -37265,7 +37269,7 @@ namespace ts { * from external module. * This is different from markTypeNodeAsReferenced because it tries to simplify type nodes in * union and intersection type - * @param node + * @param node - */ function markDecoratorMedataDataTypeNodeAsReferenced(node: TypeNode | undefined): void { const entityName = getEntityNameForDecoratorMetadata(node); @@ -37769,7 +37773,9 @@ namespace ts { if (isObjectBindingPattern(declaration.parent)) { /** * ignore starts with underscore names _ + * ``` * const { a: _a } = { a: 1 } + * ``` */ return !!(declaration.propertyName && isIdentifierThatStartsWithUnderscore(declaration.name)); } @@ -40228,7 +40234,7 @@ namespace ts { } /** - * @param member Existing member node to be checked. + * @param member - Existing member node to be checked. * Note: `member` cannot be a synthetic node. */ function checkExistingMemberForOverrideModifier( @@ -40271,7 +40277,7 @@ namespace ts { * i.e. checking a member that does not yet exist in the program. * An example of that would be to call this function in a completions scenario, * when offering a method declaration as completion. - * @param errorNode The node where we should report an error, or undefined if we should not report errors. + * @param errorNode - The node where we should report an error, or undefined if we should not report errors. */ function checkMemberForOverrideModifier( node: ClassLikeDeclaration, @@ -40406,8 +40412,8 @@ namespace ts { /** * Checks a member declaration node to see if has a missing or invalid `override` modifier. - * @param node Class-like node where the member is declared. - * @param member Member declaration node. + * @param node - Class-like node where the member is declared. + * @param member - Member declaration node. * Note: `member` can be a synthetic node without a parent. */ function getMemberOverrideModifierStatus(node: ClassLikeDeclaration, member: ClassElement): MemberOverrideStatus { @@ -42411,9 +42417,9 @@ namespace ts { /** * Copy the given symbol into symbol tables if the symbol has the given meaning * and it doesn't already existed in the symbol table - * @param key a key for storing in symbol table; if undefined, use symbol.name - * @param symbol the symbol to be added into symbol table - * @param meaning meaning of symbol to filter by before adding to symbol table + * @param key - a key for storing in symbol table; if undefined, use symbol.name + * @param symbol - the symbol to be added into symbol table + * @param meaning - meaning of symbol to filter by before adding to symbol table */ function copySymbol(symbol: Symbol, meaning: SymbolFlags): void { if (getCombinedLocalAndExportSymbolFlags(symbol) & meaning) { diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 7ad3644970b6f..4644f12e2a813 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1899,7 +1899,7 @@ namespace ts { /** * Read tsconfig.json file - * @param fileName The path to the config file + * @param fileName - The path to the config file */ export function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): { config?: any; error?: Diagnostic } { const textOrDiagnostic = tryReadFile(fileName, readFile); @@ -1908,8 +1908,8 @@ namespace ts { /** * Parse the text of the tsconfig.json file - * @param fileName The path to the config file - * @param jsonText The text of the config file + * @param fileName - The path to the config file + * @param jsonText - The text of the config file */ export function parseConfigFileTextToJson(fileName: string, jsonText: string): { config?: any; error?: Diagnostic } { const jsonSourceFile = parseJsonText(fileName, jsonText); @@ -1921,7 +1921,7 @@ namespace ts { /** * Read tsconfig.json file - * @param fileName The path to the config file + * @param fileName - The path to the config file */ export function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile { const textOrDiagnostic = tryReadFile(fileName, readFile); @@ -2062,25 +2062,25 @@ namespace ts { * Notifies parent option object is being set with the optionKey and a valid optionValue * Currently it notifies only if there is element with type object (parentOption) and * has element's option declarations map associated with it - * @param parentOption parent option name in which the option and value are being set - * @param option option declaration which is being set with the value - * @param value value of the option + * @param parentOption - parent option name in which the option and value are being set + * @param option - option declaration which is being set with the value + * @param value - value of the option */ onSetValidOptionKeyValueInParent(parentOption: string, option: CommandLineOption, value: CompilerOptionsValue): void; /** * Notify when valid root key value option is being set - * @param key option key - * @param keyNode node corresponding to node in the source file - * @param value computed value of the key - * @param ValueNode node corresponding to value in the source file + * @param key - option key + * @param keyNode - node corresponding to node in the source file + * @param value - computed value of the key + * @param ValueNode - node corresponding to value in the source file */ onSetValidOptionKeyValueInRoot(key: string, keyNode: PropertyName, value: CompilerOptionsValue, valueNode: Expression): void; /** * Notify when unknown root key value option is being set - * @param key option key - * @param keyNode node corresponding to node in the source file - * @param value computed value of the key - * @param ValueNode node corresponding to value in the source file + * @param key - option key + * @param keyNode - node corresponding to node in the source file + * @param value - computed value of the key + * @param ValueNode - node corresponding to value in the source file */ onSetUnknownOptionKeyValueInRoot(key: string, keyNode: PropertyName, value: CompilerOptionsValue, valueNode: Expression): void; } @@ -2364,9 +2364,9 @@ namespace ts { /** * Generate an uncommented, complete tsconfig for use with "--showConfig" - * @param configParseResult options to be generated into tsconfig.json - * @param configFileName name of the parsed config file - output paths will be generated relative to this - * @param host provides current directory and case sensitivity services + * @param configParseResult - options to be generated into tsconfig.json + * @param configFileName - name of the parsed config file - output paths will be generated relative to this + * @param host - provides current directory and case sensitivity services */ /** @internal */ export function convertToTSConfig(configParseResult: ParsedCommandLine, configFileName: string, host: ConvertToTSConfigHost): TSConfig { @@ -2521,7 +2521,7 @@ namespace ts { /** * Generate a list of the compiler options whose value is not the default. - * @param options compilerOptions to be evaluated. + * @param options - compilerOptions to be evaluated. /** @internal */ export function getCompilerOptionsDiffValue(options: CompilerOptions, newLine: string): string { const compilerOptionsMap = getSerializedCompilerOption(options); @@ -2554,7 +2554,7 @@ namespace ts { /** * Get the compiler options to be written into the tsconfig.json. - * @param options commandlineOptions to be included in the compileOptions. + * @param options - commandlineOptions to be included in the compileOptions. */ function getSerializedCompilerOption(options: CompilerOptions): ESMap { const compilerOptions = extend(options, defaultInitCompilerOptions); @@ -2562,8 +2562,8 @@ namespace ts { } /** * Generate tsconfig configuration when running command line "--init" - * @param options commandlineOptions to be generated into tsconfig.json - * @param fileNames array of filenames to be generated into tsconfig.json + * @param options - commandlineOptions to be generated into tsconfig.json + * @param fileNames - array of filenames to be generated into tsconfig.json */ /* @internal */ export function generateTSConfig(options: CompilerOptions, fileNames: readonly string[], newLine: string): string { @@ -2682,9 +2682,9 @@ namespace ts { /** * Parse the contents of a config file (tsconfig.json). - * @param json The contents of the config file to parse - * @param host Instance of ParseConfigHost used to enumerate files in folder. - * @param basePath A root directory to resolve relative path entries in the config + * @param json - The contents of the config file to parse + * @param host - Instance of ParseConfigHost used to enumerate files in folder. + * @param basePath - A root directory to resolve relative path entries in the config * file to. e.g. outDir */ export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map, existingWatchOptions?: WatchOptions): ParsedCommandLine { @@ -2693,9 +2693,9 @@ namespace ts { /** * Parse the contents of a config file (tsconfig.json). - * @param jsonNode The contents of the config file to parse - * @param host Instance of ParseConfigHost used to enumerate files in folder. - * @param basePath A root directory to resolve relative path entries in the config + * @param jsonNode - The contents of the config file to parse + * @param host - Instance of ParseConfigHost used to enumerate files in folder. + * @param basePath - A root directory to resolve relative path entries in the config * file to. e.g. outDir */ export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map, existingWatchOptions?: WatchOptions): ParsedCommandLine { @@ -2727,12 +2727,12 @@ namespace ts { /** * Parse the contents of a config file from json or json source file (tsconfig.json). - * @param json The contents of the config file to parse - * @param sourceFile sourceFile corresponding to the Json - * @param host Instance of ParseConfigHost used to enumerate files in folder. - * @param basePath A root directory to resolve relative path entries in the config + * @param json - The contents of the config file to parse + * @param sourceFile - sourceFile corresponding to the Json + * @param host - Instance of ParseConfigHost used to enumerate files in folder. + * @param basePath - A root directory to resolve relative path entries in the config * file to. e.g. outDir - * @param resolutionStack Only present for backwards-compatibility. Should be empty. + * @param resolutionStack - Only present for backwards-compatibility. Should be empty. */ function parseJsonConfigFileContentWorker( json: any, @@ -3352,39 +3352,43 @@ namespace ts { /** * Tests for a path that ends in a recursive directory wildcard. - * Matches **, \**, **\, and \**\, but not a**b. + * Matches `**`, `\**`, `**\`, and `\**\`, but not `a**b`. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used `\` in place of / above to avoid issues with multiline comments. * * Breakdown: + * ``` * (^|\/) # matches either the beginning of the string or a directory separator. * \*\* # matches the recursive directory wildcard "**". * \/?$ # matches an optional trailing directory separator at the end of the string. + * ``` */ const invalidTrailingRecursionPattern = /(^|\/)\*\*\/?$/; /** * Matches the portion of a wildcard path that does not contain wildcards. - * Matches \a of \a\*, or \a\b\c of \a\b\c\?\d. + * Matches `\a` of `\a\*`, or `\a\b\c` of `\a\b\c\?\d`. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used `\` in place of / above to avoid issues with multiline comments. * * Breakdown: + * ``` * ^ # matches the beginning of the string * [^*?]* # matches any number of non-wildcard characters * (?=\/[^/]*[*?]) # lookahead that matches a directory separator followed by * # a path component that contains at least one wildcard character (* or ?). + * ``` */ const wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/; /** * Gets the file names from the provided config file specs that contain, files, include, exclude and * other properties needed to resolve the file names - * @param configFileSpecs The config file specs extracted with file names to include, wildcards to include/exclude and other details - * @param basePath The base path for any relative file specifications. - * @param options Compiler options. - * @param host The host used to resolve files and directories. - * @param extraFileExtensions optionaly file extra file extension information from host + * @param configFileSpecs - The config file specs extracted with file names to include, wildcards to include/exclude and other details + * @param basePath - The base path for any relative file specifications. + * @param options - Compiler options. + * @param host - The host used to resolve files and directories. + * @param extraFileExtensions - optionaly file extra file extension information from host */ /* @internal */ export function getFileNamesFromConfigSpecs( @@ -3654,7 +3658,7 @@ namespace ts { * Determines whether a literal or wildcard file has already been included that has a higher * extension priority. * - * @param file The path to the file. + * @param file - The path to the file. */ function hasFileWithHigherPriorityExtension(file: string, literalFiles: ESMap, wildcardFiles: ESMap, extensions: readonly string[][], keyMapper: (value: string) => string) { const extensionGroup = forEach(extensions, group => fileExtensionIsOneOf(file, group) ? group : undefined); @@ -3684,7 +3688,7 @@ namespace ts { * Removes files included via wildcard expansion with a lower extension priority that have * already been included. * - * @param file The path to the file. + * @param file - The path to the file. */ function removeWildcardFilesWithLowerPriorityExtension(file: string, wildcardFiles: ESMap, extensions: readonly string[][], keyMapper: (value: string) => string) { const extensionGroup = forEach(extensions, group => fileExtensionIsOneOf(file, group) ? group : undefined); diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 934f5ace84990..dee1d49942f5a 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -358,7 +358,7 @@ namespace ts { /** * Flattens an array containing a mix of array or non-array elements. * - * @param array The array to flatten. + * @param array - The array to flatten. */ export function flatten(array: T[][] | readonly (T | readonly T[] | undefined)[]): T[] { const result = []; @@ -378,8 +378,8 @@ namespace ts { /** * Maps an array. If the mapped value is an array, it is spread into the result. * - * @param array The array to map. - * @param mapfn The callback used to map the result into one or more values. + * @param array - The array to map. + * @param mapfn - The callback used to map the result into one or more values. */ export function flatMap(array: readonly T[] | undefined, mapfn: (x: T, i: number) => U | readonly U[] | undefined): readonly U[] { let result: U[] | undefined; @@ -449,8 +449,8 @@ namespace ts { * Maps an array. If the mapped value is an array, it is spread into the result. * Avoids allocation if all elements map to themselves. * - * @param array The array to map. - * @param mapfn The callback used to map the result into one or more values. + * @param array - The array to map. + * @param mapfn - The callback used to map the result into one or more values. */ export function sameFlatMap(array: T[], mapfn: (x: T, i: number) => T | readonly T[]): T[]; export function sameFlatMap(array: readonly T[], mapfn: (x: T, i: number) => T | readonly T[]): readonly T[]; @@ -587,9 +587,9 @@ namespace ts { /** * Maps contiguous spans of values with the same key. * - * @param array The array to map. - * @param keyfn A callback used to select the key for an element. - * @param mapfn A callback used to map a contiguous chunk of values to a single value. + * @param array - The array to map. + * @param keyfn - A callback used to select the key for an element. + * @param mapfn - A callback used to map a contiguous chunk of values to a single value. */ export function spanMap(array: readonly T[], keyfn: (x: T, i: number) => K, mapfn: (chunk: T[], key: K, start: number, end: number) => U): U[]; export function spanMap(array: readonly T[] | undefined, keyfn: (x: T, i: number) => K, mapfn: (chunk: T[], key: K, start: number, end: number) => U): U[] | undefined; @@ -733,8 +733,8 @@ namespace ts { /** * Deduplicates an unsorted array. - * @param equalityComparer An `EqualityComparer` used to determine if two values are duplicates. - * @param comparer An optional `Comparer` used to sort entries before comparison, though the + * @param equalityComparer - An `EqualityComparer` used to determine if two values are duplicates. + * @param comparer - An optional `Comparer` used to sort entries before comparison, though the * result will remain in the original order in `array`. */ export function deduplicate(array: readonly T[], equalityComparer: EqualityComparer, comparer?: Comparer): T[] { @@ -914,9 +914,9 @@ namespace ts { /** * Appends a value to an array, returning the array. * - * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array + * @param to - The array to which `value` is to be appended. If `to` is `undefined`, a new array * is created if `value` was appended. - * @param value The value to append to the array. If `value` is `undefined`, nothing is + * @param value - The value to append to the array. If `value` is `undefined`, nothing is * appended. */ export function append[number] | undefined>(to: TArray, value: TValue): [undefined, undefined] extends [TArray, TValue] ? TArray : NonNullable[number][]; @@ -964,12 +964,12 @@ namespace ts { /** * Appends a range of value to an array, returning the array. * - * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array + * @param to - The array to which `value` is to be appended. If `to` is `undefined`, a new array * is created if `value` was appended. - * @param from The values to append to the array. If `from` is `undefined`, nothing is + * @param from - The values to append to the array. If `from` is `undefined`, nothing is * appended. If an element of `from` is `undefined`, that element is not appended. - * @param start The offset in `from` at which to start copying values. - * @param end The offset in `from` at which to stop copying values (non-inclusive). + * @param start - The offset in `from` at which to start copying values. + * @param end - The offset in `from` at which to stop copying values (non-inclusive). */ export function addRange(to: T[], from: readonly T[] | undefined, start?: number, end?: number): T[]; export function addRange(to: T[] | undefined, from: readonly T[] | undefined, start?: number, end?: number): T[] | undefined; @@ -987,7 +987,7 @@ namespace ts { } /** - * @return Whether the value was added. + * @returns Whether the value was added. */ export function pushIfUnique(array: T[], toAdd: T, equalityComparer?: EqualityComparer): boolean { if (contains(array, toAdd, equalityComparer)) { @@ -1149,12 +1149,12 @@ namespace ts { * Performs a binary search, finding the index at which `value` occurs in `array`. * If no such index is found, returns the 2's-complement of first index at which * `array[index]` exceeds `value`. - * @param array A sorted array whose first element must be no larger than number - * @param value The value to be searched for in the array. - * @param keySelector A callback used to select the search key from `value` and each element of + * @param array - A sorted array whose first element must be no larger than number + * @param value - The value to be searched for in the array. + * @param keySelector - A callback used to select the search key from `value` and each element of * `array`. - * @param keyComparer A callback used to compare two keys in a sorted array. - * @param offset An offset into `array` at which to start the search. + * @param keyComparer - A callback used to compare two keys in a sorted array. + * @param offset - An offset into `array` at which to start the search. */ export function binarySearch(array: readonly T[], value: T, keySelector: (v: T) => U, keyComparer: Comparer, offset?: number): number { return binarySearchKey(array, keySelector(value), keySelector, keyComparer, offset); @@ -1164,11 +1164,11 @@ namespace ts { * Performs a binary search, finding the index at which an object with `key` occurs in `array`. * If no such index is found, returns the 2's-complement of first index at which * `array[index]` exceeds `key`. - * @param array A sorted array whose first element must be no larger than number - * @param key The key to be searched for in the array. - * @param keySelector A callback used to select the search key from each element of `array`. - * @param keyComparer A callback used to compare two keys in a sorted array. - * @param offset An offset into `array` at which to start the search. + * @param array - A sorted array whose first element must be no larger than number + * @param key - The key to be searched for in the array. + * @param keySelector - A callback used to select the search key from each element of `array`. + * @param keyComparer - A callback used to compare two keys in a sorted array. + * @param offset - An offset into `array` at which to start the search. */ export function binarySearchKey(array: readonly T[], key: U, keySelector: (v: T, i: number) => U, keyComparer: Comparer, offset?: number): number { if (!some(array)) { @@ -1226,8 +1226,8 @@ namespace ts { /** * Indicates whether a map-like contains an own property with the specified key. * - * @param map A map-like. - * @param key A property key. + * @param map - A map-like. + * @param key - A property key. */ export function hasProperty(map: MapLike, key: string): boolean { return hasOwnProperty.call(map, key); @@ -1236,8 +1236,8 @@ namespace ts { /** * Gets the value of an owned property in a map-like. * - * @param map A map-like. - * @param key A property key. + * @param map - A map-like. + * @param key - A property key. */ export function getProperty(map: MapLike, key: string): T | undefined { return hasOwnProperty.call(map, key) ? map[key] : undefined; @@ -1327,8 +1327,8 @@ namespace ts { /** * Performs a shallow equality comparison of the contents of two map-likes. * - * @param left A map-like whose properties should be compared. - * @param right A map-like whose properties should be compared. + * @param left - A map-like whose properties should be compared. + * @param right - A map-like whose properties should be compared. */ export function equalOwnProperties(left: MapLike | undefined, right: MapLike | undefined, equalityComparer: EqualityComparer = equateValues) { if (left === right) return true; @@ -1352,8 +1352,8 @@ namespace ts { /** * Creates a map from the elements of an array. * - * @param array the array of input elements. - * @param makeKey a function that produces a key for a given element. + * @param array - the array of input elements. + * @param makeKey - a function that produces a key for a given element. * * This function makes no effort to avoid collisions; if any two elements produce * the same key with the given 'makeKey' function, then the element with the higher @@ -1790,7 +1790,7 @@ namespace ts { // a-z, 0-9, \u0131, \u00DF, \, /, ., : and space const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; /** - * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - \u0130) + * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - `\u0130`) * This function is used in places where we want to make file name as a key on these systems * It is possible on mac to be able to refer to file name with I with dot on top as a fileName with its lower case form * But on windows we cannot. Windows can have fileName with I with dot on top next to its lower case and they can not each be referred with the lowercase forms @@ -1840,7 +1840,7 @@ namespace ts { * High-order function, composes functions. Note that functions are composed inside-out; * for example, `compose(a, b)` is the equivalent of `x => b(a(x))`. * - * @param args The functions to compose. + * @param args - The functions to compose. */ export function compose(...args: ((t: T) => T)[]): (t: T) => T; export function compose(a: (t: T) => T, b: (t: T) => T, c: (t: T) => T, d: (t: T) => T, e: (t: T) => T): (t: T) => T { @@ -2153,7 +2153,7 @@ namespace ts { function levenshteinWithMax(s1: string, s2: string, max: number): number | undefined { let previous = new Array(s2.length + 1); let current = new Array(s2.length + 1); - /** Represents any value > max. We don't care about the particular value. */ + /** Represents any `value > max`. We don't care about the particular value. */ const big = max + 0.01; for (let i = 0; i <= s2.length; i++) { @@ -2469,9 +2469,9 @@ namespace ts { /** * Returns string left-padded with spaces or zeros until it reaches the given length. * - * @param s String to pad. - * @param length Final padded length. If less than or equal to 's.length', returns 's' unchanged. - * @param padString Character to use as padding (default " "). + * @param s - String to pad. + * @param length - Final padded length. If less than or equal to 's.length', returns 's' unchanged. + * @param padString - Character to use as padding (default " "). */ export function padLeft(s: string, length: number, padString: " " | "0" = " ") { return length <= s.length ? s : padString.repeat(length - s.length) + s; @@ -2480,9 +2480,9 @@ namespace ts { /** * Returns string right-padded with spaces until it reaches the given length. * - * @param s String to pad. - * @param length Final padded length. If less than or equal to 's.length', returns 's' unchanged. - * @param padString Character to use as padding (default " "). + * @param s - String to pad. + * @param length - Final padded length. If less than or equal to 's.length', returns 's' unchanged. + * @param padString - Character to use as padding (default " "). */ export function padRight(s: string, length: number, padString: " " = " ") { return length <= s.length ? s : s + padString.repeat(length - s.length); @@ -2515,7 +2515,7 @@ namespace ts { /** * https://jsbench.me/gjkoxld4au/1 - * The simple regex for this, /\s+$/g is O(n^2) in v8. + * The simple regex for this, `/\s+$/g` is O(n^2) in v8. * The native .trimEnd method is by far best, but since that's technically ES2019, * we provide a (still much faster than the simple regex) fallback. */ diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts index d6edd94b3dc49..aa6f4c3d58fe8 100644 --- a/src/compiler/debug.ts +++ b/src/compiler/debug.ts @@ -99,8 +99,8 @@ namespace ts { /** * Tests whether an assertion function should be executed. If it shouldn't, it is cached and replaced with `ts.noop`. * Replaced assertion functions are restored when `Debug.setAssertionLevel` is set to a high enough level. - * @param level The minimum assertion level required. - * @param name The name of the current assertion function. + * @param level - The minimum assertion level required. + * @param name - The name of the current assertion function. */ function shouldAssertFunction(level: AssertionLevel, name: K): boolean { if (!shouldAssert(level)) { diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 750f97f361530..95a0836187647 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -10,9 +10,9 @@ namespace ts { /** * Iterates over the source files that are expected to have an emit output. * - * @param host An EmitHost. - * @param action The action to execute. - * @param sourceFilesOrTargetSourceFile + * @param host - An EmitHost. + * @param action - The action to execute. + * @param sourceFilesOrTargetSourceFile - * If an array, the full list of source files to emit. * Else, calls `getSourceFilesToEmit` with the (optional) target source file to determine the list of source files to emit. */ @@ -3529,7 +3529,7 @@ namespace ts { writeSpace(); const value = node.value; - /** @see {emitPropertyAssignment} */ + /** see {@link emitPropertyAssignment} */ if ((getEmitFlags(value) & EmitFlags.NoLeadingComments) === 0) { const commentRange = getCommentRange(value); emitTrailingCommentsOfPosition(commentRange.pos); @@ -5813,7 +5813,7 @@ namespace ts { /** * Determine if the given comment is a triple-slash * - * @return true if the comment is a triple-slash comment else false + * @returns true if the comment is a triple-slash comment else false */ function isTripleSlashComment(commentPos: number, commentEnd: number) { return !!currentSourceFile && isRecognizedTripleSlashComment(currentSourceFile.text, commentPos, commentEnd); @@ -5897,7 +5897,7 @@ namespace ts { * If the position is synthetic (undefined or a negative value), no mapping will be * created. * - * @param pos The position. + * @param pos - The position. */ function emitPos(pos: number) { if (sourceMapsDisabled || positionIsSynthesized(pos) || isJsonSourceMapSource(sourceMapSource)) { @@ -5930,10 +5930,10 @@ namespace ts { /** * Emits a token of a node with possible leading and trailing source maps. * - * @param node The node containing the token. - * @param token The token to emit. - * @param tokenStartPos The start pos of the token. - * @param emitCallback The callback used to emit the token. + * @param node - The node containing the token. + * @param token - The token to emit. + * @param tokenStartPos - The start pos of the token. + * @param emitCallback - The callback used to emit the token. */ function emitTokenWithSourceMap(node: Node | undefined, token: SyntaxKind, writer: (s: string) => void, tokenPos: number, emitCallback: (token: SyntaxKind, writer: (s: string) => void, tokenStartPos: number) => number) { if (sourceMapsDisabled || node && isInJsonFile(node)) { diff --git a/src/compiler/factory/emitHelpers.ts b/src/compiler/factory/emitHelpers.ts index 85a12581965f8..e53b17f460a9e 100644 --- a/src/compiler/factory/emitHelpers.ts +++ b/src/compiler/factory/emitHelpers.ts @@ -195,7 +195,7 @@ namespace ts { // ES2018 Destructuring Helpers - /** Given value: o, propName: p, pattern: { a, b, ...p } from the original statement + /** Given value: o, propName: p, pattern: `{ a, b, ...p }` from the original statement * `{ a, b, ...p } = o`, create `p = __rest(o, ["a", "b"]);` */ function createRestHelper(value: Expression, elements: readonly BindingOrAssignmentElement[], computedTempVariables: readonly Expression[] | undefined, location: TextRange): Expression { @@ -413,8 +413,8 @@ namespace ts { } /** - * @param input Template string input strings - * @param args Names which need to be made file-level unique + * @param input - Template string input strings + * @param args - Names which need to be made file-level unique */ export function helperString(input: TemplateStringsArray, ...args: string[]) { return (uniqueName: EmitHelperUniqueNameCallback) => { @@ -849,17 +849,17 @@ namespace ts { /** * Parameters: - * @param receiver — The object from which the private member will be read. - * @param state — One of the following: + * @param receiver - The object from which the private member will be read. + * @param state - One of the following: * - A WeakMap used to read a private instance field. * - A WeakSet used as an instance brand for private instance methods and accessors. * - A function value that should be the undecorated class constructor used to brand check private static fields, methods, and accessors. - * @param kind — (optional pre TS 4.3, required for TS 4.3+) One of the following values: - * - undefined — Indicates a private instance field (pre TS 4.3). - * - "f" — Indicates a private field (instance or static). - * - "m" — Indicates a private method (instance or static). - * - "a" — Indicates a private accessor (instance or static). - * @param f — (optional pre TS 4.3) Depends on the arguments for state and kind: + * @param kind - (optional pre TS 4.3, required for TS 4.3+) One of the following values: + * - undefined - Indicates a private instance field (pre TS 4.3). + * - "f" - Indicates a private field (instance or static). + * - "m" - Indicates a private method (instance or static). + * - "a" - Indicates a private accessor (instance or static). + * @param f - (optional pre TS 4.3) Depends on the arguments for state and kind: * - If kind is "m", this should be the function corresponding to the static or instance method. * - If kind is "a", this should be the function corresponding to the getter method, or undefined if the getter was not defined. * - If kind is "f" and state is a function, this should be an object holding the value of a static field, or undefined if the static field declaration has not yet been evaluated. @@ -867,33 +867,51 @@ namespace ts { * This helper will only ever be used by the compiler in the following ways: * * Reading from a private instance field (pre TS 4.3): + * ``` * __classPrivateFieldGet(, ) + * ``` * * Reading from a private instance field (TS 4.3+): + * ``` * __classPrivateFieldGet(, , "f") + * ``` * * Reading from a private instance get accessor (when defined, TS 4.3+): + * ``` * __classPrivateFieldGet(, , "a", ) + * ``` * * Reading from a private instance get accessor (when not defined, TS 4.3+): + * ``` * __classPrivateFieldGet(, , "a", void 0) * NOTE: This always results in a runtime error. + * ``` * * Reading from a private instance method (TS 4.3+): + * ``` * __classPrivateFieldGet(, , "m", ) + * ``` * * Reading from a private static field (TS 4.3+): + * ``` * __classPrivateFieldGet(, , "f", <{ value: any }>) + * ``` * * Reading from a private static get accessor (when defined, TS 4.3+): + * ``` * __classPrivateFieldGet(, , "a", ) + * ``` * * Reading from a private static get accessor (when not defined, TS 4.3+): + * ``` * __classPrivateFieldGet(, , "a", void 0) * NOTE: This always results in a runtime error. + * ``` * * Reading from a private static method (TS 4.3+): + * ``` * __classPrivateFieldGet(, , "m", ) + * ``` */ export const classPrivateFieldGetHelper: UnscopedEmitHelper = { name: "typescript:classPrivateFieldGet", @@ -909,18 +927,18 @@ namespace ts { /** * Parameters: - * @param receiver — The object on which the private member will be set. - * @param state — One of the following: + * @param receiver - The object on which the private member will be set. + * @param state - One of the following: * - A WeakMap used to store a private instance field. * - A WeakSet used as an instance brand for private instance methods and accessors. * - A function value that should be the undecorated class constructor used to brand check private static fields, methods, and accessors. - * @param value — The value to set. - * @param kind — (optional pre TS 4.3, required for TS 4.3+) One of the following values: - * - undefined — Indicates a private instance field (pre TS 4.3). - * - "f" — Indicates a private field (instance or static). - * - "m" — Indicates a private method (instance or static). - * - "a" — Indicates a private accessor (instance or static). - * @param f — (optional pre TS 4.3) Depends on the arguments for state and kind: + * @param value - The value to set. + * @param kind - (optional pre TS 4.3, required for TS 4.3+) One of the following values: + * - undefined - Indicates a private instance field (pre TS 4.3). + * - "f" - Indicates a private field (instance or static). + * - "m" - Indicates a private method (instance or static). + * - "a" - Indicates a private accessor (instance or static). + * @param f - (optional pre TS 4.3) Depends on the arguments for state and kind: * - If kind is "m", this should be the function corresponding to the static or instance method. * - If kind is "a", this should be the function corresponding to the setter method, or undefined if the setter was not defined. * - If kind is "f" and state is a function, this should be an object holding the value of a static field, or undefined if the static field declaration has not yet been evaluated. @@ -928,35 +946,53 @@ namespace ts { * This helper will only ever be used by the compiler in the following ways: * * Writing to a private instance field (pre TS 4.3): + * ``` * __classPrivateFieldSet(, , ) + * ``` * * Writing to a private instance field (TS 4.3+): + * ``` * __classPrivateFieldSet(, , , "f") + * ``` * * Writing to a private instance set accessor (when defined, TS 4.3+): + * ``` * __classPrivateFieldSet(, , , "a", ) + * ``` * * Writing to a private instance set accessor (when not defined, TS 4.3+): + * ``` * __classPrivateFieldSet(, , , "a", void 0) * NOTE: This always results in a runtime error. + * ``` * * Writing to a private instance method (TS 4.3+): + * ``` * __classPrivateFieldSet(, , , "m", ) * NOTE: This always results in a runtime error. + * ``` * * Writing to a private static field (TS 4.3+): + * ``` * __classPrivateFieldSet(, , , "f", <{ value: any }>) + * ``` * * Writing to a private static set accessor (when defined, TS 4.3+): + * ``` * __classPrivateFieldSet(, , , "a", ) + * ``` * * Writing to a private static set accessor (when not defined, TS 4.3+): + * ``` * __classPrivateFieldSet(, , , "a", void 0) * NOTE: This always results in a runtime error. + * ``` * * Writing to a private static method (TS 4.3+): + * ``` * __classPrivateFieldSet(, , , "m", ) * NOTE: This always results in a runtime error. + * ``` */ export const classPrivateFieldSetHelper: UnscopedEmitHelper = { name: "typescript:classPrivateFieldSet", @@ -973,11 +1009,11 @@ namespace ts { /** * Parameters: - * @param state — One of the following: + * @param state - One of the following: * - A WeakMap when the member is a private instance field. * - A WeakSet when the member is a private instance method or accessor. * - A function value that should be the undecorated class constructor when the member is a private static field, method, or accessor. - * @param receiver — The object being checked if it has the private member. + * @param receiver - The object being checked if it has the private member. * * Usage: * This helper is used to transform `#field in expression` to diff --git a/src/compiler/factory/emitNode.ts b/src/compiler/factory/emitNode.ts index 19ebfd53ba2ba..02ff7a691dcde 100644 --- a/src/compiler/factory/emitNode.ts +++ b/src/compiler/factory/emitNode.ts @@ -28,7 +28,7 @@ namespace ts { /** * Clears any `EmitNode` entries from parse-tree nodes. - * @param sourceFile A source file. + * @param sourceFile - A source file. */ export function disposeEmitNodes(sourceFile: SourceFile | undefined) { // During transformation we may need to annotate a parse tree node with transient diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts index 9d7a2fce604d5..de3b77f14f941 100644 --- a/src/compiler/factory/nodeFactory.ts +++ b/src/compiler/factory/nodeFactory.ts @@ -16,8 +16,8 @@ namespace ts { /** * Creates a `NodeFactory` that can be used to create and update a syntax tree. - * @param flags Flags that control factory behavior. - * @param baseFactory A `BaseNodeFactory` used to create the base `Node` objects. + * @param flags - Flags that control factory behavior. + * @param baseFactory - A `BaseNodeFactory` used to create the base `Node` objects. */ /* @internal */ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNodeFactory): NodeFactory { @@ -1872,7 +1872,7 @@ namespace ts { return node; } - /** @deprecated */ + /** @deprecated Use createConstructorTypeNode. */ function createConstructorTypeNode2( typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], @@ -1903,7 +1903,7 @@ namespace ts { : node; } - /** @deprecated */ + /** @deprecated Use updateConstructorTypeNode. */ function updateConstructorTypeNode2( node: ConstructorTypeNode, typeParameters: NodeArray | undefined, @@ -5511,7 +5511,7 @@ namespace ts { * Creates a synthetic statement to act as a placeholder for a not-emitted statement in * order to preserve comments. * - * @param original The original statement. + * @param original - The original statement. */ // @api function createNotEmittedStatement(original: Node) { @@ -5525,8 +5525,8 @@ namespace ts { * Creates a synthetic expression to act as a placeholder for a not-emitted expression in * order to preserve comments or sourcemap positions. * - * @param expression The inner expression to emit. - * @param original The original outer expression. + * @param expression - The inner expression to emit. + * @param original - The original outer expression. */ // @api function createPartiallyEmittedExpression(expression: Expression, original?: Node) { @@ -6000,9 +6000,9 @@ namespace ts { * expression. An internal name will also *never* be renamed due to a collision with a block * scoped variable. * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param node - The declaration. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ function getInternalName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean) { return getName(node, allowComments, allowSourceMaps, EmitFlags.LocalName | EmitFlags.InternalName); @@ -6014,9 +6014,9 @@ namespace ts { * local name will *never* be prefixed with an module or namespace export modifier like * "exports." when emitted as an expression. * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param node - The declaration. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ function getLocalName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean) { return getName(node, allowComments, allowSourceMaps, EmitFlags.LocalName); @@ -6028,9 +6028,9 @@ namespace ts { * export name will *always* be prefixed with an module or namespace export modifier like * `"exports."` when emitted as an expression if the name points to an exported symbol. * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param node - The declaration. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ function getExportName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier { return getName(node, allowComments, allowSourceMaps, EmitFlags.ExportName); @@ -6039,9 +6039,9 @@ namespace ts { /** * Gets the name of a declaration for use in declarations. * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param node - The declaration. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ function getDeclarationName(node: Declaration | undefined, allowComments?: boolean, allowSourceMaps?: boolean) { return getName(node, allowComments, allowSourceMaps); @@ -6050,10 +6050,10 @@ namespace ts { /** * Gets a namespace-qualified name for use in expressions. * - * @param ns The namespace identifier. - * @param name The name. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param ns - The namespace identifier. + * @param name - The name. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ function getNamespaceMemberName(ns: Identifier, name: Identifier, allowComments?: boolean, allowSourceMaps?: boolean): PropertyAccessExpression { const qualifiedName = createPropertyAccessExpression(ns, nodeIsSynthesized(name) ? name : cloneNode(name)); @@ -6071,10 +6071,10 @@ namespace ts { * An exported name will *always* be prefixed with an module or namespace export modifier like * "exports." if the name points to an exported symbol. * - * @param ns The namespace identifier. - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param ns - The namespace identifier. + * @param node - The declaration. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ function getExternalModuleOrNamespaceExportName(ns: Identifier | undefined, node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier | PropertyAccessExpression { if (ns && hasSyntacticModifier(node, ModifierFlags.Export)) { @@ -6085,10 +6085,10 @@ namespace ts { /** * Copies any necessary standard and custom prologue-directives into target array. - * @param source origin statements array - * @param target result statements array - * @param ensureUseStrict boolean determining whether the function need to add prologue-directives - * @param visitor Optional callback used to visit any custom prologue directives. + * @param source - origin statements array + * @param target - result statements array + * @param ensureUseStrict - boolean determining whether the function need to add prologue-directives + * @param visitor - Optional callback used to visit any custom prologue directives. */ function copyPrologue(source: readonly Statement[], target: Push, ensureUseStrict?: boolean, visitor?: (node: Node) => VisitResult): number { const offset = copyStandardPrologue(source, target, 0, ensureUseStrict); @@ -6105,10 +6105,10 @@ namespace ts { /** * Copies only the standard (string-expression) prologue-directives into the target statement-array. - * @param source origin statements array - * @param target result statements array - * @param statementOffset The offset at which to begin the copy. - * @param ensureUseStrict boolean determining whether the function need to add prologue-directives + * @param source - origin statements array + * @param target - result statements array + * @param statementOffset - The offset at which to begin the copy. + * @param ensureUseStrict - boolean determining whether the function need to add prologue-directives * @returns Count of how many directive statements were copied. */ function copyStandardPrologue(source: readonly Statement[], target: Push, statementOffset = 0, ensureUseStrict?: boolean): number { @@ -6136,10 +6136,10 @@ namespace ts { /** * Copies only the custom prologue-directives into target statement-array. - * @param source origin statements array - * @param target result statements array - * @param statementOffset The offset at which to begin the copy. - * @param visitor Optional callback used to visit any custom prologue directives. + * @param source - origin statements array + * @param target - result statements array + * @param statementOffset - The offset at which to begin the copy. + * @param visitor - Optional callback used to visit any custom prologue directives. */ function copyCustomPrologue(source: readonly Statement[], target: Push, statementOffset: number, visitor?: (node: Node) => VisitResult, filter?: (node: Node) => boolean): number; function copyCustomPrologue(source: readonly Statement[], target: Push, statementOffset: number | undefined, visitor?: (node: Node) => VisitResult, filter?: (node: Node) => boolean): number | undefined; @@ -6161,7 +6161,7 @@ namespace ts { /** * Ensures "use strict" directive is added * - * @param statements An array of statements + * @param statements - An array of statements */ function ensureUseStrict(statements: NodeArray): NodeArray { const foundUseStrict = findUseStrictPrologue(statements); @@ -6176,7 +6176,7 @@ namespace ts { /** * Lifts a NodeArray containing only Statement nodes to a block. * - * @param nodes The NodeArray. + * @param nodes - The NodeArray. */ function liftToBlock(nodes: readonly Node[]): Statement { Debug.assert(every(nodes, isStatementOrBlock), "Cannot lift nodes to a Block."); diff --git a/src/compiler/factory/parenthesizerRules.ts b/src/compiler/factory/parenthesizerRules.ts index 21422f2bc6fef..f5b0c696882c5 100644 --- a/src/compiler/factory/parenthesizerRules.ts +++ b/src/compiler/factory/parenthesizerRules.ts @@ -64,9 +64,9 @@ namespace ts { /** * Determines whether the operand to a BinaryExpression needs to be parenthesized. * - * @param binaryOperator The operator for the BinaryExpression. - * @param operand The operand for the BinaryExpression. - * @param isLeftSideOfBinary A value indicating whether the operand is the left side of the + * @param binaryOperator - The operator for the BinaryExpression. + * @param operand - The operand for the BinaryExpression. + * @param isLeftSideOfBinary - A value indicating whether the operand is the left side of the * BinaryExpression. */ function binaryOperandNeedsParentheses(binaryOperator: SyntaxKind, operand: Expression, isLeftSideOfBinary: boolean, leftOperand: Expression | undefined) { @@ -169,7 +169,7 @@ namespace ts { /** * Determines whether a binary operator is mathematically associative. * - * @param binaryOperator The binary operator. + * @param binaryOperator - The binary operator. */ function operatorHasAssociativeProperty(binaryOperator: SyntaxKind) { // The following operators are associative in JavaScript: @@ -223,9 +223,9 @@ namespace ts { * Wraps the operand to a BinaryExpression in parentheses if they are needed to preserve the intended * order of operations. * - * @param binaryOperator The operator for the BinaryExpression. - * @param operand The operand for the BinaryExpression. - * @param isLeftSideOfBinary A value indicating whether the operand is the left side of the + * @param binaryOperator - The operator for the BinaryExpression. + * @param operand - The operand for the BinaryExpression. + * @param isLeftSideOfBinary - A value indicating whether the operand is the left side of the * BinaryExpression. */ function parenthesizeBinaryOperand(binaryOperator: SyntaxKind, operand: Expression, isLeftSideOfBinary: boolean, leftOperand?: Expression) { diff --git a/src/compiler/factory/utilities.ts b/src/compiler/factory/utilities.ts index 6c7f02c240f2e..69aa9eac3bd96 100644 --- a/src/compiler/factory/utilities.ts +++ b/src/compiler/factory/utilities.ts @@ -330,10 +330,10 @@ namespace ts { * The temporary variable `` is injected so that `++` and `--` work uniformly with `number` and `bigint`. * The result of the expression is always the final result of incrementing or decrementing the expression, so that it can be used for storage. * - * @param factory {@link NodeFactory} used to create the expanded representation. - * @param node The original prefix or postfix unary node. - * @param expression The expression to use as the value to increment or decrement - * @param resultVariable A temporary variable in which to store the result. Pass `undefined` if the result is discarded, or if the value of `` is the expected result. + * @param factory - {@link NodeFactory} used to create the expanded representation. + * @param node - The original prefix or postfix unary node. + * @param expression - The expression to use as the value to increment or decrement + * @param resultVariable - A temporary variable in which to store the result. Pass `undefined` if the result is discarded, or if the value of `` is the expected result. */ export function expandPreOrPostfixIncrementOrDecrementExpression(factory: NodeFactory, node: PrefixUnaryExpression | PostfixUnaryExpression, expression: Expression, recordTempVariable: (node: Identifier) => void, resultVariable: Identifier | undefined) { const operator = node.operator; @@ -1029,8 +1029,8 @@ namespace ts { namespace BinaryExpressionState { /** * Handles walking into a `BinaryExpression`. - * @param machine State machine handler functions - * @param frame The current frame + * @param machine - State machine handler functions + * @param frame - The current frame * @returns The new frame */ export function enter(machine: BinaryExpressionStateMachine, stackIndex: number, stateStack: BinaryExpressionState[], nodeStack: BinaryExpression[], userStateStack: TState[], _resultHolder: { value: TResult }, outerState: TOuterState): number { @@ -1043,8 +1043,8 @@ namespace ts { /** * Handles walking the `left` side of a `BinaryExpression`. - * @param machine State machine handler functions - * @param frame The current frame + * @param machine - State machine handler functions + * @param frame - The current frame * @returns The new frame */ export function left(machine: BinaryExpressionStateMachine, stackIndex: number, stateStack: BinaryExpressionState[], nodeStack: BinaryExpression[], userStateStack: TState[], _resultHolder: { value: TResult }, _outerState: TOuterState): number { @@ -1061,8 +1061,8 @@ namespace ts { /** * Handles walking the `operatorToken` of a `BinaryExpression`. - * @param machine State machine handler functions - * @param frame The current frame + * @param machine - State machine handler functions + * @param frame - The current frame * @returns The new frame */ export function operator(machine: BinaryExpressionStateMachine, stackIndex: number, stateStack: BinaryExpressionState[], nodeStack: BinaryExpression[], userStateStack: TState[], _resultHolder: { value: TResult }, _outerState: TOuterState): number { @@ -1075,8 +1075,8 @@ namespace ts { /** * Handles walking the `right` side of a `BinaryExpression`. - * @param machine State machine handler functions - * @param frame The current frame + * @param machine - State machine handler functions + * @param frame - The current frame * @returns The new frame */ export function right(machine: BinaryExpressionStateMachine, stackIndex: number, stateStack: BinaryExpressionState[], nodeStack: BinaryExpression[], userStateStack: TState[], _resultHolder: { value: TResult }, _outerState: TOuterState): number { @@ -1093,8 +1093,8 @@ namespace ts { /** * Handles walking out of a `BinaryExpression`. - * @param machine State machine handler functions - * @param frame The current frame + * @param machine - State machine handler functions + * @param frame - The current frame * @returns The new frame */ export function exit(machine: BinaryExpressionStateMachine, stackIndex: number, stateStack: BinaryExpressionState[], nodeStack: BinaryExpression[], userStateStack: TState[], resultHolder: { value: TResult }, _outerState: TOuterState): number { @@ -1176,11 +1176,11 @@ namespace ts { /** * Creates a state machine that walks a `BinaryExpression` using the heap to reduce call-stack depth on a large tree. - * @param onEnter Callback evaluated when entering a `BinaryExpression`. Returns new user-defined state to associate with the node while walking. - * @param onLeft Callback evaluated when walking the left side of a `BinaryExpression`. Return a `BinaryExpression` to continue walking, or `void` to advance to the right side. - * @param onRight Callback evaluated when walking the right side of a `BinaryExpression`. Return a `BinaryExpression` to continue walking, or `void` to advance to the end of the node. - * @param onExit Callback evaluated when exiting a `BinaryExpression`. The result returned will either be folded into the parent's state, or returned from the walker if at the top frame. - * @param foldState Callback evaluated when the result from a nested `onExit` should be folded into the state of that node's parent. + * @param onEnter - Callback evaluated when entering a `BinaryExpression`. Returns new user-defined state to associate with the node while walking. + * @param onLeft - Callback evaluated when walking the left side of a `BinaryExpression`. Return a `BinaryExpression` to continue walking, or `void` to advance to the right side. + * @param onRight - Callback evaluated when walking the right side of a `BinaryExpression`. Return a `BinaryExpression` to continue walking, or `void` to advance to the end of the node. + * @param onExit - Callback evaluated when exiting a `BinaryExpression`. The result returned will either be folded into the parent's state, or returned from the walker if at the top frame. + * @param foldState - Callback evaluated when the result from a nested `onExit` should be folded into the state of that node's parent. * @returns A function that walks a `BinaryExpression` node using the above callbacks, returning the result of the call to `onExit` from the outermost `BinaryExpression` node. */ export function createBinaryExpressionTrampoline( @@ -1193,11 +1193,11 @@ namespace ts { ): (node: BinaryExpression) => TResult; /** * Creates a state machine that walks a `BinaryExpression` using the heap to reduce call-stack depth on a large tree. - * @param onEnter Callback evaluated when entering a `BinaryExpression`. Returns new user-defined state to associate with the node while walking. - * @param onLeft Callback evaluated when walking the left side of a `BinaryExpression`. Return a `BinaryExpression` to continue walking, or `void` to advance to the right side. - * @param onRight Callback evaluated when walking the right side of a `BinaryExpression`. Return a `BinaryExpression` to continue walking, or `void` to advance to the end of the node. - * @param onExit Callback evaluated when exiting a `BinaryExpression`. The result returned will either be folded into the parent's state, or returned from the walker if at the top frame. - * @param foldState Callback evaluated when the result from a nested `onExit` should be folded into the state of that node's parent. + * @param onEnter - Callback evaluated when entering a `BinaryExpression`. Returns new user-defined state to associate with the node while walking. + * @param onLeft - Callback evaluated when walking the left side of a `BinaryExpression`. Return a `BinaryExpression` to continue walking, or `void` to advance to the right side. + * @param onRight - Callback evaluated when walking the right side of a `BinaryExpression`. Return a `BinaryExpression` to continue walking, or `void` to advance to the end of the node. + * @param onExit - Callback evaluated when exiting a `BinaryExpression`. The result returned will either be folded into the parent's state, or returned from the walker if at the top frame. + * @param foldState - Callback evaluated when the result from a nested `onExit` should be folded into the state of that node's parent. * @returns A function that walks a `BinaryExpression` node using the above callbacks, returning the result of the call to `onExit` from the outermost `BinaryExpression` node. */ export function createBinaryExpressionTrampoline( @@ -1299,19 +1299,19 @@ namespace ts { /** * Formats a generated name. - * @param privateName When `true`, inserts a `#` character at the start of the result. - * @param prefix The prefix (if any) to include before the base name. - * @param baseName The base name for the generated name. - * @param suffix The suffix (if any) to include after the base name. + * @param privateName - When `true`, inserts a `#` character at the start of the result. + * @param prefix - The prefix (if any) to include before the base name. + * @param baseName - The base name for the generated name. + * @param suffix - The suffix (if any) to include after the base name. */ export function formatGeneratedName(privateName: boolean, prefix: string | undefined, baseName: string, suffix: string | undefined): string; /** * Formats a generated name. - * @param privateName When `true`, inserts a `#` character at the start of the result. - * @param prefix The prefix (if any) to include before the base name. - * @param baseName The base name for the generated name. - * @param suffix The suffix (if any) to include after the base name. - * @param generateName Called to format the source node of {@link prefix} when it is a {@link GeneratedNamePart}. + * @param privateName - When `true`, inserts a `#` character at the start of the result. + * @param prefix - The prefix (if any) to include before the base name. + * @param baseName - The base name for the generated name. + * @param suffix - The suffix (if any) to include after the base name. + * @param generateName - Called to format the source node of {@link prefix} when it is a {@link GeneratedNamePart}. */ export function formatGeneratedName(privateName: boolean, prefix: string | GeneratedNamePart | undefined, baseName: string | Identifier | PrivateIdentifier, suffix: string | GeneratedNamePart | undefined, generateName: (name: GeneratedIdentifier | GeneratedPrivateIdentifier) => string): string; export function formatGeneratedName(privateName: boolean, prefix: string | GeneratedNamePart | undefined, baseName: string | Identifier | PrivateIdentifier, suffix: string | GeneratedNamePart | undefined, generateName?: (name: GeneratedIdentifier | GeneratedPrivateIdentifier) => string) { diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 9e3b15f09580c..274e651b61f24 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -280,7 +280,7 @@ namespace ts { } /** - * Returns the path to every node_modules/@types directory from some ancestor directory. + * Returns the path to every node_modules/`@types` directory from some ancestor directory. * Returns undefined if there are none. */ function getDefaultTypeRoots(currentDirectory: string, host: { directoryExists?: (directoryName: string) => boolean }): string[] | undefined { @@ -307,7 +307,7 @@ namespace ts { } /** - * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * @param containingFile - file that contains type reference directive, can be undefined if containing file is unknown. * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups * is assumed to be the same as root directory of the project. */ @@ -577,7 +577,7 @@ namespace ts { } /** - * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory + * Stored map from non-relative module name to a table: directory to result of module lookup in this directory * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive. */ export interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache { @@ -848,9 +848,9 @@ namespace ts { } /** - * At first this function add entry directory -> module resolution result to the table. + * At first this function add entry directory -\> module resolution result to the table. * Then it computes the set of parent folders for 'directory' that should have the same module resolution result - * and for every parent folder in set it adds entry: parent -> module resolution. . + * and for every parent folder in set it adds entry: parent -\> module resolution. . * Lets say we first directory name: /a/b/c/d/e and resolution result is: /a/b/bar.ts. * Set of parent folders that should have the same result will be: * [ @@ -1075,12 +1075,14 @@ namespace ts { * - paths - this setting can only be used when baseUrl is specified. allows to tune how non-relative module names * will be resolved based on the content of the module name. * Structure of 'paths' compiler options + * ``` * 'paths': { * pattern-1: [...substitutions], * pattern-2: [...substitutions], * ... * pattern-n: [...substitutions] * } + * ``` * Pattern here is a string that can contain zero or one '*' character. During module resolution module name will be matched against * all patterns in the list. Matching for patterns that don't contain '*' means that module name must be equal to pattern respecting the case. * If pattern contains '*' then to match pattern "*" module name must start with the and end with . @@ -1093,6 +1095,7 @@ namespace ts { * will be converted to absolute using baseUrl. * For example: * baseUrl: /a/b/c + * ``` * "paths": { * // match all module names * "*": [ @@ -1106,13 +1109,14 @@ namespace ts { * "components/*": [ "/root/components/*" ] // substitution will convert /components/folder1/ to '/root/components/folder1/', * // it is rooted so it will be final candidate location * } + * ``` * * 'rootDirs' allows the project to be spreaded across multiple locations and resolve modules with relative names as if * they were in the same location. For example lets say there are two files * '/local/src/content/file1.ts' * '/shared/components/contracts/src/content/protocols/file2.ts' * After bundling content of '/shared/components/contracts/src' will be merged with '/local/src' so - * if file1 has the following import 'import {x} from "./protocols/file2"' it will be resolved successfully in runtime. + * if file1 has the following import `import {x} from "./protocols/file2"` it will be resolved successfully in runtime. * 'rootDirs' provides the way to tell compiler that in order to get the whole project it should behave as if content of all * root dirs were merged together. * I.e. for the example above 'rootDirs' will have two entries: [ '/local/src', '/shared/components/contracts/src' ]. @@ -1505,7 +1509,7 @@ namespace ts { * packageDirectory is the directory of the package itself. * For `blah/node_modules/foo/index.d.ts` this is packageDirectory: "foo" * For `/node_modules/foo/bar.d.ts` this is packageDirectory: "foo" - * For `/node_modules/@types/foo/bar/index.d.ts` this is packageDirectory: "@types/foo" + * For `/node_modules/@types/foo/bar/index.d.ts` this is packageDirectory: `"@types/foo"` * For `/node_modules/foo/bar/index.d.ts` this is packageDirectory: "foo" */ /* @internal */ @@ -1534,7 +1538,7 @@ namespace ts { } /** - * @param {boolean} onlyRecordFailures - if true then function won't try to actually load files but instead record all attempts as failures. This flag is necessary + * @param onlyRecordFailures - if true then function won't try to actually load files but instead record all attempts as failures. This flag is necessary * in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations. */ function loadModuleFromFile(extensions: Extensions, candidate: string, onlyRecordFailures: boolean, state: ModuleResolutionState): PathAndExtension | undefined { @@ -2670,14 +2674,14 @@ namespace ts { * However this does not allow us to represent final result that should be used instead of further searching (i.e. a final result that was found in cache). * SearchResult is used to deal with this issue, its values represents following outcomes: * - undefined - not found, continue searching - * - { value: undefined } - not found - stop searching - * - { value: } - found - stop searching + * - `{ value: undefined }` - not found - stop searching + * - `{ value: }` - found - stop searching */ type SearchResult = { value: T | undefined } | undefined; /** * Wraps value to SearchResult. - * @returns undefined if value is undefined or { value } otherwise + * @returns undefined if value is undefined or `{ value }` otherwise */ function toSearchResult(value: T | undefined): SearchResult { return value !== undefined ? { value } : undefined; diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index e38dd46598587..5b382af1b2a5f 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -523,12 +523,14 @@ namespace ts.moduleSpecifiers { // the module could be a namespace, which is export through "export=" from an ambient module. /** + * ``` * declare module "m" { * namespace ns { * class c {} * } * export = ns; * } + * ``` */ // `import {c} from "m";` is valid, in which case, `moduleSymbol` is "ns", but the module name should be "m" const ambientModuleDeclareCandidates = mapDefined(moduleSymbol.declarations, diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 1a9e69692ccbc..aae3443771253 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -833,9 +833,9 @@ namespace ts { * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. * - * @param node a given node to visit its children - * @param cbNode a callback to be invoked for all child nodes - * @param cbNodes a callback to be invoked for embedded array + * @param node - a given node to visit its children + * @param cbNode - a callback to be invoked for all child nodes + * @param cbNodes - a callback to be invoked for embedded array * * @remarks `forEachChild` must visit the children of a node in the order * that they appear in the source code. The language service depends on this property to locate nodes by position. @@ -855,9 +855,9 @@ namespace ts { * unlike `forEachChild`, embedded arrays are flattened and the 'cbNode' callback is invoked for each element. * If a callback returns a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. * - * @param node a given node to visit its children - * @param cbNode a callback to be invoked for all child nodes - * @param cbNodes a callback to be invoked for embedded array + * @param node - a given node to visit its children + * @param cbNode - a callback to be invoked for all child nodes + * @param cbNodes - a callback to be invoked for embedded array * * @remarks Unlike `forEachChild`, `forEachChildRecursively` handles recursively invoking the traversal on each child node found, * and while doing so, handles traversing the structure without relying on the callstack to encode the tree structure. @@ -968,8 +968,8 @@ namespace ts { /** * Parse json text into SyntaxTree and return node and parse errors if any - * @param fileName - * @param sourceText + * @param fileName - + * @param sourceText - */ export function parseJsonText(fileName: string, sourceText: string): JsonSourceFile { return Parser.parseJsonText(fileName, sourceText); @@ -1895,7 +1895,7 @@ namespace ts { * Provides a better error message than the generic "';' expected" if possible for * known common variants of a missing semicolon, such as from a mispelled names. * - * @param node Node preceding the expected semicolon location. + * @param node - Node preceding the expected semicolon location. */ function parseErrorForMissingSemicolonAfter(node: Expression | PropertyName): void { // Tagged template literals are sometimes used in places where only simple strings are allowed, i.e.: @@ -1964,9 +1964,9 @@ namespace ts { /** * Reports a diagnostic error for the current token being an invalid name. * - * @param blankDiagnostic Diagnostic to report for the case of the name being blank (matched tokenIfBlankName). - * @param nameDiagnostic Diagnostic to report for all other cases. - * @param tokenIfBlankName Current token if the name was invalid for being blank (not provided / skipped). + * @param blankDiagnostic - Diagnostic to report for the case of the name being blank (matched tokenIfBlankName). + * @param nameDiagnostic - Diagnostic to report for all other cases. + * @param tokenIfBlankName - Current token if the name was invalid for being blank (not provided / skipped). */ function parseErrorForInvalidName(nameDiagnostic: DiagnosticMessage, blankDiagnostic: DiagnosticMessage, tokenIfBlankName: SyntaxKind) { if (token() === tokenIfBlankName) { diff --git a/src/compiler/path.ts b/src/compiler/path.ts index 86bafd8f785ce..ada4cc8ebddeb 100644 --- a/src/compiler/path.ts +++ b/src/compiler/path.ts @@ -371,6 +371,7 @@ namespace ts { * getAnyExtensionFromPath("/path/to/file.js", ".ext", true) === "" * getAnyExtensionFromPath("/path/to/file.js", [".ext", ".js"], true) === ".js" * getAnyExtensionFromPath("/path/to/file.ext", ".EXT", false) === "" + * ``` */ export function getAnyExtensionFromPath(path: string, extensions: string | readonly string[], ignoreCase: boolean): string; export function getAnyExtensionFromPath(path: string, extensions?: string | readonly string[], ignoreCase?: boolean): string { @@ -396,7 +397,7 @@ namespace ts { /** * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is not normalized. + * components (at indices \> 0). The result is not normalized. * If the path is relative, the root component is `""`. * If the path is absolute, the root component includes the first path separator (`/`). * @@ -423,6 +424,7 @@ namespace ts { * getPathComponents("file:///path/to/") === ["file:///", "path", "to"] * getPathComponents("file:///") === ["file:///"] * getPathComponents("file://") === ["file://"] + * ``` */ export function getPathComponents(path: string, currentDirectory = "") { path = combinePaths(currentDirectory, path); @@ -433,7 +435,7 @@ namespace ts { /** * Formats a parsed path consisting of a root component (at index 0) and zero or more path - * segments (at indices > 0). + * segments (at indices \> 0). * * ```ts * getPathFromPathComponents(["/", "path", "to", "file.ext"]) === "/path/to/file.ext" @@ -531,7 +533,7 @@ namespace ts { /** * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is normalized. + * components (at `indices > 0`). The result is normalized. * If the path is relative, the root component is `""`. * If the path is absolute, the root component includes the first path separator (`/`). * diff --git a/src/compiler/performance.ts b/src/compiler/performance.ts index 341becea645ab..125d3ccf34633 100644 --- a/src/compiler/performance.ts +++ b/src/compiler/performance.ts @@ -50,7 +50,7 @@ namespace ts.performance { /** * Marks a performance event. * - * @param markName The name of the mark. + * @param markName - The name of the mark. */ export function mark(markName: string) { if (enabled) { @@ -64,10 +64,10 @@ namespace ts.performance { /** * Adds a performance measurement with the specified name. * - * @param measureName The name of the performance measurement. - * @param startMarkName The name of the starting mark. If not supplied, the point at which the + * @param measureName - The name of the performance measurement. + * @param startMarkName - The name of the starting mark. If not supplied, the point at which the * profiler was enabled is used. - * @param endMarkName The name of the ending mark. If not supplied, the current timestamp is + * @param endMarkName - The name of the ending mark. If not supplied, the current timestamp is * used. */ export function measure(measureName: string, startMarkName?: string, endMarkName?: string) { @@ -83,7 +83,7 @@ namespace ts.performance { /** * Gets the number of times a marker was encountered. * - * @param markName The name of the mark. + * @param markName - The name of the mark. */ export function getCount(markName: string) { return counts.get(markName) || 0; @@ -92,7 +92,7 @@ namespace ts.performance { /** * Gets the total duration of all measurements with the supplied name. * - * @param measureName The name of the measure whose durations should be accumulated. + * @param measureName - The name of the measure whose durations should be accumulated. */ export function getDuration(measureName: string) { return durations.get(measureName) || 0; @@ -101,7 +101,7 @@ namespace ts.performance { /** * Iterate over each measure, performing some action * - * @param cb The action to perform for each measure + * @param cb - The action to perform for each measure */ export function forEachMeasure(cb: (measureName: string, duration: number) => void) { durations.forEach((duration, measureName) => cb(measureName, duration)); diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 6b064be8640ca..061d0d8af28a2 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -517,8 +517,8 @@ namespace ts { * Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly * defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm). * If you have an actual import node, prefer using getModeForUsageLocation on the reference string node. - * @param file File to fetch the resolution mode within - * @param index Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations + * @param file - File to fetch the resolution mode within + * @param index - Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations */ export function getModeForResolutionAtIndex(file: SourceFile, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; /** @internal */ @@ -547,8 +547,8 @@ namespace ts { * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm). * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when * `moduleResolution` is `node16`+. - * @param file The file the import or import-like reference is contained within - * @param usage The module reference string + * @param file - The file the import or import-like reference is contained within + * @param usage - The module reference string * @returns The final resolution mode of the import */ export function getModeForUsageLocation(file: {impliedNodeFormat?: SourceFile["impliedNodeFormat"]}, usage: StringLiteralLike) { @@ -836,10 +836,10 @@ namespace ts { * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the * `options` parameter. * - * @param fileName The normalized absolute path to check the format of (it need not exist on disk) - * @param [packageJsonInfoCache] A cache for package file lookups - it's best to have a cache when this function is called often - * @param host The ModuleResolutionHost which can perform the filesystem lookups for package json data - * @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution` + * @param fileName - The normalized absolute path to check the format of (it need not exist on disk) + * @param packageJsonInfoCache - A cache for package file lookups - it's best to have a cache when this function is called often + * @param host - The ModuleResolutionHost which can perform the filesystem lookups for package json data + * @param options - The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution` * @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format */ export function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ModuleKind.ESNext | ModuleKind.CommonJS | undefined { @@ -997,7 +997,7 @@ namespace ts { * that represent a compilation unit. * * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and - * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. + * triple-slash-reference-path directives transitively. `@types` and triple-slash-reference-types are also pulled in. * * @param createProgramOptions - The options for creating a program. * @returns A 'Program' object. @@ -1008,7 +1008,7 @@ namespace ts { * that represent a compilation unit. * * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and - * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. + * triple-slash-reference-path directives transitively. `@types` and triple-slash-reference-types are also pulled in. * * @param rootNames - A set of root files. * @param options - The compiler options which should be used. @@ -4282,8 +4282,7 @@ namespace ts { }; } - // For backward compatibility - /** @deprecated */ export interface ResolveProjectReferencePathHost { + /** @deprecated For backward compatibility */ export interface ResolveProjectReferencePathHost { fileExists(fileName: string): boolean; } @@ -4311,7 +4310,7 @@ namespace ts { * Note: The file might not exist. */ export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName; - /** @deprecated */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName; + /** @deprecated For backward compatibility */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName; export function resolveProjectReferencePath(hostOrRef: ResolveProjectReferencePathHost | ProjectReference, ref?: ProjectReference): ResolvedConfigFileName { const passedInRef = ref ? ref : hostOrRef as ProjectReference; return resolveConfigFileProjectName(passedInRef.path); diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 46130e35659f9..139b33a50d57e 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -108,7 +108,7 @@ namespace ts { * Filter out paths like * "/", "/user", "/user/username", "/user/username/folderAtRoot", * "c:/", "c:/users", "c:/users/username", "c:/users/username/folderAtRoot", "c:/folderAtRoot" - * @param dirPath + * @param dirPath - */ export function canWatchDirectoryOrFile(dirPath: Path) { const rootLength = getRootLength(dirPath); diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index a54389fbb9474..a8e37e1659983 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -735,16 +735,16 @@ namespace ts { * line break. Multi-line comment ranges include the leading slash-asterisk and trailing * asterisk-slash characters. * - * @param reduce If true, accumulates the result of calling the callback in a fashion similar + * @param reduce - If true, accumulates the result of calling the callback in a fashion similar * to reduceLeft. If false, iteration stops when the callback returns a truthy value. - * @param text The source text to scan. - * @param pos The position at which to start scanning. - * @param trailing If false, whitespace is skipped until the first line break and comments + * @param text - The source text to scan. + * @param pos - The position at which to start scanning. + * @param trailing - If false, whitespace is skipped until the first line break and comments * between that location and the next token are returned. If true, comments occurring * between the given position and the next line break are returned. - * @param cb The callback to execute as each comment range is encountered. - * @param state A state value to pass to each iteration of the callback. - * @param initial An initial value to pass when accumulating results (when "reduce" is true). + * @param cb - The callback to execute as each comment range is encountered. + * @param state - A state value to pass to each iteration of the callback. + * @param initial - An initial value to pass when accumulating results (when "reduce" is true). * @returns If "reduce" is true, the accumulated value. If "reduce" is false, the first truthy * return value of the callback. */ diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index bcc37fcd5a857..92820a6b7e546 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1341,7 +1341,7 @@ namespace ts { writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; /** - * @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that + * @param pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that * use native OS file watching */ watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 12c6523839ddb..45f3fdf8146ff 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -145,12 +145,12 @@ namespace ts { /** * Transforms an array of SourceFiles by passing them through each transformer. * - * @param resolver The emit resolver provided by the checker. - * @param host The emit host object used to interact with the file system. - * @param options Compiler options to surface in the `TransformationContext`. - * @param nodes An array of nodes to transform. - * @param transforms An array of `TransformerFactory` callbacks. - * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files. + * @param resolver - The emit resolver provided by the checker. + * @param host - The emit host object used to interact with the file system. + * @param options - Compiler options to surface in the `TransformationContext`. + * @param nodes - An array of nodes to transform. + * @param transforms - An array of `TransformerFactory` callbacks. + * @param allowDtsFiles - A value indicating whether to allow the transformation of .d.ts files. */ export function transformNodes(resolver: EmitResolver | undefined, host: EmitHost | undefined, factory: NodeFactory, options: CompilerOptions, nodes: readonly T[], transformers: readonly TransformerFactory[], allowDtsFiles: boolean): TransformationResult { const enabledSyntaxKindFeatures = new Array(SyntaxKind.Count); @@ -281,9 +281,9 @@ namespace ts { /** * Emits a node with possible substitution. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emitCallback The callback used to emit the node or its substitute. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to emit. + * @param emitCallback - The callback used to emit the node or its substitute. */ function substituteNode(hint: EmitHint, node: Node) { Debug.assert(state < TransformationState.Disposed, "Cannot substitute a node after the result is disposed."); @@ -310,9 +310,9 @@ namespace ts { /** * Emits a node with possible emit notification. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emitCallback The callback used to emit the node. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to emit. + * @param emitCallback - The callback used to emit the node. */ function emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) { Debug.assert(state < TransformationState.Disposed, "Cannot invoke TransformationResult callbacks after the result is disposed."); diff --git a/src/compiler/transformers/classFields.ts b/src/compiler/transformers/classFields.ts index 3ae7696d7c96e..6555df549ec12 100644 --- a/src/compiler/transformers/classFields.ts +++ b/src/compiler/transformers/classFields.ts @@ -1648,8 +1648,8 @@ namespace ts { /** * Generates assignment statements for property initializers. * - * @param properties An array of property declarations to transform. - * @param receiver The receiver on which each property should be assigned. + * @param properties - An array of property declarations to transform. + * @param receiver - The receiver on which each property should be assigned. */ function addPropertyOrClassStaticBlockStatements(statements: Statement[], properties: readonly (PropertyDeclaration | ClassStaticBlockDeclaration)[], receiver: LeftHandSideExpression) { for (const property of properties) { @@ -1692,8 +1692,8 @@ namespace ts { /** * Generates assignment expressions for property initializers. * - * @param propertiesOrClassStaticBlocks An array of property declarations to transform. - * @param receiver The receiver on which each property should be assigned. + * @param propertiesOrClassStaticBlocks - An array of property declarations to transform. + * @param receiver - The receiver on which each property should be assigned. */ function generateInitializedPropertyExpressionsOrClassStaticBlock(propertiesOrClassStaticBlocks: readonly (PropertyDeclaration | ClassStaticBlockDeclaration)[], receiver: LeftHandSideExpression) { const expressions: Expression[] = []; @@ -1716,8 +1716,8 @@ namespace ts { /** * Transforms a property initializer into an assignment statement. * - * @param property The property declaration. - * @param receiver The object receiving the property assignment. + * @param property - The property declaration. + * @param receiver - The object receiving the property assignment. */ function transformProperty(property: PropertyDeclaration, receiver: LeftHandSideExpression) { const savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock; @@ -1839,9 +1839,9 @@ namespace ts { /** * Generates brand-check initializer for private methods. * - * @param statements Statement list that should be used to append new statements. - * @param methods An array of method declarations. - * @param receiver The receiver on which each method should be assigned. + * @param statements - Statement list that should be used to append new statements. + * @param methods - An array of method declarations. + * @param receiver - The receiver on which each method should be assigned. */ function addMethodStatements(statements: Statement[], methods: readonly (MethodDeclaration | AccessorDeclaration | AutoAccessorPropertyDeclaration)[], receiver: LeftHandSideExpression) { if (!shouldTransformPrivateElementsOrClassStaticBlocks || !some(methods)) { @@ -1934,8 +1934,8 @@ namespace ts { /** * Hooks node substitutions. * - * @param hint The context for the emitter. - * @param node The node to substitute. + * @param hint - The context for the emitter. + * @param node - The node to substitute. */ function onSubstituteNode(hint: EmitHint, node: Node) { node = previousOnSubstituteNode(hint, node); @@ -2005,7 +2005,7 @@ namespace ts { /** * If the name is a computed property, this function transforms it, then either returns an expression which caches the * value of the result or the expression itself if the value is either unused or safe to inline into multiple locations - * @param shouldHoist Does the expression need to be reused? (ie, for an initializer or a decorator) + * @param shouldHoist - Does the expression need to be reused? (ie, for an initializer or a decorator) */ function getPropertyNameExpressionIfNeeded(name: PropertyName, shouldHoist: boolean): Expression | undefined { if (isComputedPropertyName(name)) { @@ -2282,7 +2282,7 @@ namespace ts { /** * Access an already defined {@link PrivateIdentifier} in the current {@link PrivateIdentifierEnvironment}. * - * @seealso {@link addPrivateIdentifierToEnvironment} + * See also {@link addPrivateIdentifierToEnvironment}. */ function accessPrivateIdentifier(name: PrivateIdentifier) { if (isGeneratedPrivateIdentifier(name)) { diff --git a/src/compiler/transformers/destructuring.ts b/src/compiler/transformers/destructuring.ts index 64900c56a887a..b47222ecf84c0 100644 --- a/src/compiler/transformers/destructuring.ts +++ b/src/compiler/transformers/destructuring.ts @@ -22,13 +22,13 @@ namespace ts { /** * Flattens a DestructuringAssignment or a VariableDeclaration to an expression. * - * @param node The node to flatten. - * @param visitor An optional visitor used to visit initializers. - * @param context The transformation context. - * @param level Indicates the extent to which flattening should occur. - * @param needsValue An optional value indicating whether the value from the right-hand-side of + * @param node - The node to flatten. + * @param visitor - An optional visitor used to visit initializers. + * @param context - The transformation context. + * @param level - Indicates the extent to which flattening should occur. + * @param needsValue - An optional value indicating whether the value from the right-hand-side of * the destructuring assignment is needed as part of a larger expression. - * @param createAssignmentCallback An optional callback used to create the assignment expression. + * @param createAssignmentCallback - An optional callback used to create the assignment expression. */ export function flattenDestructuringAssignment( node: VariableDeclaration | DestructuringAssignment, @@ -161,13 +161,13 @@ namespace ts { /** * Flattens a VariableDeclaration or ParameterDeclaration to one or more variable declarations. * - * @param node The node to flatten. - * @param visitor An optional visitor used to visit initializers. - * @param context The transformation context. - * @param boundValue The value bound to the declaration. - * @param skipInitializer A value indicating whether to ignore the initializer of `node`. - * @param hoistTempVariables Indicates whether temporary variables should not be recorded in-line. - * @param level Indicates the extent to which flattening should occur. + * @param node - The node to flatten. + * @param visitor - An optional visitor used to visit initializers. + * @param context - The transformation context. + * @param boundValue - The value bound to the declaration. + * @param skipInitializer - A value indicating whether to ignore the initializer of `node`. + * @param hoistTempVariables - Indicates whether temporary variables should not be recorded in-line. + * @param level - Indicates the extent to which flattening should occur. */ export function flattenDestructuringBinding( node: VariableDeclaration | ParameterDeclaration, @@ -253,11 +253,11 @@ namespace ts { /** * Flattens a BindingOrAssignmentElement into zero or more bindings or assignments. * - * @param flattenContext Options used to control flattening. - * @param element The element to flatten. - * @param value The current RHS value to assign to the element. - * @param location The location to use for source maps and comments. - * @param skipInitializer An optional value indicating whether to include the initializer + * @param flattenContext - Options used to control flattening. + * @param element - The element to flatten. + * @param value - The current RHS value to assign to the element. + * @param location - The location to use for source maps and comments. + * @param skipInitializer - An optional value indicating whether to include the initializer * for the element. */ function flattenBindingOrAssignmentElement( @@ -301,11 +301,11 @@ namespace ts { /** * Flattens an ObjectBindingOrAssignmentPattern into zero or more bindings or assignments. * - * @param flattenContext Options used to control flattening. - * @param parent The parent element of the pattern. - * @param pattern The ObjectBindingOrAssignmentPattern to flatten. - * @param value The current RHS value to assign to the element. - * @param location The location to use for source maps and comments. + * @param flattenContext - Options used to control flattening. + * @param parent - The parent element of the pattern. + * @param pattern - The ObjectBindingOrAssignmentPattern to flatten. + * @param value - The current RHS value to assign to the element. + * @param location - The location to use for source maps and comments. */ function flattenObjectBindingOrAssignmentPattern(flattenContext: FlattenContext, parent: BindingOrAssignmentElement, pattern: ObjectBindingOrAssignmentPattern, value: Expression, location: TextRange) { const elements = getElementsOfBindingOrAssignmentPattern(pattern); @@ -359,11 +359,11 @@ namespace ts { /** * Flattens an ArrayBindingOrAssignmentPattern into zero or more bindings or assignments. * - * @param flattenContext Options used to control flattening. - * @param parent The parent element of the pattern. - * @param pattern The ArrayBindingOrAssignmentPattern to flatten. - * @param value The current RHS value to assign to the element. - * @param location The location to use for source maps and comments. + * @param flattenContext - Options used to control flattening. + * @param parent - The parent element of the pattern. + * @param pattern - The ArrayBindingOrAssignmentPattern to flatten. + * @param value - The current RHS value to assign to the element. + * @param location - The location to use for source maps and comments. */ function flattenArrayBindingOrAssignmentPattern(flattenContext: FlattenContext, parent: BindingOrAssignmentElement, pattern: ArrayBindingOrAssignmentPattern, value: Expression, location: TextRange) { const elements = getElementsOfBindingOrAssignmentPattern(pattern); @@ -453,10 +453,10 @@ namespace ts { /** * Creates an expression used to provide a default value if a value is `undefined` at runtime. * - * @param flattenContext Options used to control flattening. - * @param value The RHS value to test. - * @param defaultValue The default value to use if `value` is `undefined` at runtime. - * @param location The location to use for source maps and comments. + * @param flattenContext - Options used to control flattening. + * @param value - The RHS value to test. + * @param defaultValue - The default value to use if `value` is `undefined` at runtime. + * @param location - The location to use for source maps and comments. */ function createDefaultValueCheck(flattenContext: FlattenContext, value: Expression, defaultValue: Expression, location: TextRange): Expression { value = ensureIdentifier(flattenContext, value, /*reuseIdentifierExpressions*/ true, location); @@ -467,11 +467,11 @@ namespace ts { * Creates either a PropertyAccessExpression or an ElementAccessExpression for the * right-hand side of a transformed destructuring assignment. * - * @link https://tc39.github.io/ecma262/#sec-runtime-semantics-keyeddestructuringassignmentevaluation + * {@link https://tc39.github.io/ecma262/#sec-runtime-semantics-keyeddestructuringassignmentevaluation} * - * @param flattenContext Options used to control flattening. - * @param value The RHS value that is the source of the property. - * @param propertyName The destructuring property name. + * @param flattenContext - Options used to control flattening. + * @param value - The RHS value that is the source of the property. + * @param propertyName - The destructuring property name. */ function createDestructuringPropertyAccess(flattenContext: FlattenContext, value: Expression, propertyName: PropertyName): LeftHandSideExpression { if (isComputedPropertyName(propertyName)) { @@ -493,11 +493,11 @@ namespace ts { * This function is useful to ensure that the expression's value can be read from in subsequent expressions. * Unless 'reuseIdentifierExpressions' is false, 'value' will be returned if it is just an identifier. * - * @param flattenContext Options used to control flattening. - * @param value the expression whose value needs to be bound. - * @param reuseIdentifierExpressions true if identifier expressions can simply be returned; + * @param flattenContext - Options used to control flattening. + * @param value - the expression whose value needs to be bound. + * @param reuseIdentifierExpressions - true if identifier expressions can simply be returned; * false if it is necessary to always emit an identifier. - * @param location The location to use for source maps and comments. + * @param location - The location to use for source maps and comments. */ function ensureIdentifier(flattenContext: FlattenContext, value: Expression, reuseIdentifierExpressions: boolean, location: TextRange) { if (isIdentifier(value) && reuseIdentifierExpressions) { diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 9e3ef1b753b87..0e86c0275ccae 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -16,6 +16,7 @@ namespace ts { * At every point where control flow leaves the loop either explicitly (break/continue) or implicitly (at the end of loop body) * we copy the value inside the loop to the out parameter holder. * + * ``` * for (let x;;) { * let a = 1; * let b = () => a; @@ -23,9 +24,11 @@ namespace ts { * if (...) break; * ... * } + * ``` * * will be converted to * + * ``` * var out_x; * var loop = function(x) { * var a = 1; @@ -41,6 +44,7 @@ namespace ts { * x = out_x; * if (state === "break") break; * } + * ``` * * NOTE: values to out parameters are not copies if loop is abrupted with 'return' - in this case this will end the entire enclosing function * so nobody can observe this new value. @@ -324,8 +328,8 @@ namespace ts { /** * Sets the `HierarchyFacts` for this node prior to visiting this node's subtree, returning the facts set prior to modification. - * @param excludeFacts The existing `HierarchyFacts` to reset before visiting the subtree. - * @param includeFacts The new `HierarchyFacts` to set before visiting the subtree. + * @param excludeFacts - The existing `HierarchyFacts` to reset before visiting the subtree. + * @param includeFacts - The new `HierarchyFacts` to set before visiting the subtree. */ function enterSubtree(excludeFacts: HierarchyFacts, includeFacts: HierarchyFacts) { const ancestorFacts = hierarchyFacts; @@ -336,9 +340,9 @@ namespace ts { /** * Restores the `HierarchyFacts` for this node's ancestor after visiting this node's * subtree, propagating specific facts from the subtree. - * @param ancestorFacts The `HierarchyFacts` of the ancestor to restore after visiting the subtree. - * @param excludeFacts The existing `HierarchyFacts` of the subtree that should not be propagated. - * @param includeFacts The new `HierarchyFacts` of the subtree that should be propagated. + * @param ancestorFacts - The `HierarchyFacts` of the ancestor to restore after visiting the subtree. + * @param excludeFacts - The existing `HierarchyFacts` of the subtree that should not be propagated. + * @param includeFacts - The new `HierarchyFacts` of the subtree that should be propagated. */ function exitSubtree(ancestorFacts: HierarchyFacts, excludeFacts: HierarchyFacts, includeFacts: HierarchyFacts) { hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & HierarchyFacts.SubtreeFactsMask | ancestorFacts; @@ -711,7 +715,7 @@ namespace ts { /** * Visits a ClassDeclaration and transforms it into a variable statement. * - * @param node A ClassDeclaration node. + * @param node - A ClassDeclaration node. */ function visitClassDeclaration(node: ClassDeclaration): VisitResult { // [source] @@ -764,7 +768,7 @@ namespace ts { /** * Visits a ClassExpression and transforms it into an expression. * - * @param node A ClassExpression node. + * @param node - A ClassExpression node. */ function visitClassExpression(node: ClassExpression): Expression { // [source] @@ -783,7 +787,7 @@ namespace ts { /** * Transforms a ClassExpression or ClassDeclaration into an expression. * - * @param node A ClassExpression or ClassDeclaration node. + * @param node - A ClassExpression or ClassDeclaration node. */ function transformClassLikeDeclarationToExpression(node: ClassExpression | ClassDeclaration): Expression { // [source] @@ -855,8 +859,8 @@ namespace ts { /** * Transforms a ClassExpression or ClassDeclaration into a function body. * - * @param node A ClassExpression or ClassDeclaration node. - * @param extendsClauseElement The expression for the class `extends` clause. + * @param node - A ClassExpression or ClassDeclaration node. + * @param extendsClauseElement - The expression for the class `extends` clause. */ function transformClassBody(node: ClassExpression | ClassDeclaration, extendsClauseElement: ExpressionWithTypeArguments | undefined): Block { const statements: Statement[] = []; @@ -891,9 +895,9 @@ namespace ts { /** * Adds a call to the `__extends` helper if needed for a class. * - * @param statements The statements of the class body function. - * @param node The ClassExpression or ClassDeclaration node. - * @param extendsClauseElement The expression for the class `extends` clause. + * @param statements - The statements of the class body function. + * @param node - The ClassExpression or ClassDeclaration node. + * @param extendsClauseElement - The expression for the class `extends` clause. */ function addExtendsHelperIfNeeded(statements: Statement[], node: ClassExpression | ClassDeclaration, extendsClauseElement: ExpressionWithTypeArguments | undefined): void { if (extendsClauseElement) { @@ -911,9 +915,9 @@ namespace ts { /** * Adds the constructor of the class to a class body function. * - * @param statements The statements of the class body function. - * @param node The ClassExpression or ClassDeclaration node. - * @param extendsClauseElement The expression for the class `extends` clause. + * @param statements - The statements of the class body function. + * @param node - The ClassExpression or ClassDeclaration node. + * @param extendsClauseElement - The expression for the class `extends` clause. */ function addConstructor(statements: Statement[], node: ClassExpression | ClassDeclaration, name: Identifier, extendsClauseElement: ExpressionWithTypeArguments | undefined): void { const savedConvertedLoopState = convertedLoopState; @@ -944,8 +948,8 @@ namespace ts { /** * Transforms the parameters of the constructor declaration of a class. * - * @param constructor The constructor for the class. - * @param hasSynthesizedSuper A value indicating whether the constructor starts with a + * @param constructor - The constructor for the class. + * @param hasSynthesizedSuper - A value indicating whether the constructor starts with a * synthesized `super` call. */ function transformConstructorParameters(constructor: ConstructorDeclaration | undefined, hasSynthesizedSuper: boolean) { @@ -983,10 +987,10 @@ namespace ts { /** * Transforms the body of a constructor declaration of a class. * - * @param constructor The constructor for the class. - * @param node The node which contains the constructor. - * @param extendsClauseElement The expression for the class `extends` clause. - * @param hasSynthesizedSuper A value indicating whether the constructor starts with a + * @param constructor - The constructor for the class. + * @param node - The node which contains the constructor. + * @param extendsClauseElement - The expression for the class `extends` clause. + * @param hasSynthesizedSuper - A value indicating whether the constructor starts with a * synthesized `super` call. */ function transformConstructorBody(constructor: ConstructorDeclaration & { body: FunctionBody } | undefined, node: ClassDeclaration | ClassExpression, extendsClauseElement: ExpressionWithTypeArguments | undefined, hasSynthesizedSuper: boolean) { @@ -1229,7 +1233,7 @@ namespace ts { /** * Visits a parameter declaration. * - * @param node A ParameterDeclaration node. + * @param node - A ParameterDeclaration node. */ function visitParameter(node: ParameterDeclaration): ParameterDeclaration | undefined { if (node.dotDotDotToken) { @@ -1285,8 +1289,8 @@ namespace ts { * Adds statements to the body of a function-like node if it contains parameters with * binding patterns or initializers. * - * @param statements The statements for the new function body. - * @param node A function-like node. + * @param statements - The statements for the new function body. + * @param node - A function-like node. */ function addDefaultValueAssignmentsIfNeeded(statements: Statement[], node: FunctionLikeDeclaration): boolean { if (!some(node.parameters, hasDefaultValueOrBindingPattern)) { @@ -1317,10 +1321,10 @@ namespace ts { /** * Adds statements to the body of a function-like node for parameters with binding patterns * - * @param statements The statements for the new function body. - * @param parameter The parameter for the function. - * @param name The name of the parameter. - * @param initializer The initializer for the parameter. + * @param statements - The statements for the new function body. + * @param parameter - The parameter for the function. + * @param name - The name of the parameter. + * @param initializer - The initializer for the parameter. */ function insertDefaultValueAssignmentForBindingPattern(statements: Statement[], parameter: ParameterDeclaration, name: BindingPattern, initializer: Expression | undefined): boolean { // In cases where a binding pattern is simply '[]' or '{}', @@ -1368,10 +1372,10 @@ namespace ts { /** * Adds statements to the body of a function-like node for parameters with initializers. * - * @param statements The statements for the new function body. - * @param parameter The parameter for the function. - * @param name The name of the parameter. - * @param initializer The initializer for the parameter. + * @param statements - The statements for the new function body. + * @param parameter - The parameter for the function. + * @param name - The name of the parameter. + * @param initializer - The initializer for the parameter. */ function insertDefaultValueAssignmentForInitializer(statements: Statement[], parameter: ParameterDeclaration, name: Identifier, initializer: Expression): void { initializer = visitNode(initializer, visitor, isExpression); @@ -1409,8 +1413,8 @@ namespace ts { /** * Gets a value indicating whether we need to add statements to handle a rest parameter. * - * @param node A ParameterDeclaration node. - * @param inConstructorWithSynthesizedSuper A value indicating whether the parameter is + * @param node - A ParameterDeclaration node. + * @param inConstructorWithSynthesizedSuper - A value indicating whether the parameter is * part of a constructor declaration with a * synthesized call to `super` */ @@ -1421,9 +1425,9 @@ namespace ts { /** * Adds statements to the body of a function-like node if it contains a rest parameter. * - * @param statements The statements for the new function body. - * @param node A function-like node. - * @param inConstructorWithSynthesizedSuper A value indicating whether the parameter is + * @param statements - The statements for the new function body. + * @param node - A function-like node. + * @param inConstructorWithSynthesizedSuper - A value indicating whether the parameter is * part of a constructor declaration with a * synthesized call to `super` */ @@ -1533,8 +1537,8 @@ namespace ts { * Adds a statement to capture the `this` of a function declaration if it is needed. * NOTE: This must be executed *after* the subtree has been visited. * - * @param statements The statements for the new function body. - * @param node A node. + * @param statements - The statements for the new function body. + * @param node - A node. */ function insertCaptureThisForNodeIfNeeded(statements: Statement[], node: Node): boolean { if (hierarchyFacts & HierarchyFacts.CapturedLexicalThis && node.kind !== SyntaxKind.ArrowFunction) { @@ -1547,8 +1551,8 @@ namespace ts { /** * Assigns the `this` in a constructor to the result of its `super()` call. * - * @param statements Statements in the constructor body. - * @param superExpression Existing `super()` call for the constructor. + * @param statements - Statements in the constructor body. + * @param superExpression - Existing `super()` call for the constructor. */ function insertSuperThisCaptureThisForNode(statements: Statement[], superExpression: Expression): void { enableSubstitutionsForCapturedThis(); @@ -1660,8 +1664,8 @@ namespace ts { * Adds statements to the class body function for a class to define the members of the * class. * - * @param statements The statements for the class body function. - * @param node The ClassExpression or ClassDeclaration node. + * @param statements - The statements for the class body function. + * @param node - The ClassExpression or ClassDeclaration node. */ function addClassMembers(statements: Statement[], node: ClassExpression | ClassDeclaration): void { for (const member of node.members) { @@ -1698,7 +1702,7 @@ namespace ts { /** * Transforms a SemicolonClassElement into a statement for a class body function. * - * @param member The SemicolonClassElement node. + * @param member - The SemicolonClassElement node. */ function transformSemicolonClassElementToStatement(member: SemicolonClassElement) { return setTextRange(factory.createEmptyStatement(), member); @@ -1707,8 +1711,8 @@ namespace ts { /** * Transforms a MethodDeclaration into a statement for a class body function. * - * @param receiver The receiver for the member. - * @param member The MethodDeclaration node. + * @param receiver - The receiver for the member. + * @param member - The MethodDeclaration node. */ function transformClassMethodDeclarationToStatement(receiver: LeftHandSideExpression, member: MethodDeclaration, container: Node) { const commentRange = getCommentRange(member); @@ -1743,8 +1747,8 @@ namespace ts { /** * Transforms a set of related of get/set accessors into a statement for a class body function. * - * @param receiver The receiver for the member. - * @param accessors The set of related get/set accessors. + * @param receiver - The receiver for the member. + * @param accessors - The set of related get/set accessors. */ function transformAccessorsToStatement(receiver: LeftHandSideExpression, accessors: AllAccessorDeclarations, container: Node): Statement { const statement = factory.createExpressionStatement(transformAccessorsToExpression(receiver, accessors, container, /*startsOnNewLine*/ false)); @@ -1760,7 +1764,7 @@ namespace ts { * Transforms a set of related get/set accessors into an expression for either a class * body function or an ObjectLiteralExpression with computed properties. * - * @param receiver The receiver for the member. + * @param receiver - The receiver for the member. */ function transformAccessorsToExpression(receiver: LeftHandSideExpression, { firstAccessor, getAccessor, setAccessor }: AllAccessorDeclarations, container: Node, startsOnNewLine: boolean): Expression { // To align with source maps in the old emitter, the receiver and property name @@ -1821,7 +1825,7 @@ namespace ts { /** * Visits an ArrowFunction and transforms it into a FunctionExpression. * - * @param node An ArrowFunction node. + * @param node - An ArrowFunction node. */ function visitArrowFunction(node: ArrowFunction) { if (node.transformFlags & TransformFlags.ContainsLexicalThis && !(hierarchyFacts & HierarchyFacts.StaticInitializer)) { @@ -1854,7 +1858,7 @@ namespace ts { /** * Visits a FunctionExpression node. * - * @param node a FunctionExpression node. + * @param node - a FunctionExpression node. */ function visitFunctionExpression(node: FunctionExpression): Expression { const ancestorFacts = getEmitFlags(node) & EmitFlags.AsyncFunctionBody @@ -1886,7 +1890,7 @@ namespace ts { /** * Visits a FunctionDeclaration node. * - * @param node a FunctionDeclaration node. + * @param node - a FunctionDeclaration node. */ function visitFunctionDeclaration(node: FunctionDeclaration): FunctionDeclaration { const savedConvertedLoopState = convertedLoopState; @@ -1915,9 +1919,9 @@ namespace ts { /** * Transforms a function-like node into a FunctionExpression. * - * @param node The function-like node to transform. - * @param location The source-map location for the new FunctionExpression. - * @param name The name of the new FunctionExpression. + * @param node - The function-like node to transform. + * @param location - The source-map location for the new FunctionExpression. + * @param name - The name of the new FunctionExpression. */ function transformFunctionLikeToExpression(node: FunctionLikeDeclaration, location: TextRange | undefined, name: Identifier | undefined, container: Node | undefined): FunctionExpression { const savedConvertedLoopState = convertedLoopState; @@ -1953,7 +1957,7 @@ namespace ts { /** * Transforms the body of a function-like node. * - * @param node A function-like node. + * @param node - A function-like node. */ function transformFunctionBody(node: FunctionLikeDeclaration) { let multiLine = false; // indicates whether the block *must* be emitted as multiple lines @@ -2066,7 +2070,7 @@ namespace ts { /** * Visits an ExpressionStatement that contains a destructuring assignment. * - * @param node An ExpressionStatement node. + * @param node - An ExpressionStatement node. */ function visitExpressionStatement(node: ExpressionStatement): Statement { return visitEachChild(node, visitorWithUnusedExpressionResult, context); @@ -2075,8 +2079,8 @@ namespace ts { /** * Visits a ParenthesizedExpression that may contain a destructuring assignment. * - * @param node A ParenthesizedExpression node. - * @param expressionResultIsUnused Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the + * @param node - A ParenthesizedExpression node. + * @param expressionResultIsUnused - Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the * expression of an `ExpressionStatement`). */ function visitParenthesizedExpression(node: ParenthesizedExpression, expressionResultIsUnused: boolean): ParenthesizedExpression { @@ -2086,8 +2090,8 @@ namespace ts { /** * Visits a BinaryExpression that contains a destructuring assignment. * - * @param node A BinaryExpression node. - * @param expressionResultIsUnused Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the + * @param node - A BinaryExpression node. + * @param expressionResultIsUnused - Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the * expression of an `ExpressionStatement`). */ function visitBinaryExpression(node: BinaryExpression, expressionResultIsUnused: boolean): Expression { @@ -2112,7 +2116,7 @@ namespace ts { } /** - * @param expressionResultIsUnused Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the + * @param expressionResultIsUnused - Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the * expression of an `ExpressionStatement`). */ function visitCommaListExpression(node: CommaListExpression, expressionResultIsUnused: boolean): Expression { @@ -2183,7 +2187,7 @@ namespace ts { /** * Visits a VariableDeclarationList that is block scoped (e.g. `let` or `const`). * - * @param node A VariableDeclarationList node. + * @param node - A VariableDeclarationList node. */ function visitVariableDeclarationList(node: VariableDeclarationList): VariableDeclarationList { if (node.flags & NodeFlags.BlockScoped || node.transformFlags & TransformFlags.ContainsBindingPattern) { @@ -2227,7 +2231,7 @@ namespace ts { * Gets a value indicating whether we should emit an explicit initializer for a variable * declaration in a `let` declaration list. * - * @param node A VariableDeclaration node. + * @param node - A VariableDeclaration node. */ function shouldEmitExplicitInitializerForLetDeclaration(node: VariableDeclaration) { // Nested let bindings might need to be initialized explicitly to preserve @@ -2293,7 +2297,7 @@ namespace ts { /** * Visits a VariableDeclaration in a `let` declaration list. * - * @param node A VariableDeclaration node. + * @param node - A VariableDeclaration node. */ function visitVariableDeclarationInLetDeclarationList(node: VariableDeclaration) { // For binding pattern names that lack initializers there is no point to emit @@ -2314,7 +2318,7 @@ namespace ts { /** * Visits a VariableDeclaration node with a binding pattern. * - * @param node A VariableDeclaration node. + * @param node - A VariableDeclaration node. */ function visitVariableDeclaration(node: VariableDeclaration): VisitResult { const ancestorFacts = enterSubtree(HierarchyFacts.ExportedVariableStatement, HierarchyFacts.None); @@ -2702,7 +2706,7 @@ namespace ts { /** * Visits an ObjectLiteralExpression with computed property names. * - * @param node An ObjectLiteralExpression node. + * @param node - An ObjectLiteralExpression node. */ function visitObjectLiteralExpression(node: ObjectLiteralExpression): Expression { const properties = node.properties; @@ -3467,10 +3471,10 @@ namespace ts { /** * Adds the members of an object literal to an array of expressions. * - * @param expressions An array of expressions. - * @param node An ObjectLiteralExpression node. - * @param receiver The receiver for members of the ObjectLiteralExpression. - * @param numInitialNonComputedProperties The number of initial properties without + * @param expressions - An array of expressions. + * @param node - An ObjectLiteralExpression node. + * @param receiver - The receiver for members of the ObjectLiteralExpression. + * @param numInitialNonComputedProperties - The number of initial properties without * computed property names. */ function addObjectLiteralMembers(expressions: Expression[], node: ObjectLiteralExpression, receiver: Identifier, start: number) { @@ -3510,9 +3514,9 @@ namespace ts { /** * Transforms a PropertyAssignment node into an expression. * - * @param node The ObjectLiteralExpression that contains the PropertyAssignment. - * @param property The PropertyAssignment node. - * @param receiver The receiver for the assignment. + * @param node - The ObjectLiteralExpression that contains the PropertyAssignment. + * @param property - The PropertyAssignment node. + * @param receiver - The receiver for the assignment. */ function transformPropertyAssignmentToExpression(property: PropertyAssignment, receiver: Expression, startsOnNewLine: boolean) { const expression = factory.createAssignment( @@ -3533,9 +3537,9 @@ namespace ts { /** * Transforms a ShorthandPropertyAssignment node into an expression. * - * @param node The ObjectLiteralExpression that contains the ShorthandPropertyAssignment. - * @param property The ShorthandPropertyAssignment node. - * @param receiver The receiver for the assignment. + * @param node - The ObjectLiteralExpression that contains the ShorthandPropertyAssignment. + * @param property - The ShorthandPropertyAssignment node. + * @param receiver - The receiver for the assignment. */ function transformShorthandPropertyAssignmentToExpression(property: ShorthandPropertyAssignment, receiver: Expression, startsOnNewLine: boolean) { const expression = factory.createAssignment( @@ -3556,9 +3560,9 @@ namespace ts { /** * Transforms a MethodDeclaration of an ObjectLiteralExpression into an expression. * - * @param node The ObjectLiteralExpression that contains the MethodDeclaration. - * @param method The MethodDeclaration node. - * @param receiver The receiver for the assignment. + * @param node - The ObjectLiteralExpression that contains the MethodDeclaration. + * @param method - The MethodDeclaration node. + * @param receiver - The receiver for the assignment. */ function transformObjectLiteralMethodDeclarationToExpression(method: MethodDeclaration, receiver: Expression, container: Node, startsOnNewLine: boolean) { const expression = factory.createAssignment( @@ -3613,7 +3617,7 @@ namespace ts { * Visits a MethodDeclaration of an ObjectLiteralExpression and transforms it into a * PropertyAssignment. * - * @param node A MethodDeclaration node. + * @param node - A MethodDeclaration node. */ function visitMethodDeclaration(node: MethodDeclaration): ObjectLiteralElementLike { // We should only get here for methods on an object literal with regular identifier names. @@ -3634,7 +3638,7 @@ namespace ts { /** * Visits an AccessorDeclaration of an ObjectLiteralExpression. * - * @param node An AccessorDeclaration node. + * @param node - An AccessorDeclaration node. */ function visitAccessorDeclaration(node: AccessorDeclaration): AccessorDeclaration { Debug.assert(!isComputedPropertyName(node.name)); @@ -3658,7 +3662,7 @@ namespace ts { /** * Visits a ShorthandPropertyAssignment and transforms it into a PropertyAssignment. * - * @param node A ShorthandPropertyAssignment node. + * @param node - A ShorthandPropertyAssignment node. */ function visitShorthandPropertyAssignment(node: ShorthandPropertyAssignment): ObjectLiteralElementLike { return setTextRange( @@ -3677,7 +3681,7 @@ namespace ts { /** * Visits a YieldExpression node. * - * @param node A YieldExpression node. + * @param node - A YieldExpression node. */ function visitYieldExpression(node: YieldExpression): Expression { // `yield` expressions are transformed using the generators transformer. @@ -3687,7 +3691,7 @@ namespace ts { /** * Visits an ArrayLiteralExpression that contains a spread element. * - * @param node An ArrayLiteralExpression node. + * @param node - An ArrayLiteralExpression node. */ function visitArrayLiteralExpression(node: ArrayLiteralExpression): Expression { if (some(node.elements, isSpreadElement)) { @@ -3700,7 +3704,7 @@ namespace ts { /** * Visits a CallExpression that contains either a spread element or `super`. * - * @param node a CallExpression. + * @param node - a CallExpression. */ function visitCallExpression(node: CallExpression) { if (getEmitFlags(node) & EmitFlags.TypeScriptClassWrapper) { @@ -3958,7 +3962,7 @@ namespace ts { /** * Visits a NewExpression that contains a spread element. * - * @param node A NewExpression node. + * @param node - A NewExpression node. */ function visitNewExpression(node: NewExpression): LeftHandSideExpression { if (some(node.arguments, isSpreadElement)) { @@ -3986,11 +3990,11 @@ namespace ts { /** * Transforms an array of Expression nodes that contains a SpreadExpression. * - * @param elements The array of Expression nodes. - * @param isArgumentList A value indicating whether to ensure that the result is a fresh array. + * @param elements - The array of Expression nodes. + * @param isArgumentList - A value indicating whether to ensure that the result is a fresh array. * This should be `false` when spreading into an `ArrayLiteral`, and `true` when spreading into an * argument list. - * @param multiLine A value indicating whether the result should be emitted on multiple lines. + * @param multiLine - A value indicating whether the result should be emitted on multiple lines. */ function transformAndSpreadElements(elements: NodeArray, isArgumentList: boolean, multiLine: boolean, hasTrailingComma: boolean): Expression { // When there is no leading SpreadElement: @@ -4109,7 +4113,7 @@ namespace ts { /** * Visits a template literal. * - * @param node A template literal. + * @param node - A template literal. */ function visitTemplateLiteral(node: LiteralExpression): LeftHandSideExpression { return setTextRange(factory.createStringLiteral(node.text), node); @@ -4118,7 +4122,7 @@ namespace ts { /** * Visits a string literal with an extended unicode escape. * - * @param node A string literal. + * @param node - A string literal. */ function visitStringLiteral(node: StringLiteral) { if (node.hasExtendedUnicodeEscape) { @@ -4130,7 +4134,7 @@ namespace ts { /** * Visits a binary or octal (ES6) numeric literal. * - * @param node A string literal. + * @param node - A string literal. */ function visitNumericLiteral(node: NumericLiteral) { if (node.numericLiteralFlags & TokenFlags.BinaryOrOctalSpecifier) { @@ -4142,7 +4146,7 @@ namespace ts { /** * Visits a TaggedTemplateExpression node. * - * @param node A TaggedTemplateExpression node. + * @param node - A TaggedTemplateExpression node. */ function visitTaggedTemplateExpression(node: TaggedTemplateExpression) { return processTaggedTemplateExpression( @@ -4158,7 +4162,7 @@ namespace ts { /** * Visits a TemplateExpression node. * - * @param node A TemplateExpression node. + * @param node - A TemplateExpression node. */ function visitTemplateExpression(node: TemplateExpression): Expression { let expression: Expression = factory.createStringLiteral(node.head.text); @@ -4200,9 +4204,9 @@ namespace ts { /** * Called by the printer just before a node is printed. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to be printed. - * @param emitCallback The callback used to emit the node. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to be printed. + * @param emitCallback - The callback used to emit the node. */ function onEmitNode(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) { if (enabledSubstitutions & ES2015SubstitutionFlags.CapturedThis && isFunctionLike(node)) { @@ -4251,8 +4255,8 @@ namespace ts { /** * Hooks node substitutions. * - * @param hint The context for the emitter. - * @param node The node to substitute. + * @param hint - The context for the emitter. + * @param node - The node to substitute. */ function onSubstituteNode(hint: EmitHint, node: Node) { node = previousOnSubstituteNode(hint, node); @@ -4288,7 +4292,7 @@ namespace ts { * Determines whether a name is the name of a declaration with a colliding name. * NOTE: This function expects to be called with an original source tree node. * - * @param node An original source tree node. + * @param node - An original source tree node. */ function isNameOfDeclarationWithCollidingName(node: Identifier) { switch (node.parent.kind) { @@ -4306,7 +4310,7 @@ namespace ts { /** * Substitutes an expression. * - * @param node An Expression node. + * @param node - An Expression node. */ function substituteExpression(node: Node) { switch (node.kind) { @@ -4323,7 +4327,7 @@ namespace ts { /** * Substitutes an expression identifier. * - * @param node An Identifier node. + * @param node - An Identifier node. */ function substituteExpressionIdentifier(node: Identifier): Identifier { if (enabledSubstitutions & ES2015SubstitutionFlags.BlockScopedBindings && !isInternalName(node)) { @@ -4363,7 +4367,7 @@ namespace ts { /** * Substitutes `this` when contained within an arrow function. * - * @param node The ThisKeyword node. + * @param node - The ThisKeyword node. */ function substituteThisKeyword(node: PrimaryExpression): PrimaryExpression { if (enabledSubstitutions & ES2015SubstitutionFlags.CapturedThis diff --git a/src/compiler/transformers/es2017.ts b/src/compiler/transformers/es2017.ts index 78d9f57ccdc9d..e1f12cb190bf3 100644 --- a/src/compiler/transformers/es2017.ts +++ b/src/compiler/transformers/es2017.ts @@ -259,7 +259,7 @@ namespace ts { * * This function will be called any time a ES2017 await expression is encountered. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitAwaitExpression(node: AwaitExpression): Expression { // do not downlevel a top-level await as it is module syntax... @@ -284,7 +284,7 @@ namespace ts { * This function will be called when one of the following conditions are met: * - The node is marked as async * - * @param node The node to visit. + * @param node - The node to visit. */ function visitMethodDeclaration(node: MethodDeclaration) { return factory.updateMethodDeclaration( @@ -308,7 +308,7 @@ namespace ts { * This function will be called when one of the following conditions are met: * - The node is marked async * - * @param node The node to visit. + * @param node - The node to visit. */ function visitFunctionDeclaration(node: FunctionDeclaration): VisitResult { return factory.updateFunctionDeclaration( @@ -331,7 +331,7 @@ namespace ts { * This function will be called when one of the following conditions are met: * - The node is marked async * - * @param node The node to visit. + * @param node - The node to visit. */ function visitFunctionExpression(node: FunctionExpression): Expression { return factory.updateFunctionExpression( @@ -354,7 +354,7 @@ namespace ts { * This function will be called when one of the following conditions are met: * - The node is marked async * - * @param node The node to visit. + * @param node - The node to visit. */ function visitArrowFunction(node: ArrowFunction) { return factory.updateArrowFunction( @@ -593,9 +593,9 @@ namespace ts { /** * Hook for node emit. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emit A callback used to emit the node in the printer. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to emit. + * @param emit - A callback used to emit the node in the printer. */ function onEmitNode(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void { // If we need to support substitutions for `super` in an async method, @@ -624,8 +624,8 @@ namespace ts { /** * Hooks node substitutions. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to substitute. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to substitute. */ function onSubstituteNode(hint: EmitHint, node: Node) { node = previousOnSubstituteNode(hint, node); diff --git a/src/compiler/transformers/es2018.ts b/src/compiler/transformers/es2018.ts index aa1f4a5e6c4f1..5f823c6b8babc 100644 --- a/src/compiler/transformers/es2018.ts +++ b/src/compiler/transformers/es2018.ts @@ -81,8 +81,8 @@ namespace ts { /** * Sets the `HierarchyFacts` for this node prior to visiting this node's subtree, returning the facts set prior to modification. - * @param excludeFacts The existing `HierarchyFacts` to reset before visiting the subtree. - * @param includeFacts The new `HierarchyFacts` to set before visiting the subtree. + * @param excludeFacts - The existing `HierarchyFacts` to reset before visiting the subtree. + * @param includeFacts - The new `HierarchyFacts` to set before visiting the subtree. */ function enterSubtree(excludeFacts: HierarchyFacts, includeFacts: HierarchyFacts) { const ancestorFacts = hierarchyFacts; @@ -93,7 +93,7 @@ namespace ts { /** * Restores the `HierarchyFacts` for this node's ancestor after visiting this node's * subtree. - * @param ancestorFacts The `HierarchyFacts` of the ancestor to restore after visiting the subtree. + * @param ancestorFacts - The `HierarchyFacts` of the ancestor to restore after visiting the subtree. */ function exitSubtree(ancestorFacts: HierarchyFacts) { hierarchyFacts = ancestorFacts; @@ -149,7 +149,7 @@ namespace ts { } /** - * @param expressionResultIsUnused Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the + * @param expressionResultIsUnused - Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the * expression of an `ExpressionStatement`). */ function visitorWorker(node: Node, expressionResultIsUnused: boolean): VisitResult { @@ -422,7 +422,7 @@ namespace ts { } /** - * @param expressionResultIsUnused Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the + * @param expressionResultIsUnused - Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the * expression of an `ExpressionStatement`). */ function visitParenthesizedExpression(node: ParenthesizedExpression, expressionResultIsUnused: boolean): ParenthesizedExpression { @@ -460,8 +460,8 @@ namespace ts { /** * Visits a BinaryExpression that contains a destructuring assignment. * - * @param node A BinaryExpression node. - * @param expressionResultIsUnused Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the + * @param node - A BinaryExpression node. + * @param expressionResultIsUnused - Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the * expression of an `ExpressionStatement`). */ function visitBinaryExpression(node: BinaryExpression, expressionResultIsUnused: boolean): Expression { @@ -486,7 +486,7 @@ namespace ts { } /** - * @param expressionResultIsUnused Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the + * @param expressionResultIsUnused - Indicates the result of an expression is unused by the parent node (i.e., the left side of a comma or the * expression of an `ExpressionStatement`). */ function visitCommaListExpression(node: CommaListExpression, expressionResultIsUnused: boolean): Expression { @@ -542,7 +542,7 @@ namespace ts { /** * Visits a VariableDeclaration node with a binding pattern. * - * @param node A VariableDeclaration node. + * @param node - A VariableDeclaration node. */ function visitVariableDeclaration(node: VariableDeclaration): VisitResult { if (exportedVariableStatement) { @@ -587,7 +587,7 @@ namespace ts { /** * Visits a ForOfStatement and converts it into a ES2015-compatible ForOfStatement. * - * @param node A ForOfStatement. + * @param node - A ForOfStatement. */ function visitForOfStatement(node: ForOfStatement, outermostLabeledStatement: LabeledStatement | undefined): VisitResult { const ancestorFacts = enterSubtree(HierarchyFacts.IterationStatementExcludes, HierarchyFacts.IterationStatementIncludes); @@ -1177,9 +1177,9 @@ namespace ts { /** * Called by the printer just before a node is printed. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to be printed. - * @param emitCallback The callback used to emit the node. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to be printed. + * @param emitCallback - The callback used to emit the node. */ function onEmitNode(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) { // If we need to support substitutions for `super` in an async method, @@ -1209,8 +1209,8 @@ namespace ts { /** * Hooks node substitutions. * - * @param hint The context for the emitter. - * @param node The node to substitute. + * @param hint - The context for the emitter. + * @param node - The node to substitute. */ function onSubstituteNode(hint: EmitHint, node: Node) { node = previousOnSubstituteNode(hint, node); diff --git a/src/compiler/transformers/es5.ts b/src/compiler/transformers/es5.ts index e82ba20cf5f9f..bd8c2af6b3516 100644 --- a/src/compiler/transformers/es5.ts +++ b/src/compiler/transformers/es5.ts @@ -3,7 +3,7 @@ namespace ts { /** * Transforms ES5 syntax into ES3 syntax. * - * @param context Context and state information for the transformation. + * @param context - Context and state information for the transformation. */ export function transformES5(context: TransformationContext) { const { factory } = context; @@ -30,7 +30,7 @@ namespace ts { /** * Transforms an ES5 source file to ES3. * - * @param node A SourceFile + * @param node - A SourceFile */ function transformSourceFile(node: SourceFile) { return node; @@ -39,9 +39,9 @@ namespace ts { /** * Called by the printer just before a node is printed. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emitCallback A callback used to emit the node. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to emit. + * @param emitCallback - A callback used to emit the node. */ function onEmitNode(hint: EmitHint, node: Node, emitCallback: (emitContext: EmitHint, node: Node) => void) { switch (node.kind) { @@ -59,8 +59,8 @@ namespace ts { /** * Hooks node substitutions. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to substitute. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to substitute. */ function onSubstituteNode(hint: EmitHint, node: Node) { if (node.id && noSubstitution && noSubstitution[node.id]) { @@ -80,7 +80,7 @@ namespace ts { /** * Substitutes a PropertyAccessExpression whose name is a reserved word. * - * @param node A PropertyAccessExpression + * @param node - A PropertyAccessExpression */ function substitutePropertyAccessExpression(node: PropertyAccessExpression): Expression { if (isPrivateIdentifier(node.name)) { @@ -96,7 +96,7 @@ namespace ts { /** * Substitutes a PropertyAssignment whose name is a reserved word. * - * @param node A PropertyAssignment + * @param node - A PropertyAssignment */ function substitutePropertyAssignment(node: PropertyAssignment): PropertyAssignment { const literalName = isIdentifier(node.name) && trySubstituteReservedName(node.name); @@ -109,7 +109,7 @@ namespace ts { /** * If an identifier name is a reserved word, returns a string literal for the name. * - * @param name An Identifier + * @param name - An Identifier */ function trySubstituteReservedName(name: Identifier) { const token = name.originalKeywordKind || (nodeIsSynthesized(name) ? stringToToken(idText(name)) : undefined); diff --git a/src/compiler/transformers/generators.ts b/src/compiler/transformers/generators.ts index ee19c12c9aec6..3b72c51e56429 100644 --- a/src/compiler/transformers/generators.ts +++ b/src/compiler/transformers/generators.ts @@ -308,7 +308,7 @@ namespace ts { /** * Visits a node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitor(node: Node): VisitResult { const transformFlags = node.transformFlags; @@ -332,7 +332,7 @@ namespace ts { /** * Visits a node that is contained within a statement that contains yield. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitJavaScriptInStatementContainingYield(node: Node): VisitResult { switch (node.kind) { @@ -352,7 +352,7 @@ namespace ts { /** * Visits a node that is contained within a generator function. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitJavaScriptInGeneratorFunctionBody(node: Node): VisitResult { switch (node.kind) { @@ -391,7 +391,7 @@ namespace ts { /** * Visits a node that contains a YieldExpression. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitJavaScriptContainingYield(node: Node): VisitResult { switch (node.kind) { @@ -421,7 +421,7 @@ namespace ts { /** * Visits a generator function. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitGenerator(node: Node): VisitResult { switch (node.kind) { @@ -443,7 +443,7 @@ namespace ts { * - The function declaration is a generator function. * - The function declaration is contained within the body of a generator function. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitFunctionDeclaration(node: FunctionDeclaration): Statement | undefined { // Currently, we only support generators that were originally async functions. @@ -492,7 +492,7 @@ namespace ts { * - The function expression is a generator function. * - The function expression is contained within the body of a generator function. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitFunctionExpression(node: FunctionExpression): Expression { // Currently, we only support generators that were originally async functions. @@ -532,7 +532,7 @@ namespace ts { * This will be called when one of the following conditions are met: * - The accessor is contained within the body of a generator function. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitAccessorDeclaration(node: AccessorDeclaration) { const savedInGeneratorFunctionBody = inGeneratorFunctionBody; @@ -548,7 +548,7 @@ namespace ts { /** * Transforms the body of a generator function declaration. * - * @param node The function body to transform. + * @param node - The function body to transform. */ function transformGeneratorFunctionBody(body: Block) { // Save existing generator state @@ -617,7 +617,7 @@ namespace ts { * This will be called when one of the following conditions are met: * - The variable statement is contained within the body of a generator function. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitVariableStatement(node: VariableStatement): Statement | undefined { if (node.transformFlags & TransformFlags.ContainsYield) { @@ -656,7 +656,7 @@ namespace ts { * This will be called when one of the following conditions are met: * - The node contains a YieldExpression. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitBinaryExpression(node: BinaryExpression): Expression { const assoc = getExpressionAssociativity(node); @@ -673,7 +673,7 @@ namespace ts { /** * Visits a right-associative binary expression containing `yield`. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitRightAssociativeBinaryExpression(node: BinaryExpression) { const { left, right } = node; @@ -776,7 +776,7 @@ namespace ts { /** * Visits a comma expression containing `yield`. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitCommaExpression(node: BinaryExpression) { // [source] @@ -812,7 +812,7 @@ namespace ts { /** * Visits a comma-list expression. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitCommaListExpression(node: CommaListExpression) { // flattened version of `visitCommaExpression` @@ -835,7 +835,7 @@ namespace ts { /** * Visits a logical binary expression containing `yield`. * - * @param node A node to visit. + * @param node - A node to visit. */ function visitLogicalBinaryExpression(node: BinaryExpression) { // Logical binary expressions (`&&` and `||`) are shortcutting expressions and need @@ -888,7 +888,7 @@ namespace ts { /** * Visits a conditional expression containing `yield`. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitConditionalExpression(node: ConditionalExpression): Expression { // [source] @@ -928,7 +928,7 @@ namespace ts { /** * Visits a `yield` expression. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitYieldExpression(node: YieldExpression): LeftHandSideExpression { // [source] @@ -959,7 +959,7 @@ namespace ts { /** * Visits an ArrayLiteralExpression that contains a YieldExpression. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitArrayLiteralExpression(node: ArrayLiteralExpression) { return visitElements(node.elements, /*leadingElement*/ undefined, /*location*/ undefined, node.multiLine); @@ -969,8 +969,8 @@ namespace ts { * Visits an array of expressions containing one or more YieldExpression nodes * and returns an expression for the resulting value. * - * @param elements The elements to visit. - * @param multiLine Whether array literals created should be emitted on multiple lines. + * @param elements - The elements to visit. + * @param multiLine - Whether array literals created should be emitted on multiple lines. */ function visitElements(elements: NodeArray, leadingElement?: Expression, location?: TextRange, multiLine?: boolean) { // [source] @@ -1092,7 +1092,7 @@ namespace ts { /** * Visits an ElementAccessExpression that contains a YieldExpression. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitElementAccessExpression(node: ElementAccessExpression) { if (containsYield(node.argumentExpression)) { @@ -2026,7 +2026,7 @@ namespace ts { /** * Begins a block operation (With, Break/Continue, Try/Catch/Finally) * - * @param block Information about the block. + * @param block - Information about the block. */ function beginBlock(block: CodeBlock): number { if (!blocks) { @@ -2077,7 +2077,7 @@ namespace ts { /** * Begins a code block for a generated `with` statement. * - * @param expression An identifier representing expression for the `with` block. + * @param expression - An identifier representing expression for the `with` block. */ function beginWithBlock(expression: Identifier): void { const startLabel = defineLabel(); @@ -2120,7 +2120,7 @@ namespace ts { /** * Enters the `catch` clause of a generated `try` statement. * - * @param variable The catch variable. + * @param variable - The catch variable. */ function beginCatchBlock(variable: VariableDeclaration): void { Debug.assert(peekBlockKind() === CodeBlockKind.Exception); @@ -2201,7 +2201,7 @@ namespace ts { * Begins a code block that supports `break` or `continue` statements that are defined in * the source tree and not from generated code. * - * @param labelText Names from containing labeled statements. + * @param labelText - Names from containing labeled statements. */ function beginScriptLoopBlock(): void { beginBlock({ @@ -2217,7 +2217,7 @@ namespace ts { * generated code. Returns a label used to mark the operation to which to jump when a * `break` statement targets this block. * - * @param continueLabel A Label used to mark the operation to which to jump when a + * @param continueLabel - A Label used to mark the operation to which to jump when a * `continue` statement targets this block. */ function beginLoopBlock(continueLabel: Label): Label { @@ -2314,7 +2314,7 @@ namespace ts { /** * Indicates whether the provided block supports `break` statements. * - * @param block A code block. + * @param block - A code block. */ function supportsUnlabeledBreak(block: CodeBlock): block is SwitchBlock | LoopBlock { return block.kind === CodeBlockKind.Switch @@ -2324,7 +2324,7 @@ namespace ts { /** * Indicates whether the provided block supports `break` statements with labels. * - * @param block A code block. + * @param block - A code block. */ function supportsLabeledBreakOrContinue(block: CodeBlock): block is LabeledBlock { return block.kind === CodeBlockKind.Labeled; @@ -2333,7 +2333,7 @@ namespace ts { /** * Indicates whether the provided block supports `continue` statements. * - * @param block A code block. + * @param block - A code block. */ function supportsUnlabeledContinue(block: CodeBlock): block is LoopBlock { return block.kind === CodeBlockKind.Loop; @@ -2358,7 +2358,7 @@ namespace ts { /** * Finds the label that is the target for a `break` statement. * - * @param labelText An optional name of a containing labeled statement. + * @param labelText - An optional name of a containing labeled statement. */ function findBreakTarget(labelText?: string): Label { if (blockStack) { @@ -2388,7 +2388,7 @@ namespace ts { /** * Finds the label that is the target for a `continue` statement. * - * @param labelText An optional name of a containing labeled statement. + * @param labelText - An optional name of a containing labeled statement. */ function findContinueTarget(labelText?: string): Label { if (blockStack) { @@ -2415,7 +2415,7 @@ namespace ts { /** * Creates an expression that can be used to indicate the value for a label. * - * @param label A label. + * @param label - A label. */ function createLabel(label: Label | undefined): Expression { if (label !== undefined && label > 0) { @@ -2449,8 +2449,8 @@ namespace ts { /** * Creates a statement that can be used indicate a Break operation to the provided label. * - * @param label A label. - * @param location An optional source map location for the statement. + * @param label - A label. + * @param location - An optional source map location for the statement. */ function createInlineBreak(label: Label, location?: TextRange): ReturnStatement { Debug.assertLessThan(0, label, "Invalid label"); @@ -2468,8 +2468,8 @@ namespace ts { /** * Creates a statement that can be used indicate a Return operation. * - * @param expression The expression for the return statement. - * @param location An optional source map location for the statement. + * @param expression - The expression for the return statement. + * @param location - An optional source map location for the statement. */ function createInlineReturn(expression?: Expression, location?: TextRange): ReturnStatement { return setTextRange( @@ -2507,7 +2507,7 @@ namespace ts { /** * Emits a Statement. * - * @param node A statement. + * @param node - A statement. */ function emitStatement(node: Statement): void { if (node) { @@ -2521,9 +2521,9 @@ namespace ts { /** * Emits an Assignment operation. * - * @param left The left-hand side of the assignment. - * @param right The right-hand side of the assignment. - * @param location An optional source map location for the assignment. + * @param left - The left-hand side of the assignment. + * @param right - The right-hand side of the assignment. + * @param location - An optional source map location for the assignment. */ function emitAssignment(left: Expression, right: Expression, location?: TextRange): void { emitWorker(OpCode.Assign, [left, right], location); @@ -2532,8 +2532,8 @@ namespace ts { /** * Emits a Break operation to the specified label. * - * @param label A label. - * @param location An optional source map location for the assignment. + * @param label - A label. + * @param location - An optional source map location for the assignment. */ function emitBreak(label: Label, location?: TextRange): void { emitWorker(OpCode.Break, [label], location); @@ -2543,9 +2543,9 @@ namespace ts { * Emits a Break operation to the specified label when a condition evaluates to a truthy * value at runtime. * - * @param label A label. - * @param condition The condition. - * @param location An optional source map location for the assignment. + * @param label - A label. + * @param condition - The condition. + * @param location - An optional source map location for the assignment. */ function emitBreakWhenTrue(label: Label, condition: Expression, location?: TextRange): void { emitWorker(OpCode.BreakWhenTrue, [label, condition], location); @@ -2555,9 +2555,9 @@ namespace ts { * Emits a Break to the specified label when a condition evaluates to a falsey value at * runtime. * - * @param label A label. - * @param condition The condition. - * @param location An optional source map location for the assignment. + * @param label - A label. + * @param condition - The condition. + * @param location - An optional source map location for the assignment. */ function emitBreakWhenFalse(label: Label, condition: Expression, location?: TextRange): void { emitWorker(OpCode.BreakWhenFalse, [label, condition], location); @@ -2566,8 +2566,8 @@ namespace ts { /** * Emits a YieldStar operation for the provided expression. * - * @param expression An optional value for the yield operation. - * @param location An optional source map location for the assignment. + * @param expression - An optional value for the yield operation. + * @param location - An optional source map location for the assignment. */ function emitYieldStar(expression?: Expression, location?: TextRange): void { emitWorker(OpCode.YieldStar, [expression], location); @@ -2576,8 +2576,8 @@ namespace ts { /** * Emits a Yield operation for the provided expression. * - * @param expression An optional value for the yield operation. - * @param location An optional source map location for the assignment. + * @param expression - An optional value for the yield operation. + * @param location - An optional source map location for the assignment. */ function emitYield(expression?: Expression, location?: TextRange): void { emitWorker(OpCode.Yield, [expression], location); @@ -2586,8 +2586,8 @@ namespace ts { /** * Emits a Return operation for the provided expression. * - * @param expression An optional value for the operation. - * @param location An optional source map location for the assignment. + * @param expression - An optional value for the operation. + * @param location - An optional source map location for the assignment. */ function emitReturn(expression?: Expression, location?: TextRange): void { emitWorker(OpCode.Return, [expression], location); @@ -2596,8 +2596,8 @@ namespace ts { /** * Emits a Throw operation for the provided expression. * - * @param expression A value for the operation. - * @param location An optional source map location for the assignment. + * @param expression - A value for the operation. + * @param location - An optional source map location for the assignment. */ function emitThrow(expression: Expression, location?: TextRange): void { emitWorker(OpCode.Throw, [expression], location); @@ -2613,8 +2613,8 @@ namespace ts { /** * Emits an operation. * - * @param code The OpCode for the operation. - * @param args The optional arguments for the operation. + * @param code - The OpCode for the operation. + * @param args - The optional arguments for the operation. */ function emitWorker(code: OpCode, args?: OperationArguments, location?: TextRange): void { if (operations === undefined) { @@ -2760,7 +2760,7 @@ namespace ts { /** * Appends a case clause for the last label and sets the new label. * - * @param markLabelEnd Indicates that the transition between labels was a fall-through + * @param markLabelEnd - Indicates that the transition between labels was a fall-through * from a previous case clause and the change in labels should be * reflected on the `state` object. */ @@ -2920,7 +2920,7 @@ namespace ts { /** * Writes an operation as a statement to the current label's statement list. * - * @param operation The OpCode of the operation + * @param operation - The OpCode of the operation */ function writeOperation(operationIndex: number): void { tryEnterLabel(operationIndex); @@ -2971,7 +2971,7 @@ namespace ts { /** * Writes a statement to the current label's statement list. * - * @param statement A statement to write. + * @param statement - A statement to write. */ function writeStatement(statement: Statement): void { if (statement) { @@ -2987,9 +2987,9 @@ namespace ts { /** * Writes an Assign operation to the current label's statement list. * - * @param left The left-hand side of the assignment. - * @param right The right-hand side of the assignment. - * @param operationLocation The source map location for the operation. + * @param left - The left-hand side of the assignment. + * @param right - The right-hand side of the assignment. + * @param operationLocation - The source map location for the operation. */ function writeAssign(left: Expression, right: Expression, operationLocation: TextRange | undefined): void { writeStatement(setTextRange(factory.createExpressionStatement(factory.createAssignment(left, right)), operationLocation)); @@ -2998,8 +2998,8 @@ namespace ts { /** * Writes a Throw operation to the current label's statement list. * - * @param expression The value to throw. - * @param operationLocation The source map location for the operation. + * @param expression - The value to throw. + * @param operationLocation - The source map location for the operation. */ function writeThrow(expression: Expression, operationLocation: TextRange | undefined): void { lastOperationWasAbrupt = true; @@ -3010,8 +3010,8 @@ namespace ts { /** * Writes a Return operation to the current label's statement list. * - * @param expression The value to return. - * @param operationLocation The source map location for the operation. + * @param expression - The value to return. + * @param operationLocation - The source map location for the operation. */ function writeReturn(expression: Expression | undefined, operationLocation: TextRange | undefined): void { lastOperationWasAbrupt = true; @@ -3035,8 +3035,8 @@ namespace ts { /** * Writes a Break operation to the current label's statement list. * - * @param label The label for the Break. - * @param operationLocation The source map location for the operation. + * @param label - The label for the Break. + * @param operationLocation - The source map location for the operation. */ function writeBreak(label: Label, operationLocation: TextRange | undefined): void { lastOperationWasAbrupt = true; @@ -3059,9 +3059,9 @@ namespace ts { /** * Writes a BreakWhenTrue operation to the current label's statement list. * - * @param label The label for the Break. - * @param condition The condition for the Break. - * @param operationLocation The source map location for the operation. + * @param label - The label for the Break. + * @param condition - The condition for the Break. + * @param operationLocation - The source map location for the operation. */ function writeBreakWhenTrue(label: Label, condition: Expression, operationLocation: TextRange | undefined): void { writeStatement( @@ -3089,9 +3089,9 @@ namespace ts { /** * Writes a BreakWhenFalse operation to the current label's statement list. * - * @param label The label for the Break. - * @param condition The condition for the Break. - * @param operationLocation The source map location for the operation. + * @param label - The label for the Break. + * @param condition - The condition for the Break. + * @param operationLocation - The source map location for the operation. */ function writeBreakWhenFalse(label: Label, condition: Expression, operationLocation: TextRange | undefined): void { writeStatement( @@ -3119,8 +3119,8 @@ namespace ts { /** * Writes a Yield operation to the current label's statement list. * - * @param expression The expression to yield. - * @param operationLocation The source map location for the operation. + * @param expression - The expression to yield. + * @param operationLocation - The source map location for the operation. */ function writeYield(expression: Expression, operationLocation: TextRange | undefined): void { lastOperationWasAbrupt = true; @@ -3144,8 +3144,8 @@ namespace ts { /** * Writes a YieldStar instruction to the current label's statement list. * - * @param expression The expression to yield. - * @param operationLocation The source map location for the operation. + * @param expression - The expression to yield. + * @param operationLocation - The source map location for the operation. */ function writeYieldStar(expression: Expression, operationLocation: TextRange | undefined): void { lastOperationWasAbrupt = true; diff --git a/src/compiler/transformers/jsx.ts b/src/compiler/transformers/jsx.ts index 83a7f70d156a0..1f79ba72c0219 100644 --- a/src/compiler/transformers/jsx.ts +++ b/src/compiler/transformers/jsx.ts @@ -65,7 +65,7 @@ namespace ts { /** * Transform JSX-specific syntax in a SourceFile. * - * @param node A SourceFile node. + * @param node - A SourceFile node. */ function transformSourceFile(node: SourceFile) { if (node.isDeclarationFile) { diff --git a/src/compiler/transformers/legacyDecorators.ts b/src/compiler/transformers/legacyDecorators.ts index fac91f5f6f584..3a4d9d28dc5d7 100644 --- a/src/compiler/transformers/legacyDecorators.ts +++ b/src/compiler/transformers/legacyDecorators.ts @@ -118,8 +118,8 @@ namespace ts { /** * Transforms a non-decorated class declaration. * - * @param node A ClassDeclaration node. - * @param name The name of the class. + * @param node - A ClassDeclaration node. + * @param name - The name of the class. */ function transformClassDeclarationWithoutClassDecorators(node: ClassDeclaration, name: Identifier | undefined) { // ${modifiers} class ${name} ${heritageClauses} { @@ -391,7 +391,7 @@ namespace ts { /** * Transforms all of the decorators for a declaration into an array of expressions. * - * @param allDecorators An object containing all of the decorators for the declaration. + * @param allDecorators - An object containing all of the decorators for the declaration. */ function transformAllDecoratorsOfDeclaration(allDecorators: AllDecorators | undefined) { if (!allDecorators) { @@ -408,8 +408,8 @@ namespace ts { * Generates statements used to apply decorators to either the static or instance members * of a class. * - * @param node The class node. - * @param isStatic A value indicating whether to generate statements for static or + * @param node - The class node. + * @param isStatic - A value indicating whether to generate statements for static or * instance members. */ function addClassElementDecorationStatements(statements: Statement[], node: ClassDeclaration, isStatic: boolean) { @@ -420,7 +420,7 @@ namespace ts { * Determines whether a class member is either a static or an instance member of a class * that is decorated, or has parameters that are decorated. * - * @param member The class member. + * @param member - The class member. */ function isDecoratedClassElement(member: ClassElement, isStaticElement: boolean, parent: ClassLikeDeclaration) { return nodeOrChildIsDecorated(member, parent) @@ -431,8 +431,8 @@ namespace ts { * Gets either the static or instance members of a class that are decorated, or have * parameters that are decorated. * - * @param node The class containing the member. - * @param isStatic A value indicating whether to retrieve static or instance members of + * @param node - The class containing the member. + * @param isStatic - A value indicating whether to retrieve static or instance members of * the class. */ function getDecoratedClassElements(node: ClassExpression | ClassDeclaration, isStatic: boolean): readonly ClassElement[] { @@ -443,8 +443,8 @@ namespace ts { * Generates expressions used to apply decorators to either the static or instance members * of a class. * - * @param node The class node. - * @param isStatic A value indicating whether to generate expressions for static or + * @param node - The class node. + * @param isStatic - A value indicating whether to generate expressions for static or * instance members. */ function generateClassElementDecorationExpressions(node: ClassExpression | ClassDeclaration, isStatic: boolean) { @@ -459,8 +459,8 @@ namespace ts { /** * Generates an expression used to evaluate class element decorators at runtime. * - * @param node The class node that contains the member. - * @param member The class member. + * @param node - The class node that contains the member. + * @param member - The class member. */ function generateClassElementDecorationExpression(node: ClassExpression | ClassDeclaration, member: ClassElement) { const allDecorators = getAllDecoratorsOfClassElement(member, node); @@ -528,7 +528,7 @@ namespace ts { /** * Generates a __decorate helper call for a class constructor. * - * @param node The class node. + * @param node - The class node. */ function addConstructorDecorationStatement(statements: Statement[], node: ClassDeclaration) { const expression = generateConstructorDecorationExpression(node); @@ -540,7 +540,7 @@ namespace ts { /** * Generates a __decorate helper call for a class constructor. * - * @param node The class node. + * @param node - The class node. */ function generateConstructorDecorationExpression(node: ClassExpression | ClassDeclaration) { const allDecorators = getAllDecoratorsOfClass(node); @@ -566,7 +566,7 @@ namespace ts { /** * Transforms a decorator into an expression. * - * @param decorator The decorator node. + * @param decorator - The decorator node. */ function transformDecorator(decorator: Decorator) { return visitNode(decorator.expression, visitor, isExpression); @@ -575,8 +575,8 @@ namespace ts { /** * Transforms the decorators of a parameter. * - * @param decorators The decorators for the parameter at the provided offset. - * @param parameterOffset The offset of the parameter. + * @param decorators - The decorators for the parameter at the provided offset. + * @param parameterOffset - The offset of the parameter. */ function transformDecoratorsOfParameter(decorators: Decorator[], parameterOffset: number) { let expressions: Expression[] | undefined; @@ -599,7 +599,7 @@ namespace ts { * Gets an expression that represents a property name (for decorated properties or enums). * For a computed property, a name is generated for the node. * - * @param member The member whose name should be converted into an expression. + * @param member - The member whose name should be converted into an expression. */ function getExpressionForPropertyName(member: ClassElement | EnumMember, generateNameForComputedPropertyName: boolean): Expression { const name = member.name!; @@ -658,8 +658,8 @@ namespace ts { /** * Hooks node substitutions. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to substitute. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to substitute. */ function onSubstituteNode(hint: EmitHint, node: Node) { node = previousOnSubstituteNode(hint, node); @@ -707,4 +707,4 @@ namespace ts { return undefined; } } -} \ No newline at end of file +} diff --git a/src/compiler/transformers/module/esnextAnd2015.ts b/src/compiler/transformers/module/esnextAnd2015.ts index 3ab66a565b7f4..be7ab6096eccd 100644 --- a/src/compiler/transformers/module/esnextAnd2015.ts +++ b/src/compiler/transformers/module/esnextAnd2015.ts @@ -86,7 +86,7 @@ namespace ts { /** * Creates a `require()` call to import an external module. * - * @param importNode The declaration to import. + * @param importNode - The declaration to import. */ function createRequireCall(importNode: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration) { const moduleName = getExternalModuleNameLiteral(factory, importNode, Debug.checkDefined(currentSourceFile), host, resolver, compilerOptions); @@ -137,7 +137,7 @@ namespace ts { /** * Visits an ImportEqualsDeclaration node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); @@ -230,9 +230,9 @@ namespace ts { /** * Hook for node emit. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emit A callback used to emit the node in the printer. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to emit. + * @param emit - A callback used to emit the node in the printer. */ function onEmitNode(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void { if (isSourceFile(node)) { @@ -254,8 +254,8 @@ namespace ts { /** * Hooks node substitutions. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to substitute. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to substitute. */ function onSubstituteNode(hint: EmitHint, node: Node) { node = previousOnSubstituteNode(hint, node); diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index 9b3b8e6ee1283..3070f06167b0f 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -53,7 +53,7 @@ namespace ts { /** * Transforms the module aspects of a SourceFile. * - * @param node The SourceFile node. + * @param node - The SourceFile node. */ function transformSourceFile(node: SourceFile) { if (node.isDeclarationFile || @@ -87,7 +87,7 @@ namespace ts { /** * Transforms a SourceFile into a CommonJS module. * - * @param node The SourceFile node. + * @param node - The SourceFile node. */ function transformCommonJSModule(node: SourceFile) { startLexicalEnvironment(); @@ -128,7 +128,7 @@ namespace ts { /** * Transforms a SourceFile into an AMD module. * - * @param node The SourceFile node. + * @param node - The SourceFile node. */ function transformAMDModule(node: SourceFile) { const define = factory.createIdentifier("define"); @@ -215,7 +215,7 @@ namespace ts { /** * Transforms a SourceFile into a UMD module. * - * @param node The SourceFile node. + * @param node - The SourceFile node. */ function transformUMDModule(node: SourceFile) { const { aliasedModuleNames, unaliasedModuleNames, importAliasNames } = collectAsynchronousDependencies(node, /*includeNonAmdDependencies*/ false); @@ -355,8 +355,8 @@ namespace ts { /** * Collect the additional asynchronous dependencies for the module. * - * @param node The source file. - * @param includeNonAmdDependencies A value indicating whether to include non-AMD dependencies. + * @param node - The source file. + * @param includeNonAmdDependencies - A value indicating whether to include non-AMD dependencies. */ function collectAsynchronousDependencies(node: SourceFile, includeNonAmdDependencies: boolean): AsynchronousDependencies { // names of modules with corresponding parameter in the factory function @@ -422,7 +422,7 @@ namespace ts { /** * Transforms a SourceFile into an AMD or UMD module body. * - * @param node The SourceFile node. + * @param node - The SourceFile node. */ function transformAsynchronousModuleBody(node: SourceFile) { startLexicalEnvironment(); @@ -463,8 +463,8 @@ namespace ts { * Adds the down-level representation of `export=` to the statement list if one exists * in the source file. * - * @param statements The Statement list to modify. - * @param emitAsReturn A value indicating whether to emit the `export=` statement as a + * @param statements - The Statement list to modify. + * @param emitAsReturn - A value indicating whether to emit the `export=` statement as a * return statement. */ function addExportEqualsIfNeeded(statements: Statement[], emitAsReturn: boolean) { @@ -503,7 +503,7 @@ namespace ts { /** * Visits a node at the top level of the source file. * - * @param node The node to visit. + * @param node - The node to visit. */ function topLevelVisitor(node: Node): VisitResult { switch (node.kind) { @@ -889,7 +889,7 @@ namespace ts { /** * Visits an ImportDeclaration node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitImportDeclaration(node: ImportDeclaration): VisitResult { let statements: Statement[] | undefined; @@ -994,7 +994,7 @@ namespace ts { /** * Creates a `require()` call to import an external module. * - * @param importNode The declararation to import. + * @param importNode - The declararation to import. */ function createRequireCall(importNode: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration) { const moduleName = getExternalModuleNameLiteral(factory, importNode, currentSourceFile, host, resolver, compilerOptions); @@ -1009,7 +1009,7 @@ namespace ts { /** * Visits an ImportEqualsDeclaration node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); @@ -1085,7 +1085,7 @@ namespace ts { /** * Visits an ExportDeclaration node. * - * @param The node to visit. + * @param The - node to visit. */ function visitExportDeclaration(node: ExportDeclaration): VisitResult { if (!node.moduleSpecifier) { @@ -1195,7 +1195,7 @@ namespace ts { /** * Visits an ExportAssignment node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitExportAssignment(node: ExportAssignment): VisitResult { if (node.isExportEquals) { @@ -1219,7 +1219,7 @@ namespace ts { /** * Visits a FunctionDeclaration node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitFunctionDeclaration(node: FunctionDeclaration): VisitResult { let statements: Statement[] | undefined; @@ -1261,7 +1261,7 @@ namespace ts { /** * Visits a ClassDeclaration node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitClassDeclaration(node: ClassDeclaration): VisitResult { let statements: Statement[] | undefined; @@ -1301,7 +1301,7 @@ namespace ts { /** * Visits a VariableStatement node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitVariableStatement(node: VariableStatement): VisitResult { let statements: Statement[] | undefined; @@ -1397,7 +1397,7 @@ namespace ts { /** * Transforms an exported variable with an initializer into an expression. * - * @param node The node to transform. + * @param node - The node to transform. */ function transformInitializedVariable(node: InitializedVariableDeclaration): Expression { if (isBindingPattern(node.name)) { @@ -1428,7 +1428,7 @@ namespace ts { * Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged * and transformed declaration. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitMergeDeclarationMarker(node: MergeDeclarationMarker): VisitResult { // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding @@ -1449,7 +1449,7 @@ namespace ts { /** * Determines whether a node has an associated EndOfDeclarationMarker. * - * @param node The node to test. + * @param node - The node to test. */ function hasAssociatedEndOfDeclarationMarker(node: Node) { return (getEmitFlags(node) & EmitFlags.HasEndOfDeclarationMarker) !== 0; @@ -1459,7 +1459,7 @@ namespace ts { * Visits a DeclarationMarker used as a placeholder for the end of a transformed * declaration. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitEndOfDeclarationMarker(node: EndOfDeclarationMarker): VisitResult { // For some transformations we emit an `EndOfDeclarationMarker` to mark the actual @@ -1479,10 +1479,10 @@ namespace ts { * Appends the exports of an ImportDeclaration to a statement list, returning the * statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param decl The declaration whose exports are to be recorded. + * @param decl - The declaration whose exports are to be recorded. */ function appendExportsOfImportDeclaration(statements: Statement[] | undefined, decl: ImportDeclaration): Statement[] | undefined { if (currentModuleInfo.exportEquals) { @@ -1521,10 +1521,10 @@ namespace ts { * Appends the exports of an ImportEqualsDeclaration to a statement list, returning the * statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param decl The declaration whose exports are to be recorded. + * @param decl - The declaration whose exports are to be recorded. */ function appendExportsOfImportEqualsDeclaration(statements: Statement[] | undefined, decl: ImportEqualsDeclaration): Statement[] | undefined { if (currentModuleInfo.exportEquals) { @@ -1538,10 +1538,10 @@ namespace ts { * Appends the exports of a VariableStatement to a statement list, returning the statement * list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param node The VariableStatement whose exports are to be recorded. + * @param node - The VariableStatement whose exports are to be recorded. */ function appendExportsOfVariableStatement(statements: Statement[] | undefined, node: VariableStatement): Statement[] | undefined { if (currentModuleInfo.exportEquals) { @@ -1559,10 +1559,10 @@ namespace ts { * Appends the exports of a VariableDeclaration or BindingElement to a statement list, * returning the statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param decl The declaration whose exports are to be recorded. + * @param decl - The declaration whose exports are to be recorded. */ function appendExportsOfBindingElement(statements: Statement[] | undefined, decl: VariableDeclaration | BindingElement): Statement[] | undefined { if (currentModuleInfo.exportEquals) { @@ -1587,10 +1587,10 @@ namespace ts { * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list, * returning the statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param decl The declaration whose exports are to be recorded. + * @param decl - The declaration whose exports are to be recorded. */ function appendExportsOfHoistedDeclaration(statements: Statement[] | undefined, decl: ClassDeclaration | FunctionDeclaration): Statement[] | undefined { if (currentModuleInfo.exportEquals) { @@ -1612,10 +1612,10 @@ namespace ts { /** * Appends the exports of a declaration to a statement list, returning the statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param decl The declaration to export. + * @param decl - The declaration to export. */ function appendExportsOfDeclaration(statements: Statement[] | undefined, decl: Declaration, liveBinding?: boolean): Statement[] | undefined { const name = factory.getDeclarationName(decl); @@ -1632,13 +1632,13 @@ namespace ts { * Appends the down-level representation of an export to a statement list, returning the * statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param exportName The name of the export. - * @param expression The expression to export. - * @param location The location to use for source maps and comments for the export. - * @param allowComments Whether to allow comments on the export. + * @param exportName - The name of the export. + * @param expression - The expression to export. + * @param location - The location to use for source maps and comments for the export. + * @param allowComments - Whether to allow comments on the export. */ function appendExportStatement(statements: Statement[] | undefined, exportName: Identifier, expression: Expression, location?: TextRange, allowComments?: boolean, liveBinding?: boolean): Statement[] | undefined { statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); @@ -1677,10 +1677,10 @@ namespace ts { /** * Creates a call to the current file's export function to export a value. * - * @param name The bound name of the export. - * @param value The exported value. - * @param location The location to use for source maps and comments for the export. - * @param allowComments An optional value indicating whether to emit comments for the statement. + * @param name - The bound name of the export. + * @param value - The exported value. + * @param location - The location to use for source maps and comments for the export. + * @param allowComments - An optional value indicating whether to emit comments for the statement. */ function createExportStatement(name: Identifier, value: Expression, location?: TextRange, allowComments?: boolean, liveBinding?: boolean) { const statement = setTextRange(factory.createExpressionStatement(createExportExpression(name, value, /* location */ undefined, liveBinding)), location); @@ -1695,9 +1695,9 @@ namespace ts { /** * Creates a call to the current file's export function to export a value. * - * @param name The bound name of the export. - * @param value The exported value. - * @param location The location to use for source maps and comments for the export. + * @param name - The bound name of the export. + * @param value - The exported value. + * @param location - The location to use for source maps and comments for the export. */ function createExportExpression(name: Identifier, value: Expression, location?: TextRange, liveBinding?: boolean) { return setTextRange( @@ -1741,7 +1741,7 @@ namespace ts { /** * Visit nodes to elide module-specific modifiers. * - * @param node The node to visit. + * @param node - The node to visit. */ function modifierVisitor(node: Node): VisitResult { // Elide module-specific modifiers. @@ -1761,9 +1761,9 @@ namespace ts { /** * Hook for node emit notifications. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emit A callback used to emit the node in the printer. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to emit. + * @param emit - A callback used to emit the node in the printer. */ function onEmitNode(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void { if (node.kind === SyntaxKind.SourceFile) { @@ -1787,8 +1787,8 @@ namespace ts { /** * Hooks node substitutions. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to substitute. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to substitute. */ function onSubstituteNode(hint: EmitHint, node: Node) { node = previousOnSubstituteNode(hint, node); @@ -1810,7 +1810,7 @@ namespace ts { * Substitution for a ShorthandPropertyAssignment whose declaration name is an imported * or exported symbol. * - * @param node The node to substitute. + * @param node - The node to substitute. */ function substituteShorthandPropertyAssignment(node: ShorthandPropertyAssignment): ObjectLiteralElementLike { const name = node.name; @@ -1830,7 +1830,7 @@ namespace ts { /** * Substitution for an Expression that may contain an imported or exported symbol. * - * @param node The node to substitute. + * @param node - The node to substitute. */ function substituteExpression(node: Expression) { switch (node.kind) { @@ -1888,7 +1888,7 @@ namespace ts { * Substitution for an Identifier expression that may contain an imported or exported * symbol. * - * @param node The node to substitute. + * @param node - The node to substitute. */ function substituteExpressionIdentifier(node: Identifier): Expression { if (getEmitFlags(node) & EmitFlags.HelperName) { @@ -1938,7 +1938,7 @@ namespace ts { /** * Substitution for a BinaryExpression that may contain an imported or exported symbol. * - * @param node The node to substitute. + * @param node - The node to substitute. */ function substituteBinaryExpression(node: BinaryExpression): Expression { // When we see an assignment expression whose left-hand side is an exported symbol, @@ -1974,7 +1974,7 @@ namespace ts { /** * Gets the additional exports of a name. * - * @param name The name. + * @param name - The name. */ function getExports(name: Identifier): Identifier[] | undefined { if (!isGeneratedIdentifier(name)) { diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index d541c3d3ad26a..0ecdae2a85c73 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -45,7 +45,7 @@ namespace ts { /** * Transforms the module aspects of a SourceFile. * - * @param node The SourceFile node. + * @param node - The SourceFile node. */ function transformSourceFile(node: SourceFile) { if (node.isDeclarationFile || !(isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & TransformFlags.ContainsDynamicImport)) { @@ -139,7 +139,7 @@ namespace ts { /** * Collects the dependency groups for this files imports. * - * @param externalImports The imports for the file. + * @param externalImports - The imports for the file. */ function collectDependencyGroups(externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]) { const groupIndices = new Map(); @@ -169,8 +169,8 @@ namespace ts { /** * Adds the statements for the module body function for the source file. * - * @param node The source file for the module. - * @param dependencyGroups The grouped dependencies of the module. + * @param node - The source file for the module. + * @param dependencyGroups - The grouped dependencies of the module. */ function createSystemModuleBody(node: SourceFile, dependencyGroups: DependencyGroup[]) { // Shape of the body in system modules: @@ -289,7 +289,7 @@ namespace ts { /** * Adds an exportStar function to a statement list if it is needed for the file. * - * @param statements A statement list. + * @param statements - A statement list. */ function addExportStarIfNeeded(statements: Statement[]) { if (!moduleInfo.hasExportStarsToExportValues) { @@ -362,7 +362,7 @@ namespace ts { * Creates an exportStar function for the file, with an optional set of excluded local * names. * - * @param localNames An optional reference to an object containing a set of excluded local + * @param localNames - An optional reference to an object containing a set of excluded local * names. */ function createExportStarFunction(localNames: Identifier | undefined) { @@ -437,8 +437,8 @@ namespace ts { /** * Creates an array setter callbacks for each dependency group. * - * @param exportStarFunction A reference to an exportStarFunction for the file. - * @param dependencyGroups An array of grouped dependencies. + * @param exportStarFunction - A reference to an exportStarFunction for the file. + * @param dependencyGroups - An array of grouped dependencies. */ function createSettersArray(exportStarFunction: Identifier, dependencyGroups: DependencyGroup[]) { const setters: Expression[] = []; @@ -575,7 +575,7 @@ namespace ts { /** * Visit source elements at the top-level of a module. * - * @param node The node to visit. + * @param node - The node to visit. */ function topLevelVisitor(node: Node): VisitResult { switch (node.kind) { @@ -599,7 +599,7 @@ namespace ts { /** * Visits an ImportDeclaration node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitImportDeclaration(node: ImportDeclaration): VisitResult { let statements: Statement[] | undefined; @@ -627,7 +627,7 @@ namespace ts { /** * Visits an ImportEqualsDeclaration node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); @@ -650,7 +650,7 @@ namespace ts { /** * Visits an ExportAssignment node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitExportAssignment(node: ExportAssignment): VisitResult { if (node.isExportEquals) { @@ -673,7 +673,7 @@ namespace ts { /** * Visits a FunctionDeclaration, hoisting it to the outer module body function. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitFunctionDeclaration(node: FunctionDeclaration): VisitResult { if (hasSyntacticModifier(node, ModifierFlags.Export)) { @@ -707,7 +707,7 @@ namespace ts { /** * Visits a ClassDeclaration, hoisting its name to the outer module body function. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitClassDeclaration(node: ClassDeclaration): VisitResult { let statements: Statement[] | undefined; @@ -754,7 +754,7 @@ namespace ts { * Visits a variable statement, hoisting declared names to the top-level module body. * Each declaration is rewritten into an assignment expression. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitVariableStatement(node: VariableStatement): VisitResult { if (!shouldHoistVariableDeclarationList(node.declarationList)) { @@ -793,7 +793,7 @@ namespace ts { /** * Hoists the declared names of a VariableDeclaration or BindingElement. * - * @param node The declaration to hoist. + * @param node - The declaration to hoist. */ function hoistBindingElement(node: VariableDeclaration | BindingElement): void { if (isBindingPattern(node.name)) { @@ -811,7 +811,7 @@ namespace ts { /** * Determines whether a VariableDeclarationList should be hoisted. * - * @param node The node to test. + * @param node - The node to test. */ function shouldHoistVariableDeclarationList(node: VariableDeclarationList) { // hoist only non-block scoped declarations or block scoped declarations parented by source file @@ -823,8 +823,8 @@ namespace ts { /** * Transform an initialized variable declaration into an expression. * - * @param node The node to transform. - * @param isExportedDeclaration A value indicating whether the variable is exported. + * @param node - The node to transform. + * @param isExportedDeclaration - A value indicating whether the variable is exported. */ function transformInitializedVariable(node: VariableDeclaration, isExportedDeclaration: boolean): Expression { const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -843,9 +843,9 @@ namespace ts { /** * Creates an assignment expression for an exported variable declaration. * - * @param name The name of the variable. - * @param value The value of the variable's initializer. - * @param location The source map location for the assignment. + * @param name - The name of the variable. + * @param value - The value of the variable's initializer. + * @param location - The source map location for the assignment. */ function createExportedVariableAssignment(name: Identifier, value: Expression, location?: TextRange) { return createVariableAssignment(name, value, location, /*isExportedDeclaration*/ true); @@ -854,9 +854,9 @@ namespace ts { /** * Creates an assignment expression for a non-exported variable declaration. * - * @param name The name of the variable. - * @param value The value of the variable's initializer. - * @param location The source map location for the assignment. + * @param name - The name of the variable. + * @param value - The value of the variable's initializer. + * @param location - The source map location for the assignment. */ function createNonExportedVariableAssignment(name: Identifier, value: Expression, location?: TextRange) { return createVariableAssignment(name, value, location, /*isExportedDeclaration*/ false); @@ -865,10 +865,10 @@ namespace ts { /** * Creates an assignment expression for a variable declaration. * - * @param name The name of the variable. - * @param value The value of the variable's initializer. - * @param location The source map location for the assignment. - * @param isExportedDeclaration A value indicating whether the variable is exported. + * @param name - The name of the variable. + * @param value - The value of the variable's initializer. + * @param location - The source map location for the assignment. + * @param isExportedDeclaration - A value indicating whether the variable is exported. */ function createVariableAssignment(name: Identifier, value: Expression, location: TextRange | undefined, isExportedDeclaration: boolean) { hoistVariableDeclaration(factory.cloneNode(name)); @@ -881,7 +881,7 @@ namespace ts { * Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged * and transformed declaration. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitMergeDeclarationMarker(node: MergeDeclarationMarker): VisitResult { // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding @@ -903,7 +903,7 @@ namespace ts { /** * Determines whether a node has an associated EndOfDeclarationMarker. * - * @param node The node to test. + * @param node - The node to test. */ function hasAssociatedEndOfDeclarationMarker(node: Node) { return (getEmitFlags(node) & EmitFlags.HasEndOfDeclarationMarker) !== 0; @@ -913,7 +913,7 @@ namespace ts { * Visits a DeclarationMarker used as a placeholder for the end of a transformed * declaration. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitEndOfDeclarationMarker(node: EndOfDeclarationMarker): VisitResult { // For some transformations we emit an `EndOfDeclarationMarker` to mark the actual @@ -939,10 +939,10 @@ namespace ts { * Appends the exports of an ImportDeclaration to a statement list, returning the * statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param decl The declaration whose exports are to be recorded. + * @param decl - The declaration whose exports are to be recorded. */ function appendExportsOfImportDeclaration(statements: Statement[] | undefined, decl: ImportDeclaration) { if (moduleInfo.exportEquals) { @@ -981,10 +981,10 @@ namespace ts { * Appends the export of an ImportEqualsDeclaration to a statement list, returning the * statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param decl The declaration whose exports are to be recorded. + * @param decl - The declaration whose exports are to be recorded. */ function appendExportsOfImportEqualsDeclaration(statements: Statement[] | undefined, decl: ImportEqualsDeclaration): Statement[] | undefined { if (moduleInfo.exportEquals) { @@ -998,11 +998,11 @@ namespace ts { * Appends the exports of a VariableStatement to a statement list, returning the statement * list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param node The VariableStatement whose exports are to be recorded. - * @param exportSelf A value indicating whether to also export each VariableDeclaration of + * @param node - The VariableStatement whose exports are to be recorded. + * @param exportSelf - A value indicating whether to also export each VariableDeclaration of * `nodes` declaration list. */ function appendExportsOfVariableStatement(statements: Statement[] | undefined, node: VariableStatement, exportSelf: boolean): Statement[] | undefined { @@ -1023,11 +1023,11 @@ namespace ts { * Appends the exports of a VariableDeclaration or BindingElement to a statement list, * returning the statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param decl The declaration whose exports are to be recorded. - * @param exportSelf A value indicating whether to also export the declaration itself. + * @param decl - The declaration whose exports are to be recorded. + * @param exportSelf - A value indicating whether to also export the declaration itself. */ function appendExportsOfBindingElement(statements: Statement[] | undefined, decl: VariableDeclaration | BindingElement, exportSelf: boolean): Statement[] | undefined { if (moduleInfo.exportEquals) { @@ -1058,10 +1058,10 @@ namespace ts { * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list, * returning the statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param decl The declaration whose exports are to be recorded. + * @param decl - The declaration whose exports are to be recorded. */ function appendExportsOfHoistedDeclaration(statements: Statement[] | undefined, decl: ClassDeclaration | FunctionDeclaration): Statement[] | undefined { if (moduleInfo.exportEquals) { @@ -1085,11 +1085,11 @@ namespace ts { /** * Appends the exports of a declaration to a statement list, returning the statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param decl The declaration to export. - * @param excludeName An optional name to exclude from exports. + * @param decl - The declaration to export. + * @param excludeName - An optional name to exclude from exports. */ function appendExportsOfDeclaration(statements: Statement[] | undefined, decl: Declaration, excludeName?: string): Statement[] | undefined { if (moduleInfo.exportEquals) { @@ -1112,12 +1112,12 @@ namespace ts { * Appends the down-level representation of an export to a statement list, returning the * statement list. * - * @param statements A statement list to which the down-level export statements are to be + * @param statements - A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. - * @param exportName The name of the export. - * @param expression The expression to export. - * @param allowComments Whether to allow comments on the export. + * @param exportName - The name of the export. + * @param expression - The expression to export. + * @param allowComments - Whether to allow comments on the export. */ function appendExportStatement(statements: Statement[] | undefined, exportName: Identifier | StringLiteral, expression: Expression, allowComments?: boolean): Statement[] | undefined { statements = append(statements, createExportStatement(exportName, expression, allowComments)); @@ -1127,9 +1127,9 @@ namespace ts { /** * Creates a call to the current file's export function to export a value. * - * @param name The bound name of the export. - * @param value The exported value. - * @param allowComments An optional value indicating whether to emit comments for the statement. + * @param name - The bound name of the export. + * @param value - The exported value. + * @param allowComments - An optional value indicating whether to emit comments for the statement. */ function createExportStatement(name: Identifier | StringLiteral, value: Expression, allowComments?: boolean) { const statement = factory.createExpressionStatement(createExportExpression(name, value)); @@ -1144,8 +1144,8 @@ namespace ts { /** * Creates a call to the current file's export function to export a value. * - * @param name The bound name of the export. - * @param value The exported value. + * @param name - The bound name of the export. + * @param value - The exported value. */ function createExportExpression(name: Identifier | StringLiteral, value: Expression) { const exportName = isIdentifier(name) ? factory.createStringLiteralFromNode(name) : name; @@ -1160,7 +1160,7 @@ namespace ts { /** * Visit nested elements at the top-level of a module. * - * @param node The node to visit. + * @param node - The node to visit. */ function topLevelNestedVisitor(node: Node): VisitResult { switch (node.kind) { @@ -1229,7 +1229,7 @@ namespace ts { /** * Visits the body of a ForStatement to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitForStatement(node: ForStatement, isTopLevel: boolean): VisitResult { const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; @@ -1250,7 +1250,7 @@ namespace ts { /** * Visits the body of a ForInStatement to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitForInStatement(node: ForInStatement): VisitResult { const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; @@ -1270,7 +1270,7 @@ namespace ts { /** * Visits the body of a ForOfStatement to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitForOfStatement(node: ForOfStatement): VisitResult { const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; @@ -1292,7 +1292,7 @@ namespace ts { * Determines whether to hoist the initializer of a ForStatement, ForInStatement, or * ForOfStatement. * - * @param node The node to test. + * @param node - The node to test. */ function shouldHoistForInitializer(node: ForInitializer): node is VariableDeclarationList { return isVariableDeclarationList(node) @@ -1302,7 +1302,7 @@ namespace ts { /** * Visits the initializer of a ForStatement, ForInStatement, or ForOfStatement * - * @param node The node to visit. + * @param node - The node to visit. */ function visitForInitializer(node: ForInitializer): ForInitializer { if (shouldHoistForInitializer(node)) { @@ -1324,7 +1324,7 @@ namespace ts { /** * Visits the body of a DoStatement to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitDoStatement(node: DoStatement): VisitResult { return factory.updateDoStatement( @@ -1337,7 +1337,7 @@ namespace ts { /** * Visits the body of a WhileStatement to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitWhileStatement(node: WhileStatement): VisitResult { return factory.updateWhileStatement( @@ -1350,7 +1350,7 @@ namespace ts { /** * Visits the body of a LabeledStatement to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitLabeledStatement(node: LabeledStatement): VisitResult { return factory.updateLabeledStatement( @@ -1363,7 +1363,7 @@ namespace ts { /** * Visits the body of a WithStatement to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitWithStatement(node: WithStatement): VisitResult { return factory.updateWithStatement( @@ -1376,7 +1376,7 @@ namespace ts { /** * Visits the body of a SwitchStatement to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitSwitchStatement(node: SwitchStatement): VisitResult { return factory.updateSwitchStatement( @@ -1389,7 +1389,7 @@ namespace ts { /** * Visits the body of a CaseBlock to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitCaseBlock(node: CaseBlock): CaseBlock { const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; @@ -1407,7 +1407,7 @@ namespace ts { /** * Visits the body of a CaseClause to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitCaseClause(node: CaseClause): VisitResult { return factory.updateCaseClause( @@ -1420,7 +1420,7 @@ namespace ts { /** * Visits the body of a DefaultClause to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitDefaultClause(node: DefaultClause): VisitResult { return visitEachChild(node, topLevelNestedVisitor, context); @@ -1429,7 +1429,7 @@ namespace ts { /** * Visits the body of a TryStatement to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitTryStatement(node: TryStatement): VisitResult { return visitEachChild(node, topLevelNestedVisitor, context); @@ -1438,7 +1438,7 @@ namespace ts { /** * Visits the body of a CatchClause to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitCatchClause(node: CatchClause): CatchClause { const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; @@ -1457,7 +1457,7 @@ namespace ts { /** * Visits the body of a Block to hoist declarations. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitBlock(node: Block): Block { const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; @@ -1476,7 +1476,7 @@ namespace ts { /** * Visit nodes to flatten destructuring assignments to exported symbols. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitorWorker(node: Node, valueIsDiscarded: boolean): VisitResult { if (!(node.transformFlags & (TransformFlags.ContainsDestructuringAssignment | TransformFlags.ContainsDynamicImport | TransformFlags.ContainsUpdateExpressionForIdentifier))) { @@ -1511,7 +1511,7 @@ namespace ts { /** * Visit nodes to flatten destructuring assignments to exported symbols. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitor(node: Node): VisitResult { return visitorWorker(node, /*valueIsDiscarded*/ false); @@ -1561,7 +1561,7 @@ namespace ts { /** * Visits a DestructuringAssignment to flatten destructuring to exported symbols. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitDestructuringAssignment(node: DestructuringAssignment, valueIsDiscarded: boolean): VisitResult { if (hasExportedReferenceInDestructuringTarget(node.left)) { @@ -1580,7 +1580,7 @@ namespace ts { /** * Determines whether the target of a destructuring assignment refers to an exported symbol. * - * @param node The destructuring target. + * @param node - The destructuring target. */ function hasExportedReferenceInDestructuringTarget(node: Expression | ObjectLiteralElementLike): boolean { if (isAssignmentExpression(node, /*excludeCompoundAssignment*/ true)) { @@ -1665,7 +1665,7 @@ namespace ts { /** * Visit nodes to elide module-specific modifiers. * - * @param node The node to visit. + * @param node - The node to visit. */ function modifierVisitor(node: Node): VisitResult { switch (node.kind) { @@ -1683,9 +1683,9 @@ namespace ts { /** * Hook for node emit notifications. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emitCallback A callback used to emit the node in the printer. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to emit. + * @param emitCallback - A callback used to emit the node in the printer. */ function onEmitNode(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void { if (node.kind === SyntaxKind.SourceFile) { @@ -1720,8 +1720,8 @@ namespace ts { /** * Hooks node substitutions. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to substitute. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to substitute. */ function onSubstituteNode(hint: EmitHint, node: Node) { node = previousOnSubstituteNode(hint, node); @@ -1742,7 +1742,7 @@ namespace ts { /** * Substitute the node, if necessary. * - * @param node The node to substitute. + * @param node - The node to substitute. */ function substituteUnspecified(node: Node) { switch (node.kind) { @@ -1755,7 +1755,7 @@ namespace ts { /** * Substitution for a ShorthandPropertyAssignment whose name that may contain an imported or exported symbol. * - * @param node The node to substitute. + * @param node - The node to substitute. */ function substituteShorthandPropertyAssignment(node: ShorthandPropertyAssignment) { const name = node.name; @@ -1794,7 +1794,7 @@ namespace ts { /** * Substitute the expression, if necessary. * - * @param node The node to substitute. + * @param node - The node to substitute. */ function substituteExpression(node: Expression) { switch (node.kind) { @@ -1812,7 +1812,7 @@ namespace ts { /** * Substitution for an Identifier expression that may contain an imported or exported symbol. * - * @param node The node to substitute. + * @param node - The node to substitute. */ function substituteExpressionIdentifier(node: Identifier): Expression { if (getEmitFlags(node) & EmitFlags.HelperName) { @@ -1860,7 +1860,7 @@ namespace ts { /** * Substitution for a BinaryExpression that may contain an imported or exported symbol. * - * @param node The node to substitute. + * @param node - The node to substitute. */ function substituteBinaryExpression(node: BinaryExpression): Expression { // When we see an assignment expression whose left-hand side is an exported symbol, @@ -1901,7 +1901,7 @@ namespace ts { /** * Gets the exports of a name. * - * @param name The name. + * @param name - The name. */ function getExports(name: Identifier) { let exportedNames: Identifier[] | undefined; @@ -1925,7 +1925,7 @@ namespace ts { /** * Prevent substitution of a node for this transformer. * - * @param node The node which should not be substituted. + * @param node - The node which should not be substituted. */ function preventSubstitution(node: T): T { if (noSubstitution === undefined) noSubstitution = []; @@ -1936,7 +1936,7 @@ namespace ts { /** * Determines whether a node should not be substituted. * - * @param node The node to test. + * @param node - The node to test. */ function isSubstitutionPrevented(node: Node) { return noSubstitution && node.id && noSubstitution[node.id]; diff --git a/src/compiler/transformers/taggedTemplate.ts b/src/compiler/transformers/taggedTemplate.ts index 60b37c1018f49..098ac4e66e283 100644 --- a/src/compiler/transformers/taggedTemplate.ts +++ b/src/compiler/transformers/taggedTemplate.ts @@ -73,7 +73,7 @@ namespace ts { /** * Creates an ES5 compatible literal from an ES6 template literal. * - * @param node The ES6 template literal. + * @param node - The ES6 template literal. */ function getRawLiteral(node: TemplateLiteralLikeNode, currentSourceFile: SourceFile) { // Find original source text, since we need to emit the raw strings of the tagged template. diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 0f2725559067b..ab8dc40dc8fd7 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -98,7 +98,7 @@ namespace ts { /** * Transform TypeScript-specific syntax in a SourceFile. * - * @param node A SourceFile node. + * @param node - A SourceFile node. */ function transformSourceFile(node: SourceFile) { if (node.isDeclarationFile) { @@ -117,7 +117,7 @@ namespace ts { /** * Visits a node, saving and restoring state variables on the stack. * - * @param node The node to visit. + * @param node - The node to visit. */ function saveStateAndInvoke(node: Node, f: (node: Node) => T): T { // Save state @@ -143,7 +143,7 @@ namespace ts { /** * Performs actions that should always occur immediately before visiting a node. * - * @param node The node to visit. + * @param node - The node to visit. */ function onBeforeVisitNode(node: Node) { switch (node.kind) { @@ -179,7 +179,7 @@ namespace ts { /** * General-purpose node visitor. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitor(node: Node): VisitResult { return saveStateAndInvoke(node, visitorWorker); @@ -188,7 +188,7 @@ namespace ts { /** * Visits and possibly transforms any node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitorWorker(node: Node): VisitResult { if (node.transformFlags & TransformFlags.ContainsTypeScript) { @@ -200,7 +200,7 @@ namespace ts { /** * Specialized visitor that visits the immediate children of a SourceFile. * - * @param node The node to visit. + * @param node - The node to visit. */ function sourceElementVisitor(node: Node): VisitResult { return saveStateAndInvoke(node, sourceElementVisitorWorker); @@ -209,7 +209,7 @@ namespace ts { /** * Specialized visitor that visits the immediate children of a SourceFile. * - * @param node The node to visit. + * @param node - The node to visit. */ function sourceElementVisitorWorker(node: Node): VisitResult { switch (node.kind) { @@ -254,7 +254,7 @@ namespace ts { /** * Specialized visitor that visits the immediate children of a namespace. * - * @param node The node to visit. + * @param node - The node to visit. */ function namespaceElementVisitor(node: Node): VisitResult { return saveStateAndInvoke(node, namespaceElementVisitorWorker); @@ -263,7 +263,7 @@ namespace ts { /** * Specialized visitor that visits the immediate children of a namespace. * - * @param node The node to visit. + * @param node - The node to visit. */ function namespaceElementVisitorWorker(node: Node): VisitResult { if (node.kind === SyntaxKind.ExportDeclaration || @@ -284,7 +284,7 @@ namespace ts { /** * Gets a specialized visitor that visits the immediate children of a class with TypeScript syntax. * - * @param parent The class containing the elements to visit. + * @param parent - The class containing the elements to visit. */ function getClassElementVisitor(parent: ClassLikeDeclaration): (node: Node) => VisitResult { return node => saveStateAndInvoke(node, n => classElementVisitorWorker(n, parent)); @@ -293,7 +293,7 @@ namespace ts { /** * Specialized visitor that visits the immediate children of a class with TypeScript syntax. * - * @param node The node to visit. + * @param node - The node to visit. */ function classElementVisitorWorker(node: Node, parent: ClassLikeDeclaration): VisitResult { switch (node.kind) { @@ -377,7 +377,7 @@ namespace ts { /** * Branching visitor, visits a TypeScript syntax node. * - * @param node The node to visit. + * @param node - The node to visit. */ function visitTypeScript(node: Node): VisitResult { if (isStatement(node) && hasSyntacticModifier(node, ModifierFlags.Ambient)) { @@ -761,7 +761,7 @@ namespace ts { /** * Transforms the members of a class. * - * @param node The current class. + * @param node - The current class. */ function transformClassMembers(node: ClassDeclaration | ClassExpression) { const members: ClassElement[] = []; @@ -789,8 +789,8 @@ namespace ts { /** * Transforms all of the decorators for a declaration into an array of expressions. * - * @param node The declaration node. - * @param allDecorators An object containing all of the decorators for the declaration. + * @param node - The declaration node. + * @param allDecorators - An object containing all of the decorators for the declaration. */ function transformAllDecoratorsOfDeclaration(node: Declaration, container: ClassLikeDeclaration, allDecorators: AllDecorators | undefined) { if (!allDecorators) { @@ -810,8 +810,8 @@ namespace ts { /** * Transforms the decorators of a parameter into decorators of the class/method. * - * @param parameterDecorators The decorators for the parameter at the provided offset. - * @param parameterOffset The offset of the parameter. + * @param parameterDecorators - The decorators for the parameter at the provided offset. + * @param parameterOffset - The offset of the parameter. */ function transformDecoratorsOfParameter(parameterDecorators: Decorator[], parameterOffset: number) { if (parameterDecorators) { @@ -835,7 +835,7 @@ namespace ts { /** * Gets optional type metadata for a declaration. * - * @param node The declaration node. + * @param node - The declaration node. */ function getTypeMetadata(node: Declaration, container: ClassLikeDeclaration) { return USE_NEW_TYPE_METADATA_FORMAT ? @@ -889,7 +889,7 @@ namespace ts { * The caller should have already tested whether the node has decorators and whether the * emitDecoratorMetadata compiler option is set. * - * @param node The node to test. + * @param node - The node to test. */ function shouldAddTypeMetadata(node: Declaration): node is MethodDeclaration | AccessorDeclaration | PropertyDeclaration { const kind = node.kind; @@ -904,7 +904,7 @@ namespace ts { * The caller should have already tested whether the node has decorators and whether the * emitDecoratorMetadata compiler option is set. * - * @param node The node to test. + * @param node - The node to test. */ function shouldAddReturnTypeMetadata(node: Declaration): node is MethodDeclaration { return node.kind === SyntaxKind.MethodDeclaration; @@ -915,7 +915,7 @@ namespace ts { * The caller should have already tested whether the node has decorators and whether the * emitDecoratorMetadata compiler option is set. * - * @param node The node to test. + * @param node - The node to test. */ function shouldAddParamTypesMetadata(node: Declaration): node is ClassLikeDeclaration & { _hasConstructorBrand: never } | MethodDeclaration | AccessorDeclaration { switch (node.kind) { @@ -934,7 +934,7 @@ namespace ts { * Gets an expression that represents a property name (for decorated properties or enums). * For a computed property, a name is generated for the node. * - * @param member The member whose name should be converted into an expression. + * @param member - The member whose name should be converted into an expression. */ function getExpressionForPropertyName(member: ClassElement | EnumMember, generateNameForComputedPropertyName: boolean): Expression { const name = member.name!; @@ -959,7 +959,7 @@ namespace ts { * initializers. For a computed property on a node with decorators, a temporary * value is stored for later use. * - * @param member The member whose name should be visited. + * @param member - The member whose name should be visited. */ function visitPropertyNameOfClassElement(member: ClassElement): PropertyName { const name = member.name!; @@ -986,7 +986,7 @@ namespace ts { * - The node is a non-`extends` heritage clause that should be elided. * - The node is an `extends` heritage clause that should be visited, but only allow a single type. * - * @param node The HeritageClause to transform. + * @param node - The HeritageClause to transform. */ function visitHeritageClause(node: HeritageClause): HeritageClause | undefined { if (node.token === SyntaxKind.ImplementsKeyword) { @@ -1002,7 +1002,7 @@ namespace ts { * This function will only be called when one of the following conditions are met: * - The node contains type arguments that should be elided. * - * @param node The ExpressionWithTypeArguments to transform. + * @param node - The ExpressionWithTypeArguments to transform. */ function visitExpressionWithTypeArguments(node: ExpressionWithTypeArguments): ExpressionWithTypeArguments { return factory.updateExpressionWithTypeArguments( @@ -1016,7 +1016,7 @@ namespace ts { * Determines whether to emit a function-like declaration. We should not emit the * declaration if it does not have a body. * - * @param node The declaration node. + * @param node - The declaration node. */ function shouldEmitFunctionLikeDeclaration(node: T): node is T & { body: NonNullable } { return !nodeIsMissing(node.body); @@ -1130,7 +1130,7 @@ namespace ts { /** * Transforms a parameter into a property assignment statement. * - * @param node The parameter declaration. + * @param node - The parameter declaration. */ function transformParameterWithPropertyAssignment(node: ParameterPropertyDeclaration) { const name = node.name; @@ -1198,7 +1198,7 @@ namespace ts { * Determines whether to emit an accessor declaration. We should not emit the * declaration if it does not have a body and is abstract. * - * @param node The declaration node. + * @param node - The declaration node. */ function shouldEmitAccessorDeclaration(node: AccessorDeclaration) { return !(nodeIsMissing(node.body) && hasSyntacticModifier(node, ModifierFlags.Abstract)); @@ -1472,7 +1472,7 @@ namespace ts { /** * Determines whether to emit an enum declaration. * - * @param node The enum declaration node. + * @param node - The enum declaration node. */ function shouldEmitEnumDeclaration(node: EnumDeclaration) { return !isEnumConst(node) @@ -1484,7 +1484,7 @@ namespace ts { * * This function will be called any time a TypeScript enum is encountered. * - * @param node The enum declaration node. + * @param node - The enum declaration node. */ function visitEnumDeclaration(node: EnumDeclaration): VisitResult { if (!shouldEmitEnumDeclaration(node)) { @@ -1577,7 +1577,7 @@ namespace ts { /** * Transforms the body of an enum declaration. * - * @param node The enum declaration node. + * @param node - The enum declaration node. */ function transformEnumBody(node: EnumDeclaration, localName: Identifier): Block { const savedCurrentNamespaceLocalName = currentNamespaceContainerName; @@ -1599,7 +1599,7 @@ namespace ts { /** * Transforms an enum member into a statement. * - * @param member The enum member node. + * @param member - The enum member node. */ function transformEnumMember(member: EnumMember): Statement { // enums don't support computed properties @@ -1637,7 +1637,7 @@ namespace ts { /** * Transforms the value of an enum member. * - * @param member The enum member node. + * @param member - The enum member node. */ function transformEnumMemberDeclarationValue(member: EnumMember): Expression { const value = resolver.getConstantValue(member); @@ -1658,7 +1658,7 @@ namespace ts { /** * Determines whether to elide a module declaration. * - * @param node The module declaration node. + * @param node - The module declaration node. */ function shouldEmitModuleDeclaration(nodeIn: ModuleDeclaration) { const node = getParseTreeNode(nodeIn, isModuleDeclaration); @@ -1783,7 +1783,7 @@ namespace ts { * * This function will be called any time a TypeScript namespace (ModuleDeclaration) is encountered. * - * @param node The module declaration node. + * @param node - The module declaration node. */ function visitModuleDeclaration(node: ModuleDeclaration): VisitResult { if (!shouldEmitModuleDeclaration(node)) { @@ -1878,7 +1878,7 @@ namespace ts { /** * Transforms the body of a module declaration. * - * @param node The module declaration node. + * @param node - The module declaration node. */ function transformModuleBody(node: ModuleDeclaration, namespaceLocalName: Identifier): Block { const savedCurrentNamespaceContainerName = currentNamespaceContainerName; @@ -1965,7 +1965,7 @@ namespace ts { /** * Visits an import declaration, eliding it if it is type-only or if it has an import clause that may be elided. * - * @param node The import declaration node. + * @param node - The import declaration node. */ function visitImportDeclaration(node: ImportDeclaration): VisitResult { if (!node.importClause) { @@ -1995,7 +1995,7 @@ namespace ts { /** * Visits an import clause, eliding it if its `name` and `namedBindings` may both be elided. * - * @param node The import clause node. + * @param node - The import clause node. */ function visitImportClause(node: ImportClause): VisitResult { Debug.assert(!node.isTypeOnly); @@ -2008,7 +2008,7 @@ namespace ts { /** * Visits named import bindings, eliding them if their targets, their references, and the compilation settings allow. * - * @param node The named import bindings node. + * @param node - The named import bindings node. */ function visitNamedImportBindings(node: NamedImportBindings): VisitResult { if (node.kind === SyntaxKind.NamespaceImport) { @@ -2028,7 +2028,7 @@ namespace ts { /** * Visits an import specifier, eliding it if its target, its references, and the compilation settings allow. * - * @param node The import specifier node. + * @param node - The import specifier node. */ function visitImportSpecifier(node: ImportSpecifier): VisitResult { return !node.isTypeOnly && shouldEmitAliasDeclaration(node) ? node : undefined; @@ -2038,7 +2038,7 @@ namespace ts { * Visits an export assignment, eliding it if it does not contain a clause that resolves * to a value. * - * @param node The export assignment node. + * @param node - The export assignment node. */ function visitExportAssignment(node: ExportAssignment): VisitResult { // Elide the export assignment if it does not reference a value. @@ -2050,7 +2050,7 @@ namespace ts { /** * Visits an export declaration, eliding it if it does not contain a clause that resolves to a value. * - * @param node The export declaration node. + * @param node - The export declaration node. */ function visitExportDeclaration(node: ExportDeclaration): VisitResult { if (node.isTypeOnly) { @@ -2088,7 +2088,7 @@ namespace ts { * Visits named exports, eliding it if it does not contain an export specifier that * resolves to a value. * - * @param node The named exports node. + * @param node - The named exports node. */ function visitNamedExports(node: NamedExports, allowEmpty: boolean): VisitResult { // Elide the named exports if all of its export specifiers were elided. @@ -2107,7 +2107,7 @@ namespace ts { /** * Visits an export specifier, eliding it if it does not resolve to a value. * - * @param node The export specifier node. + * @param node - The export specifier node. */ function visitExportSpecifier(node: ExportSpecifier): VisitResult { // Elide an export specifier if it does not reference a value. @@ -2117,7 +2117,7 @@ namespace ts { /** * Determines whether to emit an import equals declaration. * - * @param node The import equals declaration node. + * @param node - The import equals declaration node. */ function shouldEmitImportEqualsDeclaration(node: ImportEqualsDeclaration) { // preserve old compiler's behavior: emit 'var' for import declaration (even if we do not consider them referenced) when @@ -2131,7 +2131,7 @@ namespace ts { /** * Visits an import equals declaration. * - * @param node The import equals declaration node. + * @param node - The import equals declaration node. */ function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { // Always elide type-only imports @@ -2207,7 +2207,7 @@ namespace ts { /** * Gets a value indicating whether the node is exported from a namespace. * - * @param node The node to test. + * @param node - The node to test. */ function isExportOfNamespace(node: Node) { return currentNamespace !== undefined && hasSyntacticModifier(node, ModifierFlags.Export); @@ -2216,7 +2216,7 @@ namespace ts { /** * Gets a value indicating whether the node is exported from an external module. * - * @param node The node to test. + * @param node - The node to test. */ function isExternalModuleExport(node: Node) { return currentNamespace === undefined && hasSyntacticModifier(node, ModifierFlags.Export); @@ -2225,7 +2225,7 @@ namespace ts { /** * Gets a value indicating whether the node is a named export from an external module. * - * @param node The node to test. + * @param node - The node to test. */ function isNamedExternalModuleExport(node: Node) { return isExternalModuleExport(node) @@ -2235,7 +2235,7 @@ namespace ts { /** * Gets a value indicating whether the node is the default export of an external module. * - * @param node The node to test. + * @param node - The node to test. */ function isDefaultExternalModuleExport(node: Node) { return isExternalModuleExport(node) @@ -2323,9 +2323,9 @@ namespace ts { /** * Hook for node emit. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emit A callback used to emit the node in the printer. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to emit. + * @param emit - A callback used to emit the node in the printer. */ function onEmitNode(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void { const savedApplicableSubstitutions = applicableSubstitutions; @@ -2352,8 +2352,8 @@ namespace ts { /** * Hooks node substitutions. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to substitute. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to substitute. */ function onSubstituteNode(hint: EmitHint, node: Node) { node = previousOnSubstituteNode(hint, node); diff --git a/src/compiler/transformers/typeSerializer.ts b/src/compiler/transformers/typeSerializer.ts index 9504bcde8864d..568dab0e86369 100644 --- a/src/compiler/transformers/typeSerializer.ts +++ b/src/compiler/transformers/typeSerializer.ts @@ -35,22 +35,22 @@ namespace ts { * - Type references to classes (or class-like variables) point to the constructor for the class. * - Anything else points to the global "Object" constructor. * - * @param node The type node to serialize. + * @param node - The type node to serialize. */ serializeTypeNode(serializerContext: RuntimeTypeSerializerContext, node: TypeNode): Expression; /** * Serializes the type of a node for use with decorator type metadata. - * @param node The node that should have its type serialized. + * @param node - The node that should have its type serialized. */ serializeTypeOfNode(serializerContext: RuntimeTypeSerializerContext, node: PropertyDeclaration | ParameterDeclaration | AccessorDeclaration | ClassLikeDeclaration | MethodDeclaration): Expression; /** * Serializes the types of the parameters of a node for use with decorator type metadata. - * @param node The node that should have its parameter types serialized. + * @param node - The node that should have its parameter types serialized. */ serializeParameterTypesOfNode(serializerContext: RuntimeTypeSerializerContext, node: Node, container: ClassLikeDeclaration): ArrayLiteralExpression; /** * Serializes the return type of a node for use with decorator type metadata. - * @param node The node that should have its return type serialized. + * @param node - The node that should have its return type serialized. */ serializeReturnTypeOfNode(serializerContext: RuntimeTypeSerializerContext, node: Node): SerializedTypeNode; } @@ -99,7 +99,7 @@ namespace ts { /** * Serializes the type of a node for use with decorator type metadata. - * @param node The node that should have its type serialized. + * @param node - The node that should have its type serialized. */ function serializeTypeOfNode(node: PropertyDeclaration | ParameterDeclaration | AccessorDeclaration | ClassLikeDeclaration | MethodDeclaration): SerializedTypeNode { switch (node.kind) { @@ -120,7 +120,7 @@ namespace ts { /** * Serializes the type of a node for use with decorator type metadata. - * @param node The node that should have its type serialized. + * @param node - The node that should have its type serialized. */ function serializeParameterTypesOfNode(node: Node, container: ClassLikeDeclaration): ArrayLiteralExpression { const valueDeclaration = @@ -163,7 +163,7 @@ namespace ts { /** * Serializes the return type of a node for use with decorator type metadata. - * @param node The node that should have its return type serialized. + * @param node - The node that should have its return type serialized. */ function serializeReturnTypeOfNode(node: Node): SerializedTypeNode { if (isFunctionLike(node) && node.type) { @@ -192,7 +192,7 @@ namespace ts { * - Type references to classes (or class-like variables) point to the constructor for the class. * - Anything else points to the global "Object" constructor. * - * @param node The type node to serialize. + * @param node - The type node to serialize. */ function serializeTypeNode(node: TypeNode | undefined): SerializedTypeNode { if (node === undefined) { @@ -420,7 +420,7 @@ namespace ts { /** * Serializes a TypeReferenceNode to an appropriate JS constructor value for use with decorator type metadata. - * @param node The type reference node. + * @param node - The type reference node. */ function serializeTypeReferenceNode(node: TypeReferenceNode): SerializedTypeNode { const kind = resolver.getTypeReferenceSerializationKind(node.typeName, currentNameScope ?? currentLexicalScope); @@ -499,7 +499,7 @@ namespace ts { /** * Serializes an entity name which may not exist at runtime, but whose access shouldn't throw - * @param node The entity name to serialize. + * @param node - The entity name to serialize. */ function serializeEntityNameAsExpressionFallback(node: EntityName): BinaryExpression { if (node.kind === SyntaxKind.Identifier) { @@ -525,7 +525,7 @@ namespace ts { /** * Serializes an entity name as an expression for decorator type metadata. - * @param node The entity name to serialize. + * @param node - The entity name to serialize. */ function serializeEntityNameAsExpression(node: EntityName): SerializedEntityName { switch (node.kind) { @@ -544,7 +544,7 @@ namespace ts { /** * Serializes an qualified name as an expression for decorator type metadata. - * @param node The qualified name to serialize. + * @param node - The qualified name to serialize. */ function serializeQualifiedNameAsExpression(node: QualifiedName): SerializedEntityName { return factory.createPropertyAccessExpression(serializeEntityNameAsExpression(node.left), node.right) as PropertyAccessEntityNameExpression; @@ -566,4 +566,4 @@ namespace ts { factory.createIdentifier(name); } } -} \ No newline at end of file +} diff --git a/src/compiler/transformers/utilities.ts b/src/compiler/transformers/utilities.ts index 2c0552ee40c42..724b238444f52 100644 --- a/src/compiler/transformers/utilities.ts +++ b/src/compiler/transformers/utilities.ts @@ -330,8 +330,8 @@ namespace ts { /** * Gets all the static or all the instance property declarations of a class * - * @param node The class node. - * @param isStatic A value indicating whether to get properties from the static or instance side of the class. + * @param node - The class node. + * @param isStatic - A value indicating whether to get properties from the static or instance side of the class. */ export function getProperties(node: ClassExpression | ClassDeclaration, requireInitializer: true, isStatic: boolean): readonly InitializedPropertyDeclaration[]; export function getProperties(node: ClassExpression | ClassDeclaration, requireInitializer: boolean, isStatic: boolean): readonly PropertyDeclaration[]; @@ -352,8 +352,8 @@ namespace ts { /** * Is a class element either a static or an instance property declaration with an initializer? * - * @param member The class element node. - * @param isStatic A value indicating whether the member should be a static or instance member. + * @param member - The class element node. + * @param isStatic - A value indicating whether the member should be a static or instance member. */ function isInitializedOrStaticProperty(member: ClassElement, requireInitializer: boolean, isStatic: boolean) { return isPropertyDeclaration(member) @@ -368,8 +368,8 @@ namespace ts { /** * Gets a value indicating whether a class element is either a static or an instance property declaration with an initializer. * - * @param member The class element node. - * @param isStatic A value indicating whether the member should be a static or instance member. + * @param member - The class element node. + * @param isStatic - A value indicating whether the member should be a static or instance member. */ export function isInitializedProperty(member: ClassElement): member is PropertyDeclaration & { initializer: Expression; } { return member.kind === SyntaxKind.PropertyDeclaration @@ -379,7 +379,7 @@ namespace ts { /** * Gets a value indicating whether a class element is a private instance method or accessor. * - * @param member The class element node. + * @param member - The class element node. */ export function isNonStaticMethodOrAccessorWithPrivateName(member: ClassElement): member is PrivateIdentifierMethodDeclaration | PrivateIdentifierAccessorDeclaration | PrivateIdentifierAutoAccessorPropertyDeclaration { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -389,7 +389,7 @@ namespace ts { * Gets an array of arrays of decorators for the parameters of a function-like node. * The offset into the result array should correspond to the offset of the parameter. * - * @param node The function-like node. + * @param node - The function-like node. */ function getDecoratorsOfParameters(node: FunctionLikeDeclaration | undefined) { let decorators: (readonly Decorator[] | undefined)[] | undefined; @@ -417,7 +417,7 @@ namespace ts { * Gets an AllDecorators object containing the decorators for the class and the decorators for the * parameters of the constructor of the class. * - * @param node The class node. + * @param node - The class node. */ export function getAllDecoratorsOfClass(node: ClassLikeDeclaration): AllDecorators | undefined { const decorators = getDecorators(node); @@ -435,8 +435,8 @@ namespace ts { /** * Gets an AllDecorators object containing the decorators for the member and its parameters. * - * @param parent The class node that contains the member. - * @param member The class member. + * @param parent - The class node that contains the member. + * @param member - The class member. */ export function getAllDecoratorsOfClassElement(member: ClassElement, parent: ClassLikeDeclaration): AllDecorators | undefined { switch (member.kind) { @@ -458,8 +458,8 @@ namespace ts { /** * Gets an AllDecorators object containing the decorators for the accessor and its parameters. * - * @param parent The class node that contains the accessor. - * @param accessor The class accessor member. + * @param parent - The class node that contains the accessor. + * @param accessor - The class accessor member. */ function getAllDecoratorsOfAccessors(accessor: AccessorDeclaration, parent: ClassExpression | ClassDeclaration): AllDecorators | undefined { if (!accessor.body) { @@ -493,7 +493,7 @@ namespace ts { /** * Gets an AllDecorators object containing the decorators for the method and its parameters. * - * @param method The class method member. + * @param method - The class method member. */ function getAllDecoratorsOfMethod(method: MethodDeclaration): AllDecorators | undefined { if (!method.body) { @@ -512,7 +512,7 @@ namespace ts { /** * Gets an AllDecorators object containing the decorators for the property. * - * @param property The class property member. + * @param property - The class property member. */ function getAllDecoratorsOfProperty(property: PropertyDeclaration): AllDecorators | undefined { const decorators = getDecorators(property); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index bda77e561762d..8a3c7286af16a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4240,7 +4240,7 @@ namespace ts { /** * Gets a value indicating whether the specified path exists and is a file. - * @param path The path to test. + * @param path - The path to test. */ fileExists(path: string): boolean; @@ -4691,7 +4691,7 @@ namespace ts { /** * returns unknownSignature in the case of an error. * returns undefined if the node is not valid. - * @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`. + * @param argumentCount - Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`. */ getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; /* @internal */ getResolvedSignatureForSignatureHelp(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; @@ -4816,10 +4816,12 @@ namespace ts { /** * Note that this will return undefined in the following case: + * ``` * // a.ts * export namespace N { export class C { } } * // b.ts * <> + * ``` * Where `C` is the symbol we're looking for. * This should be called in a loop climbing parents of the symbol, so we'll get `N`. */ @@ -4831,7 +4833,7 @@ namespace ts { * and an external module with no 'export =' declaration resolves to the module itself. */ /* @internal */ resolveExternalModuleSymbol(symbol: Symbol): Symbol; - /** @param node A location where we might consider accessing `this`. Not necessarily a ThisExpression. */ + /** @param node - A location where we might consider accessing `this`. Not necessarily a ThisExpression. */ /* @internal */ tryGetThisTypeAt(node: Node, includeGlobalThis?: boolean, container?: Node): Type | undefined; /* @internal */ getTypeArgumentConstraint(node: TypeNode): Type | undefined; @@ -4961,7 +4963,7 @@ namespace ts { InFirstTypeArgument = 1 << 22, // Writing first type argument of the instantiated type InTypeAlias = 1 << 23, // Writing type in type alias declaration - /** @deprecated */ WriteOwnNameForAnyLike = 0, // Does nothing + /** @deprecated Unused. */ WriteOwnNameForAnyLike = 0, // Does nothing NodeBuilderFlagsMask = NoTruncation | WriteArrayAsGenericType | UseStructuralFallback | WriteTypeArgumentsOfSignature | UseFullyQualifiedType | SuppressAnyReturnType | MultilineObjectLiterals | WriteClassExpressionAsTypeLiteral | @@ -6322,8 +6324,8 @@ namespace ts { /** * Ternary values are defined such that - * x & y picks the lesser in the order False < Unknown < Maybe < True, and - * x | y picks the greater in the order False < Unknown < Maybe < True. + * x & y picks the lesser in the order False \< Unknown \< Maybe \< True, and + * x | y picks the greater in the order False \< Unknown \< Maybe \< True. * Generally, Ternary.Maybe is used as the result of a relation that depends on itself, and * Ternary.Unknown is used as the result of a variance check that depends on itself. We make * a distinction because we don't want to cache circular variance check results. @@ -7654,10 +7656,10 @@ namespace ts { /** * Create a unique temporary variable. - * @param recordTempVariable An optional callback used to record the temporary variable name. This + * @param recordTempVariable - An optional callback used to record the temporary variable name. This * should usually be a reference to `hoistVariableDeclaration` from a `TransformationContext`, but * can be `undefined` if you plan to record the temporary variable manually. - * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes + * @param reservedInNestedScopes - When `true`, reserves the temporary variable name in all nested scopes * during emit so that the variable can be referenced in a nested function body. This is an alternative to * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. */ @@ -7666,7 +7668,7 @@ namespace ts { /** * Create a unique temporary variable for use in a loop. - * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes + * @param reservedInNestedScopes - When `true`, reserves the temporary variable name in all nested scopes * during emit so that the variable can be referenced in a nested function body. This is an alternative to * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. */ @@ -8272,8 +8274,8 @@ namespace ts { * ({ set value(_a) { Reflect.set(obj, "x", _a); } }).value * ``` * - * @param paramName - * @param expression + * @param paramName - + * @param expression - */ /* @internal */ createAssignmentTargetWrapper(paramName: Identifier, expression: Expression): LeftHandSideExpression; /* @internal */ inlineExpressions(expressions: readonly Expression[]): Expression; @@ -8284,9 +8286,9 @@ namespace ts { * expression. An internal name will also *never* be renamed due to a collision with a block * scoped variable. * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param node - The declaration. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ /* @internal */ getInternalName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier; /** @@ -8295,9 +8297,9 @@ namespace ts { * local name will *never* be prefixed with an module or namespace export modifier like * "exports." when emitted as an expression. * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param node - The declaration. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ /* @internal */ getLocalName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier; /** @@ -8306,26 +8308,26 @@ namespace ts { * export name will *always* be prefixed with a module or namespace export modifier like * `"exports."` when emitted as an expression if the name points to an exported symbol. * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param node - The declaration. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ /* @internal */ getExportName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier; /** * Gets the name of a declaration for use in declarations. * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param node - The declaration. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ /* @internal */ getDeclarationName(node: Declaration | undefined, allowComments?: boolean, allowSourceMaps?: boolean): Identifier; /** * Gets a namespace-qualified name for use in expressions. * - * @param ns The namespace identifier. - * @param name The name. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param ns - The namespace identifier. + * @param name - The name. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ /* @internal */ getNamespaceMemberName(ns: Identifier, name: Identifier, allowComments?: boolean, allowSourceMaps?: boolean): PropertyAccessExpression; /** @@ -8334,10 +8336,10 @@ namespace ts { * An exported name will *always* be prefixed with an module or namespace export modifier like * "exports." if the name points to an exported symbol. * - * @param ns The namespace identifier. - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + * @param ns - The namespace identifier. + * @param node - The declaration. + * @param allowComments - A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps - A value indicating whether source maps may be emitted for the name. */ /* @internal */ getExternalModuleOrNamespaceExportName(ns: Identifier | undefined, node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier | PropertyAccessExpression; @@ -8350,26 +8352,26 @@ namespace ts { /* @internal */ createUseStrictPrologue(): PrologueDirective; /** * Copies any necessary standard and custom prologue-directives into target array. - * @param source origin statements array - * @param target result statements array - * @param ensureUseStrict boolean determining whether the function need to add prologue-directives - * @param visitor Optional callback used to visit any custom prologue directives. + * @param source - origin statements array + * @param target - result statements array + * @param ensureUseStrict - boolean determining whether the function need to add prologue-directives + * @param visitor - Optional callback used to visit any custom prologue directives. */ /* @internal */ copyPrologue(source: readonly Statement[], target: Push, ensureUseStrict?: boolean, visitor?: (node: Node) => VisitResult): number; /** * Copies only the standard (string-expression) prologue-directives into the target statement-array. - * @param source origin statements array - * @param target result statements array - * @param statementOffset The offset at which to begin the copy. - * @param ensureUseStrict boolean determining whether the function need to add prologue-directives + * @param source - origin statements array + * @param target - result statements array + * @param statementOffset - The offset at which to begin the copy. + * @param ensureUseStrict - boolean determining whether the function need to add prologue-directives */ /* @internal */ copyStandardPrologue(source: readonly Statement[], target: Push, statementOffset: number | undefined, ensureUseStrict?: boolean): number; /** * Copies only the custom prologue-directives into target statement-array. - * @param source origin statements array - * @param target result statements array - * @param statementOffset The offset at which to begin the copy. - * @param visitor Optional callback used to visit any custom prologue directives. + * @param source - origin statements array + * @param target - result statements array + * @param statementOffset - The offset at which to begin the copy. + * @param visitor - Optional callback used to visit any custom prologue directives. */ /* @internal */ copyCustomPrologue(source: readonly Statement[], target: Push, statementOffset: number, visitor?: (node: Node) => VisitResult, filter?: (node: Node) => boolean): number; /* @internal */ copyCustomPrologue(source: readonly Statement[], target: Push, statementOffset: number | undefined, visitor?: (node: Node) => VisitResult, filter?: (node: Node) => boolean): number | undefined; @@ -8498,24 +8500,24 @@ namespace ts { /** * Gets a substitute for a node, if one is available; otherwise, returns the original node. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to substitute. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to substitute. */ substituteNode(hint: EmitHint, node: Node): Node; /** * Emits a node with possible notification. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emitCallback A callback used to emit the node. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to emit. + * @param emitCallback - A callback used to emit the node. */ emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; /** * Indicates if a given node needs an emit notification * - * @param node The node to emit. + * @param node - The node to emit. */ isEmitNotificationEnabled?(node: Node): boolean; @@ -8556,13 +8558,13 @@ namespace ts { export interface Printer { /** * Print a node and its subtree as-is, without any emit transformations. - * @param hint A value indicating the purpose of a node. This is primarily used to + * @param hint - A value indicating the purpose of a node. This is primarily used to * distinguish between an `Identifier` used in an expression position, versus an * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you * should just pass `Unspecified`. - * @param node The node to print. The node and its subtree are printed as-is, without any + * @param node - The node to print. The node and its subtree are printed as-is, without any * emit transformations. - * @param sourceFile A source file that provides context for the node. The source text of + * @param sourceFile - A source file that provides context for the node. The source text of * the file is used to emit the original source content for literals and identifiers, while * the identifiers of the source file are used when generating unique names to avoid * collisions. @@ -8713,9 +8715,9 @@ namespace ts { * A hook used by the Printer to provide notifications prior to emitting a node. A * compatible implementation **must** invoke `emitCallback` with the provided `hint` and * `node` values. - * @param hint A hint indicating the intended purpose of the node. - * @param node The node to emit. - * @param emitCallback A callback that, when invoked, will emit the node. + * @param hint - A hint indicating the intended purpose of the node. + * @param node - The node to emit. + * @param emitCallback - A callback that, when invoked, will emit the node. * @example * ```ts * var printer = createPrinter(printerOptions, { @@ -8731,15 +8733,15 @@ namespace ts { /** * A hook used to check if an emit notification is required for a node. - * @param node The node to emit. + * @param node - The node to emit. */ isEmitNotificationEnabled?(node: Node): boolean; /** * A hook used by the Printer to perform just-in-time substitution of a node. This is * primarily used by node transformations that need to substitute one node for another, * such as replacing `myExportedVar` with `exports.myExportedVar`. - * @param hint A hint indicating the intended purpose of the node. - * @param node The node to emit. + * @param hint - A hint indicating the intended purpose of the node. + * @param node - The node to emit. * @example * ```ts * var printer = createPrinter(printerOptions, { @@ -9085,14 +9087,20 @@ namespace ts { TripleSlashXML = 1 << 0, /** * Single line comment of the form + * ``` * // @pragma-name argval1 argval2 + * ``` * or + * ``` * /// @pragma-name argval1 argval2 + * ``` */ SingleLine = 1 << 1, /** * Multiline non-jsdoc pragma of the form + * ``` * /* @pragma-name argval1 argval2 * / + * ``` */ MultiLine = 1 << 2, All = TripleSlashXML | SingleLine | MultiLine, diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 792c7d1f5cb3c..f6b87f9376b8e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -418,7 +418,7 @@ namespace ts { /** * Determine if the given comment is a triple-slash * - * @return true if the comment is a triple-slash comment else false + * @returns true if the comment is a triple-slash comment else false */ export function isRecognizedTripleSlashComment(text: string, commentPos: number, commentEnd: number) { // Verify this is /// comment, but do the regexp match only when we first can find /// in the comment text @@ -759,7 +759,7 @@ namespace ts { /** * An effective module (namespace) declaration is either - * 1. An actual declaration: namespace X { ... } + * 1. An actual declaration: `namespace X { ... }` * 2. A Javascript declaration, which is: * An identifier in a nested property access expression: Y in `X.Y.Z = { ... }` */ @@ -1477,7 +1477,7 @@ namespace ts { * Gets the most likely element type for a TypeNode. This is not an exhaustive test * as it assumes a rest argument can only be an array type (either T[], or Array). * - * @param node The type node. + * @param node - The type node. */ export function getRestParameterElementType(node: TypeNode | undefined) { if (node && node.kind === SyntaxKind.ArrayType) { @@ -2276,11 +2276,11 @@ namespace ts { /** * Recognized expando initializers are: - * 1. (function() {})() -- IIFEs - * 2. function() { } -- Function expressions - * 3. class { } -- Class expressions - * 4. {} -- Empty object literals - * 5. { ... } -- Non-empty object literals, when used to initialize a prototype, like `C.prototype = { m() { } }` + * 1. `(function() {})()` -- IIFEs + * 2. `function() { }` -- Function expressions + * 3. `class { }` -- Class expressions + * 4. `{}` -- Empty object literals + * 5. `{ ... }` -- Non-empty object literals, when used to initialize a prototype, like `C.prototype = { m() { } }` * * This function returns the provided initializer, or undefined if it is not valid. */ @@ -2338,12 +2338,14 @@ namespace ts { /** * Is the 'declared' name the same as the one in the initializer? - * @return true for identical entity names, as well as ones where the initializer is prefixed with + * @returns true for identical entity names, as well as ones where the initializer is prefixed with * 'window', 'self' or 'global'. For example: * + * ``` * var my = my || {} * var min = window.min || {} * my.app = self.my.app || class { } + * ``` */ export function isSameEntityName(name: Expression, initializer: Expression): boolean { if (isPropertyNameLiteral(name) && isPropertyNameLiteral(initializer)) { @@ -4090,7 +4092,7 @@ namespace ts { /** * Strip off existed surrounding single quotes, double quotes, or backticks from a given string * - * @return non-quoted string + * @returns non-quoted string */ export function stripQuotes(name: string) { const length = name.length; @@ -4429,8 +4431,8 @@ namespace ts { * Originally part of `forEachExpectedEmitFile`, this functionality was extracted to support * transformations. * - * @param host An EmitHost. - * @param targetSourceFile An optional target source file to emit. + * @param host - An EmitHost. + * @param targetSourceFile - An optional target source file to emit. */ export function getSourceFilesToEmit(host: EmitHost, targetSourceFile?: SourceFile, forceDtsEmit?: boolean): readonly SourceFile[] { const options = host.getCompilerOptions(); @@ -5402,8 +5404,8 @@ namespace ts { /** * Creates a new TextRange from the provided pos and end. * - * @param pos The start position. - * @param end The end position. + * @param pos - The start position. + * @param end - The end position. */ export function createRange(pos: number, end: number = pos): TextRange { Debug.assert(end >= pos || end === -1); @@ -5413,8 +5415,8 @@ namespace ts { /** * Creates a new TextRange from a provided range with a new end position. * - * @param range A TextRange. - * @param end The new end position. + * @param range - A TextRange. + * @param end - The new end position. */ export function moveRangeEnd(range: TextRange, end: number): TextRange { return createRange(range.pos, end); @@ -5423,8 +5425,8 @@ namespace ts { /** * Creates a new TextRange from a provided range with a new start position. * - * @param range A TextRange. - * @param pos The new Start position. + * @param range - A TextRange. + * @param pos - The new Start position. */ export function moveRangePos(range: TextRange, pos: number): TextRange { return createRange(pos, range.end); @@ -5453,7 +5455,7 @@ namespace ts { /** * Determines whether a TextRange has the same start and end positions. * - * @param range A TextRange. + * @param range - A TextRange. */ export function isCollapsedRange(range: TextRange) { return range.pos === range.end; @@ -5462,8 +5464,8 @@ namespace ts { /** * Creates a new TextRange for a token at the provides start position. * - * @param pos The start position. - * @param token The token. + * @param pos - The start position. + * @param token - The token. */ export function createTokenRange(pos: number, token: SyntaxKind): TextRange { return createRange(pos, pos + tokenToString(token)!.length); @@ -6833,7 +6835,7 @@ namespace ts { basePaths: readonly string[]; } - /** @param path directory of the tsconfig.json */ + /** @param path - directory of the tsconfig.json */ export function getFileMatcherPatterns(path: string, excludes: readonly string[] | undefined, includes: readonly string[] | undefined, useCaseSensitiveFileNames: boolean, currentDirectory: string): FileMatcherPatterns { path = normalizePath(path); currentDirectory = normalizePath(currentDirectory); @@ -6852,7 +6854,7 @@ namespace ts { return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i"); } - /** @param path directory of the tsconfig.json */ + /** @param path - directory of the tsconfig.json */ export function matchFiles(path: string, extensions: readonly string[] | undefined, excludes: readonly string[] | undefined, includes: readonly string[] | undefined, useCaseSensitiveFileNames: boolean, currentDirectory: string, depth: number | undefined, getFileSystemEntries: (path: string) => FileSystemEntries, realpath: (path: string) => string): string[] { path = normalizePath(path); currentDirectory = normalizePath(currentDirectory); @@ -6991,7 +6993,7 @@ namespace ts { } /** - * Groups of supported extensions in order of file resolution precedence. (eg, TS > TSX > DTS and seperately, CTS > DCTS) + * Groups of supported extensions in order of file resolution precedence. (eg, TS \> TSX \> DTS and seperately, CTS \> DCTS) */ export const supportedTSExtensions: readonly Extension[][] = [[Extension.Ts, Extension.Tsx, Extension.Dts], [Extension.Cts, Extension.Dcts], [Extension.Mts, Extension.Dmts]]; export const supportedTSExtensionsFlat: readonly Extension[] = flatten(supportedTSExtensions); @@ -7451,8 +7453,8 @@ namespace ts { /** * Bypasses immutability and directly sets the `parent` property of each `Node` recursively. - * @param rootNode The root node from which to start the recursion. - * @param incremental When `true`, only recursively descends through nodes whose `parent` pointers are incorrect. + * @param rootNode - The root node from which to start the recursion. + * @param incremental - When `true`, only recursively descends through nodes whose `parent` pointers are incorrect. * This allows us to quickly bail out of setting `parent` for subtrees during incremental parsing. */ /* @internal */ diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index c8b959eb8f87c..b165bb7d497d3 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -436,7 +436,7 @@ namespace ts { /** * Gets a value indicating whether a node originated in the parse tree. * - * @param node The node to test. + * @param node - The node to test. */ export function isParseTreeNode(node: Node): boolean { return (node.flags & NodeFlags.Synthesized) === 0; @@ -445,7 +445,7 @@ namespace ts { /** * Gets the original parse tree node for a node. * - * @param node The original node. + * @param node - The original node. * @returns The original parse tree node if found; otherwise, undefined. */ export function getParseTreeNode(node: Node | undefined): Node | undefined; @@ -453,8 +453,8 @@ namespace ts { /** * Gets the original parse tree node for a node. * - * @param node The original node. - * @param nodeTest A callback used to ensure the correct type of parse tree node is returned. + * @param node - The original node. + * @param nodeTest - A callback used to ensure the correct type of parse tree node is returned. * @returns The original parse tree node if found; otherwise, undefined. */ export function getParseTreeNode(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined; @@ -480,7 +480,7 @@ namespace ts { /** * Remove extra underscore from escaped identifier text content. * - * @param identifier The escaped identifier text. + * @param identifier - The escaped identifier text. * @returns The unescaped identifier text. */ export function unescapeLeadingUnderscores(identifier: __String): string { @@ -935,9 +935,11 @@ namespace ts { * * This does *not* return type parameters from a jsdoc reference to a generic type, eg * + * ``` * type Id = (x: T) => T * /** @type {Id} / * function id(x) { return x } + * ``` */ export function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[] { if (isJSDocSignature(node)) { diff --git a/src/compiler/visitorPublic.ts b/src/compiler/visitorPublic.ts index 4069b1f86164a..8c77b19fce10b 100644 --- a/src/compiler/visitorPublic.ts +++ b/src/compiler/visitorPublic.ts @@ -2,20 +2,20 @@ namespace ts { /** * Visits a Node using the supplied visitor, possibly returning a new Node in its place. * - * @param node The Node to visit. - * @param visitor The callback used to visit the Node. - * @param test A callback to execute to verify the Node is valid. - * @param lift An optional callback to execute to lift a NodeArray into a valid Node. + * @param node - The Node to visit. + * @param visitor - The callback used to visit the Node. + * @param test - A callback to execute to verify the Node is valid. + * @param lift - An optional callback to execute to lift a NodeArray into a valid Node. */ export function visitNode(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T; /** * Visits a Node using the supplied visitor, possibly returning a new Node in its place. * - * @param node The Node to visit. - * @param visitor The callback used to visit the Node. - * @param test A callback to execute to verify the Node is valid. - * @param lift An optional callback to execute to lift a NodeArray into a valid Node. + * @param node - The Node to visit. + * @param visitor - The callback used to visit the Node. + * @param test - A callback to execute to verify the Node is valid. + * @param lift - An optional callback to execute to lift a NodeArray into a valid Node. */ export function visitNode(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined; @@ -50,11 +50,11 @@ namespace ts { /** * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. * - * @param nodes The NodeArray to visit. - * @param visitor The callback used to visit a Node. - * @param test A node test to execute for each node. - * @param start An optional value indicating the starting offset at which to start visiting. - * @param count An optional value indicating the maximum number of nodes to visit. + * @param nodes - The NodeArray to visit. + * @param visitor - The callback used to visit a Node. + * @param test - A node test to execute for each node. + * @param start - An optional value indicating the starting offset at which to start visiting. + * @param count - An optional value indicating the maximum number of nodes to visit. */ export function visitNodes(nodes: NodeArray, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray; @@ -64,22 +64,22 @@ namespace ts { /** * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. * - * @param nodes The NodeArray to visit. - * @param visitor The callback used to visit a Node. - * @param test A node test to execute for each node. - * @param start An optional value indicating the starting offset at which to start visiting. - * @param count An optional value indicating the maximum number of nodes to visit. + * @param nodes - The NodeArray to visit. + * @param visitor - The callback used to visit a Node. + * @param test - A node test to execute for each node. + * @param start - An optional value indicating the starting offset at which to start visiting. + * @param count - An optional value indicating the maximum number of nodes to visit. */ export function visitNodes(nodes: NodeArray | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray | undefined; /** * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. * - * @param nodes The NodeArray to visit. - * @param visitor The callback used to visit a Node. - * @param test A node test to execute for each node. - * @param start An optional value indicating the starting offset at which to start visiting. - * @param count An optional value indicating the maximum number of nodes to visit. + * @param nodes - The NodeArray to visit. + * @param visitor - The callback used to visit a Node. + * @param test - A node test to execute for each node. + * @param start - An optional value indicating the starting offset at which to start visiting. + * @param count - An optional value indicating the maximum number of nodes to visit. */ export function visitNodes(nodes: NodeArray | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray | undefined { if (nodes === undefined || visitor === undefined) { @@ -377,9 +377,9 @@ namespace ts { /** * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. * - * @param node The Node whose children will be visited. - * @param visitor The callback used to visit each child. - * @param context A lexical environment context for the visitor. + * @param node - The Node whose children will be visited. + * @param visitor - The callback used to visit each child. + * @param context - A lexical environment context for the visitor. */ export function visitEachChild(node: T, visitor: Visitor, context: TransformationContext): T; /* @internal */ @@ -387,9 +387,9 @@ namespace ts { /** * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. * - * @param node The Node whose children will be visited. - * @param visitor The callback used to visit each child. - * @param context A lexical environment context for the visitor. + * @param node - The Node whose children will be visited. + * @param visitor - The callback used to visit each child. + * @param context - A lexical environment context for the visitor. */ export function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; /* @internal */ @@ -1324,7 +1324,7 @@ namespace ts { /** * Extracts the single node from a NodeArray. * - * @param nodes The NodeArray. + * @param nodes - The NodeArray. */ function extractSingleNode(nodes: readonly Node[]): Node | undefined { Debug.assert(nodes.length <= 1, "Too many nodes written to output."); diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 46d2bc242e772..0a4919cb49a79 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -2850,8 +2850,8 @@ namespace FourSlash { /** * Finds and applies a code action corresponding to the supplied parameters. * If index is undefined, applies the unique code action available. - * @param errorCode The error code that generated the code action. - * @param index The nth (0-index-based) codeaction available generated by errorCode. + * @param errorCode - The error code that generated the code action. + * @param index - The nth (0-index-based) codeaction available generated by errorCode. */ public getAndApplyCodeActions(errorCode?: number, index?: number) { const fileName = this.activeFile.fileName; @@ -3032,7 +3032,7 @@ namespace FourSlash { /** * Rerieves a codefix satisfying the parameters, or undefined if no such codefix is found. - * @param fileName Path to file where error should be retrieved from. + * @param fileName - Path to file where error should be retrieved from. */ private getCodeFixes(fileName: string, errorCode?: number, preferences: ts.UserPreferences = ts.emptyOptions, position?: number): readonly ts.CodeFixAction[] { const diagnosticsForCodeFix = this.getDiagnostics(fileName, /*includeSuggestions*/ true).map(diagnostic => ({ diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index 4112072d38835..7cff4dc121b21 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -1771,20 +1771,20 @@ namespace FourSlashInterface { export interface VerifySignatureHelpOptions { readonly marker?: ArrayOrSingle; - /** @default 1 */ + /** @defaultValue 1 */ readonly overloadsCount?: number; - /** @default undefined */ + /** @defaultValue undefined */ readonly docComment?: string; readonly text?: string; readonly parameterName?: string; readonly parameterSpan?: string; - /** @default undefined */ + /** @defaultValue undefined */ readonly parameterDocComment?: string; readonly parameterCount?: number; readonly argumentCount?: number; - /** @default false */ + /** @defaultValue false */ readonly isVariadic?: boolean; - /** @default ts.emptyArray */ + /** @defaultValue ts.emptyArray */ readonly tags?: readonly ts.JSDocTagInfo[]; readonly triggerReason?: ts.SignatureHelpTriggerReason; readonly overrideSelectedItemIndex?: number; diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 2786498d41e1f..f697076f7db13 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -1180,7 +1180,7 @@ namespace Harness { symlinks?: vfs.FileSet; } - /** Given a test file containing // @FileName directives, return an array of named units of code to be added to an existing compiler instance */ + /** Given a test file containing `// @FileName` directives, return an array of named units of code to be added to an existing compiler instance */ export function makeUnitsFromTest(code: string, fileName: string, rootDir?: string, settings = extractCompilerSettings(code)): TestCaseContent { // List of all the subfiles we've parsed out const testUnitData: TestUnitData[] = []; diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 6003a2ad6ce2a..695b761ae0c63 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -225,8 +225,8 @@ namespace Harness.LanguageService { public openFile(_fileName: string, _content?: string, _scriptKindName?: string): void { /*overridden*/ } /** - * @param line 0 based index - * @param col 0 based index + * @param line - 0 based index + * @param col - 0 based index */ public positionToLineAndCharacter(fileName: string, position: number): ts.LineAndCharacter { const script: ScriptInfo = this.getScriptInfo(fileName)!; diff --git a/src/harness/harnessUtils.ts b/src/harness/harnessUtils.ts index 97da7e0e3ec99..6fccd3d7ada72 100644 --- a/src/harness/harnessUtils.ts +++ b/src/harness/harnessUtils.ts @@ -18,7 +18,7 @@ namespace Utils { } } - /** Splits the given string on \r\n, or on only \n if that fails, or on only \r if *that* fails. */ + /** Splits the given string on `\r\n`, or on only `\n` if that fails, or on only `\r` if *that* fails. */ export function splitContentByNewlines(content: string) { // Split up the input file by line // Note: IE JS engine incorrectly handles consecutive delimiters here when using RegExp split, so diff --git a/src/harness/vfsUtil.ts b/src/harness/vfsUtil.ts index 63a3d6963d55e..99fee7606d04d 100644 --- a/src/harness/vfsUtil.ts +++ b/src/harness/vfsUtil.ts @@ -165,7 +165,7 @@ namespace vfs { /** * Gets or sets the timestamp (in milliseconds) used for file status, returning the previous timestamp. * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html} */ public time(value?: number): number { if (value !== undefined) { @@ -180,7 +180,7 @@ namespace vfs { /** * Gets the metadata object for a path. - * @param path + * @param path - */ public filemeta(path: string): collections.Metadata { const { node } = this._walk(this._resolve(path)); @@ -199,7 +199,7 @@ namespace vfs { /** * Get the pathname of the current working directory. * - * @link - http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html} */ public cwd() { if (!this._cwd) throw new Error("The current working directory has not been set."); @@ -212,7 +212,7 @@ namespace vfs { /** * Changes the current working directory. * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html} */ public chdir(path: string) { if (this.isReadonly) throw createIOError("EPERM"); @@ -258,9 +258,9 @@ namespace vfs { /** * Scan file system entries along a path. If `path` is a symbolic link, it is dereferenced. - * @param path The path at which to start the scan. - * @param axis The axis along which to traverse. - * @param traversal The traversal scheme to use. + * @param path - The path at which to start the scan. + * @param axis - The axis along which to traverse. + * @param traversal - The traversal scheme to use. */ public scanSync(path: string, axis: Axis, traversal: Traversal) { path = this._resolve(path); @@ -271,9 +271,9 @@ namespace vfs { /** * Scan file system entries along a path. - * @param path The path at which to start the scan. - * @param axis The axis along which to traverse. - * @param traversal The traversal scheme to use. + * @param path - The path at which to start the scan. + * @param axis - The axis along which to traverse. + * @param traversal - The traversal scheme to use. */ public lscanSync(path: string, axis: Axis, traversal: Traversal) { path = this._resolve(path); @@ -317,9 +317,9 @@ namespace vfs { /** * Mounts a physical or virtual file system at a location in this virtual file system. * - * @param source The path in the physical (or other virtual) file system. - * @param target The path in this virtual file system. - * @param resolver An object used to resolve files in `source`. + * @param source - The path in the physical (or other virtual) file system. + * @param target - The path in this virtual file system. + * @param resolver - An object used to resolve files in `source`. */ public mountSync(source: string, target: string, resolver: FileSystemResolver) { if (this.isReadonly) throw createIOError("EROFS"); @@ -425,7 +425,7 @@ namespace vfs { /** * Get file status. If `path` is a symbolic link, it is dereferenced. * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/stat.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/stat.html} * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ @@ -454,7 +454,7 @@ namespace vfs { /** * Get file status. If `path` is a symbolic link, it is dereferenced. * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html} * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ @@ -485,7 +485,7 @@ namespace vfs { /** * Read a directory. If `path` is a symbolic link, it is dereferenced. * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html} * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ @@ -499,7 +499,7 @@ namespace vfs { /** * Make a directory. * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdir.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdir.html} * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ @@ -519,7 +519,7 @@ namespace vfs { /** * Remove a directory. * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html} * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ @@ -538,7 +538,7 @@ namespace vfs { /** * Link one file to another file (also known as a "hard link"). * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html} * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ @@ -559,7 +559,7 @@ namespace vfs { /** * Remove a directory entry. * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html} * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ @@ -577,7 +577,7 @@ namespace vfs { /** * Rename a file. * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html} * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ @@ -611,7 +611,7 @@ namespace vfs { /** * Make a symbolic link. * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html} * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ @@ -631,7 +631,7 @@ namespace vfs { /** * Resolve a pathname. * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html + * {@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html} * * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. */ @@ -697,7 +697,7 @@ namespace vfs { /** * Generates a `FileSet` patch containing all the entries in this `FileSystem` that are not in `base`. - * @param base The base file system. If not provided, this file system's `shadowRoot` is used (if present). + * @param base - The base file system. If not provided, this file system's `shadowRoot` is used (if present). */ public diff(base?: FileSystem | undefined, options: DiffOptions = {}) { if (!base && !options.baseIsNotShadowRoot) base = this.shadowRoot; @@ -1025,11 +1025,11 @@ namespace vfs { /** * Walk a path to its end. * - * @param path The path to follow. - * @param noFollow A value indicating whether to *not* dereference a symbolic link at the + * @param path - The path to follow. + * @param noFollow - A value indicating whether to *not* dereference a symbolic link at the * end of a path. * - * @link http://man7.org/linux/man-pages/man7/path_resolution.7.html + * {@link http://man7.org/linux/man-pages/man7/path_resolution.7.html} */ private _walk(path: string, noFollow?: boolean, onError?: (error: NodeJS.ErrnoException, fragment: WalkResult) => "retry" | "throw"): WalkResult; private _walk(path: string, noFollow?: boolean, onError?: (error: NodeJS.ErrnoException, fragment: WalkResult) => "stop" | "retry" | "throw"): WalkResult | undefined; diff --git a/src/jsTyping/jsTyping.ts b/src/jsTyping/jsTyping.ts index 663385acf2565..605c4112faee0 100644 --- a/src/jsTyping/jsTyping.ts +++ b/src/jsTyping/jsTyping.ts @@ -107,13 +107,13 @@ namespace ts.JsTyping { } /** - * @param host is the object providing I/O related operations. - * @param fileNames are the file names that belong to the same project - * @param projectRootPath is the path to the project root directory - * @param safeListPath is the path used to retrieve the safe list - * @param packageNameToTypingLocation is the map of package names to their cached typing locations and installed versions - * @param typeAcquisition is used to customize the typing acquisition process - * @param compilerOptions are used as a source for typing inference + * @param host - is the object providing I/O related operations. + * @param fileNames - are the file names that belong to the same project + * @param projectRootPath - is the path to the project root directory + * @param safeListPath - is the path used to retrieve the safe list + * @param packageNameToTypingLocation - is the map of package names to their cached typing locations and installed versions + * @param typeAcquisition - is used to customize the typing acquisition process + * @param compilerOptions - are used as a source for typing inference */ export function discoverTypings( host: TypingResolutionHost, @@ -210,10 +210,10 @@ namespace ts.JsTyping { /** * Adds inferred typings from manifest/module pairs (think package.json + node_modules) * - * @param projectRootPath is the path to the directory where to look for package.json, bower.json and other typing information - * @param manifestName is the name of the manifest (package.json or bower.json) - * @param modulesDirName is the directory name for modules (node_modules or bower_components). Should be lowercase! - * @param filesToWatch are the files to watch for changes. We will push things into this array. + * @param projectRootPath - is the path to the directory where to look for package.json, bower.json and other typing information + * @param manifestName - is the name of the manifest (package.json or bower.json) + * @param modulesDirName - is the directory name for modules (node_modules or bower_components). Should be lowercase! + * @param filesToWatch - are the files to watch for changes. We will push things into this array. */ function getTypingNames(projectRootPath: string, manifestName: string, modulesDirName: string, filesToWatch: string[]): void { // First, we check the manifests themselves. They're not @@ -312,7 +312,7 @@ namespace ts.JsTyping { * Infer typing names from given file names. For example, the file name "jquery-min.2.3.4.js" * should be inferred to the 'jquery' typing name; and "angular-route.1.2.3.js" should be inferred * to the 'angular-route' typing name. - * @param fileNames are the names for source files in the project + * @param fileNames - are the names for source files in the project */ function getTypingNamesFromSourceFileNames(fileNames: string[]) { const fromFileNames = mapDefined(fileNames, j => { diff --git a/src/lib/dom.iterable.d.ts b/src/lib/dom.iterable.d.ts index 2c968671a1a42..2401063ce400c 100644 --- a/src/lib/dom.iterable.d.ts +++ b/src/lib/dom.iterable.d.ts @@ -27,8 +27,8 @@ interface NodeList { entries(): IterableIterator<[number, Node]>; /** * Performs the specified action for each node in an list. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list. - * @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 list. + * @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: Node, index: number, listObj: NodeList) => void, thisArg?: any): void; /** @@ -54,8 +54,8 @@ interface NodeListOf { /** * Performs the specified action for each node in an list. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list. - * @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 list. + * @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: TNode, index: number, listObj: NodeListOf) => void, thisArg?: any): void; /** diff --git a/src/lib/es2015.collection.d.ts b/src/lib/es2015.collection.d.ts index 9e27045a5592a..ef0c232c124e9 100644 --- a/src/lib/es2015.collection.d.ts +++ b/src/lib/es2015.collection.d.ts @@ -58,7 +58,7 @@ interface WeakMap { has(key: K): boolean; /** * Adds a new element with a specified key and value. - * @param key Must be an object. + * @param key - Must be an object. */ set(key: K, value: V): this; } diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts index b42880c8ece82..69567ae6a3c2f 100644 --- a/src/lib/es2015.core.d.ts +++ b/src/lib/es2015.core.d.ts @@ -2,10 +2,10 @@ interface Array { /** * 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 + * @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 + * @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: (this: void, value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; @@ -14,20 +14,20 @@ interface Array { /** * 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 + * @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 + * @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: T, index: number, obj: T[]) => unknown, thisArg?: any): number; /** * 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 + * @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 + * @param end - index to stop filling the array at. If end is negative, it is treated as * length+end. */ fill(value: T, start?: number, end?: number): this; @@ -35,11 +35,11 @@ interface Array { /** * 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 + * @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 + * @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. + * @param end - If not specified, length of the this object is used as its default value. */ copyWithin(target: number, start: number, end?: number): this; } @@ -47,21 +47,21 @@ interface Array { interface ArrayConstructor { /** * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. + * @param arrayLike - An array-like object to convert to an array. */ from(arrayLike: ArrayLike): T[]; /** * Creates an array from an 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. + * @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) => U, thisArg?: any): U[]; /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: T[]): T[]; } @@ -80,38 +80,38 @@ interface Function { interface Math { /** * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. + * @param x - A numeric expression. */ clz32(x: number): number; /** * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number + * @param x - First number + * @param y - Second number */ imul(x: number, y: number): number; /** * Returns the sign of the x, indicating whether x is positive, negative or zero. - * @param x The numeric expression to test + * @param x - The numeric expression to test */ sign(x: number): number; /** * Returns the base 10 logarithm of a number. - * @param x A numeric expression. + * @param x - A numeric expression. */ log10(x: number): number; /** * Returns the base 2 logarithm of a number. - * @param x A numeric expression. + * @param x - A numeric expression. */ log2(x: number): number; /** * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. + * @param x - A numeric expression. */ log1p(x: number): number; @@ -119,49 +119,49 @@ interface Math { * Returns the result of (e^x - 1), which is an implementation-dependent approximation to * subtracting 1 from the exponential function of x (e raised to the power of x, where e * is the base of the natural logarithms). - * @param x A numeric expression. + * @param x - A numeric expression. */ expm1(x: number): number; /** * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. + * @param x - A numeric expression that contains an angle measured in radians. */ cosh(x: number): number; /** * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. + * @param x - A numeric expression that contains an angle measured in radians. */ sinh(x: number): number; /** * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. + * @param x - A numeric expression that contains an angle measured in radians. */ tanh(x: number): number; /** * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. + * @param x - A numeric expression that contains an angle measured in radians. */ acosh(x: number): number; /** * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. + * @param x - A numeric expression that contains an angle measured in radians. */ asinh(x: number): number; /** * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. + * @param x - A numeric expression that contains an angle measured in radians. */ atanh(x: number): number; /** * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. + * @param values - Values to compute the square root for. * If no arguments are passed, the result is +0. * If there is only one argument, the result is the absolute value. * If any argument is +Infinity or -Infinity, the result is +Infinity. @@ -173,19 +173,19 @@ interface Math { /** * Returns the integral part of the a numeric expression, x, removing any fractional digits. * If x is already an integer, the result is x. - * @param x A numeric expression. + * @param x - A numeric expression. */ trunc(x: number): number; /** * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. + * @param x - A numeric expression. */ fround(x: number): number; /** * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. + * @param x - A numeric expression. */ cbrt(x: number): number; } @@ -202,13 +202,13 @@ interface NumberConstructor { * Returns true if passed value is finite. * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a * number. Only finite values of the type number, result in true. - * @param number A numeric value. + * @param number - A numeric value. */ isFinite(number: unknown): boolean; /** * Returns true if the value passed is an integer, false otherwise. - * @param number A numeric value. + * @param number - A numeric value. */ isInteger(number: unknown): boolean; @@ -216,13 +216,13 @@ interface NumberConstructor { * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter * to a number. Only values of the type number, that are also NaN, result in true. - * @param number A numeric value. + * @param number - A numeric value. */ isNaN(number: unknown): boolean; /** * Returns true if the value passed is a safe integer. - * @param number A numeric value. + * @param number - A numeric value. */ isSafeInteger(number: unknown): boolean; @@ -242,14 +242,14 @@ interface NumberConstructor { /** * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. + * @param string - A string that contains a floating-point number. */ parseFloat(string: string): number; /** * Converts A string to an integer. - * @param string A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in `string`. + * @param string - A string to convert into a number. + * @param radix - A value between 2 and 36 that specifies the base of the number in `string`. * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. * All other strings are considered decimal. */ @@ -260,61 +260,61 @@ interface ObjectConstructor { /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. Returns the target object. - * @param target The target object to copy to. - * @param source The source object from which to copy properties. + * @param target - The target object to copy to. + * @param source - The source object from which to copy properties. */ assign(target: T, source: U): T & U; /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. + * @param target - The target object to copy to. + * @param source1 - The first source object from which to copy properties. + * @param source2 - The second source object from which to copy properties. */ assign(target: T, source1: U, source2: V): T & U & V; /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. Returns the target object. - * @param target The target object to copy to. - * @param source1 The first source object from which to copy properties. - * @param source2 The second source object from which to copy properties. - * @param source3 The third source object from which to copy properties. + * @param target - The target object to copy to. + * @param source1 - The first source object from which to copy properties. + * @param source2 - The second source object from which to copy properties. + * @param source3 - The third source object from which to copy properties. */ assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources One or more source objects from which to copy properties + * @param target - The target object to copy to. + * @param sources - One or more source objects from which to copy properties */ assign(target: object, ...sources: any[]): any; /** * Returns an array of all symbol properties found directly on object o. - * @param o Object to retrieve the symbols from. + * @param o - Object to retrieve the symbols from. */ getOwnPropertySymbols(o: any): symbol[]; /** * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + * @param o - Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ keys(o: {}): string[]; /** * Returns true if the values are the same value, false otherwise. - * @param value1 The first value. - * @param value2 The second value. + * @param value1 - The first value. + * @param value2 - The second value. */ is(value1: any, value2: any): boolean; /** * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. + * @param o - The object to change its prototype. + * @param proto - The value of the new prototype or null. */ setPrototypeOf(o: any, proto: object | null): any; } @@ -323,10 +323,10 @@ interface ReadonlyArray { /** * 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 + * @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 + * @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: (this: void, value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; @@ -335,10 +335,10 @@ interface ReadonlyArray { /** * 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 + * @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 + * @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: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; @@ -391,8 +391,8 @@ interface String { * Returns true if searchString appears as a substring of the result of converting this * object to a String, at one or more positions that are * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. + * @param searchString - search string + * @param position - If position is undefined, 0 is assumed, so as to search all of the String. */ includes(searchString: string, position?: number): boolean; @@ -406,7 +406,7 @@ interface String { /** * Returns the String value result of normalizing the string into the normalization form * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * @param form - Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default * is "NFC" */ normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; @@ -414,7 +414,7 @@ interface String { /** * Returns the String value result of normalizing the string into the normalization form * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default + * @param form - Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default * is "NFC" */ normalize(form?: string): string; @@ -422,7 +422,7 @@ interface String { /** * Returns a String value that is made from count copies appended together. If count is 0, * the empty string is returned. - * @param count number of copies to append + * @param count - number of copies to append */ repeat(count: number): string; @@ -436,7 +436,7 @@ interface String { /** * Returns an `` HTML anchor element and sets the name attribute to the text value * @deprecated A legacy feature for browser compatibility - * @param name + * @param name - */ anchor(name: string): string; @@ -532,8 +532,8 @@ interface StringConstructor { * parameter will contain the substitution values. It can also be called directly, for example, * to interleave strings and values from your own tag function, and in this case the only thing * it needs from the first argument is the raw property. - * @param template A well-formed template string call site representation. - * @param substitutions A set of substitution values. + * @param template - A well-formed template string call site representation. + * @param substitutions - A set of substitution values. */ raw(template: { raw: readonly string[] | ArrayLike}, ...substitutions: any[]): string; } diff --git a/src/lib/es2015.generator.d.ts b/src/lib/es2015.generator.d.ts index 7c6929173a0e4..6e98b9a2fcfca 100644 --- a/src/lib/es2015.generator.d.ts +++ b/src/lib/es2015.generator.d.ts @@ -11,12 +11,12 @@ interface Generator extends Iterato interface GeneratorFunction { /** * Creates a new Generator object. - * @param args A list of arguments the function accepts. + * @param args - A list of arguments the function accepts. */ new (...args: any[]): Generator; /** * Creates a new Generator object. - * @param args A list of arguments the function accepts. + * @param args - A list of arguments the function accepts. */ (...args: any[]): Generator; /** @@ -36,12 +36,12 @@ interface GeneratorFunction { interface GeneratorFunctionConstructor { /** * Creates a new Generator function. - * @param args A list of arguments the function accepts. + * @param args - A list of arguments the function accepts. */ new (...args: string[]): GeneratorFunction; /** * Creates a new Generator function. - * @param args A list of arguments the function accepts. + * @param args - A list of arguments the function accepts. */ (...args: string[]): GeneratorFunction; /** diff --git a/src/lib/es2015.iterable.d.ts b/src/lib/es2015.iterable.d.ts index f1fb454f980b1..5306792c64eec 100644 --- a/src/lib/es2015.iterable.d.ts +++ b/src/lib/es2015.iterable.d.ts @@ -58,15 +58,15 @@ interface Array { interface ArrayConstructor { /** * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. + * @param iterable - An iterable object to convert to an array. */ from(iterable: Iterable | ArrayLike): T[]; /** * Creates an array from an iterable object. - * @param iterable 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. + * @param iterable - 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(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } @@ -201,7 +201,7 @@ interface PromiseConstructor { /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. - * @param values An iterable of Promises. + * @param values - An iterable of Promises. * @returns A new Promise. */ all(values: Iterable>): Promise[]>; @@ -209,7 +209,7 @@ interface PromiseConstructor { /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. - * @param values An iterable of Promises. + * @param values - An iterable of Promises. * @returns A new Promise. */ race(values: Iterable>): Promise>; @@ -241,9 +241,9 @@ 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 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. */ from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } @@ -269,9 +269,9 @@ 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 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. */ from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } @@ -300,9 +300,9 @@ 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 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. */ from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } @@ -330,9 +330,9 @@ 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 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. */ from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } @@ -358,9 +358,9 @@ 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 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. */ from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } @@ -386,9 +386,9 @@ 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 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. */ from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } @@ -414,9 +414,9 @@ 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 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. */ from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } @@ -442,9 +442,9 @@ 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 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. */ from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } @@ -470,9 +470,9 @@ 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 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. */ from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } diff --git a/src/lib/es2015.promise.d.ts b/src/lib/es2015.promise.d.ts index 68b476d8c2fc6..631a7b6d19893 100644 --- a/src/lib/es2015.promise.d.ts +++ b/src/lib/es2015.promise.d.ts @@ -6,7 +6,7 @@ interface PromiseConstructor { /** * Creates a new Promise. - * @param executor A callback used to initialize the promise. This callback is passed two arguments: + * @param executor - A callback used to initialize the promise. This callback is passed two arguments: * a resolve callback used to resolve the promise with a value or the result of another promise, * and a reject callback used to reject the promise with a provided reason or error. */ @@ -15,7 +15,7 @@ interface PromiseConstructor { /** * Creates a Promise that is resolved with an array of results when all of the provided Promises * resolve, or rejected when any Promise is rejected. - * @param values An array of Promises. + * @param values - An array of Promises. * @returns A new Promise. */ all(values: T): Promise<{ -readonly [P in keyof T]: Awaited }>; @@ -26,7 +26,7 @@ interface PromiseConstructor { /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected. - * @param values An array of Promises. + * @param values - An array of Promises. * @returns A new Promise. */ race(values: T): Promise>; @@ -36,7 +36,7 @@ interface PromiseConstructor { /** * Creates a new rejected promise for the provided reason. - * @param reason The reason the promise was rejected. + * @param reason - The reason the promise was rejected. * @returns A new rejected Promise. */ reject(reason?: any): Promise; @@ -48,13 +48,13 @@ interface PromiseConstructor { resolve(): Promise; /** * Creates a new resolved promise for the provided value. - * @param value A promise. + * @param value - A promise. * @returns A promise whose internal state matches the provided promise. */ resolve(value: T): Promise>; /** * Creates a new resolved promise for the provided value. - * @param value A promise. + * @param value - A promise. * @returns A promise whose internal state matches the provided promise. */ resolve(value: T | PromiseLike): Promise>; diff --git a/src/lib/es2015.proxy.d.ts b/src/lib/es2015.proxy.d.ts index aa339edaebb77..8202dd1826511 100644 --- a/src/lib/es2015.proxy.d.ts +++ b/src/lib/es2015.proxy.d.ts @@ -1,91 +1,91 @@ interface ProxyHandler { /** * A trap method for a function call. - * @param target The original callable object which is being proxied. + * @param target - The original callable object which is being proxied. */ apply?(target: T, thisArg: any, argArray: any[]): any; /** * A trap for the `new` operator. - * @param target The original object which is being proxied. - * @param newTarget The constructor that was originally called. + * @param target - The original object which is being proxied. + * @param newTarget - The constructor that was originally called. */ construct?(target: T, argArray: any[], newTarget: Function): object; /** * A trap for `Object.defineProperty()`. - * @param target The original object which is being proxied. + * @param target - The original object which is being proxied. * @returns A `Boolean` indicating whether or not the property has been defined. */ defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; /** * A trap for the `delete` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to delete. + * @param target - The original object which is being proxied. + * @param p - The name or `Symbol` of the property to delete. * @returns A `Boolean` indicating whether or not the property was deleted. */ deleteProperty?(target: T, p: string | symbol): boolean; /** * A trap for getting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to get. - * @param receiver The proxy or an object that inherits from the proxy. + * @param target - The original object which is being proxied. + * @param p - The name or `Symbol` of the property to get. + * @param receiver - The proxy or an object that inherits from the proxy. */ get?(target: T, p: string | symbol, receiver: any): any; /** * A trap for `Object.getOwnPropertyDescriptor()`. - * @param target The original object which is being proxied. - * @param p The name of the property whose description should be retrieved. + * @param target - The original object which is being proxied. + * @param p - The name of the property whose description should be retrieved. */ getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; /** * A trap for the `[[GetPrototypeOf]]` internal method. - * @param target The original object which is being proxied. + * @param target - The original object which is being proxied. */ getPrototypeOf?(target: T): object | null; /** * A trap for the `in` operator. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to check for existence. + * @param target - The original object which is being proxied. + * @param p - The name or `Symbol` of the property to check for existence. */ has?(target: T, p: string | symbol): boolean; /** * A trap for `Object.isExtensible()`. - * @param target The original object which is being proxied. + * @param target - The original object which is being proxied. */ isExtensible?(target: T): boolean; /** * A trap for `Reflect.ownKeys()`. - * @param target The original object which is being proxied. + * @param target - The original object which is being proxied. */ ownKeys?(target: T): ArrayLike; /** * A trap for `Object.preventExtensions()`. - * @param target The original object which is being proxied. + * @param target - The original object which is being proxied. */ preventExtensions?(target: T): boolean; /** * A trap for setting a property value. - * @param target The original object which is being proxied. - * @param p The name or `Symbol` of the property to set. - * @param receiver The object to which the assignment was originally directed. - * @returns `A `Boolean` indicating whether or not the property was set. + * @param target - The original object which is being proxied. + * @param p - The name or `Symbol` of the property to set. + * @param receiver - The object to which the assignment was originally directed. + * @returns A `Boolean` indicating whether or not the property was set. */ set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; /** * A trap for `Object.setPrototypeOf()`. - * @param target The original object which is being proxied. - * @param newPrototype The object's new prototype or `null`. + * @param target - The original object which is being proxied. + * @param newPrototype - The object's new prototype or `null`. */ setPrototypeOf?(target: T, v: object | null): boolean; } @@ -93,8 +93,8 @@ interface ProxyHandler { interface ProxyConstructor { /** * Creates a revocable Proxy object. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + * @param target - A target object to wrap with Proxy. + * @param handler - An object whose properties define the behavior of Proxy when an operation is attempted on it. */ revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; @@ -102,8 +102,8 @@ interface ProxyConstructor { * Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the * original object, but which may redefine fundamental Object operations like getting, setting, and defining * properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. - * @param target A target object to wrap with Proxy. - * @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. + * @param target - A target object to wrap with Proxy. + * @param handler - An object whose properties define the behavior of Proxy when an operation is attempted on it. */ new (target: T, handler: ProxyHandler): T; } diff --git a/src/lib/es2015.reflect.d.ts b/src/lib/es2015.reflect.d.ts index 4f4ddc404f02f..e4866863167f9 100644 --- a/src/lib/es2015.reflect.d.ts +++ b/src/lib/es2015.reflect.d.ts @@ -2,9 +2,9 @@ declare namespace Reflect { /** * Calls the function with the specified object as the this value * and the elements of specified array as the arguments. - * @param target The function to call. - * @param thisArgument The object to be used as the this object. - * @param argumentsList An array of argument values to be passed to the function. + * @param target - The function to call. + * @param thisArgument - The object to be used as the this object. + * @param argumentsList - An array of argument values to be passed to the function. */ function apply( target: (this: T, ...args: A) => R, @@ -16,9 +16,9 @@ declare namespace Reflect { /** * Constructs the target with the elements of specified array as the arguments * and the specified constructor as the `new.target` value. - * @param target The constructor to invoke. - * @param argumentsList An array of argument values to be passed to the constructor. - * @param newTarget The constructor to be used as the `new.target` object. + * @param target - The constructor to invoke. + * @param argumentsList - An array of argument values to be passed to the constructor. + * @param newTarget - The constructor to be used as the `new.target` object. */ function construct( target: new (...args: A) => R, @@ -29,26 +29,26 @@ declare namespace Reflect { /** * Adds a property to an object, or modifies attributes of an existing property. - * @param target Object on which to add or modify the property. This can be a native JavaScript object + * @param target - Object on which to add or modify the property. This can be a native JavaScript object * (that is, a user-defined object or a built in object) or a DOM object. - * @param propertyKey The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + * @param propertyKey - The property name. + * @param attributes - Descriptor for the property. It can be for a data property or an accessor property. */ function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType): boolean; /** * Removes a property from an object, equivalent to `delete target[propertyKey]`, * except it won't throw if `target[propertyKey]` is non-configurable. - * @param target Object from which to remove the own property. - * @param propertyKey The property name. + * @param target - Object from which to remove the own property. + * @param propertyKey - The property name. */ function deleteProperty(target: object, propertyKey: PropertyKey): boolean; /** * Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey The property name. - * @param receiver The reference to use as the `this` value in the getter function, + * @param target - Object that contains the property on itself or in its prototype chain. + * @param propertyKey - The property name. + * @param receiver - The reference to use as the `this` value in the getter function, * if `target[propertyKey]` is an accessor property. */ function get( @@ -60,8 +60,8 @@ declare namespace Reflect { /** * Gets the own property descriptor of the specified object. * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param target Object that contains the property. - * @param propertyKey The property name. + * @param target - Object that contains the property. + * @param propertyKey - The property name. */ function getOwnPropertyDescriptor( target: T, @@ -70,42 +70,42 @@ declare namespace Reflect { /** * Returns the prototype of an object. - * @param target The object that references the prototype. + * @param target - The object that references the prototype. */ function getPrototypeOf(target: object): object | null; /** * Equivalent to `propertyKey in target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. + * @param target - Object that contains the property on itself or in its prototype chain. + * @param propertyKey - Name of the property. */ function has(target: object, propertyKey: PropertyKey): boolean; /** * Returns a value that indicates whether new properties can be added to an object. - * @param target Object to test. + * @param target - Object to test. */ function isExtensible(target: object): boolean; /** * Returns the string and symbol keys of the own properties of an object. The own properties of an object * are those that are defined directly on that object, and are not inherited from the object's prototype. - * @param target Object that contains the own properties. + * @param target - Object that contains the own properties. */ function ownKeys(target: object): (string | symbol)[]; /** * Prevents the addition of new properties to an object. - * @param target Object to make non-extensible. - * @return Whether the object has been made non-extensible. + * @param target - Object to make non-extensible. + * @returns Whether the object has been made non-extensible. */ function preventExtensions(target: object): boolean; /** * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. - * @param target Object that contains the property on itself or in its prototype chain. - * @param propertyKey Name of the property. - * @param receiver The reference to use as the `this` value in the setter function, + * @param target - Object that contains the property on itself or in its prototype chain. + * @param propertyKey - Name of the property. + * @param receiver - The reference to use as the `this` value in the setter function, * if `target[propertyKey]` is an accessor property. */ function set( @@ -118,9 +118,9 @@ declare namespace Reflect { /** * Sets the prototype of a specified object o to object proto or null. - * @param target The object to change its prototype. - * @param proto The value of the new prototype or null. - * @return Whether setting the prototype was successful. + * @param target - The object to change its prototype. + * @param proto - The value of the new prototype or null. + * @returns Whether setting the prototype was successful. */ function setPrototypeOf(target: object, proto: object | null): boolean; } diff --git a/src/lib/es2015.symbol.d.ts b/src/lib/es2015.symbol.d.ts index 5ef7ff4bb0ee4..305954c7ba5cb 100644 --- a/src/lib/es2015.symbol.d.ts +++ b/src/lib/es2015.symbol.d.ts @@ -6,23 +6,23 @@ interface SymbolConstructor { /** * Returns a new unique Symbol value. - * @param description Description of the new Symbol object. + * @param description - Description of the new Symbol object. */ (description?: string | number): symbol; /** * Returns a Symbol object from the global symbol registry matching the given key if found. * Otherwise, returns a new symbol with this key. - * @param key key to search for. + * @param key - key to search for. */ for(key: string): symbol; /** * Returns a key from the global symbol registry matching the given Symbol if found. * Otherwise, returns a undefined. - * @param sym Symbol to find the key for. + * @param sym - Symbol to find the key for. */ keyFor(sym: symbol): string | undefined; } -declare var Symbol: SymbolConstructor; \ No newline at end of file +declare var Symbol: SymbolConstructor; diff --git a/src/lib/es2015.symbol.wellknown.d.ts b/src/lib/es2015.symbol.wellknown.d.ts index 8911baa9bb9cf..3f285b0c8cc97 100644 --- a/src/lib/es2015.symbol.wellknown.d.ts +++ b/src/lib/es2015.symbol.wellknown.d.ts @@ -103,9 +103,9 @@ interface Date { /** * Converts a Date object to a string or number. * - * @param hint The strings "number", "string", or "default" to specify what primitive to return. + * @param hint - The strings "number", "string", or "default" to specify what primitive to return. * - * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". + * @throws `TypeError` If 'hint' was given something other than "number", "string", or "default". * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". */ [Symbol.toPrimitive](hint: string): string | number; @@ -162,24 +162,24 @@ interface RegExp { /** * Matches a string with this regular expression, and returns an array containing the results of * that search. - * @param string A string to search within. + * @param string - A string to search within. */ [Symbol.match](string: string): RegExpMatchArray | null; /** * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against + * @param string - A String object or string literal whose contents matching against * this regular expression will be replaced - * @param replaceValue A String object or string literal containing the text to replace for every + * @param replaceValue - A String object or string literal containing the text to replace for every * successful match of this regular expression. */ [Symbol.replace](string: string, replaceValue: string): string; /** * Replaces text in a string, using this regular expression. - * @param string A String object or string literal whose contents matching against + * @param string - A String object or string literal whose contents matching against * this regular expression will be replaced - * @param replacer A function that returns the replacement text. + * @param replacer - A function that returns the replacement text. */ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; @@ -187,7 +187,7 @@ interface RegExp { * Finds the position beginning first substring match in a regular expression search * using this regular expression. * - * @param string The string to search within. + * @param string - The string to search within. */ [Symbol.search](string: string): number; @@ -199,8 +199,8 @@ interface RegExp { * regular expression matches, the results (including any undefined results) of the * capturing parentheses are spliced. * - * @param string string value to split - * @param limit if not undefined, the output array is truncated so that it contains no more + * @param string - string value to split + * @param limit - if not undefined, the output array is truncated so that it contains no more * than 'limit' elements. */ [Symbol.split](string: string, limit?: number): string[]; @@ -214,34 +214,34 @@ interface String { /** * Matches a string or an object that supports being matched against, and returns an array * containing the results of that search, or null if no matches are found. - * @param matcher An object that supports being matched against. + * @param matcher - An object that supports being matched against. */ match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; /** * Replaces first match with string or all matches with RegExp. - * @param searchValue A string or RegExp search value. - * @param replaceValue A string containing the text to replace for match. + * @param searchValue - A string or RegExp search value. + * @param replaceValue - A string containing the text to replace for match. */ replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; /** * Replaces text in a string, using an object that supports replacement within a string. - * @param searchValue A object can search for and replace matches within a string. - * @param replacer A function that returns the replacement text. + * @param searchValue - A object can search for and replace matches within a string. + * @param replacer - A function that returns the replacement text. */ replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; /** * Finds the first substring match in a regular expression search. - * @param searcher An object which supports searching within a string. + * @param searcher - An object which supports searching within a string. */ search(searcher: { [Symbol.search](string: string): number; }): number; /** * Split a string into substrings using the specified separator and return them as an array. - * @param splitter An object that can split a string. - * @param limit A value used to limit the number of elements returned in the array. + * @param splitter - An object that can split a string. + * @param limit - A value used to limit the number of elements returned in the array. */ split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; } diff --git a/src/lib/es2016.array.include.d.ts b/src/lib/es2016.array.include.d.ts index 1012c18407b0b..10a05131b73d9 100644 --- a/src/lib/es2016.array.include.d.ts +++ b/src/lib/es2016.array.include.d.ts @@ -1,8 +1,8 @@ interface Array { /** * 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. + * @param searchElement - The element to search for. + * @param fromIndex - The position in this array at which to begin searching for searchElement. */ includes(searchElement: T, fromIndex?: number): boolean; } @@ -10,8 +10,8 @@ interface Array { interface ReadonlyArray { /** * 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. + * @param searchElement - The element to search for. + * @param fromIndex - The position in this array at which to begin searching for searchElement. */ includes(searchElement: T, fromIndex?: number): boolean; } @@ -19,8 +19,8 @@ interface ReadonlyArray { interface Int8Array { /** * 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. + * @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; } @@ -28,8 +28,8 @@ interface Int8Array { interface Uint8Array { /** * 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. + * @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; } @@ -37,8 +37,8 @@ interface Uint8Array { interface Uint8ClampedArray { /** * 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. + * @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; } @@ -46,8 +46,8 @@ interface Uint8ClampedArray { interface Int16Array { /** * 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. + * @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; } @@ -55,8 +55,8 @@ interface Int16Array { interface Uint16Array { /** * 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. + * @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; } @@ -64,8 +64,8 @@ interface Uint16Array { interface Int32Array { /** * 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. + * @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; } @@ -73,8 +73,8 @@ interface Int32Array { interface Uint32Array { /** * 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. + * @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; } @@ -82,8 +82,8 @@ interface Uint32Array { interface Float32Array { /** * 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. + * @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; } @@ -91,8 +91,8 @@ interface Float32Array { interface Float64Array { /** * 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. + * @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; -} \ No newline at end of file +} diff --git a/src/lib/es2017.object.d.ts b/src/lib/es2017.object.d.ts index b3ace85bef182..7ab36ca638c39 100644 --- a/src/lib/es2017.object.d.ts +++ b/src/lib/es2017.object.d.ts @@ -1,31 +1,31 @@ interface ObjectConstructor { /** * Returns an array of values of the enumerable properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + * @param o - Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ values(o: { [s: string]: T } | ArrayLike): T[]; /** * Returns an array of values of the enumerable properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + * @param o - Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ values(o: {}): any[]; /** * Returns an array of key/values of the enumerable properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + * @param o - Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ entries(o: { [s: string]: T } | ArrayLike): [string, T][]; /** * Returns an array of key/values of the enumerable properties of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + * @param o - Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ entries(o: {}): [string, any][]; /** * Returns an object containing all own property descriptors of an object - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + * @param o - Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ getOwnPropertyDescriptors(o: T): {[P in keyof T]: TypedPropertyDescriptor} & { [x: string]: PropertyDescriptor }; } diff --git a/src/lib/es2017.sharedmemory.d.ts b/src/lib/es2017.sharedmemory.d.ts index 0d93ba914e09e..f699907771a5c 100644 --- a/src/lib/es2017.sharedmemory.d.ts +++ b/src/lib/es2017.sharedmemory.d.ts @@ -98,9 +98,9 @@ interface Atomics { /** * Wakes up sleeping agents that are waiting on the given index of the array, returning the * number of agents that were awoken. - * @param typedArray A shared Int32Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. + * @param typedArray - A shared Int32Array. + * @param index - The position in the typedArray to wake up on. + * @param count - The number of sleeping agents to notify. Defaults to +Infinity. */ notify(typedArray: Int32Array, index: number, count?: number): number; diff --git a/src/lib/es2017.string.d.ts b/src/lib/es2017.string.d.ts index 80139e3712ec5..a084834da6b31 100644 --- a/src/lib/es2017.string.d.ts +++ b/src/lib/es2017.string.d.ts @@ -3,10 +3,10 @@ interface String { * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. * The padding is applied from the start (left) of the current string. * - * @param maxLength The length of the resulting string once the current string has been padded. + * @param maxLength - The length of the resulting string once the current string has been padded. * If this parameter is smaller than the current string's length, the current string will be returned as it is. * - * @param fillString The string to pad the current string with. + * @param fillString - The string to pad the current string with. * If this string is too long, it will be truncated and the left-most part will be applied. * The default value for this parameter is " " (U+0020). */ @@ -16,10 +16,10 @@ interface String { * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. * The padding is applied from the end (right) of the current string. * - * @param maxLength The length of the resulting string once the current string has been padded. + * @param maxLength - The length of the resulting string once the current string has been padded. * If this parameter is smaller than the current string's length, the current string will be returned as it is. * - * @param fillString The string to pad the current string with. + * @param fillString - The string to pad the current string with. * If this string is too long, it will be truncated and the left-most part will be applied. * The default value for this parameter is " " (U+0020). */ diff --git a/src/lib/es2018.asyncgenerator.d.ts b/src/lib/es2018.asyncgenerator.d.ts index f6966264c8be4..36a429c5ae27c 100644 --- a/src/lib/es2018.asyncgenerator.d.ts +++ b/src/lib/es2018.asyncgenerator.d.ts @@ -11,12 +11,12 @@ interface AsyncGenerator extends As interface AsyncGeneratorFunction { /** * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. + * @param args - A list of arguments the function accepts. */ new (...args: any[]): AsyncGenerator; /** * Creates a new AsyncGenerator object. - * @param args A list of arguments the function accepts. + * @param args - A list of arguments the function accepts. */ (...args: any[]): AsyncGenerator; /** @@ -36,12 +36,12 @@ interface AsyncGeneratorFunction { interface AsyncGeneratorFunctionConstructor { /** * Creates a new AsyncGenerator function. - * @param args A list of arguments the function accepts. + * @param args - A list of arguments the function accepts. */ new (...args: string[]): AsyncGeneratorFunction; /** * Creates a new AsyncGenerator function. - * @param args A list of arguments the function accepts. + * @param args - A list of arguments the function accepts. */ (...args: string[]): AsyncGeneratorFunction; /** diff --git a/src/lib/es2018.promise.d.ts b/src/lib/es2018.promise.d.ts index 28f903870b67c..79e914b370067 100644 --- a/src/lib/es2018.promise.d.ts +++ b/src/lib/es2018.promise.d.ts @@ -5,7 +5,7 @@ interface Promise { /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @param onfinally - The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): Promise diff --git a/src/lib/es2019.array.d.ts b/src/lib/es2019.array.d.ts index 5181677c5f973..2dc639e19ae3c 100644 --- a/src/lib/es2019.array.d.ts +++ b/src/lib/es2019.array.d.ts @@ -12,9 +12,9 @@ interface ReadonlyArray { * a new array. * This is identical to a map followed by flat with depth 1. * - * @param callback A function that accepts up to three arguments. The flatMap method calls the + * @param callback - A function that accepts up to three arguments. The flatMap method calls the * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If + * @param thisArg - An object to which the this keyword can refer in the callback function. If * thisArg is omitted, undefined is used as the this value. */ flatMap ( @@ -27,7 +27,7 @@ interface ReadonlyArray { * Returns a new array with all sub-array elements concatenated into it recursively up to the * specified depth. * - * @param depth The maximum recursion depth + * @param depth - The maximum recursion depth */ flat( this: A, @@ -42,9 +42,9 @@ interface Array { * a new array. * This is identical to a map followed by flat with depth 1. * - * @param callback A function that accepts up to three arguments. The flatMap method calls the + * @param callback - A function that accepts up to three arguments. The flatMap method calls the * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If + * @param thisArg - An object to which the this keyword can refer in the callback function. If * thisArg is omitted, undefined is used as the this value. */ flatMap ( @@ -56,7 +56,7 @@ interface Array { * Returns a new array with all sub-array elements concatenated into it recursively up to the * specified depth. * - * @param depth The maximum recursion depth + * @param depth - The maximum recursion depth */ flat( this: A, diff --git a/src/lib/es2019.object.d.ts b/src/lib/es2019.object.d.ts index e3518b7b9d689..7f56264143ddf 100644 --- a/src/lib/es2019.object.d.ts +++ b/src/lib/es2019.object.d.ts @@ -3,13 +3,13 @@ interface ObjectConstructor { /** * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. + * @param entries - An iterable object that contains key-value entries for properties and methods. */ fromEntries(entries: Iterable): { [k: string]: T }; /** * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. + * @param entries - An iterable object that contains key-value entries for properties and methods. */ fromEntries(entries: Iterable): any; } diff --git a/src/lib/es2020.bigint.d.ts b/src/lib/es2020.bigint.d.ts index e13da87bc71c7..bff0a551b95e7 100644 --- a/src/lib/es2020.bigint.d.ts +++ b/src/lib/es2020.bigint.d.ts @@ -2,7 +2,7 @@ interface BigIntToLocaleStringOptions { /** - * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. + * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation | Intl page}. */ localeMatcher?: string; /** @@ -48,12 +48,12 @@ interface BigIntToLocaleStringOptions { minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; /** - * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information). + * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html | ISO 4217 currency codes list} (2 if the list doesn't provide that information). */ minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; /** - * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. + * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html | ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0. */ maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; @@ -89,7 +89,7 @@ interface BigIntToLocaleStringOptions { interface BigInt { /** * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. + * @param radix - Specifies a radix for converting numeric values to strings. */ toString(radix?: number): string; @@ -109,15 +109,15 @@ interface BigIntConstructor { /** * Interprets the low bits of a BigInt as a 2's-complement signed integer. * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract + * @param bits - The number of low bits to use + * @param int - The BigInt whose bits to extract */ asIntN(bits: number, int: bigint): bigint; /** * Interprets the low bits of a BigInt as an unsigned integer. * All higher bits are discarded. - * @param bits The number of low bits to use - * @param int The BigInt whose bits to extract + * @param bits - The number of low bits to use + * @param int - The BigInt whose bits to extract */ asUintN(bits: number, int: bigint): bigint; } @@ -144,11 +144,11 @@ interface BigInt64Array { /** * 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 + * @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 + * @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. + * @param end - If not specified, length of the this object is used as its default value. */ copyWithin(target: number, start: number, end?: number): this; @@ -157,29 +157,29 @@ interface BigInt64Array { /** * 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 + * @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 false, * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. + * @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: bigint, index: number, array: BigInt64Array) => boolean, 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 + * @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 + * @param end - index to stop filling the array at. If end is negative, it is treated as * length+end. */ fill(value: bigint, 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 + * @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. + * @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: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; @@ -187,10 +187,10 @@ interface BigInt64Array { /** * 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 + * @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 + * @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: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; @@ -198,41 +198,41 @@ interface BigInt64Array { /** * 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 + * @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 + * @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: bigint, index: number, array: BigInt64Array) => boolean, 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 + * @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: bigint, index: number, array: BigInt64Array) => 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. + * @param searchElement - The element to search for. + * @param fromIndex - The position in this array at which to begin searching for searchElement. */ includes(searchElement: bigint, 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 + * @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: bigint, 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 + * @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; @@ -242,8 +242,8 @@ interface BigInt64Array { /** * 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 + * @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: bigint, fromIndex?: number): number; @@ -254,9 +254,9 @@ interface BigInt64Array { /** * 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 + * @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. + * @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: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; @@ -265,9 +265,9 @@ interface BigInt64Array { * 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 + * @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 + * @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. */ @@ -277,9 +277,9 @@ interface BigInt64Array { * 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 + * @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 + * @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. */ @@ -289,9 +289,9 @@ interface BigInt64Array { * 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 + * @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 + * @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. */ @@ -301,9 +301,9 @@ interface BigInt64Array { * 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 + * @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 + * @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. */ @@ -314,39 +314,39 @@ interface BigInt64Array { /** * 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. + * @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. + * @param start - The beginning of the specified portion of the array. + * @param end - The end of the specified portion of the array. */ slice(start?: number, end?: number): BigInt64Array; /** * 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 + * @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 true, or until * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. + * @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: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; /** * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + * @param compareFn - The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. */ sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; /** * Gets a new BigInt64Array 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. + * @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): BigInt64Array; @@ -380,15 +380,15 @@ interface BigInt64ArrayConstructor { /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: bigint[]): 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 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 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. */ from(arrayLike: ArrayLike): BigInt64Array; from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; @@ -416,11 +416,11 @@ interface BigUint64Array { /** * 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 + * @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 + * @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. + * @param end - If not specified, length of the this object is used as its default value. */ copyWithin(target: number, start: number, end?: number): this; @@ -429,29 +429,29 @@ interface BigUint64Array { /** * 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 + * @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 false, * or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. + * @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: bigint, index: number, array: BigUint64Array) => boolean, 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 + * @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 + * @param end - index to stop filling the array at. If end is negative, it is treated as * length+end. */ fill(value: bigint, 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 + * @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. + * @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: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; @@ -459,10 +459,10 @@ interface BigUint64Array { /** * 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 + * @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 + * @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: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; @@ -470,41 +470,41 @@ interface BigUint64Array { /** * 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 + * @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 + * @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: bigint, index: number, array: BigUint64Array) => boolean, 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 + * @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: bigint, index: number, array: BigUint64Array) => 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. + * @param searchElement - The element to search for. + * @param fromIndex - The position in this array at which to begin searching for searchElement. */ includes(searchElement: bigint, 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 + * @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: bigint, 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 + * @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; @@ -514,8 +514,8 @@ interface BigUint64Array { /** * 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 + * @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: bigint, fromIndex?: number): number; @@ -526,9 +526,9 @@ interface BigUint64Array { /** * 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 + * @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. + * @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: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; @@ -537,9 +537,9 @@ interface BigUint64Array { * 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 + * @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 + * @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. */ @@ -549,9 +549,9 @@ interface BigUint64Array { * 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 + * @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 + * @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. */ @@ -561,9 +561,9 @@ interface BigUint64Array { * 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 + * @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 + * @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. */ @@ -573,9 +573,9 @@ interface BigUint64Array { * 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 + * @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 + * @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. */ @@ -586,39 +586,39 @@ interface BigUint64Array { /** * 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. + * @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. + * @param start - The beginning of the specified portion of the array. + * @param end - The end of the specified portion of the array. */ slice(start?: number, end?: number): BigUint64Array; /** * 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 + * @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 true, or until * the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. + * @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: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; /** * Sorts the array. - * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. + * @param compareFn - The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. */ sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; /** * Gets a new BigUint64Array 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. + * @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): BigUint64Array; @@ -652,15 +652,15 @@ interface BigUint64ArrayConstructor { /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: bigint[]): BigUint64Array; /** * 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 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. */ from(arrayLike: ArrayLike): BigUint64Array; from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; @@ -672,32 +672,32 @@ interface DataView { /** * Gets the BigInt64 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. + * @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. */ getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; /** * Gets the BigUint64 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. + * @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. */ getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; /** * Stores a BigInt64 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. + * @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. */ setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; /** * Stores a BigUint64 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. + * @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. */ setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; } diff --git a/src/lib/es2020.date.d.ts b/src/lib/es2020.date.d.ts index 07af7065f7391..9472b105d4c48 100644 --- a/src/lib/es2020.date.d.ts +++ b/src/lib/es2020.date.d.ts @@ -3,22 +3,22 @@ interface Date { /** * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. + * @param locales - A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options - An object that contains one or more properties that specify comparison options. */ toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; /** * Converts a date to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. + * @param locales - A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options - An object that contains one or more properties that specify comparison options. */ toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; /** * Converts a time to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. + * @param locales - A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options - An object that contains one or more properties that specify comparison options. */ toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; -} \ No newline at end of file +} diff --git a/src/lib/es2020.intl.d.ts b/src/lib/es2020.intl.d.ts index 37486e296307d..dc557f86fa4b5 100644 --- a/src/lib/es2020.intl.d.ts +++ b/src/lib/es2020.intl.d.ts @@ -152,7 +152,7 @@ declare namespace Intl { * * @throws `RangeError` if `unit` was given something other than `unit` possible values * - * @returns {string} Internationalized relative time message as string + * @returns Internationalized relative time message as string * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). */ @@ -353,7 +353,7 @@ declare namespace Intl { * Receives a code and returns a string based on the locale and options provided when instantiating * [`Intl.DisplayNames()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) * - * @param code The `code` to provide depends on the `type` passed to display name during creation: + * @param code - The `code` to provide depends on the `type` passed to display name during creation: * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), * or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/). * - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html). @@ -384,11 +384,11 @@ declare namespace Intl { prototype: DisplayNames; /** - * @param locales A string with a BCP 47 language tag, or an array of such strings. + * @param locales - A string with a BCP 47 language tag, or an array of such strings. * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) * page. * - * @param options An object for setting up a display name. + * @param options - An object for setting up a display name. * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). */ @@ -397,11 +397,11 @@ declare namespace Intl { /** * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. * - * @param locales A string with a BCP 47 language tag, or an array of such strings. + * @param locales - A string with a BCP 47 language tag, or an array of such strings. * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) * page. * - * @param options An object with a locale matcher. + * @param options - An object with a locale matcher. * * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. * diff --git a/src/lib/es2020.number.d.ts b/src/lib/es2020.number.d.ts index ba61f3dfd0f5a..21b5c759a5f7b 100644 --- a/src/lib/es2020.number.d.ts +++ b/src/lib/es2020.number.d.ts @@ -3,8 +3,8 @@ interface Number { /** * Converts a number to a string by using the current or specified locale. - * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. + * @param locales - A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options - An object that contains one or more properties that specify comparison options. */ toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string; } diff --git a/src/lib/es2020.promise.d.ts b/src/lib/es2020.promise.d.ts index a1b408ff8f6a9..5a52e5f04534c 100644 --- a/src/lib/es2020.promise.d.ts +++ b/src/lib/es2020.promise.d.ts @@ -14,7 +14,7 @@ interface PromiseConstructor { /** * Creates a Promise that is resolved with an array of results when all * of the provided Promises resolve or reject. - * @param values An array of Promises. + * @param values - An array of Promises. * @returns A new Promise. */ allSettled(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult> }>; @@ -22,7 +22,7 @@ interface PromiseConstructor { /** * Creates a Promise that is resolved with an array of results when all * of the provided Promises resolve or reject. - * @param values An array of Promises. + * @param values - An array of Promises. * @returns A new Promise. */ allSettled(values: Iterable>): Promise>[]>; diff --git a/src/lib/es2020.sharedmemory.d.ts b/src/lib/es2020.sharedmemory.d.ts index e8403c18ba82b..81c178cf6c705 100644 --- a/src/lib/es2020.sharedmemory.d.ts +++ b/src/lib/es2020.sharedmemory.d.ts @@ -64,9 +64,9 @@ interface Atomics { /** * Wakes up sleeping agents that are waiting on the given index of the array, returning the * number of agents that were awoken. - * @param typedArray A shared BigInt64Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. + * @param typedArray - A shared BigInt64Array. + * @param index - The position in the typedArray to wake up on. + * @param count - The number of sleeping agents to notify. Defaults to +Infinity. */ notify(typedArray: BigInt64Array, index: number, count?: number): number; diff --git a/src/lib/es2020.string.d.ts b/src/lib/es2020.string.d.ts index 382bc75595e92..ab5ac1331f79f 100644 --- a/src/lib/es2020.string.d.ts +++ b/src/lib/es2020.string.d.ts @@ -4,7 +4,7 @@ interface String { /** * Matches a string with a regular expression, and returns an iterable of matches * containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. + * @param regexp - A variable name or string literal containing the regular expression pattern and flags. */ matchAll(regexp: RegExp): IterableIterator; } diff --git a/src/lib/es2020.symbol.wellknown.d.ts b/src/lib/es2020.symbol.wellknown.d.ts index 94a11768256c7..0050937da7817 100644 --- a/src/lib/es2020.symbol.wellknown.d.ts +++ b/src/lib/es2020.symbol.wellknown.d.ts @@ -13,7 +13,7 @@ interface RegExp { /** * Matches a string with this regular expression, and returns an iterable of matches * containing the results of that search. - * @param string A string to search within. + * @param string - A string to search within. */ [Symbol.matchAll](str: string): IterableIterator; } diff --git a/src/lib/es2021.intl.d.ts b/src/lib/es2021.intl.d.ts index 9de1a9a2036cf..64472bc840316 100644 --- a/src/lib/es2021.intl.d.ts +++ b/src/lib/es2021.intl.d.ts @@ -73,7 +73,7 @@ declare namespace Intl { * * @throws `TypeError` if `list` includes something other than the possible values. * - * @returns {string} A language-specific formatted string representing the elements of the list. + * @returns A language-specific formatted string representing the elements of the list. * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). */ @@ -86,7 +86,7 @@ declare namespace Intl { * * @throws `TypeError` if `list` includes something other than the possible values. * - * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. + * @returns An Array of components which contains the formatted parts from the list. * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). */ diff --git a/src/lib/es2021.promise.d.ts b/src/lib/es2021.promise.d.ts index ef9fdeda98389..97739c5c2f8fe 100644 --- a/src/lib/es2021.promise.d.ts +++ b/src/lib/es2021.promise.d.ts @@ -16,14 +16,14 @@ declare var AggregateError: AggregateErrorConstructor; interface PromiseConstructor { /** * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. + * @param values - An array or iterable of Promises. * @returns A new Promise. */ any(values: T): Promise>; /** * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm. - * @param values An array or iterable of Promises. + * @param values - An array or iterable of Promises. * @returns A new Promise. */ any(values: Iterable>): Promise> diff --git a/src/lib/es2021.string.d.ts b/src/lib/es2021.string.d.ts index 66971bf84d6cf..4b4ddbb0dbc08 100644 --- a/src/lib/es2021.string.d.ts +++ b/src/lib/es2021.string.d.ts @@ -1,15 +1,15 @@ interface String { /** * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + * @param searchValue - A string to search for. + * @param replaceValue - A string containing the text to replace for every successful match of searchValue in this string. */ replaceAll(searchValue: string | RegExp, replaceValue: string): string; /** * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. + * @param searchValue - A string to search for. + * @param replacer - A function that returns the replacement text. */ replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } diff --git a/src/lib/es2021.weakref.d.ts b/src/lib/es2021.weakref.d.ts index d36ddb6a19cfd..42f2cdc5244f5 100644 --- a/src/lib/es2021.weakref.d.ts +++ b/src/lib/es2021.weakref.d.ts @@ -13,7 +13,7 @@ interface WeakRefConstructor { /** * Creates a WeakRef instance for the given target object. - * @param target The target object for the WeakRef instance. + * @param target - The target object for the WeakRef instance. */ new(target: T): WeakRef; } @@ -25,10 +25,10 @@ interface FinalizationRegistry { /** * Registers an object with the registry. - * @param target The target object to register. - * @param heldValue The value to pass to the finalizer for this object. This cannot be the + * @param target - The target object to register. + * @param heldValue - The value to pass to the finalizer for this object. This cannot be the * target object. - * @param unregisterToken The token to pass to the unregister method to unregister the target + * @param unregisterToken - The token to pass to the unregister method to unregister the target * object. If provided (and not undefined), this must be an object. If not provided, the target * cannot be unregistered. */ @@ -36,7 +36,7 @@ interface FinalizationRegistry { /** * Unregisters an object from the registry. - * @param unregisterToken The token that was used as the unregisterToken argument when calling + * @param unregisterToken - The token that was used as the unregisterToken argument when calling * register to register the target object. */ unregister(unregisterToken: object): void; @@ -47,7 +47,7 @@ interface FinalizationRegistryConstructor { /** * Creates a finalization registry with an associated cleanup callback - * @param cleanupCallback The callback to call after an object in the registry has been reclaimed. + * @param cleanupCallback - The callback to call after an object in the registry has been reclaimed. */ new(cleanupCallback: (heldValue: T) => void): FinalizationRegistry; } diff --git a/src/lib/es2022.array.d.ts b/src/lib/es2022.array.d.ts index 68a797f8275d3..e76a023d614cb 100644 --- a/src/lib/es2022.array.d.ts +++ b/src/lib/es2022.array.d.ts @@ -1,7 +1,7 @@ interface Array { /** * 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. + * @param index - The zero-based index of the desired code unit. A negative index will count back from the last item. */ at(index: number): T | undefined; } @@ -9,7 +9,7 @@ interface Array { interface ReadonlyArray { /** * 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. + * @param index - The zero-based index of the desired code unit. A negative index will count back from the last item. */ at(index: number): T | undefined; } @@ -17,7 +17,7 @@ interface ReadonlyArray { interface Int8Array { /** * 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. + * @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; } @@ -25,7 +25,7 @@ interface Int8Array { interface Uint8Array { /** * 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. + * @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; } @@ -33,7 +33,7 @@ interface Uint8Array { interface Uint8ClampedArray { /** * 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. + * @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; } @@ -41,7 +41,7 @@ interface Uint8ClampedArray { interface Int16Array { /** * 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. + * @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; } @@ -49,7 +49,7 @@ interface Int16Array { interface Uint16Array { /** * 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. + * @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; } @@ -57,7 +57,7 @@ interface Uint16Array { interface Int32Array { /** * 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. + * @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; } @@ -65,7 +65,7 @@ interface Int32Array { interface Uint32Array { /** * 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. + * @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; } @@ -73,7 +73,7 @@ interface Uint32Array { interface Float32Array { /** * 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. + * @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; } @@ -81,7 +81,7 @@ interface Float32Array { interface Float64Array { /** * 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. + * @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; } @@ -89,7 +89,7 @@ interface Float64Array { interface BigInt64Array { /** * 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. + * @param index - The zero-based index of the desired code unit. A negative index will count back from the last item. */ at(index: number): bigint | undefined; } @@ -97,7 +97,7 @@ interface BigInt64Array { interface BigUint64Array { /** * 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. + * @param index - The zero-based index of the desired code unit. A negative index will count back from the last item. */ at(index: number): bigint | undefined; } diff --git a/src/lib/es2022.intl.d.ts b/src/lib/es2022.intl.d.ts index 0672ec4d2d4d4..2645af5ccb0ea 100644 --- a/src/lib/es2022.intl.d.ts +++ b/src/lib/es2022.intl.d.ts @@ -81,7 +81,7 @@ declare namespace Intl { * For the general form and interpretation of the `locales` argument, * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * @param options An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters). + * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters). * with some or all possible options. * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf) diff --git a/src/lib/es2022.object.d.ts b/src/lib/es2022.object.d.ts index 7325ef3c343e2..dd231be0a23d7 100644 --- a/src/lib/es2022.object.d.ts +++ b/src/lib/es2022.object.d.ts @@ -1,8 +1,8 @@ interface ObjectConstructor { /** * Determines whether an object has a property with the specified name. - * @param o An object. - * @param v A property name. + * @param o - An object. + * @param v - A property name. */ hasOwn(o: object, v: PropertyKey): boolean; } diff --git a/src/lib/es2022.string.d.ts b/src/lib/es2022.string.d.ts index 23f4a0123f269..5476e24de64b7 100644 --- a/src/lib/es2022.string.d.ts +++ b/src/lib/es2022.string.d.ts @@ -1,7 +1,7 @@ interface String { /** * Returns a new String consisting of the single UTF-16 code unit 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. + * @param index - The zero-based index of the desired code unit. A negative index will count back from the last item. */ at(index: number): string | undefined; } diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index f4b499cd81691..0bcc6d9467af1 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -7,14 +7,14 @@ declare var Infinity: number; /** * Evaluates JavaScript code and executes it. - * @param x A String value that contains valid JavaScript code. + * @param x - A String value that contains valid JavaScript code. */ declare function eval(x: string): any; /** * Converts a string to an integer. - * @param string A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in `string`. + * @param string - A string to convert into a number. + * @param radix - A value between 2 and 36 that specifies the base of the number in `string`. * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. * All other strings are considered decimal. */ @@ -22,57 +22,57 @@ declare function parseInt(string: string, radix?: number): number; /** * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. + * @param string - A string that contains a floating-point number. */ declare function parseFloat(string: string): number; /** * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). - * @param number A numeric value. + * @param number - A numeric value. */ declare function isNaN(number: number): boolean; /** * Determines whether a supplied number is finite. - * @param number Any numeric value. + * @param number - Any numeric value. */ declare function isFinite(number: number): boolean; /** * Gets the unencoded version of an encoded Uniform Resource Identifier (URI). - * @param encodedURI A value representing an encoded URI. + * @param encodedURI - A value representing an encoded URI. */ declare function decodeURI(encodedURI: string): string; /** * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI). - * @param encodedURIComponent A value representing an encoded URI component. + * @param encodedURIComponent - A value representing an encoded URI component. */ declare function decodeURIComponent(encodedURIComponent: string): string; /** * Encodes a text string as a valid Uniform Resource Identifier (URI) - * @param uri A value representing an unencoded URI. + * @param uri - A value representing an unencoded URI. */ declare function encodeURI(uri: string): string; /** * Encodes a text string as a valid component of a Uniform Resource Identifier (URI). - * @param uriComponent A value representing an unencoded URI component. + * @param uriComponent - A value representing an unencoded URI component. */ declare function encodeURIComponent(uriComponent: string | number | boolean): string; /** * Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence. * @deprecated A legacy feature for browser compatibility - * @param string A string value + * @param string - A string value */ declare function escape(string: string): string; /** * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents. * @deprecated A legacy feature for browser compatibility - * @param string A string value + * @param string - A string value */ declare function unescape(string: string): string; @@ -114,19 +114,19 @@ interface Object { /** * Determines whether an object has a property with the specified name. - * @param v A property name. + * @param v - A property name. */ hasOwnProperty(v: PropertyKey): boolean; /** * Determines whether an object exists in another object's prototype chain. - * @param v Another object whose prototype chain is to be checked. + * @param v - Another object whose prototype chain is to be checked. */ isPrototypeOf(v: Object): boolean; /** * Determines whether a specified property is enumerable. - * @param v A property name. + * @param v - A property name. */ propertyIsEnumerable(v: PropertyKey): boolean; } @@ -141,104 +141,104 @@ interface ObjectConstructor { /** * Returns the prototype of an object. - * @param o The object that references the prototype. + * @param o - The object that references the prototype. */ getPrototypeOf(o: any): any; /** * Gets the own property descriptor of the specified object. * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. + * @param o - Object that contains the property. + * @param p - Name of the property. */ getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; /** * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. - * @param o Object that contains the own properties. + * @param o - Object that contains the own properties. */ getOwnPropertyNames(o: any): string[]; /** * Creates an object that has the specified prototype or that has null prototype. - * @param o Object to use as a prototype. May be null. + * @param o - Object to use as a prototype. May be null. */ create(o: object | null): any; /** * Creates an object that has the specified prototype, and that optionally contains specified properties. - * @param o Object to use as a prototype. May be null - * @param properties JavaScript object that contains one or more property descriptors. + * @param o - Object to use as a prototype. May be null + * @param properties - JavaScript object that contains one or more property descriptors. */ create(o: object | null, properties: PropertyDescriptorMap & ThisType): any; /** * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. + * @param o - Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. + * @param p - The property name. + * @param attributes - Descriptor for the property. It can be for a data property or an accessor property. */ defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; /** * Adds one or more properties to an object, and/or modifies attributes of existing properties. - * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. - * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. + * @param o - Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. + * @param properties - JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. */ defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; /** * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. + * @param o - Object on which to lock the attributes. */ seal(o: T): T; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param f Object on which to lock the attributes. + * @param f - Object on which to lock the attributes. */ freeze(f: T): T; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. + * @param o - Object on which to lock the attributes. */ freeze(o: T): Readonly; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. + * @param o - Object on which to lock the attributes. */ freeze(o: T): Readonly; /** * Prevents the addition of new properties to an object. - * @param o Object to make non-extensible. + * @param o - Object to make non-extensible. */ preventExtensions(o: T): T; /** * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. - * @param o Object to test. + * @param o - Object to test. */ isSealed(o: any): boolean; /** * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. - * @param o Object to test. + * @param o - Object to test. */ isFrozen(o: any): boolean; /** * Returns a value that indicates whether new properties can be added to an object. - * @param o Object to test. + * @param o - Object to test. */ isExtensible(o: any): boolean; /** * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + * @param o - Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ keys(o: object): string[]; } @@ -254,23 +254,23 @@ declare var Object: ObjectConstructor; interface Function { /** * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. - * @param thisArg The object to be used as the this object. - * @param argArray A set of arguments to be passed to the function. + * @param thisArg - The object to be used as the this object. + * @param argArray - A set of arguments to be passed to the function. */ apply(this: Function, thisArg: any, argArray?: any): any; /** * Calls a method of an object, substituting another object for the current object. - * @param thisArg The object to be used as the current object. - * @param argArray A list of arguments to be passed to the method. + * @param thisArg - The object to be used as the current object. + * @param argArray - A list of arguments to be passed to the method. */ call(this: Function, thisArg: any, ...argArray: any[]): any; /** * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg An object to which the this keyword can refer inside the new function. - * @param argArray A list of arguments to be passed to the new function. + * @param thisArg - An object to which the this keyword can refer inside the new function. + * @param argArray - A list of arguments to be passed to the new function. */ bind(this: Function, thisArg: any, ...argArray: any[]): any; @@ -288,7 +288,7 @@ interface Function { interface FunctionConstructor { /** * Creates a new function. - * @param args A list of arguments the function accepts. + * @param args - A list of arguments the function accepts. */ new(...args: string[]): Function; (...args: string[]): Function; @@ -310,24 +310,24 @@ type OmitThisParameter = unknown extends ThisParameterType ? T : T extends interface CallableFunction extends Function { /** * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. + * @param thisArg - The object to be used as the this object. + * @param args - An array of argument values to be passed to the function. */ apply(this: (this: T) => R, thisArg: T): R; apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; /** * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. + * @param thisArg - The object to be used as the this object. + * @param args - Argument values to be passed to the function. */ call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; /** * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. + * @param thisArg - The object to be used as the this object. + * @param args - Arguments to bind to the parameters of the function. */ bind(this: T, thisArg: ThisParameterType): OmitThisParameter; bind(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; @@ -340,24 +340,24 @@ interface CallableFunction extends Function { interface NewableFunction extends Function { /** * Calls the function with the specified object as the this value and the elements of specified array as the arguments. - * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. + * @param thisArg - The object to be used as the this object. + * @param args - An array of argument values to be passed to the function. */ apply(this: new () => T, thisArg: T): void; apply(this: new (...args: A) => T, thisArg: T, args: A): void; /** * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. - * @param thisArg The object to be used as the this object. - * @param args Argument values to be passed to the function. + * @param thisArg - The object to be used as the this object. + * @param args - Argument values to be passed to the function. */ call(this: new (...args: A) => T, thisArg: T, ...args: A): void; /** * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. + * @param thisArg - The object to be used as the this object. + * @param args - Arguments to bind to the parameters of the function. */ bind(this: T, thisArg: any): T; bind(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; @@ -379,87 +379,87 @@ interface String { /** * Returns the character at the specified index. - * @param pos The zero-based index of the desired character. + * @param pos - The zero-based index of the desired character. */ charAt(pos: number): string; /** * Returns the Unicode value of the character at the specified location. - * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned. + * @param index - The zero-based index of the desired character. If there is no character at the specified index, NaN is returned. */ charCodeAt(index: number): number; /** * Returns a string that contains the concatenation of two or more strings. - * @param strings The strings to append to the end of the string. + * @param strings - The strings to append to the end of the string. */ concat(...strings: string[]): string; /** * Returns the position of the first occurrence of a substring. - * @param searchString The substring to search for in the string - * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. + * @param searchString - The substring to search for in the string + * @param position - The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. */ indexOf(searchString: string, position?: number): number; /** * Returns the last occurrence of a substring in the string. - * @param searchString The substring to search for. - * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. + * @param searchString - The substring to search for. + * @param position - The index at which to begin searching. If omitted, the search begins at the end of the string. */ lastIndexOf(searchString: string, position?: number): number; /** * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string + * @param that - String to compare to target string */ localeCompare(that: string): number; /** * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. + * @param regexp - A variable name or string literal containing the regular expression pattern and flags. */ match(regexp: string | RegExp): RegExpMatchArray | null; /** * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + * @param searchValue - A string to search for. + * @param replaceValue - A string containing the text to replace for every successful match of searchValue in this string. */ replace(searchValue: string | RegExp, replaceValue: string): string; /** * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replacer A function that returns the replacement text. + * @param searchValue - A string to search for. + * @param replacer - A function that returns the replacement text. */ replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; /** * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. + * @param regexp - The regular expression pattern and applicable flags. */ search(regexp: string | RegExp): number; /** * Returns a section of a string. - * @param start The index to the beginning of the specified portion of stringObj. - * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. + * @param start - The index to the beginning of the specified portion of stringObj. + * @param end - The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. * If this value is not specified, the substring continues to the end of stringObj. */ slice(start?: number, end?: number): string; /** * Split a string into substrings using the specified separator and return them as an array. - * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. + * @param separator - A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. + * @param limit - A value used to limit the number of elements returned in the array. */ split(separator: string | RegExp, limit?: number): string[]; /** * Returns the substring at the specified location within a String object. - * @param start The zero-based index number indicating the beginning of the substring. - * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. + * @param start - The zero-based index number indicating the beginning of the substring. + * @param end - Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. * If end is omitted, the characters from start through the end of the original string are returned. */ substring(start: number, end?: number): string; @@ -486,8 +486,8 @@ interface String { /** * Gets a substring beginning at the specified location and having the specified length. * @deprecated A legacy feature for browser compatibility - * @param from The starting position of the desired substring. The index of the first character in the string is zero. - * @param length The number of characters to include in the returned substring. + * @param from - The starting position of the desired substring. The index of the first character in the string is zero. + * @param length - The number of characters to include in the returned substring. */ substr(from: number, length?: number): string; @@ -525,25 +525,25 @@ declare var Boolean: BooleanConstructor; interface Number { /** * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. + * @param radix - Specifies a radix for converting numeric values to strings. This value is only used for numbers. */ toString(radix?: number): string; /** * Returns a string representing a number in fixed-point notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. + * @param fractionDigits - Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. */ toFixed(fractionDigits?: number): string; /** * Returns a string containing a number represented in exponential notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. + * @param fractionDigits - Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. */ toExponential(fractionDigits?: number): string; /** * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. - * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive. + * @param precision - Number of significant digits. Must be in the range 1 - 21, inclusive. */ toPrecision(precision?: number): string; @@ -634,91 +634,91 @@ interface Math { /** * Returns the absolute value of a number (the value without regard to whether it is positive or negative). * For example, the absolute value of -5 is the same as the absolute value of 5. - * @param x A numeric expression for which the absolute value is needed. + * @param x - A numeric expression for which the absolute value is needed. */ abs(x: number): number; /** * Returns the arc cosine (or inverse cosine) of a number. - * @param x A numeric expression. + * @param x - A numeric expression. */ acos(x: number): number; /** * Returns the arcsine of a number. - * @param x A numeric expression. + * @param x - A numeric expression. */ asin(x: number): number; /** * Returns the arctangent of a number. - * @param x A numeric expression for which the arctangent is needed. + * @param x - A numeric expression for which the arctangent is needed. */ atan(x: number): number; /** * Returns the angle (in radians) from the X axis to a point. - * @param y A numeric expression representing the cartesian y-coordinate. - * @param x A numeric expression representing the cartesian x-coordinate. + * @param y - A numeric expression representing the cartesian y-coordinate. + * @param x - A numeric expression representing the cartesian x-coordinate. */ atan2(y: number, x: number): number; /** * Returns the smallest integer greater than or equal to its numeric argument. - * @param x A numeric expression. + * @param x - A numeric expression. */ ceil(x: number): number; /** * Returns the cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. + * @param x - A numeric expression that contains an angle measured in radians. */ cos(x: number): number; /** * Returns e (the base of natural logarithms) raised to a power. - * @param x A numeric expression representing the power of e. + * @param x - A numeric expression representing the power of e. */ exp(x: number): number; /** * Returns the greatest integer less than or equal to its numeric argument. - * @param x A numeric expression. + * @param x - A numeric expression. */ floor(x: number): number; /** * Returns the natural logarithm (base e) of a number. - * @param x A numeric expression. + * @param x - A numeric expression. */ log(x: number): number; /** * Returns the larger of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. + * @param values - Numeric expressions to be evaluated. */ max(...values: number[]): number; /** * Returns the smaller of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. + * @param values - Numeric expressions to be evaluated. */ min(...values: number[]): number; /** * Returns the value of a base expression taken to a specified power. - * @param x The base value of the expression. - * @param y The exponent value of the expression. + * @param x - The base value of the expression. + * @param y - The exponent value of the expression. */ pow(x: number, y: number): number; /** Returns a pseudorandom number between 0 and 1. */ random(): number; /** * Returns a supplied numeric expression rounded to the nearest integer. - * @param x The value to be rounded to the nearest integer. + * @param x - The value to be rounded to the nearest integer. */ round(x: number): number; /** * Returns the sine of a number. - * @param x A numeric expression that contains an angle measured in radians. + * @param x - A numeric expression that contains an angle measured in radians. */ sin(x: number): number; /** * Returns the square root of a number. - * @param x A numeric expression. + * @param x - A numeric expression. */ sqrt(x: number): number; /** * Returns the tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. + * @param x - A numeric expression that contains an angle measured in radians. */ tan(x: number): number; } @@ -779,96 +779,96 @@ interface Date { getTimezoneOffset(): number; /** * Sets the date and time value in the Date object. - * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. + * @param time - A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. */ setTime(time: number): number; /** * Sets the milliseconds value in the Date object using local time. - * @param ms A numeric value equal to the millisecond value. + * @param ms - A numeric value equal to the millisecond value. */ setMilliseconds(ms: number): number; /** * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). - * @param ms A numeric value equal to the millisecond value. + * @param ms - A numeric value equal to the millisecond value. */ setUTCMilliseconds(ms: number): number; /** * Sets the seconds value in the Date object using local time. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. + * @param sec - A numeric value equal to the seconds value. + * @param ms - A numeric value equal to the milliseconds value. */ setSeconds(sec: number, ms?: number): number; /** * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. + * @param sec - A numeric value equal to the seconds value. + * @param ms - A numeric value equal to the milliseconds value. */ setUTCSeconds(sec: number, ms?: number): number; /** * Sets the minutes value in the Date object using local time. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. + * @param min - A numeric value equal to the minutes value. + * @param sec - A numeric value equal to the seconds value. + * @param ms - A numeric value equal to the milliseconds value. */ setMinutes(min: number, sec?: number, ms?: number): number; /** * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. + * @param min - A numeric value equal to the minutes value. + * @param sec - A numeric value equal to the seconds value. + * @param ms - A numeric value equal to the milliseconds value. */ setUTCMinutes(min: number, sec?: number, ms?: number): number; /** * Sets the hour value in the Date object using local time. - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. + * @param hours - A numeric value equal to the hours value. + * @param min - A numeric value equal to the minutes value. + * @param sec - A numeric value equal to the seconds value. + * @param ms - A numeric value equal to the milliseconds value. */ setHours(hours: number, min?: number, sec?: number, ms?: number): number; /** * Sets the hours value in the Date object using Universal Coordinated Time (UTC). - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. + * @param hours - A numeric value equal to the hours value. + * @param min - A numeric value equal to the minutes value. + * @param sec - A numeric value equal to the seconds value. + * @param ms - A numeric value equal to the milliseconds value. */ setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; /** * Sets the numeric day-of-the-month value of the Date object using local time. - * @param date A numeric value equal to the day of the month. + * @param date - A numeric value equal to the day of the month. */ setDate(date: number): number; /** * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). - * @param date A numeric value equal to the day of the month. + * @param date - A numeric value equal to the day of the month. */ setUTCDate(date: number): number; /** * Sets the month value in the Date object using local time. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. + * @param month - A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date - A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. */ setMonth(month: number, date?: number): number; /** * Sets the month value in the Date object using Universal Coordinated Time (UTC). - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. + * @param month - A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. + * @param date - A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. */ setUTCMonth(month: number, date?: number): number; /** * Sets the year of the Date object using local time. - * @param year A numeric value for the year. - * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. - * @param date A numeric value equal for the day of the month. + * @param year - A numeric value for the year. + * @param month - A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. + * @param date - A numeric value equal for the day of the month. */ setFullYear(year: number, month?: number, date?: number): number; /** * Sets the year value in the Date object using Universal Coordinated Time (UTC). - * @param year A numeric value equal to the year. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. - * @param date A numeric value equal to the day of the month. + * @param year - A numeric value equal to the year. + * @param month - A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. + * @param date - A numeric value equal to the day of the month. */ setUTCFullYear(year: number, month?: number, date?: number): number; /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ @@ -884,31 +884,31 @@ interface DateConstructor { new(value: number | string): Date; /** * Creates a new Date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. + * @param year - The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex - The month as a number between 0 and 11 (January to December). + * @param date - The date as a number between 1 and 31. + * @param hours - Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes - Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds - Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms - A number from 0 to 999 that specifies the milliseconds. */ new(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; (): string; readonly prototype: Date; /** * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param s A date string + * @param s - A date string */ parse(s: string): number; /** * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param monthIndex The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. + * @param year - The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex - The month as a number between 0 and 11 (January to December). + * @param date - The date as a number between 1 and 31. + * @param hours - Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes - Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds - Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms - A number from 0 to 999 that specifies the milliseconds. */ UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; @@ -945,13 +945,13 @@ interface RegExpExecArray extends Array { interface RegExp { /** * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. - * @param string The String object or string literal on which to perform the search. + * @param string - The String object or string literal on which to perform the search. */ exec(string: string): RegExpExecArray | null; /** * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. - * @param string String on which to perform the search. + * @param string - String on which to perform the search. */ test(string: string): boolean; @@ -1107,23 +1107,23 @@ declare var URIError: URIErrorConstructor; interface JSON { /** * Converts a JavaScript Object Notation (JSON) string into an object. - * @param text A valid JSON string. - * @param reviver A function that transforms the results. This function is called for each member of the object. + * @param text - A valid JSON string. + * @param reviver - A function that transforms the results. This function is called for each member of the object. * If a member contains nested objects, the nested objects are transformed before the parent object is. */ parse(text: string, reviver?: (this: any, key: string, value: any) => any): any; /** * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @param value - A JavaScript value, usually an object or array, to be converted. + * @param replacer - A function that transforms the results. + * @param space - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. */ stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; /** * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. + * @param value - A JavaScript value, usually an object or array, to be converted. + * @param replacer - An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified. + * @param space - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. */ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; } @@ -1153,112 +1153,112 @@ interface ReadonlyArray { toLocaleString(): string; /** * Combines two or more arrays. - * @param items Additional items to add to the end of array1. + * @param items - Additional items to add to the end of array1. */ concat(...items: ConcatArray[]): T[]; /** * Combines two or more arrays. - * @param items Additional items to add to the end of array1. + * @param items - Additional items to add to the end of array1. */ concat(...items: (T | ConcatArray)[]): T[]; /** * 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. + * @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 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'. + * @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): T[]; /** * 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. + * @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: T, fromIndex?: number): number; /** * Returns the index of the last occurrence of a specified 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 the last index in the 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 the last index in the array. */ lastIndexOf(searchElement: T, fromIndex?: number): number; /** * 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 + * @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. + * @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: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; /** * 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 + * @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. + * @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: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; /** * 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 + * @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. + * @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: 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; /** * 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. + * @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: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; /** * 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. + * @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: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; /** * 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. + * @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: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; /** * 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. + * @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: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; /** * 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. + * @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: T, currentIndex: number, array: readonly T[]) => 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. + * @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: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; /** * 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. + * @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: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; @@ -1292,24 +1292,24 @@ interface Array { pop(): T | undefined; /** * Appends new elements to the end of an array, and returns the new length of the array. - * @param items New elements to add to the array. + * @param items - New elements to add to the array. */ push(...items: T[]): number; /** * Combines two or more arrays. * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. + * @param items - Additional arrays and/or items to add to the end of the array. */ concat(...items: ConcatArray[]): T[]; /** * Combines two or more arrays. * This method returns a new array without modifying any existing arrays. - * @param items Additional arrays and/or items to add to the end of the array. + * @param items - Additional arrays and/or items to add to the end of the array. */ concat(...items: (T | ConcatArray)[]): T[]; /** * Adds all the elements of an array into a string, separated by the specified separator string. - * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. + * @param separator - A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. */ join(separator?: string): string; /** @@ -1326,16 +1326,16 @@ interface Array { * Returns a copy of a section of an array. * For both start and end, a negative index can be used to indicate an offset from the end of the array. * For example, -2 refers to the second to last element of the array. - * @param start The beginning index of the specified portion of the array. + * @param start - The beginning index of the specified portion of the array. * If start is undefined, then the slice begins at index 0. - * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. + * @param end - The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. * If end is undefined, then the slice extends to the end of the array. */ slice(start?: number, end?: number): T[]; /** * Sorts an array in place. * 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 + * @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. * ```ts @@ -1345,111 +1345,111 @@ interface Array { sort(compareFn?: (a: T, b: T) => number): this; /** * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. + * @param start - The zero-based location in the array from which to start removing elements. + * @param deleteCount - The number of elements to remove. * @returns An array containing the elements that were deleted. */ splice(start: number, deleteCount?: number): T[]; /** * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. - * @param deleteCount The number of elements to remove. - * @param items Elements to insert into the array in place of the deleted elements. + * @param start - The zero-based location in the array from which to start removing elements. + * @param deleteCount - The number of elements to remove. + * @param items - Elements to insert into the array in place of the deleted elements. * @returns An array containing the elements that were deleted. */ splice(start: number, deleteCount: number, ...items: T[]): T[]; /** * Inserts new elements at the start of an array, and returns the new length of the array. - * @param items Elements to insert at the start of the array. + * @param items - Elements to insert at the start of the array. */ unshift(...items: T[]): number; /** * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. - * @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. + * @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: T, fromIndex?: number): number; /** * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. + * @param searchElement - The value to locate in the array. + * @param fromIndex - The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. */ lastIndexOf(searchElement: T, fromIndex?: number): number; /** * 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 + * @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. + * @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: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; /** * 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 + * @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. + * @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: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; /** * 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 + * @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. + * @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: 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; /** * 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. + * @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: T, index: number, array: T[]) => U, thisArg?: any): U[]; /** * 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. + * @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: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; /** * 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. + * @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: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; /** * 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. + * @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: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; /** * 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. + * @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: T, currentIndex: number, array: T[]) => 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. + * @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: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; /** * 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. + * @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: T, currentIndex: number, array: T[]) => U, initialValue: U): U; @@ -1488,8 +1488,8 @@ declare type PromiseConstructorLike = new (executor: (resolve: (value: T | Pr interface PromiseLike { /** * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. + * @param onfulfilled - The callback to execute when the Promise is resolved. + * @param onrejected - The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; @@ -1501,15 +1501,15 @@ interface PromiseLike { interface Promise { /** * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. + * @param onfulfilled - The callback to execute when the Promise is resolved. + * @param onrejected - The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; /** * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. + * @param onrejected - The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; @@ -1688,123 +1688,123 @@ interface DataView { /** * Gets the Float32 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. + * @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. */ getFloat32(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Float64 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. + * @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. */ getFloat64(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Int8 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 byteOffset - The place in the buffer at which the value should be retrieved. */ getInt8(byteOffset: number): number; /** * Gets the Int16 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. + * @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. */ getInt16(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Int32 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. + * @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. */ getInt32(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Uint8 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 byteOffset - The place in the buffer at which the value should be retrieved. */ getUint8(byteOffset: number): number; /** * Gets the Uint16 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. + * @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. */ getUint16(byteOffset: number, littleEndian?: boolean): number; /** * Gets the Uint32 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. + * @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. */ getUint32(byteOffset: number, littleEndian?: boolean): number; /** * Stores an Float32 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. + * @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. */ setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; /** * Stores an Float64 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. + * @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. */ setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; /** * Stores an Int8 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 byteOffset - The place in the buffer at which the value should be set. + * @param value - The value to set. */ setInt8(byteOffset: number, value: number): void; /** * Stores an Int16 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. + * @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. */ setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; /** * Stores an Int32 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. + * @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. */ setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; /** * Stores an Uint8 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 byteOffset - The place in the buffer at which the value should be set. + * @param value - The value to set. */ setUint8(byteOffset: number, value: number): void; /** * Stores an Uint16 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. + * @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. */ setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; /** * Stores an Uint32 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. + * @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. */ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; } @@ -1843,39 +1843,39 @@ interface Int8Array { /** * 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 + * @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 + * @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. + * @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 + * @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. + * @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: Int8Array) => 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 + * @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 + * @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 + * @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. + * @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: Int8Array) => any, thisArg?: any): Int8Array; @@ -1883,10 +1883,10 @@ interface Int8Array { /** * 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 + * @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 + * @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: Int8Array) => boolean, thisArg?: any): number | undefined; @@ -1894,42 +1894,42 @@ interface Int8Array { /** * 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 + * @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 + * @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: Int8Array) => boolean, 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 + * @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: Int8Array) => void, thisArg?: any): void; /** * 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 + * @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 + * @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 + * @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; @@ -1942,9 +1942,9 @@ interface Int8Array { /** * 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 + * @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. + * @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: Int8Array) => number, thisArg?: any): Int8Array; @@ -1953,9 +1953,9 @@ interface Int8Array { * 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 + * @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 + * @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. */ @@ -1966,9 +1966,9 @@ interface Int8Array { * 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 + * @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 + * @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. */ @@ -1978,9 +1978,9 @@ interface Int8Array { * 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 + * @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 + * @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. */ @@ -1991,9 +1991,9 @@ interface Int8Array { * 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 + * @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 + * @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. */ @@ -2006,31 +2006,31 @@ interface Int8Array { /** * 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. + * @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'. + * @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): Int8Array; /** * 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 + * @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. + * @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: Int8Array) => unknown, thisArg?: any): boolean; /** * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return + * @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 @@ -2042,8 +2042,8 @@ interface Int8Array { /** * Gets a new Int8Array 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. + * @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): Int8Array; @@ -2075,21 +2075,21 @@ interface Int8ArrayConstructor { /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: number[]): 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 or iterable 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 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 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. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; @@ -2125,39 +2125,39 @@ interface Uint8Array { /** * 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 + * @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 + * @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. + * @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 + * @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. + * @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: Uint8Array) => 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 + * @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 + * @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 + * @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. + * @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: Uint8Array) => any, thisArg?: any): Uint8Array; @@ -2165,10 +2165,10 @@ interface Uint8Array { /** * 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 + * @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 + * @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: Uint8Array) => boolean, thisArg?: any): number | undefined; @@ -2176,42 +2176,42 @@ interface Uint8Array { /** * 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 + * @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 + * @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: Uint8Array) => boolean, 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 + * @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: Uint8Array) => void, thisArg?: any): void; /** * 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 + * @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 + * @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 + * @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; @@ -2224,9 +2224,9 @@ interface Uint8Array { /** * 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 + * @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. + * @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: Uint8Array) => number, thisArg?: any): Uint8Array; @@ -2235,9 +2235,9 @@ interface Uint8Array { * 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 + * @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 + * @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. */ @@ -2248,9 +2248,9 @@ interface Uint8Array { * 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 + * @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 + * @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. */ @@ -2260,9 +2260,9 @@ interface Uint8Array { * 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 + * @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 + * @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. */ @@ -2273,9 +2273,9 @@ interface Uint8Array { * 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 + * @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 + * @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. */ @@ -2288,31 +2288,31 @@ interface Uint8Array { /** * 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. + * @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'. + * @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): Uint8Array; /** * 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 + * @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. + * @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: Uint8Array) => unknown, thisArg?: any): boolean; /** * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return + * @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 @@ -2324,8 +2324,8 @@ interface Uint8Array { /** * Gets a new Uint8Array 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. + * @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): Uint8Array; @@ -2358,21 +2358,21 @@ interface Uint8ArrayConstructor { /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: number[]): 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 or iterable 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 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 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. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; @@ -2407,39 +2407,39 @@ interface Uint8ClampedArray { /** * 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 + * @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 + * @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. + * @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 + * @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. + * @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: Uint8ClampedArray) => 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 + * @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 + * @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 + * @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. + * @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: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray; @@ -2447,10 +2447,10 @@ interface Uint8ClampedArray { /** * 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 + * @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 + * @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: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined; @@ -2458,42 +2458,42 @@ interface Uint8ClampedArray { /** * 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 + * @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 + * @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: Uint8ClampedArray) => boolean, 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 + * @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: Uint8ClampedArray) => void, thisArg?: any): void; /** * 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 + * @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 + * @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 + * @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; @@ -2506,9 +2506,9 @@ interface Uint8ClampedArray { /** * 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 + * @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. + * @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: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray; @@ -2517,9 +2517,9 @@ interface Uint8ClampedArray { * 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 + * @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 + * @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. */ @@ -2530,9 +2530,9 @@ interface Uint8ClampedArray { * 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 + * @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 + * @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. */ @@ -2542,9 +2542,9 @@ interface Uint8ClampedArray { * 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 + * @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 + * @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. */ @@ -2555,9 +2555,9 @@ interface Uint8ClampedArray { * 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 + * @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 + * @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. */ @@ -2570,31 +2570,31 @@ interface Uint8ClampedArray { /** * 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. + * @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'. + * @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): Uint8ClampedArray; /** * 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 + * @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. + * @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: Uint8ClampedArray) => unknown, thisArg?: any): boolean; /** * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return + * @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 @@ -2606,8 +2606,8 @@ interface Uint8ClampedArray { /** * Gets a new Uint8ClampedArray 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. + * @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): Uint8ClampedArray; @@ -2640,21 +2640,21 @@ interface Uint8ClampedArrayConstructor { /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: number[]): 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 or iterable 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 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 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. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } @@ -2688,39 +2688,39 @@ interface Int16Array { /** * 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 + * @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 + * @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. + * @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 + * @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. + * @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: Int16Array) => 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 + * @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 + * @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 + * @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. + * @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: Int16Array) => any, thisArg?: any): Int16Array; @@ -2728,10 +2728,10 @@ interface Int16Array { /** * 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 + * @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 + * @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: Int16Array) => boolean, thisArg?: any): number | undefined; @@ -2739,41 +2739,41 @@ interface Int16Array { /** * 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 + * @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 + * @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: Int16Array) => boolean, 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 + * @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: Int16Array) => void, thisArg?: any): void; /** * 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 + * @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 + * @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 + * @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; @@ -2786,9 +2786,9 @@ interface Int16Array { /** * 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 + * @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. + * @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: Int16Array) => number, thisArg?: any): Int16Array; @@ -2797,9 +2797,9 @@ interface Int16Array { * 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 + * @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 + * @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. */ @@ -2810,9 +2810,9 @@ interface Int16Array { * 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 + * @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 + * @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. */ @@ -2822,9 +2822,9 @@ interface Int16Array { * 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 + * @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 + * @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. */ @@ -2835,9 +2835,9 @@ interface Int16Array { * 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 + * @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 + * @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. */ @@ -2850,31 +2850,31 @@ interface Int16Array { /** * 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. + * @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'. + * @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): Int16Array; /** * 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 + * @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. + * @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: Int16Array) => unknown, thisArg?: any): boolean; /** * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return + * @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 @@ -2886,8 +2886,8 @@ interface Int16Array { /** * Gets a new Int16Array 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. + * @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): Int16Array; @@ -2920,21 +2920,21 @@ interface Int16ArrayConstructor { /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: number[]): 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 or iterable 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 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 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. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; @@ -2970,39 +2970,39 @@ interface Uint16Array { /** * 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 + * @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 + * @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. + * @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 + * @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. + * @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: Uint16Array) => 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 + * @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 + * @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 + * @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. + * @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: Uint16Array) => any, thisArg?: any): Uint16Array; @@ -3010,10 +3010,10 @@ interface Uint16Array { /** * 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 + * @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 + * @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: Uint16Array) => boolean, thisArg?: any): number | undefined; @@ -3021,42 +3021,42 @@ interface Uint16Array { /** * 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 + * @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 + * @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: Uint16Array) => boolean, 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 + * @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: Uint16Array) => void, thisArg?: any): void; /** * 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 + * @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 + * @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 + * @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; @@ -3069,9 +3069,9 @@ interface Uint16Array { /** * 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 + * @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. + * @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: Uint16Array) => number, thisArg?: any): Uint16Array; @@ -3080,9 +3080,9 @@ interface Uint16Array { * 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 + * @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 + * @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. */ @@ -3093,9 +3093,9 @@ interface Uint16Array { * 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 + * @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 + * @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. */ @@ -3105,9 +3105,9 @@ interface Uint16Array { * 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 + * @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 + * @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. */ @@ -3118,9 +3118,9 @@ interface Uint16Array { * 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 + * @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 + * @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. */ @@ -3133,31 +3133,31 @@ interface Uint16Array { /** * 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. + * @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'. + * @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): Uint16Array; /** * 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 + * @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. + * @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: Uint16Array) => unknown, thisArg?: any): boolean; /** * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return + * @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 @@ -3169,8 +3169,8 @@ interface Uint16Array { /** * Gets a new Uint16Array 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. + * @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): Uint16Array; @@ -3203,21 +3203,21 @@ interface Uint16ArrayConstructor { /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: number[]): 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 or iterable 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 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 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. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; @@ -3252,39 +3252,39 @@ interface Int32Array { /** * 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 + * @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 + * @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. + * @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 + * @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. + * @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: Int32Array) => 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 + * @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 + * @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 + * @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. + * @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: Int32Array) => any, thisArg?: any): Int32Array; @@ -3292,10 +3292,10 @@ interface Int32Array { /** * 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 + * @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 + * @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: Int32Array) => boolean, thisArg?: any): number | undefined; @@ -3303,42 +3303,42 @@ interface Int32Array { /** * 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 + * @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 + * @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: Int32Array) => boolean, 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 + * @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: Int32Array) => void, thisArg?: any): void; /** * 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 + * @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 + * @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 + * @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; @@ -3351,9 +3351,9 @@ interface Int32Array { /** * 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 + * @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. + * @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: Int32Array) => number, thisArg?: any): Int32Array; @@ -3362,9 +3362,9 @@ interface Int32Array { * 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 + * @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 + * @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. */ @@ -3375,9 +3375,9 @@ interface Int32Array { * 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 + * @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 + * @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. */ @@ -3387,9 +3387,9 @@ interface Int32Array { * 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 + * @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 + * @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. */ @@ -3400,9 +3400,9 @@ interface Int32Array { * 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 + * @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 + * @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. */ @@ -3415,31 +3415,31 @@ interface Int32Array { /** * 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. + * @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'. + * @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): Int32Array; /** * 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 + * @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. + * @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: Int32Array) => unknown, thisArg?: any): boolean; /** * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return + * @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 @@ -3451,8 +3451,8 @@ interface Int32Array { /** * Gets a new Int32Array 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. + * @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): Int32Array; @@ -3485,21 +3485,21 @@ interface Int32ArrayConstructor { /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: number[]): 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 or iterable 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 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 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. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; @@ -3534,39 +3534,39 @@ interface Uint32Array { /** * 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 + * @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 + * @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. + * @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 + * @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. + * @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: Uint32Array) => 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 + * @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 + * @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 + * @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. + * @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: Uint32Array) => any, thisArg?: any): Uint32Array; @@ -3574,10 +3574,10 @@ interface Uint32Array { /** * 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 + * @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 + * @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: Uint32Array) => boolean, thisArg?: any): number | undefined; @@ -3585,41 +3585,41 @@ interface Uint32Array { /** * 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 + * @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 + * @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: Uint32Array) => boolean, 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 + * @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: Uint32Array) => void, thisArg?: any): void; /** * 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 + * @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 + * @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 + * @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; @@ -3632,9 +3632,9 @@ interface Uint32Array { /** * 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 + * @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. + * @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: Uint32Array) => number, thisArg?: any): Uint32Array; @@ -3643,9 +3643,9 @@ interface Uint32Array { * 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 + * @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 + * @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. */ @@ -3656,9 +3656,9 @@ interface Uint32Array { * 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 + * @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 + * @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. */ @@ -3668,9 +3668,9 @@ interface Uint32Array { * 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 + * @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 + * @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. */ @@ -3681,9 +3681,9 @@ interface Uint32Array { * 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 + * @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 + * @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. */ @@ -3696,31 +3696,31 @@ interface Uint32Array { /** * 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. + * @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'. + * @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): Uint32Array; /** * 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 + * @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. + * @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: Uint32Array) => unknown, thisArg?: any): boolean; /** * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return + * @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 @@ -3732,8 +3732,8 @@ interface Uint32Array { /** * Gets a new Uint32Array 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. + * @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): Uint32Array; @@ -3766,21 +3766,21 @@ interface Uint32ArrayConstructor { /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: number[]): 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 or iterable 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 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 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. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; @@ -3815,39 +3815,39 @@ interface Float32Array { /** * 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 + * @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 + * @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. + * @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 + * @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. + * @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: Float32Array) => 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 + * @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 + * @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 + * @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. + * @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: Float32Array) => any, thisArg?: any): Float32Array; @@ -3855,10 +3855,10 @@ interface Float32Array { /** * 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 + * @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 + * @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: Float32Array) => boolean, thisArg?: any): number | undefined; @@ -3866,42 +3866,42 @@ interface Float32Array { /** * 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 + * @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 + * @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: Float32Array) => boolean, 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 + * @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: Float32Array) => void, thisArg?: any): void; /** * 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 + * @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 + * @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 + * @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; @@ -3914,9 +3914,9 @@ interface Float32Array { /** * 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 + * @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. + * @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: Float32Array) => number, thisArg?: any): Float32Array; @@ -3925,9 +3925,9 @@ interface Float32Array { * 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 + * @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 + * @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. */ @@ -3938,9 +3938,9 @@ interface Float32Array { * 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 + * @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 + * @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. */ @@ -3950,9 +3950,9 @@ interface Float32Array { * 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 + * @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 + * @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. */ @@ -3963,9 +3963,9 @@ interface Float32Array { * 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 + * @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 + * @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. */ @@ -3978,31 +3978,31 @@ interface Float32Array { /** * 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. + * @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'. + * @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): Float32Array; /** * 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 + * @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. + * @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: Float32Array) => unknown, thisArg?: any): boolean; /** * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return + * @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 @@ -4014,8 +4014,8 @@ interface Float32Array { /** * Gets a new Float32Array 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. + * @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): Float32Array; @@ -4048,21 +4048,21 @@ interface Float32ArrayConstructor { /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: number[]): 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 or iterable 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 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 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. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; @@ -4098,39 +4098,39 @@ interface Float64Array { /** * 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 + * @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 + * @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. + * @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 + * @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. + * @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: Float64Array) => 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 + * @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 + * @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 + * @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. + * @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: Float64Array) => any, thisArg?: any): Float64Array; @@ -4138,10 +4138,10 @@ interface Float64Array { /** * 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 + * @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 + * @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: Float64Array) => boolean, thisArg?: any): number | undefined; @@ -4149,42 +4149,42 @@ interface Float64Array { /** * 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 + * @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 + * @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: Float64Array) => boolean, 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 + * @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: Float64Array) => void, thisArg?: any): void; /** * 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 + * @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 + * @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 + * @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; @@ -4197,9 +4197,9 @@ interface Float64Array { /** * 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 + * @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. + * @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: Float64Array) => number, thisArg?: any): Float64Array; @@ -4208,9 +4208,9 @@ interface Float64Array { * 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 + * @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 + * @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. */ @@ -4221,9 +4221,9 @@ interface Float64Array { * 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 + * @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 + * @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. */ @@ -4233,9 +4233,9 @@ interface Float64Array { * 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 + * @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 + * @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. */ @@ -4246,9 +4246,9 @@ interface Float64Array { * 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 + * @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 + * @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. */ @@ -4261,31 +4261,31 @@ interface Float64Array { /** * 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. + * @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'. + * @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): Float64Array; /** * 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 + * @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. + * @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: Float64Array) => unknown, thisArg?: any): boolean; /** * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return + * @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 @@ -4296,8 +4296,8 @@ interface Float64Array { /** * 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. + * @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): Float64Array; @@ -4322,21 +4322,21 @@ interface Float64ArrayConstructor { /** * Returns a new array from a set of elements. - * @param items A set of elements to include in the new array object. + * @param items - A set of elements to include in the new array object. */ of(...items: number[]): 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 or iterable 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 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 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. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; @@ -4462,9 +4462,9 @@ declare namespace Intl { interface String { /** * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. + * @param that - String to compare to target string + * @param locales - A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. + * @param options - An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. */ localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; } @@ -4472,8 +4472,8 @@ interface String { interface Number { /** * Converts a number to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. + * @param locales - A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options - An object that contains one or more properties that specify comparison options. */ toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string; } @@ -4481,21 +4481,21 @@ interface Number { interface Date { /** * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. + * @param locales - A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options - An object that contains one or more properties that specify comparison options. */ toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; /** * Converts a date to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. + * @param locales - A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options - An object that contains one or more properties that specify comparison options. */ toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; /** * Converts a time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. + * @param locales - A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. + * @param options - An object that contains one or more properties that specify comparison options. */ toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string; } diff --git a/src/lib/scripthost.d.ts b/src/lib/scripthost.d.ts index c3ac4a7e6560f..ec7ff9a50cc40 100644 --- a/src/lib/scripthost.d.ts +++ b/src/lib/scripthost.d.ts @@ -76,7 +76,7 @@ interface TextStreamReader extends TextStreamBase { /** * Skips a specified number of characters when reading from an input text stream. * Can only be used on a stream in reading mode; causes an error in writing or appending mode. - * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.) + * @param characters - Positive number of characters to skip forward. (Backward skipping is not supported.) */ Skip(characters: number): void; @@ -175,8 +175,8 @@ declare var WScript: { /** * Creates a COM object. - * @param strProgiID - * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events. + * @param strProgID - + * @param strPrefix - Function names in the form prefix_event will be bound to this object's COM events. */ CreateObject(strProgID: string, strPrefix?: string): any; @@ -187,16 +187,16 @@ declare var WScript: { /** * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file. - * @param strPathname Fully qualified path to the file containing the object persisted to disk. + * @param strPathname - Fully qualified path to the file containing the object persisted to disk. * For objects in memory, pass a zero-length string. - * @param strProgID - * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events. + * @param strProgID - + * @param strPrefix - Function names in the form prefix_event will be bound to this object's COM events. */ GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any; /** * Suspends script execution for a specified length of time, then continues execution. - * @param intTime Interval (in milliseconds) to suspend script execution. + * @param intTime - Interval (in milliseconds) to suspend script execution. */ Sleep(intTime: number): void; }; @@ -266,13 +266,13 @@ interface VBArray { /** * Returns the smallest available index for a given dimension. - * @param dimension 1-based dimension (defaults to 1) + * @param dimension - 1-based dimension (defaults to 1) */ lbound(dimension?: number): number; /** * Returns the largest available index for a given dimension. - * @param dimension 1-based dimension (defaults to 1) + * @param dimension - 1-based dimension (defaults to 1) */ ubound(dimension?: number): number; diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 3ab9f02741cc1..f7cd769115b9a 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -1548,7 +1548,7 @@ namespace ts.server { /** * Remove this file from the set of open, non-configured files. - * @param info The file that has been closed or newly configured + * @param info - The file that has been closed or newly configured */ private closeOpenFile(info: ScriptInfo, skipAssignOrphanScriptInfosToInferredProject?: true) { // Closing file should trigger re-reading the file content from disk. This is @@ -3226,8 +3226,8 @@ namespace ts.server { /** * Open file whose contents is managed by the client - * @param filename is absolute pathname - * @param fileContent is a known version of the file content that is more up to date than the one on disk + * @param filename - is absolute pathname + * @param fileContent - is a known version of the file content that is more up to date than the one on disk */ openClientFile(fileName: string, fileContent?: string, scriptKind?: ScriptKind, projectRootPath?: string): OpenConfiguredProjectResult { return this.openClientFileWithNormalizedPath(toNormalizedPath(fileName), fileContent, scriptKind, /*hasMixedContent*/ false, projectRootPath ? toNormalizedPath(projectRootPath) : undefined); @@ -3660,7 +3660,7 @@ namespace ts.server { /** * Close file whose contents is managed by the client - * @param filename is absolute pathname + * @param filename - is absolute pathname */ closeClientFile(uncheckedFileName: string): void; /*@internal*/ diff --git a/src/server/project.ts b/src/server/project.ts index 43b1c7128e005..75ab199ea4c27 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -1092,7 +1092,7 @@ namespace ts.server { /** * Updates set of files that contribute to this project - * @returns: true if set of files in the project stays the same and false - otherwise. + * @returns true if set of files in the project stays the same and false - otherwise. */ updateGraph(): boolean { tracing?.push(tracing.Phase.Session, "updateGraph", { name: this.projectName, kind: ProjectKind[this.projectKind] }); @@ -2453,7 +2453,7 @@ namespace ts.server { /** * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph - * @returns: true if set of files in the project stays the same and false - otherwise. + * @returns true if set of files in the project stays the same and false - otherwise. */ updateGraph(): boolean { const isInitialLoad = this.isInitialLoadPending(); diff --git a/src/server/protocol.ts b/src/server/protocol.ts index e78d2262b5bca..7b80acea25756 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -61,7 +61,7 @@ namespace ts.server.protocol { NavtoFull = "navto-full", NavTree = "navtree", NavTreeFull = "navtree-full", - /** @deprecated */ + /** @deprecated Use document highlights. */ Occurrences = "occurrences", DocumentHighlights = "documentHighlights", /* @internal */ @@ -1074,16 +1074,16 @@ namespace ts.server.protocol { } /** - * @deprecated * Get occurrences request; value of command field is * "occurrences". Return response giving spans that are relevant * in the file at a given line and column. + * @deprecated Use document highlights. */ export interface OccurrencesRequest extends FileLocationRequest { command: CommandTypes.Occurrences; } - /** @deprecated */ + /** @deprecated Use document highlights. */ export interface OccurrencesResponseItem extends FileSpanWithContext { /** * True if the occurrence is a write location, false otherwise. @@ -1096,7 +1096,7 @@ namespace ts.server.protocol { isInString?: true; } - /** @deprecated */ + /** @deprecated Use document highlights. */ export interface OccurrencesResponse extends Response { body?: OccurrencesResponseItem[]; } @@ -1340,7 +1340,7 @@ namespace ts.server.protocol { /** * Represents a file in external project. - * External project is project whose set of files, compilation options and open\close state + * External project is project whose set of files, compilation options and open/close state * is maintained by the client (i.e. if all this data come from .csproj file in Visual Studio). * External project will exist even if all files in it are closed and should be closed explicitly. * If external project includes one or more tsconfig.json/jsconfig.json files then tsserver will @@ -2132,7 +2132,7 @@ namespace ts.server.protocol { */ export interface FormatOnKeyRequestArgs extends FileLocationRequestArgs { /** - * Key pressed (';', '\n', or '}'). + * Key pressed (`';'`, `'\n'`, or `'}'`). */ key: string; @@ -2242,9 +2242,9 @@ namespace ts.server.protocol { kind: string; } - /** A part of a symbol description that links from a jsdoc @link tag to a declaration */ + /** A part of a symbol description that links from a jsdoc `@link` tag to a declaration */ export interface JSDocLinkDisplayPart extends SymbolDisplayPart { - /** The location of the declaration that the @link tag links to. */ + /** The location of the declaration that the `@link` tag links to. */ target: FileSpan; } @@ -2334,7 +2334,7 @@ namespace ts.server.protocol { export interface CompletionEntryLabelDetails { /** * An optional string which is rendered less prominently directly after - * {@link CompletionEntry.name name}, without any spacing. Should be + * {@link CompletionEntry.name | name}, without any spacing. Should be * used for function signatures or type annotations. */ detail?: string; @@ -3442,7 +3442,7 @@ namespace ts.server.protocol { */ readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean; /** - * Indicates whether {@link CompletionEntry.labelDetails completion entry label details} are supported. + * Indicates whether {@link CompletionEntry.labelDetails | completion entry label details} are supported. * If not, contents of `labelDetails` may be included in the {@link CompletionEntry.name} property. */ readonly useLabelDetailsInCompletionEntries?: boolean; diff --git a/src/server/scriptInfo.ts b/src/server/scriptInfo.ts index 5656f15683cae..7dda6fc7aa22a 100644 --- a/src/server/scriptInfo.ts +++ b/src/server/scriptInfo.ts @@ -171,7 +171,7 @@ namespace ts.server { return this.switchToScriptVersionCache().getAbsolutePositionAndLineText(line); } /** - * @param line 0 based index + * @param line - 0 based index */ lineToTextSpan(line: number): TextSpan { if (!this.useScriptVersionCacheIfValidOrOpen()) { @@ -184,8 +184,8 @@ namespace ts.server { } /** - * @param line 1 based index - * @param offset 1 based index + * @param line - 1 based index + * @param offset - 1 based index */ lineOffsetToPosition(line: number, offset: number, allowEdits?: true): number { if (!this.useScriptVersionCacheIfValidOrOpen()) { @@ -629,15 +629,15 @@ namespace ts.server { } /** - * @param line 1 based index + * @param line - 1 based index */ lineToTextSpan(line: number) { return this.textStorage.lineToTextSpan(line); } /** - * @param line 1 based index - * @param offset 1 based index + * @param line - 1 based index + * @param offset - 1 based index */ lineOffsetToPosition(line: number, offset: number): number; /*@internal*/ diff --git a/src/server/session.ts b/src/server/session.ts index 5eff52c6ad8e0..5f5107d4a5302 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -487,11 +487,11 @@ namespace ts.server { } /** - * @param projects Projects initially known to contain {@link initialLocation} - * @param defaultProject The default project containing {@link initialLocation} - * @param initialLocation Where the search operation was triggered - * @param getResultsForPosition This is where you plug in `findReferences`, `renameLocation`, etc - * @param forPositionInResult Given an item returned by {@link getResultsForPosition} enumerate the positions referred to by that result + * @param projects - Projects initially known to contain {@link initialLocation} + * @param defaultProject - The default project containing {@link initialLocation} + * @param initialLocation - Where the search operation was triggered + * @param getResultsForPosition - This is where you plug in `findReferences`, `renameLocation`, etc + * @param forPositionInResult - Given an item returned by {@link getResultsForPosition} enumerate the positions referred to by that result * @returns In the common case where there's only one project, returns an array of results from {@link getResultsForPosition}. * If multiple projects were searched - even if they didn't return results - the result will be a map from project to per-project results. */ @@ -1002,8 +1002,7 @@ namespace ts.server { this.send(toEvent(eventName, body)); } - // For backwards-compatibility only. - /** @deprecated */ + /** @deprecated For backwards-compatibility only. */ public output(info: any, cmdName: string, reqSeq?: number, errorMsg?: string): void { this.doOutput(info, cmdName, reqSeq!, /*success*/ !errorMsg, errorMsg); // TODO: GH#18217 } @@ -1846,8 +1845,8 @@ namespace ts.server { } /** - * @param fileName is the name of the file to be opened - * @param fileContent is a version of the file content that is known to be more up to date than the one on disk + * @param fileName - is the name of the file to be opened + * @param fileContent - is a version of the file content that is known to be more up to date than the one on disk */ private openClientFile(fileName: NormalizedPath, fileContent?: string, scriptKind?: ScriptKind, projectRootPath?: NormalizedPath) { this.projectService.openClientFileWithNormalizedPath(fileName, fileContent, scriptKind, /*hasMixedContent*/ false, projectRootPath); diff --git a/src/services/codefixes/convertToAsyncFunction.ts b/src/services/codefixes/convertToAsyncFunction.ts index cf633747320fc..075f3833fac82 100644 --- a/src/services/codefixes/convertToAsyncFunction.ts +++ b/src/services/codefixes/convertToAsyncFunction.ts @@ -290,8 +290,8 @@ namespace ts.codefix { // dispatch function to recursively build the refactoring // should be kept up to date with isFixablePromiseHandler in suggestionDiagnostics.ts /** - * @param hasContinuation Whether another `then`, `catch`, or `finally` continuation follows the continuation to which this expression belongs. - * @param continuationArgName The argument name for the continuation that follows this call. + * @param hasContinuation - Whether another `then`, `catch`, or `finally` continuation follows the continuation to which this expression belongs. + * @param continuationArgName - The argument name for the continuation that follows this call. */ function transformExpression(returnContextNode: Expression, node: Expression, transformer: Transformer, hasContinuation: boolean, continuationArgName?: SynthBindingName): readonly Statement[] { if (isPromiseReturningCallExpression(node, transformer.checker, "then")) { @@ -396,8 +396,8 @@ namespace ts.codefix { } /** - * @param hasContinuation Whether another `then`, `catch`, or `finally` continuation follows this continuation. - * @param continuationArgName The argument name for the continuation that follows this call. + * @param hasContinuation - Whether another `then`, `catch`, or `finally` continuation follows this continuation. + * @param continuationArgName - The argument name for the continuation that follows this call. */ function transformFinally(node: PromiseReturningCallExpression<"finally">, onFinally: Expression | undefined, transformer: Transformer, hasContinuation: boolean, continuationArgName?: SynthBindingName): readonly Statement[] { if (!onFinally || isNullOrUndefined(transformer, onFinally)) { @@ -423,8 +423,8 @@ namespace ts.codefix { } /** - * @param hasContinuation Whether another `then`, `catch`, or `finally` continuation follows this continuation. - * @param continuationArgName The argument name for the continuation that follows this call. + * @param hasContinuation - Whether another `then`, `catch`, or `finally` continuation follows this continuation. + * @param continuationArgName - The argument name for the continuation that follows this call. */ function transformCatch(node: PromiseReturningCallExpression<"then" | "catch">, onRejected: Expression | undefined, transformer: Transformer, hasContinuation: boolean, continuationArgName?: SynthBindingName): readonly Statement[] { if (!onRejected || isNullOrUndefined(transformer, onRejected)) { @@ -451,8 +451,8 @@ namespace ts.codefix { } /** - * @param hasContinuation Whether another `then`, `catch`, or `finally` continuation follows this continuation. - * @param continuationArgName The argument name for the continuation that follows this call. + * @param hasContinuation - Whether another `then`, `catch`, or `finally` continuation follows this continuation. + * @param continuationArgName - The argument name for the continuation that follows this call. */ function transformThen(node: PromiseReturningCallExpression<"then">, onFulfilled: Expression | undefined, onRejected: Expression | undefined, transformer: Transformer, hasContinuation: boolean, continuationArgName?: SynthBindingName): readonly Statement[] { if (!onFulfilled || isNullOrUndefined(transformer, onFulfilled)) { @@ -530,9 +530,9 @@ namespace ts.codefix { // should be kept up to date with isFixablePromiseArgument in suggestionDiagnostics.ts /** - * @param hasContinuation Whether another `then`, `catch`, or `finally` continuation follows the continuation to which this callback belongs. - * @param continuationArgName The argument name for the continuation that follows this call. - * @param inputArgName The argument name provided to this call + * @param hasContinuation - Whether another `then`, `catch`, or `finally` continuation follows the continuation to which this callback belongs. + * @param continuationArgName - The argument name for the continuation that follows this call. + * @param inputArgName - The argument name provided to this call */ function transformCallbackArgument(func: Expression, hasContinuation: boolean, continuationArgName: SynthBindingName | undefined, inputArgName: SynthBindingName | undefined, parent: PromiseReturningCallExpression<"then" | "catch" | "finally">, transformer: Transformer): readonly Statement[] { switch (func.kind) { @@ -716,8 +716,8 @@ namespace ts.codefix { } /** - * @param hasContinuation Whether another `then`, `catch`, or `finally` continuation follows the continuation to which this statement belongs. - * @param continuationArgName The argument name for the continuation that follows this call. + * @param hasContinuation - Whether another `then`, `catch`, or `finally` continuation follows the continuation to which this statement belongs. + * @param continuationArgName - The argument name for the continuation that follows this call. */ function transformReturnStatementWithFixablePromiseHandler(transformer: Transformer, innerRetStmt: ReturnStatement, hasContinuation: boolean, continuationArgName?: SynthBindingName) { let innerCbBody: Statement[] = []; diff --git a/src/services/codefixes/convertToEsModule.ts b/src/services/codefixes/convertToEsModule.ts index c21ba7464f997..85f225a75bacd 100644 --- a/src/services/codefixes/convertToEsModule.ts +++ b/src/services/codefixes/convertToEsModule.ts @@ -70,8 +70,10 @@ namespace ts.codefix { * This is necessary because `exports.x = 0;` does not declare a local variable. * Converting this to `export const x = 0;` would declare a local, so we must be careful to avoid shadowing. * If there would be shadowing at either the declaration or at any reference to `exports.x` (now just `x`), we must convert to: + * ``` * const _x = 0; * export { _x as x }; + * ``` * This conversion also must place if the exported name is not a valid identifier, e.g. `exports.class = 0;`. */ type ExportRenames = ReadonlyESMap; diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts index 5e26fbb38ab63..a539853d1815e 100644 --- a/src/services/codefixes/helpers.ts +++ b/src/services/codefixes/helpers.ts @@ -3,8 +3,8 @@ namespace ts.codefix { /** * Finds members of the resolved type that are missing in the class pointed to by class decl * and generates source code for the missing members. - * @param possiblyMissingSymbols The collection of symbols to filter and then get insertions for. - * @param importAdder If provided, type annotations will use identifier type references instead of ImportTypeNodes, and the missing imports will be added to the importAdder. + * @param possiblyMissingSymbols - The collection of symbols to filter and then get insertions for. + * @param importAdder - If provided, type annotations will use identifier type references instead of ImportTypeNodes, and the missing imports will be added to the importAdder. * @returns Empty string iff there are no member insertions. */ export function createMissingMemberNodes( @@ -45,7 +45,7 @@ namespace ts.codefix { /** * `addClassElement` will not be called if we can't figure out a representation for `symbol` in `enclosingDeclaration`. - * @param body If defined, this will be the body of the member node passed to `addClassElement`. Otherwise, the body will default to a stub. + * @param body - If defined, this will be the body of the member node passed to `addClassElement`. Otherwise, the body will default to a stub. */ export function addNewNodeForMemberSymbol( symbol: Symbol, @@ -70,11 +70,11 @@ namespace ts.codefix { * `MappedIndirect.ax` and `MappedIndirect.ay` have no declaration node attached (due to their mapped-type * parent): * - * >>> ```ts - * >>> type Base = { ax: number; ay: string }; - * >>> type BaseKeys = keyof Base; - * >>> type MappedIndirect = { [K in BaseKeys]: boolean }; - * >>> ``` + * ```ts + * type Base = { ax: number; ay: string }; + * type BaseKeys = keyof Base; + * type MappedIndirect = { [K in BaseKeys]: boolean }; + * ``` * * In such cases, we assume the declaration to be a `PropertySignature`. */ @@ -698,7 +698,7 @@ namespace ts.codefix { } /** - * Given a type node containing 'import("./a").SomeType>', + * Given a type node containing `import("./a").SomeType>`, * returns an equivalent type reference node with any nested ImportTypeNodes also replaced * with type references, and a list of symbols that must be imported to use the type reference. */ diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 496a5d888a194..d38187cd2ea17 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -853,7 +853,7 @@ namespace ts.codefix { } /** - * @param forceImportKeyword Indicates that the user has already typed `import`, so the result must start with `import`. + * @param forceImportKeyword - Indicates that the user has already typed `import`, so the result must start with `import`. * (In other words, do not allow `const x = require("...")` for JS files.) */ export function getImportKind(importingFile: SourceFile, exportKind: ExportKind, compilerOptions: CompilerOptions, forceImportKeyword?: boolean): ImportKind { diff --git a/src/services/completions.ts b/src/services/completions.ts index 48e1c28bf01de..157bc577d7e67 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -147,11 +147,11 @@ namespace ts.Completions { } /** - * Map from symbol index in `symbols` -> SymbolOriginInfo. + * Map from symbol index in `symbols` to SymbolOriginInfo. */ type SymbolOriginInfoMap = Record; - /** Map from symbol id -> SortText. */ + /** Map from symbol id to SortText. */ type SymbolSortTextMap = (SortText | undefined)[]; const enum KeywordCompletionFilters { @@ -3125,13 +3125,17 @@ namespace ts.Completions { * Aggregates relevant symbols for completion in import clauses and export clauses * whose declarations have a module specifier; for instance, symbols will be aggregated for * + * ``` * import { | } from "moduleName"; * export { a as foo, | } from "moduleName"; + * ``` * * but not for * + * ``` * export { | }; * + * ``` * Relevant symbols are stored in the captured 'symbols' variable. */ function tryGetImportOrExportClauseCompletionSymbols(): GlobalsSearch { @@ -3177,8 +3181,11 @@ namespace ts.Completions { /** * Adds local declarations for completions in named exports: * + * ``` * export { | }; * + * ``` + * * Does not check for the absence of a module specifier (`export {} from "./other"`) * because `tryGetImportOrExportClauseCompletionSymbols` runs first and handles that, * preventing this function from running. @@ -3982,10 +3989,14 @@ namespace ts.Completions { const entries = []; /** * An `AssertClause` can come after an import declaration: + * ``` * import * from "foo" | * import "foo" | + * ``` * or after a re-export declaration that has a module specifier: + * ``` * export { foo } from "foo" | + * ``` * Source: https://tc39.es/proposal-import-assertions/ */ if (contextToken) { diff --git a/src/services/documentRegistry.ts b/src/services/documentRegistry.ts index 21a17a2d30045..54c0c6a5bc5a2 100644 --- a/src/services/documentRegistry.ts +++ b/src/services/documentRegistry.ts @@ -20,16 +20,16 @@ namespace ts { * The first call to acquire will call createLanguageServiceSourceFile to generate * the SourceFile if was not found in the registry. * - * @param fileName The name of the file requested - * @param compilationSettingsOrHost Some compilation settings like target affects the + * @param fileName - The name of the file requested + * @param compilationSettingsOrHost - Some compilation settings like target affects the * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. - * @param scriptSnapshot Text of the file. Only used if the file was not found + * @param scriptSnapshot - Text of the file. Only used if the file was not found * in the registry and a new one was created. - * @param version Current version of the file. Only used if the file was not found + * @param version - Current version of the file. Only used if the file was not found * in the registry and a new one was created. */ acquireDocument( @@ -57,15 +57,15 @@ namespace ts { * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile * to get an updated SourceFile. * - * @param fileName The name of the file requested - * @param compilationSettingsOrHost Some compilation settings like target affects the + * @param fileName - The name of the file requested + * @param compilationSettingsOrHost - Some compilation settings like target affects the * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. - * @param scriptSnapshot Text of the file. - * @param version Current version of the file. + * @param scriptSnapshot - Text of the file. + * @param version - Current version of the file. */ updateDocument( fileName: string, @@ -94,9 +94,9 @@ namespace ts { * Note: It is not allowed to call release on a SourceFile that was not acquired from * this registry originally. * - * @param fileName The name of the file to be released - * @param compilationSettings The compilation settings used to acquire the file - * @param scriptKind The script kind of the file to be released + * @param fileName - The name of the file to be released + * @param compilationSettings - The compilation settings used to acquire the file + * @param scriptKind - The script kind of the file to be released */ /**@deprecated pass scriptKind and impliedNodeFormat for correctness */ releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind?: ScriptKind): void; @@ -106,10 +106,10 @@ namespace ts { * Note: It is not allowed to call release on a SourceFile that was not acquired from * this registry originally. * - * @param fileName The name of the file to be released - * @param compilationSettings The compilation settings used to acquire the file - * @param scriptKind The script kind of the file to be released - * @param impliedNodeFormat The implied source file format of the file to be released + * @param fileName - The name of the file to be released + * @param compilationSettings - The compilation settings used to acquire the file + * @param scriptKind - The script kind of the file to be released + * @param impliedNodeFormat - The implied source file format of the file to be released */ releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void; // eslint-disable-line @typescript-eslint/unified-signatures /** diff --git a/src/services/exportInfoMap.ts b/src/services/exportInfoMap.ts index 5e927b3ff8afb..4cac4ddb4e90c 100644 --- a/src/services/exportInfoMap.ts +++ b/src/services/exportInfoMap.ts @@ -67,7 +67,7 @@ namespace ts { const exportInfo = createMultiMap(); const symbols = new Map(); /** - * Key: node_modules package name (no @types). + * Key: node_modules package name (no `@types`). * Value: path to deepest node_modules folder seen that is * both visible to `usableByFileName` and contains the package. * diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index d11a447b1428b..52e89f450472c 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -1076,9 +1076,11 @@ namespace ts.FindAllReferences { /** * It's possible that we will encounter the right side of `export { foo as bar } from "x";` more than once. * For example: + * ``` * // b.ts * export { foo as bar } from "./a"; * import { bar } from "./b"; + * ``` * * Normally at `foo as bar` we directly add `foo` and do not locally search for it (since it doesn't declare a local). * But another reference to it may appear in the same source file. @@ -1108,7 +1110,7 @@ namespace ts.FindAllReferences { return this.importTracker(exportSymbol, exportInfo, this.options.use === FindReferencesUse.Rename); } - /** @param allSearchSymbols set of additional symbols for use by `includes`. */ + /** @param allSearchSymbols - set of additional symbols for use by `includes`. */ createSearch(location: Node | undefined, symbol: Symbol, comingFrom: ImportExport | undefined, searchOptions: { text?: string, allSearchSymbols?: Symbol[] } = {}): Search { // 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 }`. @@ -1933,8 +1935,10 @@ namespace ts.FindAllReferences { * is an interface, determines if some ancestor of the child symbol extends or inherits from it. * Also takes in a cache of previous results which makes this slightly more efficient and is * necessary to avoid potential loops like so: + * ``` * class A extends B { } * class B extends A { } + * ``` * * We traverse the AST rather than using the type checker because users are typically only interested * in explicit implementations of an interface/class when calling "Go to Implementation". Sibling @@ -1943,9 +1947,9 @@ namespace ts.FindAllReferences { * distinction between structurally compatible implementations and explicit implementations, so we * must use the AST. * - * @param symbol A class or interface Symbol - * @param parent Another class or interface Symbol - * @param cachedResults A map of symbol id pairs (i.e. "child,parent") to booleans indicating previous results + * @param symbol - A class or interface Symbol + * @param parent - Another class or interface Symbol + * @param cachedResults - A map of symbol id pairs (i.e. "child,parent") to booleans indicating previous results */ function explicitlyInheritsFrom(symbol: Symbol, parent: Symbol, cachedResults: ESMap, checker: TypeChecker): boolean { if (symbol === parent) { @@ -2130,12 +2134,12 @@ namespace ts.FindAllReferences { } /** - * @param allowBaseTypes return true means it would try to find in base class or interface. + * @param allowBaseTypes - return true means it would try to find in base class or interface. */ function forEachRelatedSymbol( symbol: Symbol, location: Node, checker: TypeChecker, isForRenamePopulateSearchSymbolSet: boolean, onlyIncludeBindingElementAtReferenceLocation: boolean, /** - * @param baseSymbol This symbol means one property/mehtod from base class or interface when it is not null or undefined, + * @param baseSymbol - This symbol means one property/mehtod from base class or interface when it is not null or undefined, */ cbSymbol: (symbol: Symbol, rootSymbol?: Symbol, baseSymbol?: Symbol, kind?: NodeEntryKind) => T | undefined, allowBaseTypes: (rootSymbol: Symbol) => boolean, @@ -2253,10 +2257,10 @@ namespace ts.FindAllReferences { /** * 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 result an array of symbol of found property symbols - * @param previousIterationSymbolsCache a cache of symbol from previous iterations of calling this function to prevent infinite revisiting of the same symbol. + * @param symbol - a symbol to start searching for the given propertyName + * @param propertyName - a name of property to search for + * @param result - an array of symbol of found property symbols + * @param previousIterationSymbolsCache - 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. */ function getPropertySymbolsFromBaseTypes(symbol: Symbol, propertyName: string, checker: TypeChecker, cb: (symbol: Symbol) => T | undefined): T | undefined { diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index 3b8534b8ef326..b5d152d59a1b3 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -47,22 +47,26 @@ namespace ts.formatting { getIndentationForComment(owningToken: SyntaxKind, tokenIndentation: number, container: Node): number; /** * Indentation for open and close tokens of the node if it is block or another node that needs special indentation + * ``` * ... { * ......... * ....} * ____ - indentation * ____ - delta + * ``` */ getIndentation(): number; /** * Prefered relative indentation for child nodes. * Delta is used to carry the indentation info + * ``` * foo(bar({ * $ * })) + * ``` * Both 'foo', 'bar' introduce new indentation with delta = 4, but total indentation in $ is not 8. - * foo: { indentation: 0, delta: 4 } - * bar: { indentation: foo.indentation + foo.delta = 4, delta: 4} however 'foo' and 'bar' are on the same line + * foo: `{ indentation: 0, delta: 4 }` + * bar: `{ indentation: foo.indentation + foo.delta = 4, delta: 4}` however 'foo' and 'bar' are on the same line * so bar inherits indentation from foo and bar.delta will be 4 * */ @@ -160,7 +164,7 @@ namespace ts.formatting { /** * 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. + * @param expectedTokenKind - The kind of the last token constituting the desired parent node. */ function findImmediatelyPrecedingTokenOfKind(end: number, expectedTokenKind: SyntaxKind, sourceFile: SourceFile): Node | undefined { const precedingToken = findPrecedingToken(end, sourceFile); @@ -1171,8 +1175,8 @@ namespace ts.formatting { } /** - * @param start The position of the first character in range - * @param end The position of the last character in range + * @param start - The position of the first character in range + * @param end - The position of the last character in range */ function getTrailingWhitespaceStartPosition(start: number, end: number) { let pos = end; @@ -1289,7 +1293,7 @@ namespace ts.formatting { const enum LineAction { None, LineAdded, LineRemoved } /** - * @param precedingToken pass `null` if preceding token was already computed and result was `undefined`. + * @param precedingToken - pass `null` if preceding token was already computed and result was `undefined`. */ export function getRangeOfEnclosingComment( sourceFile: SourceFile, diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index 637201b0c2546..4437f198dec45 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -366,12 +366,12 @@ namespace ts.formatting { * 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 + * @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 */ function rule( debugName: string, diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 78b8a95890e50..af21a5a5359e0 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -7,7 +7,7 @@ namespace ts.formatting { } /** - * @param assumeNewLineBeforeCloseBrace + * @param assumeNewLineBeforeCloseBrace - * `false` when called on text from a real source file. * `true` when we need to assume `position` is on a newline. * @@ -548,7 +548,7 @@ namespace ts.formatting { /** * 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$" + * `"0\t2$"` * value of 'character' for '$' is 3 * value of 'column' for '$' is 6 (assuming that tab size is 4) */ @@ -693,7 +693,7 @@ namespace ts.formatting { /** * 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. + * @param isNextChild - If true, we are judging indent of a hypothetical child *after* this one, not the current child. */ export function shouldIndentChildNode(settings: FormatCodeSettings, parent: TextRangeWithKind, child?: Node, sourceFile?: SourceFileLike, isNextChild = false): boolean { return nodeWillIndentChild(settings, parent, child, sourceFile, /*indentByDefault*/ false) diff --git a/src/services/importTracker.ts b/src/services/importTracker.ts index 8bec8c130bcae..0ef866ee55e20 100644 --- a/src/services/importTracker.ts +++ b/src/services/importTracker.ts @@ -353,7 +353,7 @@ namespace ts.FindAllReferences { export type ModuleReference = /** "import" also includes require() calls. */ | { kind: "import", literal: StringLiteralLike } - /** or */ + /** `` or `` */ | { kind: "reference", referencingFile: SourceFile, ref: FileReference }; export function findModuleReferences(program: Program, sourceFiles: readonly SourceFile[], searchModuleSymbol: Symbol): ModuleReference[] { const refs: ModuleReference[] = []; @@ -458,7 +458,7 @@ namespace ts.FindAllReferences { * If at an import, look locally for the symbol it imports. * If at an export, look for all imports of it. * This doesn't handle export specifiers; that is done in `getReferencesAtExportSpecifier`. - * @param comingFromExport If we are doing a search for all exports, don't bother looking backwards for the imported symbol, since that's the reason we're here. + * @param comingFromExport - If we are doing a search for all exports, don't bother looking backwards for the imported symbol, since that's the reason we're here. */ export function getImportOrExportSymbol(node: Node, symbol: Symbol, checker: TypeChecker, comingFromExport: boolean): ImportedSymbol | ExportedSymbol | undefined { return comingFromExport ? getExport() : getExport() || getImport(); diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 257531c14e8d9..90e2150cd8774 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -333,8 +333,8 @@ namespace ts.JsDoc { * - If the keystroke sequence "/\*\*" induced the call, we also check that the next * non-whitespace character is '*', which (approximately) indicates whether we added * the second '*' to complete an existing (JSDoc) comment. - * @param fileName The file in which to perform the check. - * @param position The (character-indexed) position in the file where the check should + * @param fileName - The file in which to perform the check. + * @param position - The (character-indexed) position in the file where the check should * be performed. */ export function getDocCommentTemplateAtPosition(newLine: string, sourceFile: SourceFile, position: number, options?: DocCommentTemplateOptions): TextInsertion | undefined { diff --git a/src/services/organizeImports.ts b/src/services/organizeImports.ts index d1cd6c517f8c9..6b5e7fe386f75 100644 --- a/src/services/organizeImports.ts +++ b/src/services/organizeImports.ts @@ -223,7 +223,7 @@ namespace ts.OrganizeImports { // Internal for testing /** - * @param importGroup a list of ImportDeclarations, all with the same module name. + * @param importGroup - a list of ImportDeclarations, all with the same module name. */ export function coalesceImports(importGroup: readonly ImportDeclaration[]) { if (importGroup.length === 0) { @@ -363,7 +363,7 @@ namespace ts.OrganizeImports { // Internal for testing /** - * @param exportGroup a list of ExportDeclarations, all with the same module name. + * @param exportGroup - a list of ExportDeclarations, all with the same module name. */ export function coalesceExports(exportGroup: readonly ExportDeclaration[]) { if (exportGroup.length === 0) { diff --git a/src/services/refactorProvider.ts b/src/services/refactorProvider.ts index ccc6f81d2924d..15176101615de 100644 --- a/src/services/refactorProvider.ts +++ b/src/services/refactorProvider.ts @@ -4,7 +4,7 @@ namespace ts.refactor { // e.g. nonSuggestableRefactors[refactorCode] -> the refactor you want const refactors = new Map(); - /** @param name An unique code associated with each refactor. Does not have to be human-readable. */ + /** @param name - An unique code associated with each refactor. Does not have to be human-readable. */ export function registerRefactor(name: string, refactor: Refactor) { refactors.set(name, refactor); } diff --git a/src/services/refactors/convertToOptionalChainExpression.ts b/src/services/refactors/convertToOptionalChainExpression.ts index ba40ec6a5e553..eab589db1f703 100644 --- a/src/services/refactors/convertToOptionalChainExpression.ts +++ b/src/services/refactors/convertToOptionalChainExpression.ts @@ -238,7 +238,7 @@ namespace ts.refactor.convertToOptionalChainExpression { * Gets a property access expression which may be nested inside of a binary expression. The final * expression in an && chain will occur as the right child of the parent binary expression, unless * it is followed by a different binary operator. - * @param node the right child of a binary expression or a call expression. + * @param node - the right child of a binary expression or a call expression. */ function getFinalExpressionInChain(node: Expression): CallExpression | PropertyAccessExpression | ElementAccessExpression | undefined { // foo && |foo.bar === 1|; - here the right child of the && binary expression is another binary expression. diff --git a/src/services/refactors/extractSymbol.ts b/src/services/refactors/extractSymbol.ts index 67435b4735456..af696b7e53edc 100644 --- a/src/services/refactors/extractSymbol.ts +++ b/src/services/refactors/extractSymbol.ts @@ -363,7 +363,7 @@ namespace ts.refactor.extractSymbol { /** * Attempt to refine the extraction node (generally, by shrinking it) to produce better results. - * @param node The unrefined extraction node. + * @param node - The unrefined extraction node. */ function refineNode(node: Node): Node { if (isReturnStatement(node)) { diff --git a/src/services/services.ts b/src/services/services.ts index a2078b875a568..d08b3975dcc02 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -598,7 +598,7 @@ namespace ts { /** * Returns whether or not the given node has a JSDoc "inheritDoc" tag on it. - * @param node the Node in question. + * @param node - the Node in question. * @returns `true` if `node` has a JSDoc "inheritDoc" tag on it, otherwise `false`. */ function hasJSDocInheritDocTag(node: Node) { @@ -2784,7 +2784,7 @@ namespace ts { } /** - * Returns the containing object literal property declaration given a possible name node, e.g. "a" in x = { "a": 1 } + * Returns the containing object literal property declaration given a possible name node, e.g. "a" in `x = { "a": 1 }` */ /* @internal */ export function getContainingObjectLiteralElement(node: Node): ObjectLiteralElementWithName | undefined { diff --git a/src/services/shims.ts b/src/services/shims.ts index af0f424a736ff..076d721da566f 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -43,7 +43,9 @@ namespace ts { /** * Returns a JSON-encoded value of the type: - * { span: { start: number; length: number }; newLength: number } + * ``` + * { span: { start: number; length: number }; newLength: number } + * ``` * * Or undefined value if there was no change. */ @@ -97,7 +99,7 @@ namespace ts { /** * Returns a JSON-encoded value of the type: string[] * - * @param exclude A JSON encoded string[] containing the paths to exclude + * @param exclude - A JSON encoded string[] containing the paths to exclude * when enumerating the directory. */ readDirectory(rootDir: string, extension: string, basePaths?: string, excludeEx?: string, includeFileEx?: string, includeDirEx?: string, depth?: number): string; @@ -163,20 +165,26 @@ namespace ts { /** * Returns a JSON-encoded value of the type: + * ``` * { canRename: boolean, localizedErrorMessage: string, displayName: string, fullDisplayName: string, kind: string, kindModifiers: string, triggerSpan: { start; length } } + * ``` */ getRenameInfo(fileName: string, position: number, preferences: UserPreferences): string; getSmartSelectionRange(fileName: string, position: number): string; /** * Returns a JSON-encoded value of the type: + * ``` * { fileName: string, textSpan: { start: number, length: number } }[] + * ``` */ findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): string; /** * Returns a JSON-encoded value of the type: + * ``` * { fileName: string; textSpan: { start: number; length: number}; kind: string; name: string; containerKind: string; containerName: string } + * ``` * * Or undefined value if no definition can be found. */ @@ -186,7 +194,9 @@ namespace ts { /** * Returns a JSON-encoded value of the type: + * ``` * { fileName: string; textSpan: { start: number; length: number}; kind: string; name: string; containerKind: string; containerName: string } + * ``` * * Or undefined value if no definition can be found. */ @@ -194,53 +204,69 @@ namespace ts { /** * Returns a JSON-encoded value of the type: + * ``` * { fileName: string; textSpan: { start: number; length: number}; }[] + * ``` */ getImplementationAtPosition(fileName: string, position: number): string; /** * Returns a JSON-encoded value of the type: + * ``` * { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean, isDefinition?: boolean }[] + * ``` */ getReferencesAtPosition(fileName: string, position: number): string; /** * Returns a JSON-encoded value of the type: + * ``` * { definition: ; references: [] }[] + * ``` */ findReferences(fileName: string, position: number): string; /** * Returns a JSON-encoded value of the type: + * ``` * { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean, isDefinition?: boolean }[] + * ``` */ getFileReferences(fileName: string): string; /** * @deprecated * Returns a JSON-encoded value of the type: + * ``` * { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean }[] + * ``` */ getOccurrencesAtPosition(fileName: string, position: number): string; /** * Returns a JSON-encoded value of the type: + * ``` * { fileName: string; highlights: { start: number; length: number }[] }[] + * ``` * - * @param fileToSearch A JSON encoded string[] containing the file names that should be + * @param fileToSearch - A JSON encoded string[] containing the file names that should be * considered when searching. */ getDocumentHighlights(fileName: string, position: number, filesToSearch: string): string; /** * Returns a JSON-encoded value of the type: + * ``` * { name: string; kind: string; kindModifiers: string; containerName: string; containerKind: string; matchKind: string; fileName: string; textSpan: { start: number; length: number}; } [] = []; + * ``` */ getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string): string; /** * Returns a JSON-encoded value of the type: + * ``` * { text: string; kind: string; kindModifiers: string; bolded: boolean; grayed: boolean; indent: number; spans: { start: number; length: number; }[]; childItems: [] } [] = []; + * ``` */ getNavigationBarItems(fileName: string): string; @@ -249,7 +275,9 @@ namespace ts { /** * Returns a JSON-encoded value of the type: + * ``` * { textSpan: { start: number, length: number }; hintSpan: { start: number, length: number }; bannerText: string; autoCollapse: boolean } [] = []; + * ``` */ getOutliningSpans(fileName: string): string; diff --git a/src/services/smartSelection.ts b/src/services/smartSelection.ts index c2aa95a0eaff8..60205360747c5 100644 --- a/src/services/smartSelection.ts +++ b/src/services/smartSelection.ts @@ -123,9 +123,9 @@ namespace ts.SmartSelectionRange { * count too, unless that position belongs to the next node. In effect, makes * selections able to snap to preceding tokens when the cursor is on the tail * end of them with only whitespace ahead. - * @param sourceFile The source file containing the nodes. - * @param pos The position to check. - * @param node The candidate node to snap to. + * @param sourceFile - The source file containing the nodes. + * @param pos - The position to check. + * @param node - The candidate node to snap to. */ function positionShouldSnapToNode(sourceFile: SourceFile, pos: number, node: Node) { // Can’t use 'ts.positionBelongsToNode()' here because it cleverly accounts @@ -252,10 +252,10 @@ namespace ts.SmartSelectionRange { * 3) everything right of the first node matched by `pivotOn`, * 4) a trailing semicolon, if `separateTrailingSemicolon` is enabled. * The left and right groups, if not empty, will each be grouped into their own containing SyntaxList. - * @param children The sibling nodes to split. - * @param pivotOn The predicate function to match the node to be the pivot. The first node that matches + * @param children - The sibling nodes to split. + * @param pivotOn - The predicate function to match the node to be the pivot. The first node that matches * the predicate will be used; any others that may match will be included into the right-hand group. - * @param separateTrailingSemicolon If the last token is a semicolon, it will be returned as a separate + * @param separateTrailingSemicolon - If the last token is a semicolon, it will be returned as a separate * child rather than be included in the right-hand group. */ function splitChildren(children: Node[], pivotOn: (child: Node) => boolean, separateTrailingSemicolon = true): Node[] { diff --git a/src/services/stringCompletions.ts b/src/services/stringCompletions.ts index 922e50654bbe1..13d9859bf15ae 100644 --- a/src/services/stringCompletions.ts +++ b/src/services/stringCompletions.ts @@ -969,11 +969,15 @@ namespace ts.Completions.StringCompletions { * for completions. * For example, this matches * + * ``` * /// (source: T | T[], transformers: TransformerFactory[], compilerOptions?: CompilerOptions) { const diagnostics: DiagnosticWithLocation[] = []; @@ -13,4 +13,4 @@ namespace ts { result.diagnostics = concatenate(result.diagnostics, diagnostics); return result; } -} \ No newline at end of file +} diff --git a/src/services/types.ts b/src/services/types.ts index 98de7db46fe90..1affeb50458b8 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -358,7 +358,7 @@ namespace ts { * While these represent the majority of syntax-related diagnostics, there are some * that require the type system, which will be present in `getSemanticDiagnostics`. * - * @param fileName A path to the file you want syntactic diagnostics for + * @param fileName - A path to the file you want syntactic diagnostics for */ getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[]; @@ -375,7 +375,7 @@ namespace ts { * sentence: "The sun is green." is syntactically correct; those are real English words with * correct sentence structure. However, it is semantically invalid, because it is not true. * - * @param fileName A path to the file you want semantic diagnostics for + * @param fileName - A path to the file you want semantic diagnostics for */ getSemanticDiagnostics(fileName: string): Diagnostic[]; @@ -384,7 +384,7 @@ namespace ts { * proactively suggest refactors, as opposed to diagnostics that indicate * potentially incorrect runtime behavior. * - * @param fileName A path to the file you want semantic diagnostics for + * @param fileName - A path to the file you want semantic diagnostics for */ getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[]; @@ -411,9 +411,9 @@ namespace ts { * Gets semantic highlights information for a particular file. Has two formats, an older * version used by VS and a format used by VS Code. * - * @param fileName The path to the file - * @param position A text span to return results within - * @param format Which format to use, defaults to "original" + * @param fileName - The path to the file + * @param position - A text span to return results within + * @param format - Which format to use, defaults to "original" * @returns a number array encoded as triples of [start, length, ClassificationType, ...]. */ getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications; @@ -421,24 +421,24 @@ namespace ts { /** * Gets completion entries at a particular position in a file. * - * @param fileName The path to the file - * @param position A zero-based index of the character where you want the entries - * @param options An object describing how the request was triggered and what kinds + * @param fileName - The path to the file + * @param position - A zero-based index of the character where you want the entries + * @param options - An object describing how the request was triggered and what kinds * of code actions can be returned with the completions. - * @param formattingSettings settings needed for calling formatting functions. + * @param formattingSettings - settings needed for calling formatting functions. */ getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined, formattingSettings?: FormatCodeSettings): WithMetadata | undefined; /** * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`. * - * @param fileName The path to the file - * @param position A zero based index of the character where you want the entries - * @param entryName The `name` from an existing completion which came from `getCompletionsAtPosition` - * @param formatOptions How should code samples in the completions be formatted, can be undefined for backwards compatibility - * @param source `source` property from the completion entry - * @param preferences User settings, can be undefined for backwards compatibility - * @param data `data` property from the completion entry + * @param fileName - The path to the file + * @param position - A zero based index of the character where you want the entries + * @param entryName - The `name` from an existing completion which came from `getCompletionsAtPosition` + * @param formatOptions - How should code samples in the completions be formatted, can be undefined for backwards compatibility + * @param source - `source` property from the completion entry + * @param preferences - User settings, can be undefined for backwards compatibility + * @param data - `data` property from the completion entry */ getCompletionEntryDetails( fileName: string, @@ -456,8 +456,8 @@ namespace ts { * Gets semantic information about the identifier at a particular position in a * file. Quick info is what you typically see when you hover in an editor. * - * @param fileName The path to the file - * @param position A zero-based index of the character where you want the quick info + * @param fileName - The path to the file + * @param position - A zero-based index of the character where you want the quick info */ getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined; @@ -491,7 +491,7 @@ namespace ts { getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined; getFileReferences(fileName: string): ReferenceEntry[]; - /** @deprecated */ + /** @deprecated Use document highlights. */ getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined; getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[]; @@ -1214,7 +1214,7 @@ namespace ts { isGlobalCompletion: boolean; isMemberCompletion: boolean; /** - * In the absence of `CompletionEntry["replacementSpan"], the editor may choose whether to use + * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span * must be used to commit that completion entry. */ @@ -1392,9 +1392,9 @@ namespace ts { * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the * lexical, syntactic, and semantic classifiers may issue the best user experience. * - * @param text The text of a line to classify. - * @param lexState The state of the lexical classifier at the end of the previous line. - * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. + * @param text - The text of a line to classify. + * @param lexState - The state of the lexical classifier at the end of the previous line. + * @param syntacticClassifierAbsent - Whether the client is *not* using a syntactic classifier. * If there is no syntactic classifier (syntacticClassifierAbsent=true), * certain heuristics may be used in its place; however, if there is a * syntactic classifier (syntacticClassifierAbsent=false), certain @@ -1417,28 +1417,54 @@ namespace ts { /** top level script node */ scriptElement = "script", - /** module foo {} */ + /** + * ``` + * module foo {} + * ``` + */ moduleElement = "module", - /** class X {} */ + /** + * ``` + * class X {} + * ``` + */ classElement = "class", - /** var x = class X {} */ + /** + * ``` + * var x = class X {} + * ``` + */ localClassElement = "local class", - /** interface Y {} */ + /** + * ``` + * interface Y {} + * ``` + */ interfaceElement = "interface", - /** type T = ... */ + /** + * ``` + * type T = ... + * ``` + */ typeElement = "type", - /** enum E */ + /** + * ``` + * enum E + * ``` + */ enumElement = "enum", enumMemberElement = "enum member", /** * Inside module and script only + * ``` * const v = .. + * ``` */ variableElement = "var", @@ -1447,45 +1473,84 @@ namespace ts { /** * Inside module and script only + * ``` * function f() { } + * ``` */ functionElement = "function", /** Inside function */ localFunctionElement = "local function", - /** class X { [public|private]* foo() {} } */ + /** + * ``` + * class X { [public|private]* foo() {} } + * ``` + */ memberFunctionElement = "method", - /** class X { [public|private]* [get|set] foo:number; } */ + /** + * ``` + * class X { [public|private]* get foo:number; } + * ``` + */ memberGetAccessorElement = "getter", + /** + * ``` + * class X { [public|private]* set foo:number; } + * ``` + */ memberSetAccessorElement = "setter", /** + * ``` * class X { [public|private]* foo:number; } * interface Y { foo:number; } + * ``` */ memberVariableElement = "property", - /** class X { [public|private]* accessor foo: number; } */ + /** + * ``` + * class X { [public|private]* accessor foo: number; } + * ``` + */ memberAccessorVariableElement = "accessor", /** + * ``` * class X { constructor() { } } * class X { static { } } + * ``` */ constructorImplementationElement = "constructor", - /** interface Y { ():number; } */ + /** + * ``` + * interface Y { ():number; } + * ``` + */ callSignatureElement = "call", - /** interface Y { []:number; } */ + /** + * ``` + * interface Y { []:number; } + * ``` + */ indexSignatureElement = "index", - /** interface Y { new():Y; } */ + /** + * ``` + * interface Y { new():Y; } + * ``` + */ constructSignatureElement = "construct", - /** function foo(*Y*: string) */ + /** + * ``` + * function foo(*Y*: string) + * ``` + */ parameterElement = "parameter", typeParameterElement = "type parameter", @@ -1505,21 +1570,23 @@ namespace ts { externalModuleName = "external module name", /** + * ```jsx * - * @deprecated + * ``` + * @deprecated No longer returned by any API. */ jsxAttribute = "JSX attribute", /** String literal */ string = "string", - /** Jsdoc @link: in `{@link C link text}`, the before and after text "{@link " and "}" */ + /** Jsdoc `@link`: in `{@link C link text}`, the before and after text "{@link " and "}" */ link = "link", - /** Jsdoc @link: in `{@link C link text}`, the entity name "C" */ + /** Jsdoc `@link`: in `{@link C link text}`, the entity name "C" */ linkName = "link name", - /** Jsdoc @link: in `{@link C link text}`, the link text "link text" */ + /** Jsdoc `@link`: in `{@link C link text}`, the link text "link text" */ linkText = "link text", } diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 2c9fbe3011c95..765bffe445d77 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -1097,7 +1097,7 @@ namespace ts { /** * Gets the token whose text has range [start, end) and - * position >= start and (position < end or (position === end && token is literal or keyword or identifier)) + * position \>= start and (position \< end or (position === end && token is literal or keyword or identifier)) */ export function getTouchingPropertyName(sourceFile: SourceFile, position: number): Node { return getTouchingToken(sourceFile, position, n => isPropertyNameLiteral(n) || isKeyword(n.kind) || isPrivateIdentifier(n)); @@ -1230,9 +1230,10 @@ namespace ts { * The token on the left of the position is the token that strictly includes the position * or sits to the left of the cursor if it is on a boundary. For example * - * fo|o -> will return foo - * foo |bar -> will return foo - * + * ```plaintext + * fo|o -> will return foo + * foo |bar -> will return foo + * ``` */ export function findTokenOnLeftOfPosition(file: SourceFile, position: number): Node | undefined { // Ideally, getTokenAtPosition should return a token. However, it is currently @@ -1659,8 +1660,7 @@ namespace ts { /** * Returns true if the cursor at position in sourceFile is within a comment. * - * @param tokenAtPosition Must equal `getTokenAtPosition(sourceFile, position) - * @param predicate Additional predicate to test on the comment range. + * @param tokenAtPosition - Must equal `getTokenAtPosition(sourceFile, position)` */ export function isInComment(sourceFile: SourceFile, position: number, tokenAtPosition?: Node): CommentRange | undefined { return formatting.getRangeOfEnclosingComment(sourceFile, position, /*precedingToken*/ undefined, tokenAtPosition); @@ -2646,7 +2646,7 @@ namespace ts { } /** - * @return The index of the (only) reference to the extracted symbol. We want the cursor + * @returns The index of the (only) reference to the extracted symbol. We want the cursor * to be on the reference, rather than the declaration, because it's closer to where the * user was before extracting it. */ @@ -3348,9 +3348,9 @@ namespace ts { * haystack.indexOf(needle, startIndex) === startIndex * ``` * - * @param haystack The string that potentially contains `needle`. - * @param needle The string whose content might sit within `haystack`. - * @param startIndex The index within `haystack` to start searching for `needle`. + * @param haystack - The string that potentially contains `needle`. + * @param needle - The string whose content might sit within `haystack`. + * @param startIndex - The index within `haystack` to start searching for `needle`. */ export function stringContainsAt(haystack: string, needle: string, startIndex: number) { const needleLength = needle.length; diff --git a/src/testRunner/externalCompileRunner.ts b/src/testRunner/externalCompileRunner.ts index 92acf6532b088..12b4b9252e582 100644 --- a/src/testRunner/externalCompileRunner.ts +++ b/src/testRunner/externalCompileRunner.ts @@ -296,10 +296,12 @@ ${result.stderr.toString().replace(/\r\n/g, "\n")}`; /** * Split an array into multiple arrays whenever `isStart` returns true. * @example + * ``` * splitBy([1,2,3,4,5,6], isOdd) * ==> [[1, 2], [3, 4], [5, 6]] * where * const isOdd = n => !!(n % 2) + * ``` */ function splitBy(xs: T[], isStart: (x: T) => boolean): T[][] { const result = []; diff --git a/src/testRunner/parallel/worker.ts b/src/testRunner/parallel/worker.ts index ed91b3c285fd6..b441499c8e22a 100644 --- a/src/testRunner/parallel/worker.ts +++ b/src/testRunner/parallel/worker.ts @@ -24,8 +24,8 @@ namespace Harness.Parallel.Worker { /** * Mixin helper. - * @param base The base class constructor. - * @param mixins The mixins to apply to the constructor. + * @param base - The base class constructor. + * @param mixins - The mixins to apply to the constructor. */ function mixin any>(base: T, ...mixins: ((klass: T) => T)[]) { for (const mixin of mixins) { @@ -93,8 +93,8 @@ namespace Harness.Parallel.Worker { /** * Shims a 'bdd'-style test interface to support parallel test execution in a worker. - * @param rootSuite The root suite. - * @param context The test context (usually the NodeJS `global` object). + * @param rootSuite - The root suite. + * @param context - The test context (usually the NodeJS `global` object). */ function shimTestInterface(rootSuite: Mocha.Suite, context: Mocha.MochaGlobals) { const suites = [rootSuite]; diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index c30eeaecddad7..5a4a108681f08 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -2201,7 +2201,7 @@ declare namespace ts { readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; /** * Gets a value indicating whether the specified path exists and is a file. - * @param path The path to test. + * @param path - The path to test. */ fileExists(path: string): boolean; readFile(path: string): string | undefined; @@ -2391,7 +2391,7 @@ declare namespace ts { /** * returns unknownSignature in the case of an error. * returns undefined if the node is not valid. - * @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`. + * @param argumentCount - Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`. */ getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined; @@ -2479,7 +2479,7 @@ declare namespace ts { InElementType = 2097152, InFirstTypeArgument = 4194304, InTypeAlias = 8388608, - /** @deprecated */ WriteOwnNameForAnyLike = 0, + /** @deprecated Unused. */ WriteOwnNameForAnyLike = 0, NodeBuilderFlagsMask = 848330091 } export enum SymbolFormatFlags { @@ -3407,17 +3407,17 @@ declare namespace ts { createIdentifier(text: string): Identifier; /** * Create a unique temporary variable. - * @param recordTempVariable An optional callback used to record the temporary variable name. This + * @param recordTempVariable - An optional callback used to record the temporary variable name. This * should usually be a reference to `hoistVariableDeclaration` from a `TransformationContext`, but * can be `undefined` if you plan to record the temporary variable manually. - * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes + * @param reservedInNestedScopes - When `true`, reserves the temporary variable name in all nested scopes * during emit so that the variable can be referenced in a nested function body. This is an alternative to * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. */ createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined, reservedInNestedScopes?: boolean): Identifier; /** * Create a unique temporary variable for use in a loop. - * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes + * @param reservedInNestedScopes - When `true`, reserves the temporary variable name in all nested scopes * during emit so that the variable can be referenced in a nested function body. This is an alternative to * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. */ @@ -3923,22 +3923,22 @@ declare namespace ts { /** * Gets a substitute for a node, if one is available; otherwise, returns the original node. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to substitute. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to substitute. */ substituteNode(hint: EmitHint, node: Node): Node; /** * Emits a node with possible notification. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emitCallback A callback used to emit the node. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to emit. + * @param emitCallback - A callback used to emit the node. */ emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; /** * Indicates if a given node needs an emit notification * - * @param node The node to emit. + * @param node - The node to emit. */ isEmitNotificationEnabled?(node: Node): boolean; /** @@ -3971,13 +3971,13 @@ declare namespace ts { export interface Printer { /** * Print a node and its subtree as-is, without any emit transformations. - * @param hint A value indicating the purpose of a node. This is primarily used to + * @param hint - A value indicating the purpose of a node. This is primarily used to * distinguish between an `Identifier` used in an expression position, versus an * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you * should just pass `Unspecified`. - * @param node The node to print. The node and its subtree are printed as-is, without any + * @param node - The node to print. The node and its subtree are printed as-is, without any * emit transformations. - * @param sourceFile A source file that provides context for the node. The source text of + * @param sourceFile - A source file that provides context for the node. The source text of * the file is used to emit the original source content for literals and identifiers, while * the identifiers of the source file are used when generating unique names to avoid * collisions. @@ -4006,9 +4006,9 @@ declare namespace ts { * A hook used by the Printer to provide notifications prior to emitting a node. A * compatible implementation **must** invoke `emitCallback` with the provided `hint` and * `node` values. - * @param hint A hint indicating the intended purpose of the node. - * @param node The node to emit. - * @param emitCallback A callback that, when invoked, will emit the node. + * @param hint - A hint indicating the intended purpose of the node. + * @param node - The node to emit. + * @param emitCallback - A callback that, when invoked, will emit the node. * @example * ```ts * var printer = createPrinter(printerOptions, { @@ -4023,15 +4023,15 @@ declare namespace ts { onEmitNode?(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; /** * A hook used to check if an emit notification is required for a node. - * @param node The node to emit. + * @param node - The node to emit. */ isEmitNotificationEnabled?(node: Node): boolean; /** * A hook used by the Printer to perform just-in-time substitution of a node. This is * primarily used by node transformations that need to substitute one node for another, * such as replacing `myExportedVar` with `exports.myExportedVar`. - * @param hint A hint indicating the intended purpose of the node. - * @param node The node to emit. + * @param hint - A hint indicating the intended purpose of the node. + * @param node - The node to emit. * @example * ```ts * var printer = createPrinter(printerOptions, { @@ -4195,7 +4195,7 @@ declare namespace ts { getFileSize?(path: string): number; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; /** - * @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that + * @param pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that * use native OS file watching */ watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; @@ -4362,21 +4362,21 @@ declare namespace ts { /** * Gets a value indicating whether a node originated in the parse tree. * - * @param node The node to test. + * @param node - The node to test. */ function isParseTreeNode(node: Node): boolean; /** * Gets the original parse tree node for a node. * - * @param node The original node. + * @param node - The original node. * @returns The original parse tree node if found; otherwise, undefined. */ function getParseTreeNode(node: Node | undefined): Node | undefined; /** * Gets the original parse tree node for a node. * - * @param node The original node. - * @param nodeTest A callback used to ensure the correct type of parse tree node is returned. + * @param node - The original node. + * @param nodeTest - A callback used to ensure the correct type of parse tree node is returned. * @returns The original parse tree node if found; otherwise, undefined. */ function getParseTreeNode(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined; @@ -4385,7 +4385,7 @@ declare namespace ts { /** * Remove extra underscore from escaped identifier text content. * - * @param identifier The escaped identifier text. + * @param identifier - The escaped identifier text. * @returns The unescaped identifier text. */ function unescapeLeadingUnderscores(identifier: __String): string; @@ -4486,9 +4486,11 @@ declare namespace ts { * * This does *not* return type parameters from a jsdoc reference to a generic type, eg * + * ``` * type Id = (x: T) => T * /** @type {Id} / * function id(x) { return x } + * ``` */ function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[]; function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined; @@ -4584,7 +4586,7 @@ declare namespace ts { declare namespace ts { /** * Clears any `EmitNode` entries from parse-tree nodes. - * @param sourceFile A source file. + * @param sourceFile - A source file. */ function disposeEmitNodes(sourceFile: SourceFile | undefined): void; /** @@ -4865,9 +4867,9 @@ declare namespace ts { * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. * - * @param node a given node to visit its children - * @param cbNode a callback to be invoked for all child nodes - * @param cbNodes a callback to be invoked for embedded array + * @param node - a given node to visit its children + * @param cbNode - a callback to be invoked for all child nodes + * @param cbNodes - a callback to be invoked for embedded array * * @remarks `forEachChild` must visit the children of a node in the order * that they appear in the source code. The language service depends on this property to locate nodes by position. @@ -4892,8 +4894,8 @@ declare namespace ts { export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined; /** * Parse json text into SyntaxTree and return node and parse errors if any - * @param fileName - * @param sourceText + * @param fileName - + * @param sourceText - */ export function parseJsonText(fileName: string, sourceText: string): JsonSourceFile; export function isExternalModule(file: SourceFile): boolean; @@ -4924,7 +4926,7 @@ declare namespace ts { export function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions | undefined, host: ParseConfigFileHost, extendedConfigCache?: Map, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined; /** * Read tsconfig.json file - * @param fileName The path to the config file + * @param fileName - The path to the config file */ export function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): { config?: any; @@ -4932,8 +4934,8 @@ declare namespace ts { }; /** * Parse the text of the tsconfig.json file - * @param fileName The path to the config file - * @param jsonText The text of the config file + * @param fileName - The path to the config file + * @param jsonText - The text of the config file */ export function parseConfigFileTextToJson(fileName: string, jsonText: string): { config?: any; @@ -4941,7 +4943,7 @@ declare namespace ts { }; /** * Read tsconfig.json file - * @param fileName The path to the config file + * @param fileName - The path to the config file */ export function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile; /** @@ -4950,17 +4952,17 @@ declare namespace ts { export function convertToObject(sourceFile: JsonSourceFile, errors: Push): any; /** * Parse the contents of a config file (tsconfig.json). - * @param json The contents of the config file to parse - * @param host Instance of ParseConfigHost used to enumerate files in folder. - * @param basePath A root directory to resolve relative path entries in the config + * @param json - The contents of the config file to parse + * @param host - Instance of ParseConfigHost used to enumerate files in folder. + * @param basePath - A root directory to resolve relative path entries in the config * file to. e.g. outDir */ export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map, existingWatchOptions?: WatchOptions): ParsedCommandLine; /** * Parse the contents of a config file (tsconfig.json). - * @param jsonNode The contents of the config file to parse - * @param host Instance of ParseConfigHost used to enumerate files in folder. - * @param basePath A root directory to resolve relative path entries in the config + * @param jsonNode - The contents of the config file to parse + * @param host - Instance of ParseConfigHost used to enumerate files in folder. + * @param basePath - A root directory to resolve relative path entries in the config * file to. e.g. outDir */ export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map, existingWatchOptions?: WatchOptions): ParsedCommandLine; @@ -4991,7 +4993,7 @@ declare namespace ts { declare namespace ts { export function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined; /** - * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * @param containingFile - file that contains type reference directive, can be undefined if containing file is unknown. * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups * is assumed to be the same as root directory of the project. */ @@ -5032,7 +5034,7 @@ declare namespace ts { getPackageJsonInfoCache(): PackageJsonInfoCache; } /** - * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory + * Stored map from non-relative module name to a table: directory to result of module lookup in this directory * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive. */ export interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache { @@ -5057,39 +5059,39 @@ declare namespace ts { /** * Visits a Node using the supplied visitor, possibly returning a new Node in its place. * - * @param node The Node to visit. - * @param visitor The callback used to visit the Node. - * @param test A callback to execute to verify the Node is valid. - * @param lift An optional callback to execute to lift a NodeArray into a valid Node. + * @param node - The Node to visit. + * @param visitor - The callback used to visit the Node. + * @param test - A callback to execute to verify the Node is valid. + * @param lift - An optional callback to execute to lift a NodeArray into a valid Node. */ function visitNode(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T; /** * Visits a Node using the supplied visitor, possibly returning a new Node in its place. * - * @param node The Node to visit. - * @param visitor The callback used to visit the Node. - * @param test A callback to execute to verify the Node is valid. - * @param lift An optional callback to execute to lift a NodeArray into a valid Node. + * @param node - The Node to visit. + * @param visitor - The callback used to visit the Node. + * @param test - A callback to execute to verify the Node is valid. + * @param lift - An optional callback to execute to lift a NodeArray into a valid Node. */ function visitNode(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined; /** * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. * - * @param nodes The NodeArray to visit. - * @param visitor The callback used to visit a Node. - * @param test A node test to execute for each node. - * @param start An optional value indicating the starting offset at which to start visiting. - * @param count An optional value indicating the maximum number of nodes to visit. + * @param nodes - The NodeArray to visit. + * @param visitor - The callback used to visit a Node. + * @param test - A node test to execute for each node. + * @param start - An optional value indicating the starting offset at which to start visiting. + * @param count - An optional value indicating the maximum number of nodes to visit. */ function visitNodes(nodes: NodeArray, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray; /** * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. * - * @param nodes The NodeArray to visit. - * @param visitor The callback used to visit a Node. - * @param test A node test to execute for each node. - * @param start An optional value indicating the starting offset at which to start visiting. - * @param count An optional value indicating the maximum number of nodes to visit. + * @param nodes - The NodeArray to visit. + * @param visitor - The callback used to visit a Node. + * @param test - A node test to execute for each node. + * @param start - An optional value indicating the starting offset at which to start visiting. + * @param count - An optional value indicating the maximum number of nodes to visit. */ function visitNodes(nodes: NodeArray | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray | undefined; /** @@ -5125,17 +5127,17 @@ declare namespace ts { /** * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. * - * @param node The Node whose children will be visited. - * @param visitor The callback used to visit each child. - * @param context A lexical environment context for the visitor. + * @param node - The Node whose children will be visited. + * @param visitor - The callback used to visit each child. + * @param context - A lexical environment context for the visitor. */ function visitEachChild(node: T, visitor: Visitor, context: TransformationContext): T; /** * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. * - * @param node The Node whose children will be visited. - * @param visitor The callback used to visit each child. - * @param context A lexical environment context for the visitor. + * @param node - The Node whose children will be visited. + * @param visitor - The callback used to visit each child. + * @param context - A lexical environment context for the visitor. */ function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; } @@ -5167,8 +5169,8 @@ declare namespace ts { * Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly * defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm). * If you have an actual import node, prefer using getModeForUsageLocation on the reference string node. - * @param file File to fetch the resolution mode within - * @param index Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations + * @param file - File to fetch the resolution mode within + * @param index - Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations */ export function getModeForResolutionAtIndex(file: SourceFile, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; /** @@ -5176,8 +5178,8 @@ declare namespace ts { * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm). * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when * `moduleResolution` is `node16`+. - * @param file The file the import or import-like reference is contained within - * @param usage The module reference string + * @param file - The file the import or import-like reference is contained within + * @param usage - The module reference string * @returns The final resolution mode of the import */ export function getModeForUsageLocation(file: { @@ -5188,10 +5190,10 @@ declare namespace ts { * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the * `options` parameter. * - * @param fileName The normalized absolute path to check the format of (it need not exist on disk) - * @param [packageJsonInfoCache] A cache for package file lookups - it's best to have a cache when this function is called often - * @param host The ModuleResolutionHost which can perform the filesystem lookups for package json data - * @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution` + * @param fileName - The normalized absolute path to check the format of (it need not exist on disk) + * @param packageJsonInfoCache - A cache for package file lookups - it's best to have a cache when this function is called often + * @param host - The ModuleResolutionHost which can perform the filesystem lookups for package json data + * @param options - The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution` * @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format */ export function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ModuleKind.ESNext | ModuleKind.CommonJS | undefined; @@ -5200,7 +5202,7 @@ declare namespace ts { * that represent a compilation unit. * * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and - * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. + * triple-slash-reference-path directives transitively. `@types` and triple-slash-reference-types are also pulled in. * * @param createProgramOptions - The options for creating a program. * @returns A 'Program' object. @@ -5211,7 +5213,7 @@ declare namespace ts { * that represent a compilation unit. * * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and - * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. + * triple-slash-reference-path directives transitively. `@types` and triple-slash-reference-types are also pulled in. * * @param rootNames - A set of root files. * @param options - The compiler options which should be used. @@ -5221,7 +5223,7 @@ declare namespace ts { * @returns A 'Program' object. */ export function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program; - /** @deprecated */ export interface ResolveProjectReferencePathHost { + /** @deprecated For backward compatibility */ export interface ResolveProjectReferencePathHost { fileExists(fileName: string): boolean; } /** @@ -5229,7 +5231,7 @@ declare namespace ts { * Note: The file might not exist. */ export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName; - /** @deprecated */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName; + /** @deprecated For backward compatibility */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName; export {}; } declare namespace ts { @@ -5877,7 +5879,7 @@ declare namespace ts { * While these represent the majority of syntax-related diagnostics, there are some * that require the type system, which will be present in `getSemanticDiagnostics`. * - * @param fileName A path to the file you want syntactic diagnostics for + * @param fileName - A path to the file you want syntactic diagnostics for */ getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[]; /** @@ -5893,7 +5895,7 @@ declare namespace ts { * sentence: "The sun is green." is syntactically correct; those are real English words with * correct sentence structure. However, it is semantically invalid, because it is not true. * - * @param fileName A path to the file you want semantic diagnostics for + * @param fileName - A path to the file you want semantic diagnostics for */ getSemanticDiagnostics(fileName: string): Diagnostic[]; /** @@ -5901,7 +5903,7 @@ declare namespace ts { * proactively suggest refactors, as opposed to diagnostics that indicate * potentially incorrect runtime behavior. * - * @param fileName A path to the file you want semantic diagnostics for + * @param fileName - A path to the file you want semantic diagnostics for */ getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[]; /** @@ -5920,32 +5922,32 @@ declare namespace ts { * Gets semantic highlights information for a particular file. Has two formats, an older * version used by VS and a format used by VS Code. * - * @param fileName The path to the file - * @param position A text span to return results within - * @param format Which format to use, defaults to "original" + * @param fileName - The path to the file + * @param position - A text span to return results within + * @param format - Which format to use, defaults to "original" * @returns a number array encoded as triples of [start, length, ClassificationType, ...]. */ getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications; /** * Gets completion entries at a particular position in a file. * - * @param fileName The path to the file - * @param position A zero-based index of the character where you want the entries - * @param options An object describing how the request was triggered and what kinds + * @param fileName - The path to the file + * @param position - A zero-based index of the character where you want the entries + * @param options - An object describing how the request was triggered and what kinds * of code actions can be returned with the completions. - * @param formattingSettings settings needed for calling formatting functions. + * @param formattingSettings - settings needed for calling formatting functions. */ getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined, formattingSettings?: FormatCodeSettings): WithMetadata | undefined; /** * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`. * - * @param fileName The path to the file - * @param position A zero based index of the character where you want the entries - * @param entryName The `name` from an existing completion which came from `getCompletionsAtPosition` - * @param formatOptions How should code samples in the completions be formatted, can be undefined for backwards compatibility - * @param source `source` property from the completion entry - * @param preferences User settings, can be undefined for backwards compatibility - * @param data `data` property from the completion entry + * @param fileName - The path to the file + * @param position - A zero based index of the character where you want the entries + * @param entryName - The `name` from an existing completion which came from `getCompletionsAtPosition` + * @param formatOptions - How should code samples in the completions be formatted, can be undefined for backwards compatibility + * @param source - `source` property from the completion entry + * @param preferences - User settings, can be undefined for backwards compatibility + * @param data - `data` property from the completion entry */ getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined, data: CompletionEntryData | undefined): CompletionEntryDetails | undefined; getCompletionEntrySymbol(fileName: string, position: number, name: string, source: string | undefined): Symbol | undefined; @@ -5953,8 +5955,8 @@ declare namespace ts { * Gets semantic information about the identifier at a particular position in a * file. Quick info is what you typically see when you hover in an editor. * - * @param fileName The path to the file - * @param position A zero-based index of the character where you want the quick info + * @param fileName - The path to the file + * @param position - A zero-based index of the character where you want the quick info */ getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined; getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined; @@ -5973,7 +5975,7 @@ declare namespace ts { findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined; getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined; getFileReferences(fileName: string): ReferenceEntry[]; - /** @deprecated */ + /** @deprecated Use document highlights. */ getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined; getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[]; getNavigationBarItems(fileName: string): NavigationBarItem[]; @@ -6547,7 +6549,7 @@ declare namespace ts { isGlobalCompletion: boolean; isMemberCompletion: boolean; /** - * In the absence of `CompletionEntry["replacementSpan"], the editor may choose whether to use + * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span * must be used to commit that completion entry. */ @@ -6702,9 +6704,9 @@ declare namespace ts { * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the * lexical, syntactic, and semantic classifiers may issue the best user experience. * - * @param text The text of a line to classify. - * @param lexState The state of the lexical classifier at the end of the previous line. - * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. + * @param text - The text of a line to classify. + * @param lexState - The state of the lexical classifier at the end of the previous line. + * @param syntacticClassifierAbsent - Whether the client is *not* using a syntactic classifier. * If there is no syntactic classifier (syntacticClassifierAbsent=true), * certain heuristics may be used in its place; however, if there is a * syntactic classifier (syntacticClassifierAbsent=false), certain @@ -6723,57 +6725,122 @@ declare namespace ts { keyword = "keyword", /** top level script node */ scriptElement = "script", - /** module foo {} */ + /** + * ``` + * module foo {} + * ``` + */ moduleElement = "module", - /** class X {} */ + /** + * ``` + * class X {} + * ``` + */ classElement = "class", - /** var x = class X {} */ + /** + * ``` + * var x = class X {} + * ``` + */ localClassElement = "local class", - /** interface Y {} */ + /** + * ``` + * interface Y {} + * ``` + */ interfaceElement = "interface", - /** type T = ... */ + /** + * ``` + * type T = ... + * ``` + */ typeElement = "type", - /** enum E */ + /** + * ``` + * enum E + * ``` + */ enumElement = "enum", enumMemberElement = "enum member", /** * Inside module and script only + * ``` * const v = .. + * ``` */ variableElement = "var", /** Inside function */ localVariableElement = "local var", /** * Inside module and script only + * ``` * function f() { } + * ``` */ functionElement = "function", /** Inside function */ localFunctionElement = "local function", - /** class X { [public|private]* foo() {} } */ + /** + * ``` + * class X { [public|private]* foo() {} } + * ``` + */ memberFunctionElement = "method", - /** class X { [public|private]* [get|set] foo:number; } */ + /** + * ``` + * class X { [public|private]* get foo:number; } + * ``` + */ memberGetAccessorElement = "getter", + /** + * ``` + * class X { [public|private]* set foo:number; } + * ``` + */ memberSetAccessorElement = "setter", /** + * ``` * class X { [public|private]* foo:number; } * interface Y { foo:number; } + * ``` */ memberVariableElement = "property", - /** class X { [public|private]* accessor foo: number; } */ + /** + * ``` + * class X { [public|private]* accessor foo: number; } + * ``` + */ memberAccessorVariableElement = "accessor", /** + * ``` * class X { constructor() { } } * class X { static { } } + * ``` */ constructorImplementationElement = "constructor", - /** interface Y { ():number; } */ + /** + * ``` + * interface Y { ():number; } + * ``` + */ callSignatureElement = "call", - /** interface Y { []:number; } */ + /** + * ``` + * interface Y { []:number; } + * ``` + */ indexSignatureElement = "index", - /** interface Y { new():Y; } */ + /** + * ``` + * interface Y { new():Y; } + * ``` + */ constructSignatureElement = "construct", - /** function foo(*Y*: string) */ + /** + * ``` + * function foo(*Y*: string) + * ``` + */ parameterElement = "parameter", typeParameterElement = "type parameter", primitiveType = "primitive type", @@ -6784,17 +6851,19 @@ declare namespace ts { directory = "directory", externalModuleName = "external module name", /** + * ```jsx * - * @deprecated + * ``` + * @deprecated No longer returned by any API. */ jsxAttribute = "JSX attribute", /** String literal */ string = "string", - /** Jsdoc @link: in `{@link C link text}`, the before and after text "{@link " and "}" */ + /** Jsdoc `@link`: in `{@link C link text}`, the before and after text "{@link " and "}" */ link = "link", - /** Jsdoc @link: in `{@link C link text}`, the entity name "C" */ + /** Jsdoc `@link`: in `{@link C link text}`, the entity name "C" */ linkName = "link name", - /** Jsdoc @link: in `{@link C link text}`, the link text "link text" */ + /** Jsdoc `@link`: in `{@link C link text}`, the link text "link text" */ linkText = "link text" } enum ScriptElementKindModifier { @@ -6915,16 +6984,16 @@ declare namespace ts { * The first call to acquire will call createLanguageServiceSourceFile to generate * the SourceFile if was not found in the registry. * - * @param fileName The name of the file requested - * @param compilationSettingsOrHost Some compilation settings like target affects the + * @param fileName - The name of the file requested + * @param compilationSettingsOrHost - Some compilation settings like target affects the * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. - * @param scriptSnapshot Text of the file. Only used if the file was not found + * @param scriptSnapshot - Text of the file. Only used if the file was not found * in the registry and a new one was created. - * @param version Current version of the file. Only used if the file was not found + * @param version - Current version of the file. Only used if the file was not found * in the registry and a new one was created. */ acquireDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; @@ -6934,15 +7003,15 @@ declare namespace ts { * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile * to get an updated SourceFile. * - * @param fileName The name of the file requested - * @param compilationSettingsOrHost Some compilation settings like target affects the + * @param fileName - The name of the file requested + * @param compilationSettingsOrHost - Some compilation settings like target affects the * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. - * @param scriptSnapshot Text of the file. - * @param version Current version of the file. + * @param scriptSnapshot - Text of the file. + * @param version - Current version of the file. */ updateDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; updateDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; @@ -6953,9 +7022,9 @@ declare namespace ts { * Note: It is not allowed to call release on a SourceFile that was not acquired from * this registry originally. * - * @param fileName The name of the file to be released - * @param compilationSettings The compilation settings used to acquire the file - * @param scriptKind The script kind of the file to be released + * @param fileName - The name of the file to be released + * @param compilationSettings - The compilation settings used to acquire the file + * @param scriptKind - The script kind of the file to be released */ /**@deprecated pass scriptKind and impliedNodeFormat for correctness */ releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind?: ScriptKind): void; @@ -6965,10 +7034,10 @@ declare namespace ts { * Note: It is not allowed to call release on a SourceFile that was not acquired from * this registry originally. * - * @param fileName The name of the file to be released - * @param compilationSettings The compilation settings used to acquire the file - * @param scriptKind The script kind of the file to be released - * @param impliedNodeFormat The implied source file format of the file to be released + * @param fileName - The name of the file to be released + * @param compilationSettings - The compilation settings used to acquire the file + * @param scriptKind - The script kind of the file to be released + * @param impliedNodeFormat - The implied source file format of the file to be released */ releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void; /** @@ -7022,9 +7091,9 @@ declare namespace ts { declare namespace ts { /** * Transform one or more nodes using the supplied transformers. - * @param source A single `Node` or an array of `Node` objects. - * @param transformers An array of `TransformerFactory` callbacks used to process the transformation. - * @param compilerOptions Optional compiler options. + * @param source - A single `Node` or an array of `Node` objects. + * @param transformers - An array of `TransformerFactory` callbacks used to process the transformation. + * @param compilerOptions - Optional compiler options. */ function transform(source: T | T[], transformers: TransformerFactory[], compilerOptions?: CompilerOptions): TransformationResult; } @@ -7143,7 +7212,7 @@ declare namespace ts.server.protocol { Navto = "navto", NavTree = "navtree", NavTreeFull = "navtree-full", - /** @deprecated */ + /** @deprecated Use document highlights. */ Occurrences = "occurrences", DocumentHighlights = "documentHighlights", Open = "open", @@ -7898,15 +7967,15 @@ declare namespace ts.server.protocol { readonly body: TextInsertion; } /** - * @deprecated * Get occurrences request; value of command field is * "occurrences". Return response giving spans that are relevant * in the file at a given line and column. + * @deprecated Use document highlights. */ interface OccurrencesRequest extends FileLocationRequest { command: CommandTypes.Occurrences; } - /** @deprecated */ + /** @deprecated Use document highlights. */ interface OccurrencesResponseItem extends FileSpanWithContext { /** * True if the occurrence is a write location, false otherwise. @@ -7917,7 +7986,7 @@ declare namespace ts.server.protocol { */ isInString?: true; } - /** @deprecated */ + /** @deprecated Use document highlights. */ interface OccurrencesResponse extends Response { body?: OccurrencesResponseItem[]; } @@ -8119,7 +8188,7 @@ declare namespace ts.server.protocol { } /** * Represents a file in external project. - * External project is project whose set of files, compilation options and open\close state + * External project is project whose set of files, compilation options and open/close state * is maintained by the client (i.e. if all this data come from .csproj file in Visual Studio). * External project will exist even if all files in it are closed and should be closed explicitly. * If external project includes one or more tsconfig.json/jsconfig.json files then tsserver will @@ -8690,7 +8759,7 @@ declare namespace ts.server.protocol { */ interface FormatOnKeyRequestArgs extends FileLocationRequestArgs { /** - * Key pressed (';', '\n', or '}'). + * Key pressed (`';'`, `'\n'`, or `'}'`). */ key: string; options?: FormatCodeSettings; @@ -8786,9 +8855,9 @@ declare namespace ts.server.protocol { */ kind: string; } - /** A part of a symbol description that links from a jsdoc @link tag to a declaration */ + /** A part of a symbol description that links from a jsdoc `@link` tag to a declaration */ interface JSDocLinkDisplayPart extends SymbolDisplayPart { - /** The location of the declaration that the @link tag links to. */ + /** The location of the declaration that the `@link` tag links to. */ target: FileSpan; } /** @@ -8876,7 +8945,7 @@ declare namespace ts.server.protocol { interface CompletionEntryLabelDetails { /** * An optional string which is rendered less prominently directly after - * {@link CompletionEntry.name name}, without any spacing. Should be + * {@link CompletionEntry.name | name}, without any spacing. Should be * used for function signatures or type annotations. */ detail?: string; @@ -9789,7 +9858,7 @@ declare namespace ts.server.protocol { */ readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean; /** - * Indicates whether {@link CompletionEntry.labelDetails completion entry label details} are supported. + * Indicates whether {@link CompletionEntry.labelDetails | completion entry label details} are supported. * If not, contents of `labelDetails` may be included in the {@link CompletionEntry.name} property. */ readonly useLabelDetailsInCompletionEntries?: boolean; @@ -9995,12 +10064,12 @@ declare namespace ts.server { markContainingProjectsAsDirty(): void; isOrphan(): boolean; /** - * @param line 1 based index + * @param line - 1 based index */ lineToTextSpan(line: number): TextSpan; /** - * @param line 1 based index - * @param offset 1 based index + * @param line - 1 based index + * @param offset - 1 based index */ lineOffsetToPosition(line: number, offset: number): number; positionToLineOffset(position: number): protocol.Location; @@ -10173,7 +10242,7 @@ declare namespace ts.server { markAsDirty(): void; /** * Updates set of files that contribute to this project - * @returns: true if set of files in the project stays the same and false - otherwise. + * @returns true if set of files in the project stays the same and false - otherwise. */ updateGraph(): boolean; protected removeExistingTypings(include: string[]): string[]; @@ -10238,7 +10307,7 @@ declare namespace ts.server { private projectReferences; /** * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph - * @returns: true if set of files in the project stays the same and false - otherwise. + * @returns true if set of files in the project stays the same and false - otherwise. */ updateGraph(): boolean; getConfigFilePath(): NormalizedPath; @@ -10540,7 +10609,7 @@ declare namespace ts.server { private assignOrphanScriptInfosToInferredProject; /** * Remove this file from the set of open, non-configured files. - * @param info The file that has been closed or newly configured + * @param info - The file that has been closed or newly configured */ private closeOpenFile; private deleteScriptInfo; @@ -10637,8 +10706,8 @@ declare namespace ts.server { private ensureProjectForOpenFiles; /** * Open file whose contents is managed by the client - * @param filename is absolute pathname - * @param fileContent is a known version of the file content that is more up to date than the one on disk + * @param filename - is absolute pathname + * @param fileContent - is a known version of the file content that is more up to date than the one on disk */ openClientFile(fileName: string, fileContent?: string, scriptKind?: ScriptKind, projectRootPath?: string): OpenConfiguredProjectResult; private findExternalProjectContainingOpenScriptInfo; @@ -10653,7 +10722,7 @@ declare namespace ts.server { private telemetryOnOpenFile; /** * Close file whose contents is managed by the client - * @param filename is absolute pathname + * @param filename - is absolute pathname */ closeClientFile(uncheckedFileName: string): void; private collectChanges; @@ -10745,7 +10814,7 @@ declare namespace ts.server { send(msg: protocol.Message): void; protected writeMessage(msg: protocol.Message): void; event(body: T, eventName: string): void; - /** @deprecated */ + /** @deprecated For backwards-compatibility only. */ output(info: any, cmdName: string, reqSeq?: number, errorMsg?: string): void; private doOutput; private semanticCheck; @@ -10799,8 +10868,8 @@ declare namespace ts.server { private getReferences; private getFileReferences; /** - * @param fileName is the name of the file to be opened - * @param fileContent is a version of the file content that is known to be more up to date than the one on disk + * @param fileName - is the name of the file to be opened + * @param fileContent - is a version of the file content that is known to be more up to date than the one on disk */ private openClientFile; private getPosition; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 847e1301be640..7a218cf29ca1c 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -2201,7 +2201,7 @@ declare namespace ts { readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; /** * Gets a value indicating whether the specified path exists and is a file. - * @param path The path to test. + * @param path - The path to test. */ fileExists(path: string): boolean; readFile(path: string): string | undefined; @@ -2391,7 +2391,7 @@ declare namespace ts { /** * returns unknownSignature in the case of an error. * returns undefined if the node is not valid. - * @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`. + * @param argumentCount - Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`. */ getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined; @@ -2479,7 +2479,7 @@ declare namespace ts { InElementType = 2097152, InFirstTypeArgument = 4194304, InTypeAlias = 8388608, - /** @deprecated */ WriteOwnNameForAnyLike = 0, + /** @deprecated Unused. */ WriteOwnNameForAnyLike = 0, NodeBuilderFlagsMask = 848330091 } export enum SymbolFormatFlags { @@ -3407,17 +3407,17 @@ declare namespace ts { createIdentifier(text: string): Identifier; /** * Create a unique temporary variable. - * @param recordTempVariable An optional callback used to record the temporary variable name. This + * @param recordTempVariable - An optional callback used to record the temporary variable name. This * should usually be a reference to `hoistVariableDeclaration` from a `TransformationContext`, but * can be `undefined` if you plan to record the temporary variable manually. - * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes + * @param reservedInNestedScopes - When `true`, reserves the temporary variable name in all nested scopes * during emit so that the variable can be referenced in a nested function body. This is an alternative to * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. */ createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined, reservedInNestedScopes?: boolean): Identifier; /** * Create a unique temporary variable for use in a loop. - * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes + * @param reservedInNestedScopes - When `true`, reserves the temporary variable name in all nested scopes * during emit so that the variable can be referenced in a nested function body. This is an alternative to * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. */ @@ -3923,22 +3923,22 @@ declare namespace ts { /** * Gets a substitute for a node, if one is available; otherwise, returns the original node. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to substitute. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to substitute. */ substituteNode(hint: EmitHint, node: Node): Node; /** * Emits a node with possible notification. * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emitCallback A callback used to emit the node. + * @param hint - A hint as to the intended usage of the node. + * @param node - The node to emit. + * @param emitCallback - A callback used to emit the node. */ emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; /** * Indicates if a given node needs an emit notification * - * @param node The node to emit. + * @param node - The node to emit. */ isEmitNotificationEnabled?(node: Node): boolean; /** @@ -3971,13 +3971,13 @@ declare namespace ts { export interface Printer { /** * Print a node and its subtree as-is, without any emit transformations. - * @param hint A value indicating the purpose of a node. This is primarily used to + * @param hint - A value indicating the purpose of a node. This is primarily used to * distinguish between an `Identifier` used in an expression position, versus an * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you * should just pass `Unspecified`. - * @param node The node to print. The node and its subtree are printed as-is, without any + * @param node - The node to print. The node and its subtree are printed as-is, without any * emit transformations. - * @param sourceFile A source file that provides context for the node. The source text of + * @param sourceFile - A source file that provides context for the node. The source text of * the file is used to emit the original source content for literals and identifiers, while * the identifiers of the source file are used when generating unique names to avoid * collisions. @@ -4006,9 +4006,9 @@ declare namespace ts { * A hook used by the Printer to provide notifications prior to emitting a node. A * compatible implementation **must** invoke `emitCallback` with the provided `hint` and * `node` values. - * @param hint A hint indicating the intended purpose of the node. - * @param node The node to emit. - * @param emitCallback A callback that, when invoked, will emit the node. + * @param hint - A hint indicating the intended purpose of the node. + * @param node - The node to emit. + * @param emitCallback - A callback that, when invoked, will emit the node. * @example * ```ts * var printer = createPrinter(printerOptions, { @@ -4023,15 +4023,15 @@ declare namespace ts { onEmitNode?(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; /** * A hook used to check if an emit notification is required for a node. - * @param node The node to emit. + * @param node - The node to emit. */ isEmitNotificationEnabled?(node: Node): boolean; /** * A hook used by the Printer to perform just-in-time substitution of a node. This is * primarily used by node transformations that need to substitute one node for another, * such as replacing `myExportedVar` with `exports.myExportedVar`. - * @param hint A hint indicating the intended purpose of the node. - * @param node The node to emit. + * @param hint - A hint indicating the intended purpose of the node. + * @param node - The node to emit. * @example * ```ts * var printer = createPrinter(printerOptions, { @@ -4195,7 +4195,7 @@ declare namespace ts { getFileSize?(path: string): number; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; /** - * @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that + * @param pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that * use native OS file watching */ watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; @@ -4362,21 +4362,21 @@ declare namespace ts { /** * Gets a value indicating whether a node originated in the parse tree. * - * @param node The node to test. + * @param node - The node to test. */ function isParseTreeNode(node: Node): boolean; /** * Gets the original parse tree node for a node. * - * @param node The original node. + * @param node - The original node. * @returns The original parse tree node if found; otherwise, undefined. */ function getParseTreeNode(node: Node | undefined): Node | undefined; /** * Gets the original parse tree node for a node. * - * @param node The original node. - * @param nodeTest A callback used to ensure the correct type of parse tree node is returned. + * @param node - The original node. + * @param nodeTest - A callback used to ensure the correct type of parse tree node is returned. * @returns The original parse tree node if found; otherwise, undefined. */ function getParseTreeNode(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined; @@ -4385,7 +4385,7 @@ declare namespace ts { /** * Remove extra underscore from escaped identifier text content. * - * @param identifier The escaped identifier text. + * @param identifier - The escaped identifier text. * @returns The unescaped identifier text. */ function unescapeLeadingUnderscores(identifier: __String): string; @@ -4486,9 +4486,11 @@ declare namespace ts { * * This does *not* return type parameters from a jsdoc reference to a generic type, eg * + * ``` * type Id = (x: T) => T * /** @type {Id} / * function id(x) { return x } + * ``` */ function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[]; function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined; @@ -4584,7 +4586,7 @@ declare namespace ts { declare namespace ts { /** * Clears any `EmitNode` entries from parse-tree nodes. - * @param sourceFile A source file. + * @param sourceFile - A source file. */ function disposeEmitNodes(sourceFile: SourceFile | undefined): void; /** @@ -4865,9 +4867,9 @@ declare namespace ts { * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. * - * @param node a given node to visit its children - * @param cbNode a callback to be invoked for all child nodes - * @param cbNodes a callback to be invoked for embedded array + * @param node - a given node to visit its children + * @param cbNode - a callback to be invoked for all child nodes + * @param cbNodes - a callback to be invoked for embedded array * * @remarks `forEachChild` must visit the children of a node in the order * that they appear in the source code. The language service depends on this property to locate nodes by position. @@ -4892,8 +4894,8 @@ declare namespace ts { export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined; /** * Parse json text into SyntaxTree and return node and parse errors if any - * @param fileName - * @param sourceText + * @param fileName - + * @param sourceText - */ export function parseJsonText(fileName: string, sourceText: string): JsonSourceFile; export function isExternalModule(file: SourceFile): boolean; @@ -4924,7 +4926,7 @@ declare namespace ts { export function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions | undefined, host: ParseConfigFileHost, extendedConfigCache?: Map, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined; /** * Read tsconfig.json file - * @param fileName The path to the config file + * @param fileName - The path to the config file */ export function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): { config?: any; @@ -4932,8 +4934,8 @@ declare namespace ts { }; /** * Parse the text of the tsconfig.json file - * @param fileName The path to the config file - * @param jsonText The text of the config file + * @param fileName - The path to the config file + * @param jsonText - The text of the config file */ export function parseConfigFileTextToJson(fileName: string, jsonText: string): { config?: any; @@ -4941,7 +4943,7 @@ declare namespace ts { }; /** * Read tsconfig.json file - * @param fileName The path to the config file + * @param fileName - The path to the config file */ export function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile; /** @@ -4950,17 +4952,17 @@ declare namespace ts { export function convertToObject(sourceFile: JsonSourceFile, errors: Push): any; /** * Parse the contents of a config file (tsconfig.json). - * @param json The contents of the config file to parse - * @param host Instance of ParseConfigHost used to enumerate files in folder. - * @param basePath A root directory to resolve relative path entries in the config + * @param json - The contents of the config file to parse + * @param host - Instance of ParseConfigHost used to enumerate files in folder. + * @param basePath - A root directory to resolve relative path entries in the config * file to. e.g. outDir */ export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map, existingWatchOptions?: WatchOptions): ParsedCommandLine; /** * Parse the contents of a config file (tsconfig.json). - * @param jsonNode The contents of the config file to parse - * @param host Instance of ParseConfigHost used to enumerate files in folder. - * @param basePath A root directory to resolve relative path entries in the config + * @param jsonNode - The contents of the config file to parse + * @param host - Instance of ParseConfigHost used to enumerate files in folder. + * @param basePath - A root directory to resolve relative path entries in the config * file to. e.g. outDir */ export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map, existingWatchOptions?: WatchOptions): ParsedCommandLine; @@ -4991,7 +4993,7 @@ declare namespace ts { declare namespace ts { export function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined; /** - * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * @param containingFile - file that contains type reference directive, can be undefined if containing file is unknown. * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups * is assumed to be the same as root directory of the project. */ @@ -5032,7 +5034,7 @@ declare namespace ts { getPackageJsonInfoCache(): PackageJsonInfoCache; } /** - * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory + * Stored map from non-relative module name to a table: directory to result of module lookup in this directory * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive. */ export interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache { @@ -5057,39 +5059,39 @@ declare namespace ts { /** * Visits a Node using the supplied visitor, possibly returning a new Node in its place. * - * @param node The Node to visit. - * @param visitor The callback used to visit the Node. - * @param test A callback to execute to verify the Node is valid. - * @param lift An optional callback to execute to lift a NodeArray into a valid Node. + * @param node - The Node to visit. + * @param visitor - The callback used to visit the Node. + * @param test - A callback to execute to verify the Node is valid. + * @param lift - An optional callback to execute to lift a NodeArray into a valid Node. */ function visitNode(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T; /** * Visits a Node using the supplied visitor, possibly returning a new Node in its place. * - * @param node The Node to visit. - * @param visitor The callback used to visit the Node. - * @param test A callback to execute to verify the Node is valid. - * @param lift An optional callback to execute to lift a NodeArray into a valid Node. + * @param node - The Node to visit. + * @param visitor - The callback used to visit the Node. + * @param test - A callback to execute to verify the Node is valid. + * @param lift - An optional callback to execute to lift a NodeArray into a valid Node. */ function visitNode(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined; /** * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. * - * @param nodes The NodeArray to visit. - * @param visitor The callback used to visit a Node. - * @param test A node test to execute for each node. - * @param start An optional value indicating the starting offset at which to start visiting. - * @param count An optional value indicating the maximum number of nodes to visit. + * @param nodes - The NodeArray to visit. + * @param visitor - The callback used to visit a Node. + * @param test - A node test to execute for each node. + * @param start - An optional value indicating the starting offset at which to start visiting. + * @param count - An optional value indicating the maximum number of nodes to visit. */ function visitNodes(nodes: NodeArray, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray; /** * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. * - * @param nodes The NodeArray to visit. - * @param visitor The callback used to visit a Node. - * @param test A node test to execute for each node. - * @param start An optional value indicating the starting offset at which to start visiting. - * @param count An optional value indicating the maximum number of nodes to visit. + * @param nodes - The NodeArray to visit. + * @param visitor - The callback used to visit a Node. + * @param test - A node test to execute for each node. + * @param start - An optional value indicating the starting offset at which to start visiting. + * @param count - An optional value indicating the maximum number of nodes to visit. */ function visitNodes(nodes: NodeArray | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray | undefined; /** @@ -5125,17 +5127,17 @@ declare namespace ts { /** * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. * - * @param node The Node whose children will be visited. - * @param visitor The callback used to visit each child. - * @param context A lexical environment context for the visitor. + * @param node - The Node whose children will be visited. + * @param visitor - The callback used to visit each child. + * @param context - A lexical environment context for the visitor. */ function visitEachChild(node: T, visitor: Visitor, context: TransformationContext): T; /** * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. * - * @param node The Node whose children will be visited. - * @param visitor The callback used to visit each child. - * @param context A lexical environment context for the visitor. + * @param node - The Node whose children will be visited. + * @param visitor - The callback used to visit each child. + * @param context - A lexical environment context for the visitor. */ function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; } @@ -5167,8 +5169,8 @@ declare namespace ts { * Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly * defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm). * If you have an actual import node, prefer using getModeForUsageLocation on the reference string node. - * @param file File to fetch the resolution mode within - * @param index Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations + * @param file - File to fetch the resolution mode within + * @param index - Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations */ export function getModeForResolutionAtIndex(file: SourceFile, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; /** @@ -5176,8 +5178,8 @@ declare namespace ts { * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm). * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when * `moduleResolution` is `node16`+. - * @param file The file the import or import-like reference is contained within - * @param usage The module reference string + * @param file - The file the import or import-like reference is contained within + * @param usage - The module reference string * @returns The final resolution mode of the import */ export function getModeForUsageLocation(file: { @@ -5188,10 +5190,10 @@ declare namespace ts { * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the * `options` parameter. * - * @param fileName The normalized absolute path to check the format of (it need not exist on disk) - * @param [packageJsonInfoCache] A cache for package file lookups - it's best to have a cache when this function is called often - * @param host The ModuleResolutionHost which can perform the filesystem lookups for package json data - * @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution` + * @param fileName - The normalized absolute path to check the format of (it need not exist on disk) + * @param packageJsonInfoCache - A cache for package file lookups - it's best to have a cache when this function is called often + * @param host - The ModuleResolutionHost which can perform the filesystem lookups for package json data + * @param options - The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution` * @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format */ export function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ModuleKind.ESNext | ModuleKind.CommonJS | undefined; @@ -5200,7 +5202,7 @@ declare namespace ts { * that represent a compilation unit. * * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and - * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. + * triple-slash-reference-path directives transitively. `@types` and triple-slash-reference-types are also pulled in. * * @param createProgramOptions - The options for creating a program. * @returns A 'Program' object. @@ -5211,7 +5213,7 @@ declare namespace ts { * that represent a compilation unit. * * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and - * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. + * triple-slash-reference-path directives transitively. `@types` and triple-slash-reference-types are also pulled in. * * @param rootNames - A set of root files. * @param options - The compiler options which should be used. @@ -5221,7 +5223,7 @@ declare namespace ts { * @returns A 'Program' object. */ export function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program; - /** @deprecated */ export interface ResolveProjectReferencePathHost { + /** @deprecated For backward compatibility */ export interface ResolveProjectReferencePathHost { fileExists(fileName: string): boolean; } /** @@ -5229,7 +5231,7 @@ declare namespace ts { * Note: The file might not exist. */ export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName; - /** @deprecated */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName; + /** @deprecated For backward compatibility */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName; export {}; } declare namespace ts { @@ -5877,7 +5879,7 @@ declare namespace ts { * While these represent the majority of syntax-related diagnostics, there are some * that require the type system, which will be present in `getSemanticDiagnostics`. * - * @param fileName A path to the file you want syntactic diagnostics for + * @param fileName - A path to the file you want syntactic diagnostics for */ getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[]; /** @@ -5893,7 +5895,7 @@ declare namespace ts { * sentence: "The sun is green." is syntactically correct; those are real English words with * correct sentence structure. However, it is semantically invalid, because it is not true. * - * @param fileName A path to the file you want semantic diagnostics for + * @param fileName - A path to the file you want semantic diagnostics for */ getSemanticDiagnostics(fileName: string): Diagnostic[]; /** @@ -5901,7 +5903,7 @@ declare namespace ts { * proactively suggest refactors, as opposed to diagnostics that indicate * potentially incorrect runtime behavior. * - * @param fileName A path to the file you want semantic diagnostics for + * @param fileName - A path to the file you want semantic diagnostics for */ getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[]; /** @@ -5920,32 +5922,32 @@ declare namespace ts { * Gets semantic highlights information for a particular file. Has two formats, an older * version used by VS and a format used by VS Code. * - * @param fileName The path to the file - * @param position A text span to return results within - * @param format Which format to use, defaults to "original" + * @param fileName - The path to the file + * @param position - A text span to return results within + * @param format - Which format to use, defaults to "original" * @returns a number array encoded as triples of [start, length, ClassificationType, ...]. */ getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications; /** * Gets completion entries at a particular position in a file. * - * @param fileName The path to the file - * @param position A zero-based index of the character where you want the entries - * @param options An object describing how the request was triggered and what kinds + * @param fileName - The path to the file + * @param position - A zero-based index of the character where you want the entries + * @param options - An object describing how the request was triggered and what kinds * of code actions can be returned with the completions. - * @param formattingSettings settings needed for calling formatting functions. + * @param formattingSettings - settings needed for calling formatting functions. */ getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined, formattingSettings?: FormatCodeSettings): WithMetadata | undefined; /** * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`. * - * @param fileName The path to the file - * @param position A zero based index of the character where you want the entries - * @param entryName The `name` from an existing completion which came from `getCompletionsAtPosition` - * @param formatOptions How should code samples in the completions be formatted, can be undefined for backwards compatibility - * @param source `source` property from the completion entry - * @param preferences User settings, can be undefined for backwards compatibility - * @param data `data` property from the completion entry + * @param fileName - The path to the file + * @param position - A zero based index of the character where you want the entries + * @param entryName - The `name` from an existing completion which came from `getCompletionsAtPosition` + * @param formatOptions - How should code samples in the completions be formatted, can be undefined for backwards compatibility + * @param source - `source` property from the completion entry + * @param preferences - User settings, can be undefined for backwards compatibility + * @param data - `data` property from the completion entry */ getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined, data: CompletionEntryData | undefined): CompletionEntryDetails | undefined; getCompletionEntrySymbol(fileName: string, position: number, name: string, source: string | undefined): Symbol | undefined; @@ -5953,8 +5955,8 @@ declare namespace ts { * Gets semantic information about the identifier at a particular position in a * file. Quick info is what you typically see when you hover in an editor. * - * @param fileName The path to the file - * @param position A zero-based index of the character where you want the quick info + * @param fileName - The path to the file + * @param position - A zero-based index of the character where you want the quick info */ getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined; getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined; @@ -5973,7 +5975,7 @@ declare namespace ts { findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined; getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined; getFileReferences(fileName: string): ReferenceEntry[]; - /** @deprecated */ + /** @deprecated Use document highlights. */ getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined; getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[]; getNavigationBarItems(fileName: string): NavigationBarItem[]; @@ -6547,7 +6549,7 @@ declare namespace ts { isGlobalCompletion: boolean; isMemberCompletion: boolean; /** - * In the absence of `CompletionEntry["replacementSpan"], the editor may choose whether to use + * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span * must be used to commit that completion entry. */ @@ -6702,9 +6704,9 @@ declare namespace ts { * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the * lexical, syntactic, and semantic classifiers may issue the best user experience. * - * @param text The text of a line to classify. - * @param lexState The state of the lexical classifier at the end of the previous line. - * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. + * @param text - The text of a line to classify. + * @param lexState - The state of the lexical classifier at the end of the previous line. + * @param syntacticClassifierAbsent - Whether the client is *not* using a syntactic classifier. * If there is no syntactic classifier (syntacticClassifierAbsent=true), * certain heuristics may be used in its place; however, if there is a * syntactic classifier (syntacticClassifierAbsent=false), certain @@ -6723,57 +6725,122 @@ declare namespace ts { keyword = "keyword", /** top level script node */ scriptElement = "script", - /** module foo {} */ + /** + * ``` + * module foo {} + * ``` + */ moduleElement = "module", - /** class X {} */ + /** + * ``` + * class X {} + * ``` + */ classElement = "class", - /** var x = class X {} */ + /** + * ``` + * var x = class X {} + * ``` + */ localClassElement = "local class", - /** interface Y {} */ + /** + * ``` + * interface Y {} + * ``` + */ interfaceElement = "interface", - /** type T = ... */ + /** + * ``` + * type T = ... + * ``` + */ typeElement = "type", - /** enum E */ + /** + * ``` + * enum E + * ``` + */ enumElement = "enum", enumMemberElement = "enum member", /** * Inside module and script only + * ``` * const v = .. + * ``` */ variableElement = "var", /** Inside function */ localVariableElement = "local var", /** * Inside module and script only + * ``` * function f() { } + * ``` */ functionElement = "function", /** Inside function */ localFunctionElement = "local function", - /** class X { [public|private]* foo() {} } */ + /** + * ``` + * class X { [public|private]* foo() {} } + * ``` + */ memberFunctionElement = "method", - /** class X { [public|private]* [get|set] foo:number; } */ + /** + * ``` + * class X { [public|private]* get foo:number; } + * ``` + */ memberGetAccessorElement = "getter", + /** + * ``` + * class X { [public|private]* set foo:number; } + * ``` + */ memberSetAccessorElement = "setter", /** + * ``` * class X { [public|private]* foo:number; } * interface Y { foo:number; } + * ``` */ memberVariableElement = "property", - /** class X { [public|private]* accessor foo: number; } */ + /** + * ``` + * class X { [public|private]* accessor foo: number; } + * ``` + */ memberAccessorVariableElement = "accessor", /** + * ``` * class X { constructor() { } } * class X { static { } } + * ``` */ constructorImplementationElement = "constructor", - /** interface Y { ():number; } */ + /** + * ``` + * interface Y { ():number; } + * ``` + */ callSignatureElement = "call", - /** interface Y { []:number; } */ + /** + * ``` + * interface Y { []:number; } + * ``` + */ indexSignatureElement = "index", - /** interface Y { new():Y; } */ + /** + * ``` + * interface Y { new():Y; } + * ``` + */ constructSignatureElement = "construct", - /** function foo(*Y*: string) */ + /** + * ``` + * function foo(*Y*: string) + * ``` + */ parameterElement = "parameter", typeParameterElement = "type parameter", primitiveType = "primitive type", @@ -6784,17 +6851,19 @@ declare namespace ts { directory = "directory", externalModuleName = "external module name", /** + * ```jsx * - * @deprecated + * ``` + * @deprecated No longer returned by any API. */ jsxAttribute = "JSX attribute", /** String literal */ string = "string", - /** Jsdoc @link: in `{@link C link text}`, the before and after text "{@link " and "}" */ + /** Jsdoc `@link`: in `{@link C link text}`, the before and after text "{@link " and "}" */ link = "link", - /** Jsdoc @link: in `{@link C link text}`, the entity name "C" */ + /** Jsdoc `@link`: in `{@link C link text}`, the entity name "C" */ linkName = "link name", - /** Jsdoc @link: in `{@link C link text}`, the link text "link text" */ + /** Jsdoc `@link`: in `{@link C link text}`, the link text "link text" */ linkText = "link text" } enum ScriptElementKindModifier { @@ -6915,16 +6984,16 @@ declare namespace ts { * The first call to acquire will call createLanguageServiceSourceFile to generate * the SourceFile if was not found in the registry. * - * @param fileName The name of the file requested - * @param compilationSettingsOrHost Some compilation settings like target affects the + * @param fileName - The name of the file requested + * @param compilationSettingsOrHost - Some compilation settings like target affects the * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. - * @param scriptSnapshot Text of the file. Only used if the file was not found + * @param scriptSnapshot - Text of the file. Only used if the file was not found * in the registry and a new one was created. - * @param version Current version of the file. Only used if the file was not found + * @param version - Current version of the file. Only used if the file was not found * in the registry and a new one was created. */ acquireDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; @@ -6934,15 +7003,15 @@ declare namespace ts { * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile * to get an updated SourceFile. * - * @param fileName The name of the file requested - * @param compilationSettingsOrHost Some compilation settings like target affects the + * @param fileName - The name of the file requested + * @param compilationSettingsOrHost - Some compilation settings like target affects the * shape of a the resulting SourceFile. This allows the DocumentRegistry to store * multiple copies of the same file for different compilation settings. A minimal * resolution cache is needed to fully define a source file's shape when * the compilation settings include `module: node16`+, so providing a cache host * object should be preferred. A common host is a language service `ConfiguredProject`. - * @param scriptSnapshot Text of the file. - * @param version Current version of the file. + * @param scriptSnapshot - Text of the file. + * @param version - Current version of the file. */ updateDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; updateDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; @@ -6953,9 +7022,9 @@ declare namespace ts { * Note: It is not allowed to call release on a SourceFile that was not acquired from * this registry originally. * - * @param fileName The name of the file to be released - * @param compilationSettings The compilation settings used to acquire the file - * @param scriptKind The script kind of the file to be released + * @param fileName - The name of the file to be released + * @param compilationSettings - The compilation settings used to acquire the file + * @param scriptKind - The script kind of the file to be released */ /**@deprecated pass scriptKind and impliedNodeFormat for correctness */ releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind?: ScriptKind): void; @@ -6965,10 +7034,10 @@ declare namespace ts { * Note: It is not allowed to call release on a SourceFile that was not acquired from * this registry originally. * - * @param fileName The name of the file to be released - * @param compilationSettings The compilation settings used to acquire the file - * @param scriptKind The script kind of the file to be released - * @param impliedNodeFormat The implied source file format of the file to be released + * @param fileName - The name of the file to be released + * @param compilationSettings - The compilation settings used to acquire the file + * @param scriptKind - The script kind of the file to be released + * @param impliedNodeFormat - The implied source file format of the file to be released */ releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void; /** @@ -7022,9 +7091,9 @@ declare namespace ts { declare namespace ts { /** * Transform one or more nodes using the supplied transformers. - * @param source A single `Node` or an array of `Node` objects. - * @param transformers An array of `TransformerFactory` callbacks used to process the transformation. - * @param compilerOptions Optional compiler options. + * @param source - A single `Node` or an array of `Node` objects. + * @param transformers - An array of `TransformerFactory` callbacks used to process the transformation. + * @param compilerOptions - Optional compiler options. */ function transform(source: T | T[], transformers: TransformerFactory[], compilerOptions?: CompilerOptions): TransformationResult; } diff --git a/tests/baselines/reference/completionEntryForUnionMethod.baseline b/tests/baselines/reference/completionEntryForUnionMethod.baseline index b46b77f0f7641..2b35787cabc05 100644 --- a/tests/baselines/reference/completionEntryForUnionMethod.baseline +++ b/tests/baselines/reference/completionEntryForUnionMethod.baseline @@ -493,7 +493,7 @@ "kind": "space" }, { - "text": "Additional arrays and/or items to add to the end of the array.", + "text": "- Additional arrays and/or items to add to the end of the array.", "kind": "text" } ] @@ -510,7 +510,7 @@ "kind": "space" }, { - "text": "Additional arrays and/or items to add to the end of the array.", + "text": "- Additional arrays and/or items to add to the end of the array.", "kind": "text" } ] @@ -1047,7 +1047,7 @@ "kind": "space" }, { - "text": "A function that accepts up to three arguments. The every method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value false, or until the end of the array.", + "text": "- A function that accepts up to three arguments. The every method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value false, or until the end of the array.", "kind": "text" } ] @@ -1064,7 +1064,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value.", + "text": "- An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value.", "kind": "text" } ] @@ -1081,7 +1081,7 @@ "kind": "space" }, { - "text": "A function that accepts up to three arguments. The every method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value false, or until the end of the array.", + "text": "- A function that accepts up to three arguments. The every method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value false, or until the end of the array.", "kind": "text" } ] @@ -1098,7 +1098,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value.", + "text": "- An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value.", "kind": "text" } ] @@ -1627,7 +1627,7 @@ "kind": "space" }, { - "text": "A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", + "text": "- A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", "kind": "text" } ] @@ -1644,7 +1644,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", + "text": "- An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", "kind": "text" } ] @@ -1661,7 +1661,7 @@ "kind": "space" }, { - "text": "A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", + "text": "- A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", "kind": "text" } ] @@ -1678,7 +1678,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", + "text": "- An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", "kind": "text" } ] @@ -2027,7 +2027,7 @@ "kind": "space" }, { - "text": "A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.", + "text": "- A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.", "kind": "text" } ] @@ -2044,7 +2044,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.", + "text": "- An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.", "kind": "text" } ] @@ -2177,7 +2177,7 @@ "kind": "space" }, { - "text": "The value to locate in the array.", + "text": "- The value to locate in the array.", "kind": "text" } ] @@ -2194,7 +2194,7 @@ "kind": "space" }, { - "text": "The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.", + "text": "- The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.", "kind": "text" } ] @@ -2307,7 +2307,7 @@ "kind": "space" }, { - "text": "A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.", + "text": "- A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.", "kind": "text" } ] @@ -2440,7 +2440,7 @@ "kind": "space" }, { - "text": "The value to locate in the array.", + "text": "- The value to locate in the array.", "kind": "text" } ] @@ -2457,7 +2457,7 @@ "kind": "space" }, { - "text": "The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.", + "text": "- The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.", "kind": "text" } ] @@ -2892,7 +2892,7 @@ "kind": "space" }, { - "text": "A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.", + "text": "- A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.", "kind": "text" } ] @@ -2909,7 +2909,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.", + "text": "- An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.", "kind": "text" } ] @@ -3116,7 +3116,7 @@ "kind": "space" }, { - "text": "New elements to add to the array.", + "text": "- New elements to add to the array.", "kind": "text" } ] @@ -3801,7 +3801,7 @@ "kind": "space" }, { - "text": "A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.", + "text": "- A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.", "kind": "text" } ] @@ -3818,7 +3818,7 @@ "kind": "space" }, { - "text": "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.", + "text": "- 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.", "kind": "text" } ] @@ -3835,7 +3835,7 @@ "kind": "space" }, { - "text": "A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.", + "text": "- A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.", "kind": "text" } ] @@ -3852,7 +3852,7 @@ "kind": "space" }, { - "text": "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.", + "text": "- 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.", "kind": "text" } ] @@ -4537,7 +4537,7 @@ "kind": "space" }, { - "text": "A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.", + "text": "- A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.", "kind": "text" } ] @@ -4554,7 +4554,7 @@ "kind": "space" }, { - "text": "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.", + "text": "- 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.", "kind": "text" } ] @@ -4571,7 +4571,7 @@ "kind": "space" }, { - "text": "A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.", + "text": "- A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.", "kind": "text" } ] @@ -4588,7 +4588,7 @@ "kind": "space" }, { - "text": "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.", + "text": "- 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.", "kind": "text" } ] @@ -4957,7 +4957,7 @@ "kind": "space" }, { - "text": "The beginning index of the specified portion of the array.\r\nIf start is undefined, then the slice begins at index 0.", + "text": "- The beginning index of the specified portion of the array.\r\nIf start is undefined, then the slice begins at index 0.", "kind": "text" } ] @@ -4974,7 +4974,7 @@ "kind": "space" }, { - "text": "The end index of the specified portion of the array. This is exclusive of the element at the index 'end'.\r\nIf end is undefined, then the slice extends to the end of the array.", + "text": "- The end index of the specified portion of the array. This is exclusive of the element at the index 'end'.\r\nIf end is undefined, then the slice extends to the end of the array.", "kind": "text" } ] @@ -5323,7 +5323,7 @@ "kind": "space" }, { - "text": "A function that accepts up to three arguments. The some method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value true, or until the end of the array.", + "text": "- A function that accepts up to three arguments. The some method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value true, or until the end of the array.", "kind": "text" } ] @@ -5340,7 +5340,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value.", + "text": "- An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value.", "kind": "text" } ] @@ -5633,7 +5633,7 @@ "kind": "space" }, { - "text": "Function used to determine the order of the elements. It is expected to return\r\na negative value if the first argument is less than the second argument, zero if they're equal, and a positive\r\nvalue otherwise. If omitted, the elements are sorted in ascending, ASCII character order.\r\n```ts\r\n[11,2,22,1].sort((a, b) => a - b)\r\n```", + "text": "- Function used to determine the order of the elements. It is expected to return\r\na negative value if the first argument is less than the second argument, zero if they're equal, and a positive\r\nvalue otherwise. If omitted, the elements are sorted in ascending, ASCII character order.\r\n```ts\r\n[11,2,22,1].sort((a, b) => a - b)\r\n```", "kind": "text" } ] @@ -5830,7 +5830,7 @@ "kind": "space" }, { - "text": "The zero-based location in the array from which to start removing elements.", + "text": "- The zero-based location in the array from which to start removing elements.", "kind": "text" } ] @@ -5847,7 +5847,7 @@ "kind": "space" }, { - "text": "The number of elements to remove.", + "text": "- The number of elements to remove.", "kind": "text" } ] @@ -6121,7 +6121,7 @@ "kind": "space" }, { - "text": "Elements to insert at the start of the array.", + "text": "- Elements to insert at the start of the array.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsClass.baseline b/tests/baselines/reference/completionsCommentsClass.baseline index 7c01a94bdee8b..de08df0b5f008 100644 --- a/tests/baselines/reference/completionsCommentsClass.baseline +++ b/tests/baselines/reference/completionsCommentsClass.baseline @@ -1130,7 +1130,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -1211,7 +1211,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -1340,7 +1340,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -1453,7 +1453,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -1595,7 +1595,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -2280,7 +2280,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -2361,7 +2361,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -2811,7 +2811,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -2920,7 +2920,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -2937,7 +2937,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -3852,7 +3852,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -3942,7 +3942,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsClassMembers.baseline b/tests/baselines/reference/completionsCommentsClassMembers.baseline index aae31c8f975de..98f5ca4c3d164 100644 --- a/tests/baselines/reference/completionsCommentsClassMembers.baseline +++ b/tests/baselines/reference/completionsCommentsClassMembers.baseline @@ -2159,7 +2159,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -2240,7 +2240,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -2369,7 +2369,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -2482,7 +2482,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -2624,7 +2624,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -3297,7 +3297,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -3378,7 +3378,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -3756,7 +3756,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -3865,7 +3865,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -3882,7 +3882,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -4737,7 +4737,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -4827,7 +4827,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -9244,7 +9244,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -9325,7 +9325,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -9454,7 +9454,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -9567,7 +9567,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -9709,7 +9709,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -10382,7 +10382,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -10463,7 +10463,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -10841,7 +10841,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -10950,7 +10950,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -10967,7 +10967,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -11822,7 +11822,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -11912,7 +11912,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -14082,7 +14082,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -14163,7 +14163,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -14292,7 +14292,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -14405,7 +14405,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -14547,7 +14547,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -15220,7 +15220,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -15301,7 +15301,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -15679,7 +15679,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -15788,7 +15788,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -15805,7 +15805,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -16660,7 +16660,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -16750,7 +16750,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -21167,7 +21167,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -21248,7 +21248,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -21377,7 +21377,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -21490,7 +21490,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -21632,7 +21632,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -22305,7 +22305,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -22386,7 +22386,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -22764,7 +22764,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -22873,7 +22873,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -22890,7 +22890,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -23745,7 +23745,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -23835,7 +23835,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -25256,7 +25256,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -25337,7 +25337,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -25466,7 +25466,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -25579,7 +25579,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -25721,7 +25721,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -26394,7 +26394,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -26475,7 +26475,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -26853,7 +26853,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -26962,7 +26962,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -26979,7 +26979,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -27834,7 +27834,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -27924,7 +27924,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -28457,7 +28457,7 @@ "kind": "space" }, { - "text": "The object to be used as the this object.", + "text": "- The object to be used as the this object.", "kind": "text" } ] @@ -28474,7 +28474,7 @@ "kind": "space" }, { - "text": "A set of arguments to be passed to the function.", + "text": "- A set of arguments to be passed to the function.", "kind": "text" } ] @@ -28680,7 +28680,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer inside the new function.", + "text": "- An object to which the this keyword can refer inside the new function.", "kind": "text" } ] @@ -28697,7 +28697,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the new function.", + "text": "- A list of arguments to be passed to the new function.", "kind": "text" } ] @@ -28854,7 +28854,7 @@ "kind": "space" }, { - "text": "The object to be used as the current object.", + "text": "- The object to be used as the current object.", "kind": "text" } ] @@ -28871,7 +28871,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the method.", + "text": "- A list of arguments to be passed to the method.", "kind": "text" } ] @@ -30501,7 +30501,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -30582,7 +30582,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -30711,7 +30711,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -30824,7 +30824,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -30966,7 +30966,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -31639,7 +31639,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -31720,7 +31720,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -32098,7 +32098,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -32207,7 +32207,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -32224,7 +32224,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -33079,7 +33079,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -33169,7 +33169,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -34544,7 +34544,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -34625,7 +34625,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -34754,7 +34754,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -34867,7 +34867,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -35009,7 +35009,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -35682,7 +35682,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -35763,7 +35763,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -36141,7 +36141,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -36250,7 +36250,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -36267,7 +36267,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -37122,7 +37122,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -37212,7 +37212,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -37745,7 +37745,7 @@ "kind": "space" }, { - "text": "The object to be used as the this object.", + "text": "- The object to be used as the this object.", "kind": "text" } ] @@ -37762,7 +37762,7 @@ "kind": "space" }, { - "text": "A set of arguments to be passed to the function.", + "text": "- A set of arguments to be passed to the function.", "kind": "text" } ] @@ -37968,7 +37968,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer inside the new function.", + "text": "- An object to which the this keyword can refer inside the new function.", "kind": "text" } ] @@ -37985,7 +37985,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the new function.", + "text": "- A list of arguments to be passed to the new function.", "kind": "text" } ] @@ -38142,7 +38142,7 @@ "kind": "space" }, { - "text": "The object to be used as the current object.", + "text": "- The object to be used as the current object.", "kind": "text" } ] @@ -38159,7 +38159,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the method.", + "text": "- A list of arguments to be passed to the method.", "kind": "text" } ] @@ -39743,7 +39743,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -39824,7 +39824,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -39953,7 +39953,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -40066,7 +40066,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -40208,7 +40208,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -40881,7 +40881,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -40962,7 +40962,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -41340,7 +41340,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -41449,7 +41449,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -41466,7 +41466,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -42321,7 +42321,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -42411,7 +42411,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -42944,7 +42944,7 @@ "kind": "space" }, { - "text": "The object to be used as the this object.", + "text": "- The object to be used as the this object.", "kind": "text" } ] @@ -42961,7 +42961,7 @@ "kind": "space" }, { - "text": "A set of arguments to be passed to the function.", + "text": "- A set of arguments to be passed to the function.", "kind": "text" } ] @@ -43167,7 +43167,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer inside the new function.", + "text": "- An object to which the this keyword can refer inside the new function.", "kind": "text" } ] @@ -43184,7 +43184,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the new function.", + "text": "- A list of arguments to be passed to the new function.", "kind": "text" } ] @@ -43341,7 +43341,7 @@ "kind": "space" }, { - "text": "The object to be used as the current object.", + "text": "- The object to be used as the current object.", "kind": "text" } ] @@ -43358,7 +43358,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the method.", + "text": "- A list of arguments to be passed to the method.", "kind": "text" } ] @@ -44988,7 +44988,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -45069,7 +45069,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -45198,7 +45198,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -45311,7 +45311,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -45453,7 +45453,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -46126,7 +46126,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -46207,7 +46207,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -46585,7 +46585,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -46694,7 +46694,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -46711,7 +46711,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -47566,7 +47566,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -47656,7 +47656,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -48189,7 +48189,7 @@ "kind": "space" }, { - "text": "The object to be used as the this object.", + "text": "- The object to be used as the this object.", "kind": "text" } ] @@ -48206,7 +48206,7 @@ "kind": "space" }, { - "text": "A set of arguments to be passed to the function.", + "text": "- A set of arguments to be passed to the function.", "kind": "text" } ] @@ -48412,7 +48412,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer inside the new function.", + "text": "- An object to which the this keyword can refer inside the new function.", "kind": "text" } ] @@ -48429,7 +48429,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the new function.", + "text": "- A list of arguments to be passed to the new function.", "kind": "text" } ] @@ -48586,7 +48586,7 @@ "kind": "space" }, { - "text": "The object to be used as the current object.", + "text": "- The object to be used as the current object.", "kind": "text" } ] @@ -48603,7 +48603,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the method.", + "text": "- A list of arguments to be passed to the method.", "kind": "text" } ] @@ -50233,7 +50233,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -50314,7 +50314,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -50443,7 +50443,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -50556,7 +50556,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -50698,7 +50698,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -51371,7 +51371,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -51452,7 +51452,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -51830,7 +51830,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -51939,7 +51939,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -51956,7 +51956,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -52811,7 +52811,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -52901,7 +52901,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -53434,7 +53434,7 @@ "kind": "space" }, { - "text": "The object to be used as the this object.", + "text": "- The object to be used as the this object.", "kind": "text" } ] @@ -53451,7 +53451,7 @@ "kind": "space" }, { - "text": "A set of arguments to be passed to the function.", + "text": "- A set of arguments to be passed to the function.", "kind": "text" } ] @@ -53657,7 +53657,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer inside the new function.", + "text": "- An object to which the this keyword can refer inside the new function.", "kind": "text" } ] @@ -53674,7 +53674,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the new function.", + "text": "- A list of arguments to be passed to the new function.", "kind": "text" } ] @@ -53831,7 +53831,7 @@ "kind": "space" }, { - "text": "The object to be used as the current object.", + "text": "- The object to be used as the current object.", "kind": "text" } ] @@ -53848,7 +53848,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the method.", + "text": "- A list of arguments to be passed to the method.", "kind": "text" } ] @@ -55478,7 +55478,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -55559,7 +55559,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -55688,7 +55688,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -55801,7 +55801,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -55943,7 +55943,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -56616,7 +56616,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -56697,7 +56697,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -57075,7 +57075,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -57184,7 +57184,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -57201,7 +57201,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -58056,7 +58056,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -58146,7 +58146,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -59562,7 +59562,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -59643,7 +59643,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -59772,7 +59772,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -59885,7 +59885,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -60027,7 +60027,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -60700,7 +60700,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -60781,7 +60781,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -61159,7 +61159,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -61268,7 +61268,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -61285,7 +61285,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -62140,7 +62140,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -62230,7 +62230,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -63646,7 +63646,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -63727,7 +63727,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -63856,7 +63856,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -63969,7 +63969,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -64111,7 +64111,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -64784,7 +64784,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -64865,7 +64865,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -65243,7 +65243,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -65352,7 +65352,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -65369,7 +65369,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -66224,7 +66224,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -66314,7 +66314,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -67730,7 +67730,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -67811,7 +67811,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -67940,7 +67940,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -68053,7 +68053,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -68195,7 +68195,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -68868,7 +68868,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -68949,7 +68949,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -69327,7 +69327,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -69436,7 +69436,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -69453,7 +69453,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -70308,7 +70308,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -70398,7 +70398,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -71814,7 +71814,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -71895,7 +71895,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -72024,7 +72024,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -72137,7 +72137,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -72279,7 +72279,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -72952,7 +72952,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -73033,7 +73033,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -73411,7 +73411,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -73520,7 +73520,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -73537,7 +73537,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -74392,7 +74392,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -74482,7 +74482,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -75898,7 +75898,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -75979,7 +75979,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -76108,7 +76108,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -76221,7 +76221,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -76363,7 +76363,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -77036,7 +77036,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -77117,7 +77117,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -77495,7 +77495,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -77604,7 +77604,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -77621,7 +77621,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -78476,7 +78476,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -78566,7 +78566,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -79982,7 +79982,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -80063,7 +80063,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -80192,7 +80192,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -80305,7 +80305,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -80447,7 +80447,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -81120,7 +81120,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -81201,7 +81201,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -81579,7 +81579,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -81688,7 +81688,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -81705,7 +81705,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -82560,7 +82560,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -82650,7 +82650,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -84407,7 +84407,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -84488,7 +84488,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -84617,7 +84617,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -84730,7 +84730,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -84872,7 +84872,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -85557,7 +85557,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -85638,7 +85638,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -86088,7 +86088,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -86197,7 +86197,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -86214,7 +86214,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -87129,7 +87129,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -87219,7 +87219,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -87752,7 +87752,7 @@ "kind": "space" }, { - "text": "The object to be used as the this object.", + "text": "- The object to be used as the this object.", "kind": "text" } ] @@ -87769,7 +87769,7 @@ "kind": "space" }, { - "text": "A set of arguments to be passed to the function.", + "text": "- A set of arguments to be passed to the function.", "kind": "text" } ] @@ -87975,7 +87975,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer inside the new function.", + "text": "- An object to which the this keyword can refer inside the new function.", "kind": "text" } ] @@ -87992,7 +87992,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the new function.", + "text": "- A list of arguments to be passed to the new function.", "kind": "text" } ] @@ -88149,7 +88149,7 @@ "kind": "space" }, { - "text": "The object to be used as the current object.", + "text": "- The object to be used as the current object.", "kind": "text" } ] @@ -88166,7 +88166,7 @@ "kind": "space" }, { - "text": "A list of arguments to be passed to the method.", + "text": "- A list of arguments to be passed to the method.", "kind": "text" } ] @@ -89777,7 +89777,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -89858,7 +89858,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -89987,7 +89987,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -90100,7 +90100,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -90242,7 +90242,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -90927,7 +90927,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -91008,7 +91008,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -91458,7 +91458,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -91567,7 +91567,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -91584,7 +91584,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -92499,7 +92499,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -92589,7 +92589,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -94403,7 +94403,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -94484,7 +94484,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -94613,7 +94613,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -94726,7 +94726,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -94868,7 +94868,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -95541,7 +95541,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -95622,7 +95622,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -96000,7 +96000,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -96109,7 +96109,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -96126,7 +96126,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -96981,7 +96981,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -97071,7 +97071,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsCommentParsing.baseline b/tests/baselines/reference/completionsCommentsCommentParsing.baseline index 1622a0c8f39b2..6d8c314534a54 100644 --- a/tests/baselines/reference/completionsCommentsCommentParsing.baseline +++ b/tests/baselines/reference/completionsCommentsCommentParsing.baseline @@ -2993,7 +2993,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -3074,7 +3074,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -3203,7 +3203,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -3316,7 +3316,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -3458,7 +3458,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -4131,7 +4131,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -4212,7 +4212,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -4590,7 +4590,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -4699,7 +4699,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -4716,7 +4716,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -5571,7 +5571,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -5661,7 +5661,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -8666,7 +8666,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -8747,7 +8747,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -8876,7 +8876,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -8989,7 +8989,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -9179,7 +9179,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -9984,7 +9984,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -10065,7 +10065,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -10542,7 +10542,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -10651,7 +10651,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -10668,7 +10668,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -12039,7 +12039,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -12129,7 +12129,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -15109,7 +15109,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -15190,7 +15190,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -15319,7 +15319,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -15432,7 +15432,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -15574,7 +15574,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -16247,7 +16247,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -16328,7 +16328,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -16706,7 +16706,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -16815,7 +16815,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -16832,7 +16832,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -17687,7 +17687,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -17777,7 +17777,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -20678,7 +20678,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -20759,7 +20759,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -20888,7 +20888,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -21001,7 +21001,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -21143,7 +21143,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -21828,7 +21828,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -21909,7 +21909,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -22359,7 +22359,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -22468,7 +22468,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -22485,7 +22485,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -23400,7 +23400,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -23490,7 +23490,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -26589,7 +26589,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -26670,7 +26670,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -26799,7 +26799,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -26912,7 +26912,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -27054,7 +27054,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -27727,7 +27727,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -27808,7 +27808,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -28186,7 +28186,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -28295,7 +28295,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -28312,7 +28312,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -29167,7 +29167,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -29257,7 +29257,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -32262,7 +32262,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -32343,7 +32343,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -32472,7 +32472,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -32585,7 +32585,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -32775,7 +32775,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -33580,7 +33580,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -33661,7 +33661,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -34138,7 +34138,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -34247,7 +34247,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -34264,7 +34264,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -35635,7 +35635,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -35725,7 +35725,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -38626,7 +38626,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -38707,7 +38707,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -38836,7 +38836,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -38949,7 +38949,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -39091,7 +39091,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -39776,7 +39776,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -39857,7 +39857,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -40307,7 +40307,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -40416,7 +40416,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -40433,7 +40433,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -41348,7 +41348,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -41438,7 +41438,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline index 0cd4ca2b6398e..3d3c7d9b39f09 100644 --- a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline @@ -861,7 +861,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -942,7 +942,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -1071,7 +1071,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -1184,7 +1184,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -1374,7 +1374,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -2179,7 +2179,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -2260,7 +2260,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -2737,7 +2737,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -2846,7 +2846,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -2863,7 +2863,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -4234,7 +4234,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -4324,7 +4324,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -5157,7 +5157,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -5238,7 +5238,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -5367,7 +5367,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -5480,7 +5480,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -5622,7 +5622,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -6295,7 +6295,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -6376,7 +6376,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -6754,7 +6754,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -6863,7 +6863,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -6880,7 +6880,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -7735,7 +7735,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -7825,7 +7825,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -8697,7 +8697,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -8778,7 +8778,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -8907,7 +8907,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -9020,7 +9020,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -9210,7 +9210,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -10015,7 +10015,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -10096,7 +10096,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -10573,7 +10573,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -10682,7 +10682,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -10699,7 +10699,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -12070,7 +12070,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -12160,7 +12160,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline index 5e5e0b5e1d905..a87701f77d566 100644 --- a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline @@ -1037,7 +1037,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -1118,7 +1118,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -1247,7 +1247,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -1360,7 +1360,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -1502,7 +1502,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -2187,7 +2187,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -2268,7 +2268,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -2718,7 +2718,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -2827,7 +2827,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -2844,7 +2844,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -3759,7 +3759,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -3849,7 +3849,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -4977,7 +4977,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -5058,7 +5058,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -5187,7 +5187,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -5300,7 +5300,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -5490,7 +5490,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -6307,7 +6307,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -6388,7 +6388,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -6937,7 +6937,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -7046,7 +7046,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -7063,7 +7063,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -8494,7 +8494,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -8584,7 +8584,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -9607,7 +9607,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -9688,7 +9688,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -9817,7 +9817,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -9930,7 +9930,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -10072,7 +10072,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -10745,7 +10745,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -10826,7 +10826,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -11204,7 +11204,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -11313,7 +11313,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -11330,7 +11330,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -12185,7 +12185,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -12275,7 +12275,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -13331,7 +13331,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI.", + "text": "- A value representing an encoded URI.", "kind": "text" } ] @@ -13412,7 +13412,7 @@ "kind": "space" }, { - "text": "A value representing an encoded URI component.", + "text": "- A value representing an encoded URI component.", "kind": "text" } ] @@ -13541,7 +13541,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI.", + "text": "- A value representing an unencoded URI.", "kind": "text" } ] @@ -13654,7 +13654,7 @@ "kind": "space" }, { - "text": "A value representing an unencoded URI component.", + "text": "- A value representing an unencoded URI component.", "kind": "text" } ] @@ -13844,7 +13844,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ] @@ -14649,7 +14649,7 @@ "kind": "space" }, { - "text": "Any numeric value.", + "text": "- Any numeric value.", "kind": "text" } ] @@ -14730,7 +14730,7 @@ "kind": "space" }, { - "text": "A numeric value.", + "text": "- A numeric value.", "kind": "text" } ] @@ -15207,7 +15207,7 @@ "kind": "space" }, { - "text": "A string that contains a floating-point number.", + "text": "- A string that contains a floating-point number.", "kind": "text" } ] @@ -15316,7 +15316,7 @@ "kind": "space" }, { - "text": "A string to convert into a number.", + "text": "- A string to convert into a number.", "kind": "text" } ] @@ -15333,7 +15333,7 @@ "kind": "space" }, { - "text": "A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", + "text": "- A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal.", "kind": "text" } ] @@ -16704,7 +16704,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] @@ -16794,7 +16794,7 @@ "kind": "space" }, { - "text": "A string value", + "text": "- A string value", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsStringMethods.baseline b/tests/baselines/reference/completionsStringMethods.baseline index 0d3fe39d755c9..385d0aab3c660 100644 --- a/tests/baselines/reference/completionsStringMethods.baseline +++ b/tests/baselines/reference/completionsStringMethods.baseline @@ -101,7 +101,7 @@ "kind": "space" }, { - "text": "The zero-based index of the desired character.", + "text": "- The zero-based index of the desired character.", "kind": "text" } ] @@ -198,7 +198,7 @@ "kind": "space" }, { - "text": "The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.", + "text": "- The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.", "kind": "text" } ] @@ -307,7 +307,7 @@ "kind": "space" }, { - "text": "The strings to append to the end of the string.", + "text": "- The strings to append to the end of the string.", "kind": "text" } ] @@ -432,7 +432,7 @@ "kind": "space" }, { - "text": "The substring to search for in the string", + "text": "- The substring to search for in the string", "kind": "text" } ] @@ -449,7 +449,7 @@ "kind": "space" }, { - "text": "The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.", + "text": "- The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.", "kind": "text" } ] @@ -574,7 +574,7 @@ "kind": "space" }, { - "text": "The substring to search for.", + "text": "- The substring to search for.", "kind": "text" } ] @@ -591,7 +591,7 @@ "kind": "space" }, { - "text": "The index at which to begin searching. If omitted, the search begins at the end of the string.", + "text": "- The index at which to begin searching. If omitted, the search begins at the end of the string.", "kind": "text" } ] @@ -770,7 +770,7 @@ "kind": "space" }, { - "text": "String to compare to target string", + "text": "- String to compare to target string", "kind": "text" } ] @@ -883,7 +883,7 @@ "kind": "space" }, { - "text": "A variable name or string literal containing the regular expression pattern and flags.", + "text": "- A variable name or string literal containing the regular expression pattern and flags.", "kind": "text" } ] @@ -1048,7 +1048,7 @@ "kind": "space" }, { - "text": "A string to search for.", + "text": "- A string to search for.", "kind": "text" } ] @@ -1065,7 +1065,7 @@ "kind": "space" }, { - "text": "A string containing the text to replace for every successful match of searchValue in this string.", + "text": "- A string containing the text to replace for every successful match of searchValue in this string.", "kind": "text" } ] @@ -1178,7 +1178,7 @@ "kind": "space" }, { - "text": "The regular expression pattern and applicable flags.", + "text": "- The regular expression pattern and applicable flags.", "kind": "text" } ] @@ -1307,7 +1307,7 @@ "kind": "space" }, { - "text": "The index to the beginning of the specified portion of stringObj.", + "text": "- The index to the beginning of the specified portion of stringObj.", "kind": "text" } ] @@ -1324,7 +1324,7 @@ "kind": "space" }, { - "text": "The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.\r\nIf this value is not specified, the substring continues to the end of stringObj.", + "text": "- The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.\r\nIf this value is not specified, the substring continues to the end of stringObj.", "kind": "text" } ] @@ -1473,7 +1473,7 @@ "kind": "space" }, { - "text": "A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.", + "text": "- A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.", "kind": "text" } ] @@ -1490,7 +1490,7 @@ "kind": "space" }, { - "text": "A value used to limit the number of elements returned in the array.", + "text": "- A value used to limit the number of elements returned in the array.", "kind": "text" } ] @@ -1615,7 +1615,7 @@ "kind": "space" }, { - "text": "The zero-based index number indicating the beginning of the substring.", + "text": "- The zero-based index number indicating the beginning of the substring.", "kind": "text" } ] @@ -1632,7 +1632,7 @@ "kind": "space" }, { - "text": "Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\r\nIf end is omitted, the characters from start through the end of the original string are returned.", + "text": "- Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\r\nIf end is omitted, the characters from start through the end of the original string are returned.", "kind": "text" } ] @@ -2288,7 +2288,7 @@ "kind": "space" }, { - "text": "The starting position of the desired substring. The index of the first character in the string is zero.", + "text": "- The starting position of the desired substring. The index of the first character in the string is zero.", "kind": "text" } ] @@ -2305,7 +2305,7 @@ "kind": "space" }, { - "text": "The number of characters to include in the returned substring.", + "text": "- The number of characters to include in the returned substring.", "kind": "text" } ] diff --git a/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline b/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline index 67dfa434799d7..63a9dd0a67566 100644 --- a/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline +++ b/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline @@ -96,7 +96,7 @@ "name": "predicate", "documentation": [ { - "text": "A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", + "text": "- A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", "kind": "text" } ], @@ -241,7 +241,7 @@ "name": "thisArg", "documentation": [ { - "text": "An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", + "text": "- An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", "kind": "text" } ], @@ -290,7 +290,7 @@ "kind": "space" }, { - "text": "A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", + "text": "- A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", "kind": "text" } ] @@ -307,7 +307,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", + "text": "- An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", "kind": "text" } ] @@ -375,7 +375,7 @@ "name": "predicate", "documentation": [ { - "text": "A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", + "text": "- A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", "kind": "text" } ], @@ -504,7 +504,7 @@ "name": "thisArg", "documentation": [ { - "text": "An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", + "text": "- An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", "kind": "text" } ], @@ -553,7 +553,7 @@ "kind": "space" }, { - "text": "A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", + "text": "- A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.", "kind": "text" } ] @@ -570,7 +570,7 @@ "kind": "space" }, { - "text": "An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", + "text": "- An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.", "kind": "text" } ] diff --git a/tests/baselines/reference/signatureHelpWithUnknown.baseline b/tests/baselines/reference/signatureHelpWithUnknown.baseline index 4a9c81e46906e..eef3703345d22 100644 --- a/tests/baselines/reference/signatureHelpWithUnknown.baseline +++ b/tests/baselines/reference/signatureHelpWithUnknown.baseline @@ -52,7 +52,7 @@ "name": "x", "documentation": [ { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ], @@ -97,7 +97,7 @@ "kind": "space" }, { - "text": "A String value that contains valid JavaScript code.", + "text": "- A String value that contains valid JavaScript code.", "kind": "text" } ]