- Sep 2023
-
johtela.github.io johtela.github.io
- Jul 2023
- May 2023
-
blog.logrocket.com blog.logrocket.com
Tags
Annotators
URL
-
-
wojciechkrysiak.medium.com wojciechkrysiak.medium.com
-
www.prisma.io www.prisma.io
Tags
Annotators
URL
-
-
www.typescriptlang.org www.typescriptlang.org
-
www.typescriptlang.org www.typescriptlang.org
Tags
Annotators
URL
-
-
www.typescriptlang.org www.typescriptlang.org
-
With TypeScript 3.7, TypeScript added support for generating .d.ts files from JavaScript using JSDoc syntax. This set up means you can own the editor experience of TypeScript-powered editors without porting your project to TypeScript, or having to maintain .d.ts files in your codebase.
npx -p typescript tsc src/**/*.js --declaration --allowJs --emitDeclarationOnly --outDir types
-
-
www.typescriptlang.org www.typescriptlang.org
-
github.com github.com
-
jsdoc /* * @pattern /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*)/ */
Tags
Annotators
URL
-
-
github.com github.com
-
js /** * This component is just a Box with border. * It serves as an example of how you can incorporate * components together. * * Component also has slots, methods and events. * * @component * @example <caption>Basic usage just with the default slot</caption> * <Box> * I am inside a slot * </Box> * * @example <caption>Using second component inside</caption> * <Box> * <ProgressBar :spent="spent" :remaining="50"></ProgressBar> * </Box> * * @example <caption>Example of passing an entire component in a preview</caption> * { * template: `<Box> * <ProgressBar :spent="spent" :remaining="50"></ProgressBar> * <ProgressBar :spent="50" :remaining="50" style="margin-top: 20px"></ProgressBar> * </Box>`, * data: function() { * return {spent: 223}; * } * } */ export default { name: "Box", props: { /** * This will be in the header */ title: { type: String, default: "My box" } }, methods: { /** * Also, you can describe methods for each component * the same as you would do this in regular @jsdoc * documented file * * @param {string} prop1 some example property * @param {string} prop2 other property */ exampleMethod(prop1, prop2) { // method body // The method could even throw an event /** * This event could be thrown by component in case * of some kind of unexpected behaviour. * * @category API * @event unexpectedEvent */ this.$emit('unexpecteEvent') } } }
Tags
Annotators
URL
-
- Dec 2022
- Nov 2019
-
devhints.io devhints.io
-
-
Tags
Annotators
URL
-
- Apr 2019
-
google.github.io google.github.io
Tags
Annotators
URL
-
- Aug 2015
-
www.cheatography.com www.cheatography.com
-
@interfaceFunction is interface (no new)
Use this to document abstract classes in JSDoc
-