Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

期望大佬升级typescript #20

Open
septbr opened this issue Jan 15, 2020 · 7 comments
Open

期望大佬升级typescript #20

septbr opened this issue Jan 15, 2020 · 7 comments

Comments

@septbr
Copy link

septbr commented Jan 15, 2020

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();
@eos3tion
Copy link

@septbr
Copy link
Author

septbr commented Jan 17, 2020 via email

@sylarlin
Copy link

sylarlin commented Apr 9, 2021

@septrd https://github.com/eos3tion/TypeScript-plus/tree/v3.7.2plus
貌似你删除了不少函数,例如reorderSourceFiles,不能直接替换掉白鹭的呢。。。。

@robinch-top
Copy link

@septrd https://github.com/eos3tion/TypeScript-plus/tree/v3.7.2plus
貌似你删除了不少函数,例如reorderSourceFiles,不能直接替换掉白鹭的呢。。。。

你有找到可替换的吗

@eos3tion
Copy link

eos3tion commented Jul 9, 2021

@sylarlin @robinch-top 可以直接替换白鹭啊,我再白鹭发了另外一个合并请求
egret-labs/egret-core#302
我自己的白鹭项目用的很正常

@robinch-top
Copy link

robinch-top commented Jul 9, 2021

@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

@1045290202
Copy link

我改了一个ts5.0.4版本的typescript-plus,https://github.com/1045290202/typescript-plus,有需要可以试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants