Socket
Socket
Sign inDemoInstall

@microsoft/api-extractor

Package Overview
Dependencies
12
Maintainers
2
Versions
478
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.39.5 to 7.40.0

1

lib/generators/ApiModelGenerator.d.ts

@@ -13,2 +13,3 @@ import { ApiModel, ApiPackage } from '@microsoft/api-extractor-model';

private _processDeclaration;
private _tryFindFunctionDeclaration;
private _processChildDeclarations;

@@ -15,0 +16,0 @@ private _processApiCallSignature;

@@ -190,3 +190,10 @@ "use strict";

case ts.SyntaxKind.VariableDeclaration:
this._processApiVariable(astDeclaration, context);
// check for arrow functions in variable declaration
const functionDeclaration = this._tryFindFunctionDeclaration(astDeclaration);
if (functionDeclaration) {
this._processApiFunction(astDeclaration, context, functionDeclaration);
}
else {
this._processApiVariable(astDeclaration, context);
}
break;

@@ -197,2 +204,6 @@ default:

}
_tryFindFunctionDeclaration(astDeclaration) {
const children = astDeclaration.declaration.getChildren(astDeclaration.declaration.getSourceFile());
return children.find(ts.isFunctionTypeNode);
}
_processChildDeclarations(astDeclaration, context) {

@@ -389,3 +400,3 @@ for (const childDeclaration of astDeclaration.children) {

}
_processApiFunction(astDeclaration, context) {
_processApiFunction(astDeclaration, context, altFunctionDeclaration) {
const { name, isExported, parentApiItem } = context;

@@ -396,3 +407,3 @@ const overloadIndex = this._collector.getOverloadIndex(astDeclaration);

if (apiFunction === undefined) {
const functionDeclaration = astDeclaration.declaration;
const functionDeclaration = altFunctionDeclaration !== null && altFunctionDeclaration !== void 0 ? altFunctionDeclaration : astDeclaration.declaration;
const nodesToCapture = [];

@@ -399,0 +410,0 @@ const returnTypeTokenRange = ExcerptBuilder_1.ExcerptBuilder.createEmptyTokenRange();

6

package.json
{
"name": "@microsoft/api-extractor",
"version": "7.39.5",
"version": "7.40.0",
"description": "Analyze the exported API for a TypeScript library and generate reviews, documentation, and .d.ts rollups",

@@ -45,4 +45,4 @@ "keywords": [

"@rushstack/node-core-library": "3.65.0",
"@rushstack/rig-package": "0.5.1",
"@rushstack/ts-command-line": "4.17.1"
"@rushstack/ts-command-line": "4.17.1",
"@rushstack/rig-package": "0.5.1"
},

@@ -49,0 +49,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc