bases
anvil-ts-upgrade-example
bases | anvil-ts-upgrade-example | |
---|---|---|
13 | 1 | |
5,650 | 1 | |
3.7% | - | |
7.6 | 0.0 | |
13 days ago | almost 2 years ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bases
-
Configuring Jest for Typescript Unit Tests
We will install ready-to-use Typescript base configurations instead of starting from scratch. In this article, we will use Typescript base configurations for node version 20. If you are using a different version of node, visit the tsconfig bases docs to find out what you need. You can also create a Typescript configuration file with settings that work for you.
-
TSConfig Applier Extension :)
This Visual Studio Code extension simplifies the process of selecting and applying TypeScript configuration files (`tsconfig.json`) from the https://github.com/tsconfig/bases repository. With this extension, you can effortlessly browse through available configuration
-
The hardest thing in Typescript for me is...
Steal from this repo: https://github.com/tsconfig/bases/blob/main/bases/next.json
-
🎓 Monorepo College Lecture 2: Build Me Up Buttercup
I personally am a big advocate for writing the least amount of tsconfig possible, and the tsconfig/bases package serves as a great source for getting tsconfig templates.
-
Use Mocha instead of Jest and boost your tests speed
Possibly depends on your tsconfig. We use the recommended base configs from here https://github.com/tsconfig/bases
-
Achieving end-to-end type safety in a modern JS GraphQL stack
A tsconfig.json preset that ensures type safety;
-
Create a NodeJS Boilerplate with Typescript
The same configuration is also available for other nodejs versions like 14 and 12.
-
Converting your vanilla Javascript app to TypeScript
After installing, we also need to set up a basic tsconfig.json file for how we want tsc to behave with our app. We will use one of the recommended tsconfig files here: https://github.com/tsconfig/bases#centralized-recommendations-for-tsconfig-bases. This contains a list of community recommended configs depending on your app type. We’re using Node 16 and want to be extremely strict on the first pass to clean up any bad code habits and enforce some consistency. We’ll use the one located: https://github.com/tsconfig/bases/blob/main/bases/node16-strictest.combined.json.
-
Possibly moving from JS to TS - have a few questions
You'll need @typescript-eslint/parser to get it working with eslint, then I would add @typescript-eslint/recommended as a plugin, then add prettier-eslint for formatting. What's more important is having a really good tsconfig file, I would recommend extending something from https://github.com/tsconfig/bases
-
How to Set Up a Node.js Project with TypeScript
The above configuration file extends the base configuration provided by the TypeScript team for Node.js v16. Additional options or overrides may be included through the compilerOptions property. It also specifies that all the files in the src directory should be included in the program, but everything in the node_modules directory is skipped entirely. Both the include and exclude properties support glob patterns.
anvil-ts-upgrade-example
-
Converting your vanilla Javascript app to TypeScript
This post will go through an example TODO app repo we’ve set up here: https://github.com/anvilco/anvil-ts-upgrade-example. This repo is in plain vanilla Javascript and runs on Node.js and uses Express. There are some basic tests included, but it’s as simple as can be. We will go through a few strategies that one can take when attempting to migrate to using TypeScript from Javascript.
What are some alternatives?
node-express-boilerplate - A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose
coffeescript - Unfancy JavaScript
tsconfig-applier - Welcome to `tsconfig-applier`! This Visual Studio Code extension simplifies the process of selecting and applying TypeScript configuration files (`tsconfig.json`) from the https://github.com/tsconfig/bases repository. With this extension, you can effortlessly browse through available configuration
Nodemon.io - Monitor for any changes in your node.js application and automatically restart the server - perfect for development
piscina - A fast, efficient Node.js Worker Thread Pool implementation
Bee-Queue - A simple, fast, robust job/task queue for Node.js, backed by Redis.
volta - Volta: JS Toolchains as Code. âš¡
deno - A modern runtime for JavaScript and TypeScript.
DefinitelyTyped - The repository for high quality TypeScript type definitions.
typescript-eslint - :sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.