TypeScript

Keyof for Nested Objects

Problem

· 1 min
TypeScript

Writing TypeScript in Monaco Editor

Implementing a TypeScript editor using Monaco involves more than just setting the language. This post covers how to …

· 1 min
monaco-editortypescriptweb-editor

Global Type Definition Issues in Third-party Packages

When global types in third-party packages don't apply, here’s how to wire them up in TS or JS projects and the ideal …

· 1 min
TypeScript

Add Global Constants to a Frontend Project

Expose config from package.json into the built app via webpack DefinePlugin, with typing in TS and pitfalls to avoid.

· 1 min
Build ToolsTypeScriptFrontend Development

Contributing TS Type Declarations to Open Source Projects

How to create, package, and reference TypeScript declaration files when contributing typings to open-source projects.

· 1 min
TypeScript

Lesser-Known TypeScript Types

Covers `never`, `ArrayLike`, and `PromiseLike`, when to use them, and links to further reading.

· 2 min
TypeScript

Extend AxiosRequestConfig in TypeScript

Use declaration merging to add custom properties (e.g., loading flags) to AxiosRequestConfig without sacrificing type …

· 1 min
TypeScript

TypeScript Enum vs. ES6 Symbol

Compares TypeScript enums and ES6 symbols so you know when to choose each for identifiers and constants.

· 2 min
JavaScriptTypeScript

TypeScript Explained (Simple Guide)

Key takeaways about TypeScript, including use cases and implementation details, to help you work with the language more …

· 2 min
TypeScript

Upgrading TypeScript to v4

Notes from upgrading to TypeScript 4.0—packages to bump, issues encountered, and fixes.

· 1 min
TypeScript

TypeScript Decorator Practice

Overview of TypeScript decorators, how to enable them, and a practical example transforming Redux action types.

· 2 min
TypeScript

Migrating from ts-loader to babel-loader

Why I switched from ts-loader to babel-loader, sample configuration, performance notes, and common questions.

· 1 min
TypeScript

Eliminating Dead Code in TS Projects

How to remove dead code in TypeScript projects with compiler settings, lint rules, and tooling so you keep the codebase …

· 2 min
TypeScript

JavaScript method vs function vs member

This article explains the differences between JavaScript methods, functions, and members, including their advantages, …

· 4 min
JavaScriptTypeScript

regeneratorRuntime is not defined

Troubleshooting the regeneratorRuntime runtime error after adding redux-saga-promise, covering root cause and fixes in …

· 1 min
TypeScript

Difference Between implements and extends in TypeScript

Clarifies how implements vs. extends behave in TypeScript and compares them with Java.

· 1 min
TypeScript

Unknown vs. Any in TypeScript

Highlights the core difference between `unknown` and `any`, with examples of type narrowing and why `unknown` is safer.

· 1 min
TypeScript

Duplicate identifier LibraryManagedAttributes

This article introduces the solution to the Duplicate identifier LibraryManagedAttributes error, including the …

· 1 min
TypeScriptNode.js

Type Issues When Using React with TypeScript

This article introduces type issues when using React with TypeScript, including their advantages, implementation …

· 5 min
TypeScriptReact

interface vs type in TypeScript

When to use interfaces vs. type aliases, what the TypeScript docs recommend, and how the ESLint/TSLint rule works.

· 2 min
TypeScriptTechnical Study

JSX.Element vs React.ReactNode Comparison

This article provides a detailed comparison between JSX.Element and React.ReactNode types in React with TypeScript, …

· 2 min
Technical LearningReactTypeScript

TSLint Does Not Catch TypeScript Errors

Explains why linting alone isn’t enough—TSLint enforces style but won’t catch TypeScript type errors, so add tsc to your …

· 1 min
TypeScript

Type Casting vs. Type Assertions in TypeScript

Clarifies that TypeScript’s `as` syntax performs compile-time assertions, not runtime casts, and compares it with …

· 2 min
TypeScriptJavaScript

[Translation] TypeScript vs. JavaScript: Should You Migrate Your Project to TypeScript?

This post compares TypeScript and JavaScript and discusses whether you should migrate a project to TypeScript, covering …

· 5 min
TypeScriptTranslation

TypeScript Version Always Shows 1.0

Why `tsc --version` reported 1.0.3.0 on Windows even after installing a newer TypeScript, and how removing the SDK path …

· 1 min
TypeScript