0

为什么我会收到此类重复错误?

在此处输入图像描述

源代码如下。

[Sigin.html]

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title></title>
    <script type="text/javascript" src="scripts/web/public/signin/WebpageLoader.js"></script>
</head>
<body>
    <WebBody></WebBody>
</body>
</html>

.

[网页加载器.ts]

/// <reference path="../../../../../typings/main/ambient/systemjs/index.d.ts" />

'use strict';

//import System = require("systemjs");

class WebpageLoader {
    public constructor() {
        window.onload = () => {
            //====================================================
            //Notice: This is the javascript component that bootstrap Angular 2, to get it up and going...
            //====================================================
            System.config({
                baseURL: "/lib",
                defaultJSExtensions: true
            });

            System.import('/scripts/web/public/signin/WebpageLoaderComponent');
            //====================================================
        };
    }
}

var webpageLoader = new WebpageLoader();
4

1 回答 1

1

您必须从编译中排除您的 d.ts 文件。您可以在 tsconfig 中添加排除数组并添加 d.ts 的路径

于 2016-04-27T22:28:17.710 回答