Giter Site home page Giter Site logo

Cannot find name 'I'. - when passing opts: --ts_proto_opt="outputServices=generic-definitions,outputServices=default" about ts-proto HOT 4 OPEN

ws-gregm avatar ws-gregm commented on June 16, 2024
Cannot find name 'I'. - when passing opts: --ts_proto_opt="outputServices=generic-definitions,outputServices=default"

from ts-proto.

Comments (4)

stephenh avatar stephenh commented on June 16, 2024

I don't really recognize the output here; it looks like:

export type Exact<P, I extends P> = P extends Builtin ? P
  : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };

But we don't output keyof I, "result", we output keyof I, KeysOfUnion....

We also don't output keyof I_1 with the _1 suffix...

Can you include more than just a single line of context?

You've also linked to compile errors in index.d.ts files, but ts-proto generates *.ts files.

My guess is that the code in the ts-proto-generated *.ts files is fine, but something is happening on the compilation to index.d.ts, that is likely specific to your build process.

from ts-proto.

ws-gregm avatar ws-gregm commented on June 16, 2024

I'm just running tsc. Here is what my tsconfig.json looks like...

$ cat tsconfig.json 
{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "rootDir": "./src",
    "outDir": "./dist",
    "types": ["node", "@types/long"]
  },
  "exclude": ["node_modules", "dist"],
  "include": ["src/**/*"]
}

from ts-proto.

ws-gregm avatar ws-gregm commented on June 16, 2024

@stephenh Any idea here? Otherwise, I might resort to outputServices=grpc-js which works as intended but then, I would have to change a bunch of code to match the different casing of method names.

from ts-proto.

stephenh avatar stephenh commented on June 16, 2024

No, no ideas. From the title, you're passing

opts: --ts_proto_opt="outputServices=generic-definitions,outputServices=default

I think the syntax would be "outputServices=generic-definitions,default" instead of repeating outputServices again, but not sure how that'd led to your compile error.

from ts-proto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.