当前位置: 首页 > article >正文

The TypeScript Compiler - Version 5.2.2,tsc -w无效怎么办?

文章目录

  • 前言
  • tsc -w无效怎么办?
  • 报错内容
  • 后言

前言

hello world欢迎来到前端的新世界


😜当前文章系列专栏:Typescript
🐱‍👓博主在前端领域还有很多知识和技术需要掌握,正在不断努力填补技术短板。(如果出现错误,感谢大家指出)🌹
💖感谢大家支持!您的观看就是作者创作的动力

tsc -w无效怎么办?

直接再来一个初始化

tsc --init

就ok了


报错内容

Version 5.2.2
tsc: The TypeScript Compiler - Version 5.2.2                                                                            
                                                                                                                     TS 
COMMON COMMANDS

  tsc
  Compiles the current project (tsconfig.json in the working directory.)

  tsc app.ts util.ts
  Ignoring tsconfig.json, compiles the specified files with default compiler options.

  tsc -b
  Build a composite project in the working directory.

  tsc --init
  Creates a tsconfig.json with the recommended settings in the working directory.

  tsc -p ./path/to/tsconfig.json
  Compiles the TypeScript project located at the specified path.

  tsc --help --all
  An expanded version of this information, showing all possible compiler options

  tsc --noEmit
  tsc --target esnext
  Compiles the current project, with additional settings.

COMMAND LINE FLAGS

     --help, -h  Print this message.

    --watch, -w  Watch input files.

          --all  Show all compiler options.

  --version, -v  Print the compiler's version.

         --init  Initializes a TypeScript project and creates a tsconfig.json file.

  --project, -p  Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.

    --build, -b  Build one or more projects and their dependencies, if out of date

   --showConfig  Print the final configuration instead of building.

COMMON COMPILER OPTIONS

               --pretty  Enable color and formatting in TypeScript's output to make compiler errors easier to read.
                  type:  boolean
               default:  true

      --declaration, -d  Generate .d.ts files from TypeScript and JavaScript files in your project.
                  type:  boolean
               default:  `false`, unless `composite` is set

       --declarationMap  Create sourcemaps for d.ts files.
                  type:  boolean
               default:  false

  --emitDeclarationOnly  Only output d.ts files and not JavaScript files.
                  type:  boolean
               default:  false

            --sourceMap  Create source map files for emitted JavaScript files.
                  type:  boolean
               default:  false

           --target, -t  Set the JavaScript language version for emitted JavaScript and include compatible library declarations.
                one of:  es3, es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, esnext
               default:  es5

           --module, -m  Specify what module code is generated.
                one of:  none, commonjs, amd, umd, system, es6/es2015, es2020, es2022, esnext, node16, nodenext
               default:  undefined

                  --lib  Specify a set of bundled library declaration files that describe the target runtime environment.
           one or more:  es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, esnext, dom, dom.iterable, webworker, webworker.i                         mportscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es201                         5.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.date, es2017.object, es2017.sharedmemory                         , es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es201                         8.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.b                         igint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.pr                         omise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.objec                         t, es2022.sharedmemory, es2022.string/esnext.string, es2022.regexp, es2023.array/esnext.array, es2023.collection/esnext.collection, es                         next.intl, esnext.disposable, esnext.decorators, decorators, decorators.legacy
               default:  undefined

              --allowJs  Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files.
                  type:  boolean
               default:  false

              --checkJs  Enable error reporting in type-checked JavaScript files.
                  type:  boolean
               default:  false

                  --jsx  Specify what JSX code is generated.
                one of:  preserve, react, react-native, react-jsx, react-jsxdev
               default:  undefined

              --outFile  Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d                         .ts output.

               --outDir  Specify an output folder for all emitted files.

       --removeComments  Disable emitting comments.
               default:  false

               --noEmit  Disable emitting files from a compilation.
                  type:  boolean
               default:  false

               --strict  Enable all strict type-checking options.
                  type:  boolean
               default:  false


                         ibility.
                  type:  boolean
               default:  false

You can learn about all of the compiler options at https://aka.ms/tsc

后言

创作不易,要是本文章对广大读者有那么一点点帮助 不妨三连支持一下,您的鼓励就是博主创作的动力


http://www.kler.cn/a/145309.html

相关文章:

  • 【自学笔记】计算机网络的重点知识点-持续更新
  • 详细解释java当中的所有知识点(前言及数据类型及变量)(第一部分)
  • 解锁豆瓣高清海报:深度爬虫与requests进阶之路
  • python学opencv|读取图像(四十九)原理探究:使用cv2.bitwise()系列函数实现图像按位运算
  • Solon Cloud Gateway 开发:Route 的过滤器与定制
  • Vue.js组件开发-实现下载时暂停恢复下载
  • 「Verilog学习笔记」数据串转并电路
  • 目录树自动生成器 golang+fyne
  • 力扣-55.跳跃游戏
  • Guacamole简介及centos7下搭建教程
  • 哲学家就餐问题
  • OSG编程指南<十二>:OSG二三维文字创建及文字特效
  • 哈希思想的应用
  • Python与设计模式--责任链模式
  • 【分布式】小白看Ring算法 - 03
  • 【SAS Planet 下载地图瓦片】
  • 【数据结构】树与二叉树(廿六):树删除指定结点及其子树(算法DS)
  • 如何找出excel中两列数据中不同的值(IF函数的用法)
  • 2018年4月26日 Go生态洞察:Go新品牌形象及标识发布
  • Mac | Vmware Fusion | 分辨率自动还原问题解决
  • 【Mybatis】动态sql
  • SpringBoot——配置及原理
  • 十大排序之归并排序(详解)
  • 基于WSL2+Docker+VScode搭建机器学习(深度学习)开发环境
  • 【Linux篇】gdb调试器的使用
  • 扩散模型实战(十二):使用调度器DDIM反转来优化图像编辑