Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Christoph Gysin
    And now it seems morgan tests are broken :eyes: DefinitelyTyped/DefinitelyTyped#50065
    Christoph Gysin
    Who are the DT maintainers? Is there someone I can ping to get DefinitelyTyped/DefinitelyTyped#50065 merged which currently breaks CI?
    Kannan Goundan

    I'd like to report an issue with the review flow. I believe typescript-bot requested a re-review unnecessarily in my PR: DefinitelyTyped/DefinitelyTyped#50378

    What happened:

    1. I submitted a PR for some type definitions.
    2. Maintainer 1 (doberkofler) accepted.
    3. Maintainer 2 (eps1lon) requested changes.
    4. I updated the PR with the requested changes.
    5. Maintainer 2 accepted.
    6. typescript-bot requested that Maintainer 1 re-review and accept the changes.

    Step 6 seems like a mistake, since Maintainer 2 has already accepted the latest changes.


    Typescript Bot issue:

    • typescript-bot keep saying "I'm ready to merge this PR...", I commented "Ready to merge" as requested but typescript-boot respond again with the same message "I'm ready to merge this PR...". This seems to go in a loop and I can't merge the PR.

    The bot seems to be broken here?



    Typescript Bot issue:

    • typescript-bot keep saying "I'm ready to merge this PR...", I commented "Ready to merge" as requested but typescript-boot respond again with the same message "I'm ready to merge this PR...". This seems to go in a loop and I can't merge the PR.

    The bot seems to be broken here?


    Tried again and the PR is merged now. All good

    Eli Barzilay
    There was a failure due to some recent changes which was resolved around the time the above was reported, hopefully these things are fine now.

    Hello everyone!

    I'm having a headache trying to solve a problem with @types:
    I've forked a repository which is carbon-components-react to add custom components to it.
    Now when I'm importing the components from the forked library (which is on a self-hosted npm registry), I receive the nasty error:

    Could not find a declaration file for module '@graphite/components-react'. 'c:/Users/my-name/projects/react--test/node_modules/@my-lib/components-react/lib/index.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/my-lib__components-react` if it exists or add a new declaration (.d.ts) file containing `declare module '@my-lib/components-react';`ts(7016)

    I can easily make this error go away by adding a index.d.ts in a my-library__components-react folder with a declare module '@my-library/components-react' and editing the typeRoots in the tsconfig.json.
    While this allows me to use my components, I'll never be able to use the right types from the original @types/carbon-components-react npm package.

    How could I solve this issue?

    Krisztián Balla
    If you don't use the original package and extended it with things that need to be typed, I would copy the type definitions from here (https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/carbon-components-react), extend them and include them with your package using the types field in your package.json file. This way you don't need to install extra packages to have your package typed.
    Thanks for your answer. It makes sense and I didn't know about the types key in the package.json
    What if I don't need to extend them? Could I just set the reference to the npm module in the types field? In that way, I could have access to the latest updates from the maintained repo I guess, but not sure about this
    Krisztián Balla
    I guess that should work too.
    Tomasz Pluskiewicz
    can someone tell me why many type modules have an export {}; in them?
    Kutner JS
    hey guys I got an error with React17, wanted to make sure it's real before opening an issue
    export function Cat(props: React.HTMLAttributes<HTMLDivElement>) {
      return <div {...props}>cat</div>
    getting this error:
    Types of property ''aria-relevant'' are incompatible.
     Type '"text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined' is not assignable to type '"text" | "all" | "additions" | "additions text" | "removals" | undefined'.
       Type '"additions removals"' is not assignable to type '"text" | "all" | "additions" | "additions text" | "removals" | undefined'.ts(2322)
    I went around it by omitting aria-relevant from props:
    Omit<React.HTMLAttributes<HTMLDivElement>, 'aria-relevant'>
    Kutner JS
    oh no it's not happening in a new Create React App :'(
    there's probably a different version of react somewhere 😭

    Curious if anyone has had issues using @types/karma-mocha-reporter with @types/karma. I just recently upgraded to the latest version of karma and @types/karma and see some new ts compile errors in my karma.conf.ts file. (All on the latest version of typescript)

    Argument of type '{ files: string[]; frameworks: string[]; reporters: string[]; mochaReporter: { colors: { success: string; info: string; warning: string; error: string; }; symbols: { success: string; info: string; warning: string; error: string; }; showDiff: boolean; }; ... }' is not assignable to parameter of type 'ConfigOptions'.
      Object literal may only specify known properties, and 'mochaReporter' does not exist in type 'ConfigOptions'. ts(2345)

    From what I understand @types/karma-mocha-reporter overloads the 'karma' module and adds the mochaReporter field to the ConfigOptions type, but that doesn't appear to work anymore with the same tsconfig file.

    @peterblazejewicz , it looks like you are the author of the @types/karma-mocha-reporter plugin, would you have any recommendations to move forward or how I could send out a fix?

    @mtraynham, I'm having the same issue in @types/karma-webpack except its for properties webpack and webpackMiddleware.
    when I run exec('ps', (error) => callback) from child_process.d.ts I keep getting a windows script host error
    "Please run this script using CScript. This can be scheived by..."
    I found this exec call in the pstree.remy npm package
    Jacek Nowacki
    Hello. I wanted to contribute to DefinitelyTyped, but I have one question I couldn't find answer for:
    • should I add typings for private members of a class?
    • if yes - should I make it match the actual implementation or just put any or unknown just to make TypeScript compiler complain if anyone tries to use that private?
    Krisztián Balla
    @dzek69 adding typings for private members is not necessary, because the consuming code won't see them.
    Robert Quinn
    I just submitted DefinitelyTyped/DefinitelyTyped#51730 to the DefinitelyTyped/DefinitelyTyped repo in regard to the prettier types at DefinitelyTyped/DefinitelyTyped - prettier. I am only leaving this message here b/c it said to drop a message in the instructions for posting an issue.
    Anders Kaseorg
    CI is failing on master and every PR today. Has someone investigated?
    Tony Brix
    What should we do if running prettier conflicts with tslint. I don't feel like peppering the codebase with // prettier-ignore is the right solution.
    Dmitry Semigradsky
    Hi! Is it possible to publish alpha version of package?
    There were attempts to create @types/node v15, but all them failed.
    Maybe it will be more easy to merge PR with moving files to 'v14' and 'v15' folder and release v15-alpha and v16-alpha version.
    And update them in new PRs.
    Eduard Zintz
    hello out there, is there a way to reopen closed pull requests by the bot?
    Marcel Kinzel
    Hello DefinitelyTyped Team, I would like to contribute to your project by updating the @types/autobahn definitions (DefinitelyTyped/DefinitelyTyped#42528) and providing a new definition for @types/autobahn-browser as mentioned in DefinitelyTyped/DefinitelyTyped#34067
    Is there an advice from you whether I should just bump the version in the autobahn definition and add missing options - or should we update the definitions to match the requirements of "new definitions" like avoiding interfaces names like "IBoo" and breaking existing code bases?
    Lorenzo Pecchio
    Hi DefinitelyTyped Team, i've just submitted #52677 for adding support for @types/chrome MV3 changes. I would like to help to code part of it but i never created a pull request and I don't even know if this is the right thing to do.
    If someone can explain me how to help in a public repo i can help to update this awesome repo!
    Adam Voga
    Hey folks, how can I remove myself as a maintainer?
    Krisztián Balla
    Eli Barzilay
    @agov You just make a PR that removes yourself from the list...
    Simon Schick
    is there any chance to get in contact with DT maintainers, I'm trying to update the node typings to v15.3 but would like this to speed up to finally get on-par with node again, see DefinitelyTyped/DefinitelyTyped#52646
    Eli Barzilay
    @SimonSchick , I ran into the second -- if it's a revert, then shouldn't there be some mention of the commit/pr it reverts?
    (nvm, I see that they all came from different places... I never saw this prefix thing...)
    Eli Barzilay
    (nvm², I see that you do mention a PR... The PR template doesn't make it easy to see such things...)
    Blake Regalia
    Open question to DT team about a dilemma our org is having rdfjs publishes an interface specification for js libs dealing with RDF data (the interface typings currently reside at @types/rdf-js). However, we want to move these typings to @rdfjs/types but have concerns about breaking user's TS projects that use @types/rdf-js. I believe the best approach would be to publish a new minor version of @types/rdf-js and then immediately deprecate that version so that user's can see the deprecation notice and migrate their dev dependency to the new package location.
    I don't believe we have the ability to deprecate a package under the @types/ org ourselves, so presumably this approach would have to involve a DT maintainer.
    Moreover, I want to hear what the folks here have to say about this (what I think is a) unique situation of migrating an interface typings to another package.
    18 replies
    Tomasz Pluskiewicz

    Disclaimer: I'm also rdf-js contributor

    hey @blake-regalia I think deprecation handled by the DT's removal process. once we remove a package, it will publish a version and deprecate

    9 replies

    Hi. I've added definitions for few packages with dependencies on each other.
    Example: Package B depends on Package A and use most of types in Package A.
    Now I have 3 choices:

    1. Re-export definitions from package A in Package B
    2. Duplicate types in Package B
    3. Do nothing. Consumer must install both packages

    Which one will be correct?

    Omar Almalol
    Joshua Jeschek
    Heyhey, I just posted a Pull Request. It's a really small change, but somehow CI is failing.
    The log shows the error as JavaScript heap out of memory - but I have no idea why that would happen.
    Here is the CI Log
    Joshua Jeschek
    oh my gosh it works now nice
    really don't know what was going on there
    Type definitions for three.js r73 latest verson build