在更新到angular 9之后,我收到警告:
\src\main.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.
\src\polyfills.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only
我是angular的新手,我正在尝试在从angular 6更新到8之后构建我的项目,但是由于某种原因,我收到了2个我不理解的警告,我已经在互联网上搜索了所有的解决方案,但没有一个有效,感谢您的帮助。
WARNING in D:/Spark/doPayroll Backup/dopayroll-front-end/src/app/banks/addbank.model.ts is part of
the TypeScript compilation but it's unused.
Add only entry points to the 'files' or '
当在角项目中包含@fireflysemantics/slice时,我会得到以下错误消息:
ERROR in ./node_modules/@fireflysemantics/slice/index.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /home/ole/Temp/fstest/node_modules/@fireflysemantics/slice/index.ts is missing from the TypeScript compilation. Please
摘要
我试图使用Typedoc为TypeScript项目构建文档。不幸的是,Typedoc在我的一个文件中使用的导入语句上产生了错误。
我很困惑,因为它是错误检查的文件没有在我的项目中使用,或者必须构造我的导入类型。
问题序言
我使用语法import type { Type }导入一个类型。具体来说,这个文件export是一个interface,我在导入语句中使用一个相对路径(在项目根之外)来访问它。此文件是使用openapi生成器生成的模型。这个文件的顶部还有一堆import语句,其中一条叫做runtime.ts。
Typedoc和我的TSConfig似乎解决了所有这些导入,然后错误地检查它
我使用从“前面”和“后面”引用“共享”项目。
tsc -v: Version 3.3.3
项目结构:
./{MY_PROJECT}.code-workspace /* the only file in this level */
./back
./back/tsconfig.json
./shared/src/
./shared/
./shared/tsconfig.json
./shared/src/
./front
./front/tsconfig.json
./front/src
我正在尝试从共享项目中将一个模块导入到./front/src/article-view-model.ts
在角度更新之后,所有延迟加载的模块都会返回警告:
Error: [path/to/module/module-name.ts] is missing from the TypeScript
compilation. Please make sure it is in your tsconfig via the 'files'
or 'include' property.
我的函数返回模块数组:
export function manifests(prefix = '') {
return [
{
l
这是我的Angular5项目结构。
tsconfig.app.json和package.json都包含此部分
"include": [
"/src/main.ts",
"/src/polyfills.ts"
]
但是无论我怎么尝试,我仍然会得到这个错误:
\polyfills.ts & \main.ts is missing from the TypeScript compilation.
Please make sure it is in your tsconfig via the
我想使用来转换类型记录别名路径,首先安装插件:
yarn add ts-transform-paths -D
然后在tsconfig.json中添加配置
// Note: To transform paths for both the output .js and .d.ts files, you need both of the below entries
"plugins": [
// Transform paths in output .js files
{ "transform": "typescript-tran
当我使用以下命令构建angular 5项目时
ng build --prod
它给出了很长的误差,如下所示。它显示了部分错误。
error TS5055: Cannot write file 'E:/Files/dash-
functional/node_modules/zone.js/dist/long-stack-trace-zone.js' because it
would overwrite in
put file.
Adding a tsconfig.json file will help organize projects that contain both
我正试图在一个类型记录环境中用Jasmine编写我的单元测试。
我安装了业力,业力类型记录,业力-茉莉花,茉莉花和茉莉花。
我已经将一个自定义tsconfig.json添加到spec目录中,并在业力类型记录设置中使用它。
一般来说,我的测试是有效的,但是它不执行我的规范助手。
,我是不是缺少了什么东西来执行我的规范助手?
供您参考,以下是我的配置:
karma.conf.js:
module.exports = function (config) {
config.set({
// base path that will be use
我想使用syntastic插件为vim提供实时错误检查,而我正在编写打字记录文件,使用tsc。我已经在tsc中激活了vim。对于如何让tsc使用最近的父tsconfig.json文件作为配置,有什么建议吗?我发现tsc在默认情况下不会这么做,这使得syntastic配置变得困难。谢谢!
编辑:我认为它不使用tsconfig.json的原因是,像模块解析方法这样的选项似乎不起作用(“要求”没有定义),而且它也没有捕获files属性在tsconfig.json中定义的定义文件。
我试图解决这个问题失败了:
let g:syntastic_typescript_checks=['tsc
我试图使用汇总构建一个带有Svelte和TypeScript的应用程序,而当我试图构建Svelte组件时,我似乎无法让它编译.ts组件中包含的.ts文件。
我一直在犯这个错误:
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
src/ui/pages/files-page/utils/mapPaths.ts (1:12)
1: import type { PathMapping } from '~/types/path.d';
Error: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
在角度9中,同样的方案没有出现这样的误差。
Angular10现在添加了tsconfig.base.json文件。
更新的tsconfig.json文件
在编译过程中,我一直在使用与ES5标准不同的东西,这是因为我刚刚开始使用TS,而且我不知道如何将tsconfig.json直接包含在自己的Gulp任务自动编译中。
error TS1056: Accessors are only available when targeting ECMAScript 5 and higher
是否可以将我的tsconfig.json文件属性直接添加到管道中?
电流gulpfile.js
'use strict';
var gulp = require('gulp');
var ts = require('gulp-