Library Search
结果页TypeScript 入门到进阶
在 技术栈 中找到 8 个匹配结果。
技术栈
技术栈
8 个 TypeScript # TypeScript 入门到进阶教程
## 第一章:为什么要学 TypeScript
JavaScript 是动态类型语言——变量类型在运行时确定。这带来灵活性,但在大型项目中是灾难:
- 重构一个函数签名,不知道哪些调用会炸
- 后端返回的数据结构,只能靠注释来约定
- `undefined is not a function` 是最常见的运行时错误
TypeScript 在 JS 之… 3% Vue ()
</script>
```
### 4. 状态管理:Pinia
```typescript
// stores/user.ts
import { defineStore } from 'pinia'
export const useUserStore = defineStore('user', () => {
const token = ref('')
const userIn… 3% React 分步操作:搭建毕设项目
### Step 1: Vite + React + TypeScript
```bash
npm create vite@latest grad-project -- --template react-ts
cd grad-project
npm install
npm run dev
```
### Step 2: 安装必备库
```bash
npm insta… 3% NestJS /students/dto/create-student.dto.ts`
```typescript
import { IsString, IsInt, Min, Max, IsEmail, IsOptional } from 'class-validator';
export class CreateStudentDto {
@IsString()
name: string;
@… 3% Angular |
### 2. 装饰器(Decorator)
Angular 大量使用 TypeScript 装饰器标记类:
```typescript
@Component({ selector: 'app-student', templateUrl: './student.component.html' })
export class StudentComponent { }
@Injectabl… 3% Next.js 署
## 2. 安装命令
### 创建项目
```bash
# 推荐:带 TypeScript + Tailwind + App Router
npx create-next-app@latest my-next-app --typescript --tailwind --app --eslint
# 或交互式选择
npx create-next-app@latest my-next-ap… 2% Spring Boot # Spring Boot 入门到进阶教程
## 第一章:Spring Boot 核心概念
### 1.1 自动配置原理
Spring Boot 的自动配置通过 `@SpringBootApplication` 注解触发,该注解包含三个关键注解:
- **@SpringBootConfiguration**:标记为配置类
- **@EnableAutoConfiguration**:启用自… 2% Vite 00 倍。你不需要手动配置 esbuild。
### 3. 开箱即用
```typescript
// TypeScript — 零配置
// JSX/TSX — 零配置
// CSS Modules — .module.css 自动识别
// PostCSS — postcss.config.js
// WASM — 直接 import
// Web Workers — new Worker… 2%