# base_type_script **Repository Path**: python-base/base_type_script ## Basic Information - **Project Name**: base_type_script - **Description**: TypeScript学习笔记 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-01 - **Last Updated**: 2025-09-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # base_type_script This template should help get you started developing with Vue 3 in Vite. ## Recommended IDE Setup [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). ## Customize configuration See [Vite Configuration Reference](https://vite.dev/config/). ## Project Setup ```sh npm install ``` ### Compile and Hot-Reload for Development ```sh npm run dev ``` ### Compile and Minify for Production ```sh npm run build ``` # 课程笔记 TS不能直接被JS直接执行,需要TS编译成JS才能执行,为什么? JS根深蒂固,不好替换。 ![img.png](images/img.png) TS就是在解决JS缺点的同时,自己添加一些特有特性。 ## 一、开发环境 ```bash 下载node 安装node 安装TS解析器 npm i -g typescript ``` ts代码不能直接在网页执行,js代码可以直接在网页执行。 ## 二、开启自动编译 ```bash 创建tsconfig.json文件 运行tsc 进入监控模式 ``` ## 三、webpack打包 ```bash npm -i init 生成package.json文件 cnpm i -D webpack webpack-cli typescript ts-loader npm i -D webpack webpack-cli typescript ts-loader ```