@capacitor/docgen
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -29,13 +29,3 @@ "use strict"; | ||
return (api) => { | ||
let apiInterface = interfaces.find((i) => i.name === api) || null; | ||
/** | ||
* Add methods of import(many is used in `extends`) | ||
*/ | ||
const allImportObject = interfaces | ||
.filter((i) => (apiInterface === null || apiInterface === void 0 ? void 0 : apiInterface.importObject.includes(i.name)) && i.name !== api) | ||
.map((i) => i.importObject); | ||
const otherMethod = interfaces.filter((i) => [...new Set(allImportObject.flat())].includes(i.name)).map((d) => d.methods) || null; | ||
if (apiInterface !== null && otherMethod && otherMethod.length > 0) { | ||
apiInterface.methods = [...new Set(apiInterface === null || apiInterface === void 0 ? void 0 : apiInterface.methods.concat(otherMethod.flat(1)))]; | ||
} | ||
const apiInterface = interfaces.find((i) => i.name === api) || null; | ||
const data = { | ||
@@ -108,3 +98,2 @@ api: apiInterface, | ||
function getInterface(typeChecker, node) { | ||
var _a, _b; | ||
const interfaceName = node.name.text; | ||
@@ -127,4 +116,2 @@ const methods = node.members.filter(typescript_1.default.isMethodSignature).reduce((methods, methodSignature) => { | ||
const docs = symbol ? serializeSymbol(typeChecker, symbol) : null; | ||
// @ts-ignore | ||
const importObject = ((_b = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.locals) === null || _b === void 0 ? void 0 : _b.keys()) || []; | ||
const i = { | ||
@@ -137,3 +124,2 @@ name: interfaceName, | ||
properties, | ||
importObject: [...importObject].filter((d) => d !== interfaceName), | ||
}; | ||
@@ -140,0 +126,0 @@ return i; |
@@ -21,3 +21,2 @@ export interface DocsData { | ||
properties: DocsInterfaceProperty[]; | ||
importObject: string[]; | ||
} | ||
@@ -24,0 +23,0 @@ export interface DocsEnum { |
{ | ||
"name": "@capacitor/docgen", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Docs Readme Markdown and JSON Generator for Capacitor Plugins", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52761
1344