-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
repeated message error #1307
Comments
Same here. Problem is, that it transpiles This has something to do with the TypeScript Compiler I guess, because in my Env nothing else changed. This is bad, because I dont know the version that worked before. |
@mreiche @wildfire810 for (let file of glob('*.d.ts', { cwd: __dirname + '/../src/generated' })) {
|
Github has been working horribly in the last few days. I can't edit the broken markup in the previous message 😕 |
I probably get this fixed. But I really want to know the reason for that. Do you know a working Typescript Version? I compile my proto files like:
and
It installes one of these extensions
which may also cause the issue. |
Im not sure if this works in general, because it also compiles /**
* File meta.
* @member {Object.<string,string>} meta
* @memberof data.File
* @instance
*/
File.prototype.meta = $util.emptyObject; to /** File meta. */
public meta: [ 'object' ].<string, string>; |
According to #1306 downgrading to Node 10.x is a workarround. |
I use the library in cocos creator,a typescript game framework. |
protobuf.js version: 6.8.8
message MessageList {
repeated Message messageList = 1;
}
D:\Project\skybox\Engine\Monju\Protocol\ProtoBuf\Protocol.d.ts
Error:Error:line (70)TS2416: Property 'messageList' in type 'MessageList' is not assignable to the same property in base type 'IMessageList'.
Type '["Array"]' is not assignable to type 'IMessage[]'.
Type '"Array"' has no properties in common with type 'IMessage'.
Error:Error:line (77)TS2304: Cannot find name 'create'.
Error:Error:line (77)TS2304: Cannot find name 'properties'.
Error:Error:line (77)TS2693: 'IMessageList' only refers to a type, but is being used as a value here.
Error:Error:line (85)TS2552: Cannot find name 'encode'. Did you mean 'Node'?
Error:Error:line (85)TS2552: Cannot find name 'message'. Did you mean 'Message'?
Error:Error:line (85)TS2693: 'IMessageList' only refers to a type, but is being used as a value here.
Error:Error:line (85)TS2304: Cannot find name 'writer'.
Error:Error:line (95)TS2304: Cannot find name 'decode'.
Error:Error:line (95)TS2304: Cannot find name 'reader'.
Error:Error:line (95)TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
Error:Error:line (95)TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
Error:Error:line (95)TS2693: 'number' only refers to a type, but is being used as a value here.
Error:Error:line (70)TS1005: ';' expected.
Error:Error:line (70)TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
Error:Error:line (70)TS1109: Expression expected.
Error:Error:line (77)TS1128: Declaration or statement expected.
Error:Error:line (77)TS1128: Declaration or statement expected.
Error:Error:line (77)TS1109: Expression expected.
Error:Error:line (77)TS1005: ';' expected.
Error:Error:line (85)TS1128: Declaration or statement expected.
Error:Error:line (85)TS1128: Declaration or statement expected.
Error:Error:line (85)TS1005: ',' expected.
Error:Error:line (85)TS1109: Expression expected.
Error:Error:line (85)TS1005: ';' expected.
Error:Error:line (95)TS1128: Declaration or statement expected.
Error:Error:line (95)TS1128: Declaration or statement expected.
Error:Error:line (95)TS1005: ',' expected.
Error:Error:line (95)TS1109: Expression expected.
Error:Error:line (95)TS1005: ';' expected.
Error:Error:line (96)TS1128: Declaration or statement expected.
The text was updated successfully, but these errors were encountered: