Skip to content

Instantly share code, notes, and snippets.

View DaveyJake's full-sized avatar
🎯
Focusing

Davey Jacobson DaveyJake

🎯
Focusing
View GitHub Profile

TypeScript jsdoc examples

Some examples of how to do TypeScript with only jsdoc comments.

Type casting

Note: the extra parenthesis are necessary here.

// TypeScript
@MaximilianFranz
MaximilianFranz / SkyCiv API - Python Schema
Created December 1, 2021 07:55
Pydantic Schema from thy SkyCiv S3DModel JSON Schema
See the the generated schema below.
@erhangundogan
erhangundogan / typescript-diagnostic.sh
Last active January 11, 2024 20:58
TypeScript compiler CLI commands to debug and diagnose your builds
# npm i -g typescript
# change directory to your project
# Prints out tsconfig.json including extended options if there is any.
tsc --showConfig
# You can use this flag to discover where TypeScript is spending it’s time when compiling
# https://github.com/microsoft/TypeScript/wiki/Performance
tsc --extendedDiagnostics
@sindresorhus
sindresorhus / esm-package.md
Last active May 31, 2024 09:16
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@customcommander
customcommander / jsdoc-cheat-sheet.md
Last active June 26, 2023 05:20
JSDoc Cheat Sheet
@irazasyed
irazasyed / mysq-mariadb-macos-start-issue.md
Created October 7, 2020 00:05
Solution for MySQL / MariaDB Start Issue on MacOS

Solution for MySQL / MariaDB Start Issue on MacOS

Errors

On trying to start mysql.server start

./usr/local/bin/mysql.server: line 264: kill: (12262) - No such process ERROR!

@ShaggyTech
ShaggyTech / jsdoc-schema.js
Last active November 17, 2022 17:03
JSDOC - Schema for validating JSDoc doclets
/**
* Schema for validating JSDoc doclets.
* @module jsdoc/schema
* @see <https://trac.tools.ietf.org/html/draft-wright-json-schema-validation-01>
*/
// JSON schema types
const ARRAY = 'array';
const BOOLEAN = 'boolean';
const NULL = 'null';
const NUMBER = 'number';
@kwakwaversal
kwakwaversal / jsDoc-cheatsheet.md
Last active November 19, 2022 23:58
jsDoc cheatsheet #javascript #boilerplate

jsDoc cheatsheet #javascript #boilerplate

A collection of [jsDoc] blocks for reference when coding in JavaScript.

'use strict';

/**
 * @fileOverview Class handling email-related functions.
 * @module Email
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@manjula-dube
manjula-dube / .eslintrc.js
Created February 6, 2018 15:55
.eslintrc.js
// use this format since .eslintrc is deprecated.
// You can logically derive this format.
module.exports = {
parser: 'babel-eslint',
extends: [
'plugin:flowtype/recommended',
'plugin:jest/recommended',
'plugin:react/recommended',
'eslint-config-airbnb',