> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syntblaze.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript Named Import

A named import is a module resolution mechanism used to extract specific, explicitly exported bindings—such as variables, functions, classes, types, or interfaces—from an external module into the current module's scope. Unlike default imports, named imports require exact identifier matching between the exporting module and the importing module, enabling static analysis and precise tree-shaking.

## Basic Syntax

Named imports utilize destructuring-like syntax within curly braces `{}` to specify the exact identifiers to be imported.

```typescript theme={"dark"}
// Importing a single member
import { Identifier } from './module-path';

// Importing multiple members
import { IdentifierA, IdentifierB, IdentifierC } from './module-path';
```

## Identifier Aliasing

To prevent namespace collisions within the local scope, named imports support immediate renaming using the `as` keyword. This binds the exported member to a new local identifier.

```typescript theme={"dark"}
import { OriginalName as LocalName } from './module-path';
```

## TypeScript-Specific Extensions: Type-Only Imports

TypeScript extends standard ECMAScript named imports with the `type` modifier. This explicitly instructs the TypeScript compiler that the imported binding is used exclusively in the type system (e.g., as an interface or type alias). The compiler guarantees the erasure of these imports during the JavaScript emit phase, ensuring no runtime overhead or strict-mode module resolution errors.

**Module-Level Type Import:**
Applies the type-only constraint to all named imports within the statement.

```typescript theme={"dark"}
import type { UserInterface, UserState } from './user-types';
```

**Inline Type Import (TypeScript 4.5+):**
Allows mixing runtime value imports and compile-time type imports within a single named import statement by prefixing individual identifiers with the `type` keyword.

```typescript theme={"dark"}
import { fetchUserData, type UserInterface } from './user-module';
```

## Binding Mechanics

Named imports create a live, read-only view of the exported binding. The imported identifier cannot be reassigned within the importing module (e.g., `IdentifierA = newValue` will throw a compiler error), but if the exporting module mutates the underlying value, the imported binding will reflect that updated state.

<div
  style={{ 
display: "flex", 
justifyContent: "space-between", 
alignItems: "center", 
maxWidth: "754px", 
padding: "1rem 0",
marginBottom: "24px"
}}
>
  <span style={{ fontWeight: "bold", fontSize: "1.25rem", color: "var(--tw-prose-headings)", fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif" }}>Tired of Poor TypeScript Skills? Fix That With Deep Grasping!</span>

  <a
    href="https://syntblaze.com"
    target="_blank"
    style={{ 
  marginLeft: "24px",
  textDecoration: "none", 
  backgroundColor: "#007AFF",
  color: "#ffffff", 
  padding: "6px 16px", 
  borderRadius: "16px",
  fontSize: "0.9rem",
  fontWeight: "600",
  textAlign: "center",
  transition: "background-color 0.2s ease"
}}
  >
    Learn More
  </a>
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/skill-tracking.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=b9b0305c93bb501c9e767b5c76c88835" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/skill-tracking.png" />

  <img src="https://mintcdn.com/syntblazellc/23tyuOzaWS88qFlc/images/nuggets.png?fit=max&auto=format&n=23tyuOzaWS88qFlc&q=85&s=c86c80197299762989e9b882419b2109" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/nuggets.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/bite-sized-exercises.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=a65f9a38c37ff28ab73ed783c53c60e3" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/bite-sized-exercises.png" />
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap", marginTop: "12px" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/mastery-chain.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=748a1763454713e679260fbb95f154a2" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/mastery-chain.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-previews.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=242f61448ff5dd6deaaab2dccc13b507" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-previews.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-explanations.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=cf0fc1c31f9cd0fc26716781be05fbc9" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-explanations.png" />
</div>
