typescript-plus
typescript-plus copied to clipboard
期望大佬升级typescript
class X {
public go(data: { arg1: number }) { }
}
class Y {
public x?: { call: () => void } = { call: () => console.log('x?.call();') }
public go(data: { arg1: number, arg2?: string }) { }
}
let x = new X(), y = new Y();
// error TS2349: Cannot invoke an expression whose type lacks a call signature.
// Type '((data: { arg1: number; }) => void) | ((data: { arg1: number; arg2?: string; }) => void)' has no compatible call signatures.
let go: typeof x.go | typeof y.go = x.go;
go({ arg1: 0 });
// error: Optional Chaining in typescript 3.7.x
y?.x.call();
@septrd https://github.com/eos3tion/TypeScript-plus/tree/v3.7.2plus
谢谢
------------------ 原始邮件 ------------------ 发件人: "程方"<[email protected]>; 发送时间: 2020年1月17日(星期五) 中午1:42 收件人: "domchen/typescript-plus"<[email protected]>; 抄送: "iCunda"<[email protected]>; "Mention"<[email protected]>; 主题: Re: [domchen/typescript-plus] 期望大佬升级typescript (#20)
@septrd https://github.com/eos3tion/TypeScript-plus/tree/v3.7.2plus
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@septrd https://github.com/eos3tion/TypeScript-plus/tree/v3.7.2plus 貌似你删除了不少函数,例如reorderSourceFiles,不能直接替换掉白鹭的呢。。。。
@septrd https://github.com/eos3tion/TypeScript-plus/tree/v3.7.2plus 貌似你删除了不少函数,例如reorderSourceFiles,不能直接替换掉白鹭的呢。。。。
你有找到可替换的吗
@sylarlin @robinch-top 可以直接替换白鹭啊,我再白鹭发了另外一个合并请求 https://github.com/egret-labs/egret-core/pull/302 我自己的白鹭项目用的很正常
@sylarlin @robinch-top 可以直接替换白鹭啊,我再白鹭发了另外一个合并请求 egret-labs/egret-core#302 我自己的白鹭项目用的很正常
是直接替换Egret\engine\5.2.33\tools\lib\typescript-plus\lib吗 我在使用5.2.33版本 使用https://github.com/eos3tion/TypeScript-plus/tree/v3.7.2plus 中lib替换了plus中lib 并不能正常编译通过 报错:TypeError: ts.reorderSourceFiles is not a function
我改了一个ts5.0.4版本的typescript-plus,https://github.com/1045290202/typescript-plus,有需要可以试试