Skip to content

Instantly share code, notes, and snippets.

View hipstersmoothie's full-sized avatar
🎧
Ignoring the real world

Andrew Lisowski hipstersmoothie

🎧
Ignoring the real world
View GitHub Profile
title layout permalink oneline
Creating .d.ts Files from .js files
docs
/docs/handbook/declaration-files/dts-from-js.html
How to add d.ts generation to JavaScript projects

With TypeScript 3.7, TypeScript added support for generating .d.ts files from JavaScript using JSDoc syntax.

const createLogger = (backgroundColor, color) => {
const logger = (message, ...args) => {
if (logger.enabled === false) {
return;
}
console.groupCollapsed(
`%c${message}`,
`background-color: ${backgroundColor}; color: ${color}; padding: 2px 4px;`,
...args
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active March 22, 2025 07:22
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@AGmakonts
AGmakonts / README.md
Last active February 5, 2022 18:42
Automatic GitHub release notes and built package from Circle CI

Automatic GitHub release notes and built package from Circle CI

This config uses github-release and github-release-notes to automatically update release with required artifacts and compose release notes based on commit messages. Follow documentation of thos etwo packages to configure it to your needs.