akveo / doc-prsr Goto Github PK
View Code? Open in Web Editor NEWSimple parser to normalize typdoc and doc.js output
License: MIT License
Simple parser to normalize typdoc and doc.js output
License: MIT License
Currently, methods and properties marked with @private
tag are not ignored and included into the final output. We need a way to control these methods/properties on the client side so that we can remove them or mark as private. So I propose to add a property private
which will be resulted in true
when @private
tag exists on an element.
Code
Result
protected validateToken(module: string) {
return map((res) => {
const token = this.getConfigValue('token.getter')(module, res);
if (!token) {
const key = this.getConfigValue('token.key');
console.warn(`NbEmailPassAuthProvider:
Token is not provided under '${key}' key
with getter '${this.getConfigValue('token.getter')}', check your auth configuration.`);
throw new Error('Could not extract token from the response.');
}
return res;
});
}
1 Menu Component, property type
/**
* List of menu items.
* @type List<NbMenuItem> | List<any> | any
*/
@Input() items: NbMenuItem[];
2 User Component, property type
/**
* List of menu items for a user context menu (shown when clicked)
* @type NbUserMenuItem[]
*/
@Input() menu: NbUserMenuItem[] = [];
3 MediaBreakpoint service, return parameter
/**
* Returns a map of configured breakpoints for the theme
* @returns {[p: string]: number}
*/
getBreakpointsMap(): { [breakpoint: string]: number } {
return this.breakpointsMap;
}
This project looks interesting, but could you expand the README to better explain what it does and how to use it?
Method parser crashes if method documentation contains no arguments
Example
* @method {() => void} focus - Requests focus for the given input or view. The exact behavior triggered
* will depend on the platform and type of view.
Quick fix
To get rid of this I've simply modified methods.parser.js :)
function getParamType(param) {
const splitElement = param.split(':')[1];
var crudeParam = splitElement && splitElement.trim();
return crudeParam && crudeParam.split(' ')[0].trim();
}
As you can see, I simply do nothing if split function returns undefined
But it also results in incorrect output
NODE v7.2.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.