我试图在类型记录中构建一个fluent-API库,我有两个类,分别位于不同的文件中,它们相互引用如下:
a.ts
import * as b from "./b"
export abstract class A {
static create(n: number) : A {
return new b.B(n);
}
}
b.ts
import * as a from "./a"
export class B extends a.A {
constructor(n: number) {
super()
我是JS和Kotlin/JS的新手。下面是一个示例中的插件的最低限度工作Javascript代码。它如预期的那样运作:
var obsidian = require('obsidian');
class SomePlugin extends obsidian.Plugin {
onload() {
new obsidian.Notice('This is a notice!');
}
}
module.exports = Plugin;
我本来希望用Kotlin扩展这个插件,因为我知道Kotlin语言,但我在将它转换为Kotlin
当我删除polyfills.ts中的注释部分,以便在因特网上加载页面时
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float&
尝试使用angular 7 (cdkPortal)应用程序打开一个新窗口,在chrome上工作得很好,但在边缘,新打开的窗口上不显示HTML内容。
我正在尝试下面的例子,它在chrome上看起来很好,但在IE Edge中就不行了:
下面是我的polyfills.ts文件:
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divid
更新2:这个问题很混乱,因为我认为ES6 class并没有修改.protototype,它是做的,因此这正是我想要的。
我接受了最广泛的答案,即使所有的答案和评论都应该在一开始就指向正确的方向:)
谢谢大家!
旧:
在旧JS中,pre ES6中,当我们学习如何使用以下方法创建“类”时:
function X() {
this.foo = function(){
}
};
var x = new X();
我们还知道,每次执行x = new X();时,我们都会得到'foo‘方法的副本,这是为什么使用prototype是个好主意的原因之一。
现在,在ES6中,我们有了这
所以我对我正在做的一个项目有一些问题--一切运行都很好,除了我试图取消对polyfill.ts for IE9,10和11中的导入语句的注释。我取消了所有注释,运行了npm安装--保存classlist.js和npm安装--保存网络动画--js。所有东西都是在chrome上构建和运行的,但是它仍然没有在IE11上运行,这种行为背后有什么想法吗?它以IE11上的角徽标打开,但只有一个空白屏幕。
我是不是遗漏了什么?我搜索了互联网,并与gitter交谈,但没有结果。
我也找到了类似的职位,但没有找到合适的答案。(例如,)
发现增设员额:
也是
尝试添加到index.html:< meta
我有一个新的角应用程序。如果我使用'ng serve‘运行它,那么我似乎没有任何错误,如果我在2017中运行它,那么我会在调试输出窗口中得到很多错误,例如
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request finished in 137.0021ms 404 text/html; charset=utf-8
Exception was thrown at line 2584, column 55 in http://localhost:50055/polyfills.js
0x800a138f - Ja