Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typescript 不兼容的相同类型_Typescript - Fatal编程技术网

Typescript 不兼容的相同类型

Typescript 不兼容的相同类型,typescript,Typescript,有几次,我遇到了一个不寻常的类型错误,其形式如下: Type 'SomeType<SomeGeneric>' is not assignable to type 'SomeType<SomeGeneric>'. 任何帮助都将不胜感激 你能发布一段代码来重现错误吗?我目前遇到的模块是reservisindbts。我使用的是一个私有模块,它有db ts作为依赖项。我将查看是否可以构造一个以类似方式运行的公共模块。我已尝试在此处复制它,但没有出现类型错误:。该错误似乎也不再出

有几次,我遇到了一个不寻常的类型错误,其形式如下:

Type 'SomeType<SomeGeneric>' is not assignable to type 'SomeType<SomeGeneric>'.

任何帮助都将不胜感激

你能发布一段代码来重现错误吗?我目前遇到的模块是
reservisindbts
。我使用的是一个私有模块,它有
db ts
作为依赖项。我将查看是否可以构造一个以类似方式运行的公共模块。我已尝试在此处复制它,但没有出现类型错误:。该错误似乎也不再出现在我的一个项目中。可能是依赖项的版本与项目不同。我不确定。
{
    "composite": true,
    "declaration": true,
    "sourceMap": true,
    "target": "es2015",
    "module": "ES6",
    "moduleResolution": "node",
    "baseUrl": "./",
    "outDir": "./build/",
    "lib":
    [
        "es2015",
        "es2017"
    ],
    "removeComments": true,
    "downlevelIteration": true,
    "alwaysStrict": true,
    "allowSyntheticDefaultImports": true,
    "strictNullChecks": true,
    "resolveJsonModule": true,
    "paths":
    {
        "common/*": ["../Common/*"]
    },
    "watch": true
}