Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Chris Drackett
    @chrisdrackett
    is anyone having issues testing on a Mac? I'm getting the following error:
    Error: Unexpected path .DS_Store
        at validatePath (/Users/cwd/src/DefinitelyTyped/node_modules/types-publisher/src/get-definitely-typed.ts:256:15)
        at DiskFS.getPath (/Users/cwd/src/DefinitelyTyped/node_modules/types-publisher/src/get-definitely-typed.ts:217:13)
        at DiskFS.isDirectory (/Users/cwd/src/DefinitelyTyped/node_modules/types-publisher/src/get-definitely-typed.ts:227:33)
        at /Users/cwd/src/DefinitelyTyped/node_modules/types-publisher/src/parse-definitions.ts:35:131
        at /Users/cwd/src/DefinitelyTyped/node_modules/types-publisher/src/util/util.ts:56:34
        at initArray (/Users/cwd/src/DefinitelyTyped/node_modules/types-publisher/src/util/util.ts:114:18)
        at nAtATime (/Users/cwd/src/DefinitelyTyped/node_modules/types-publisher/src/util/util.ts:51:23)
        at Object.filterNAtATimeOrdered (/Users/cwd/src/DefinitelyTyped/node_modules/types-publisher/src/util/util.ts:88:42)
        at Object.parseDefinitions [as default] (/Users/cwd/src/DefinitelyTyped/node_modules/types-publisher/src/parse-definitions.ts:35:32)
        at main (/Users/cwd/src/DefinitelyTyped/node_modules/types-publisher/src/tester/test.ts:24:5)
    Chris Drackett
    @chrisdrackett
    ok, I fixed that, but now I'm getting:
    1> apple-mapkit-js failing:
    1> SyntaxError: Unexpected token } in JSON at position 82
    1>     at JSON.parse (<anonymous>)
    1>     at Object.<anonymous> (/Users/cwd/src/DefinitelyTyped/node_modules/dtslint/bin/util.js:19:21)
    1>     at Generator.next (<anonymous>)
    1>     at fulfilled (/Users/cwd/src/DefinitelyTyped/node_modules/dtslint/bin/util.js:4:58)
    when running tests :\
    Gabriel JUCHAULT
    @gjuchault

    Hello,
    I'm having some trouble with DefinitelyTyped/DefinitelyTyped#37609
    The build is saying

    Error: In package.json: Dependency @vue/test-utils not in whitelist.
    If you are depending on another `@types` package, do *not* add it to a `package.json`. Path mapping should make the import work.
    If this is an external library that provides typings,  please make a pull request to types-publisher adding it to `dependenciesWhitelist.txt`.

    Whereas I didn't change anything related to that. Should I rebase on upstream or is there anything more ?

    Derek Sifford
    @dsifford
    @gjuchault You need to add the dependency to the whitelist in this repo for your build to pass: https://github.com/microsoft/types-publisher
    Oh, just actually read your PR and indeed it doesn't look like you did anything related to vue. So my guess it's a stale cache in travis. So you should be fine.
    Tim Yates
    @cimbul
    It looks like the dependency whitelist errors about @vue/test-utils started after my PR got merged in. (Which was also a stale cache issue, but I'm not sure why it's still an issue or what will take to resolve it for everyone.) DefinitelyTyped/DefinitelyTyped#37655
    Nathan Shively-Sanders
    @sandersn
    Yep, this is fixed now. Thanks @cimbul for the heads-up on the repo.
    Nico Flaig
    @nflaig
    Hi guys,
    I was wondering what is the advantage of using a separate repository/package for types instead of just putting the .d.ts files in the node modules themselves. If I write a node module with TypeScript the types will be also in the same package.
    Nathan Shively-Sanders
    @sandersn
    @nflaig You should opt to ship types with the package if possible, use Definitely Typed if not. If the owners of a package want to stay with JS and don't want to maintain types, use DT for that too.
    Nico Flaig
    @nflaig
    @sandersn Thanks for the response. I thought it might be also because of the extra files that need to be downloaded even by pure JavaScript projects if the .d.ts files are directly included
    Nathan Shively-Sanders
    @sandersn
    I don't think the extra size is that important. I hope so at least.
    Spencer Pollock
    @srepollock
    Hey there, I noticed that you don't have the updated .d.ts for nodejs@12.8.1. Was wondering if there is an automatic build for this or if I should submit a pr? Looking to use v8.serialize/deserialze functions that are in the newer commits
    Ghost
    @ghost~554b7d8c15522ed4b3e0103e

    Hi, I'm trying to do my first PR to add typings for a package, and I need to import * as fs from 'fs' , however I get "Cannot find module 'fs'." errors (same for 'http', or any other node module, I assume). I looked into other packages and they have the same tsconfig but the import seems to work there. The only way I found to get it to work is to add

    /// <reference types="node" />

    ... is that how i'm supposed to do it?

    Nico Flaig
    @nflaig
    @simonhaenisch do you have @types/node installed?
    Ghost
    @ghost~554b7d8c15522ed4b3e0103e
    why would i install that in the DefinitelyTyped project?
    Nico Flaig
    @nflaig
    @ghost~554b7d8c15522ed4b3e0103e sorry I didnt read that your talking about a PR. /// <reference types="node" /> is used in a lot of packages if you check here for example. I guess the best thing to do is wait for the PR review and see if it gets approved.
    Daniel Bartholomae
    @dbartholomae

    Hi there! I would like to add types for react-loadable-visibility. Basically it exports the same types as react-loadable, which is also typed via DefinitelyTyped. I am not sure how to best do this. My best guess is

    import Loadable from 'react-loadable';
    export default Loadable;

    and adding a package.json with a dependency to react-loadable. Is this the correct way?

    Daniel Bartholomae
    @dbartholomae
    I think I found a way, let's see how the PR review goes :D
    Mirone
    @Saul-Mirone
    Can anyone review my PR please?
    DefinitelyTyped/DefinitelyTyped#37969
    Nathan Shively-Sanders
    @sandersn
    @Saul-Mirone unfortunately the authors of type packages don't usually hang out on this channel. Your best bet is to ping the authors again. pirix-gh has been responsive in the past.
    Daniel Bartholomae
    @dbartholomae
    Did anyone have success with adding types that depend on another @types package? For me it is working locally, but Travis is failing for the PR :(
    Nathan Shively-Sanders
    @sandersn
    Normally you just import the types from the package without mentioning that it is @types. Can you link to the PR?
    Daniel Bartholomae
    @dbartholomae
    Nathan Shively-Sanders
    @sandersn
    ah, turns out you need some path remapping in your tsconfig, like hapi__wreck does:
            "paths": {
                "@hapi/wreck": [
                    "hapi__wreck"
                ],
                "@hapi/boom": [
                    "hapi__boom"
                ]
            },
    Daniel Bartholomae
    @dbartholomae
    thanks, but I still get the same error message :(
    Eugene Ghanizadeh
    @loreanvictor

    Hi fellas

    Recently I was playing around with a basic DOM TSX renderer (i.e. a TSX renderer that instead of creating React elements, creates HTMLElement). It occurred to me that if you do not want to loosen type-checking (for example by turning off "noImplicitAny"), you need a proper type definition for this, and I could not find such a type definition out there.

    My question is, is there any such typing out there, is it under the scope of DefinitelyTyped or not, should something like this even be under that scope? I wrote a basic custom type definition for myself (with stringent attribute checking), but I do not know if it is of proper quality (since I do not know exactly what it should contain to be a proper high-quality type definition for the outlined use-case, couldn't find resources on this as well), and I'm not even sure if something like this would/should be covered by DefinitelyTyped to begin with.

    here is a gist of the custom typing I ended up creating for myself, if it helps.

    P.S. also any suggestion on how to improve this custom typing regardless of whether or not it should be submitted to DefinitelyTyped is much appreciated.

    Nathan Shively-Sanders
    @sandersn
    There's no associated npm module, is there? I'd publish it as its own standalone npm module then.
    Eugene Ghanizadeh
    @loreanvictor
    no there is none, as it is a mere typing. and yes it is possible to do that, but it does seem to me that a natural place for such a thing would be @types/jsx or something.
    thats why I am asking
    (besides making sure this is already out there and I just missed it, or there are resources on this out there that I couldn't find)
    Karl Fokum
    @LinhoDemos_twitter
    Hey all. I'm new to the channel and the DefinitelyTyped repo. My team is using @types/redux-logger and in our upgrade to redux ^4.0.0, I realized that redux-logger's depenencies specified in the package.json file only allows ^3.6.0. Are there plans to upgrade this to v4? How does this work?
    Thanks for your time.
    Liana Pigeot
    @nialna
    Hello, I have a quick question. Someone opened an issue and PR on a package I'm reviewer on, but this PR is fundamentally wrong and should just be closed. What is the way to make that happen? The documentation/review bots are unclear on what to do in this case. I can "request changes" (which I did, basically saying the PR is wrong), but what needs to happen to close a PR?
    Lunkhopao Haokip
    @mongoloidkhulmikuki366
    Hello ! I Urge the caretaker of my PaPal SandBox status to update as soon as possible
    Sandor
    @sandorTuranszky
    Hello, my type definitions depends on two other types, express and sinon. Do I need to include them as reference /// <reference types="express" /> /// <reference types="sinon" />?
    Sandor
    @sandorTuranszky
    I am getting this error Error: At 1:1 : Expected /\/\/ Type definitions for (non-npm package )?/. Thanks!
    jhubba
    @jhubba
    All packages are type-checking/linting cleanly on typescript@next: Build Status: Failed see https://github.com/DefinitelyTyped/DefinitelyTyped
    Gareth Jones
    @G-Rath
    Hey all: was wondering if there's any process for making a breaking changing in a type definition? There's a type definition that doesn't actually properly type part of it's library, but the readme only talks about how to handle if a library updates w/ breaking changes
    Simon Schick
    @SimonSchick
    If the types are wrong, a breaking change is actually a fix and that's ok.
    Gareth Jones
    @G-Rath
    That's what I think too - tbh I don't really know how else DT could function w/o having massive overhead & needing a 4th semver slot, but wanted to double check before possibly pissing a few people off by preventing their code from compiling :grimacing:
    Nathan Shively-Sanders
    @sandersn
    @jhubba A few DT packages depend on three and protractor, which are both currently broken on 3.7. I'm waiting for the owners of those packages to upgrade them.
    @dillonwork I think Stack overflow is the best place to ask that; this is the place to ask questions about whether DT is publishing correctly, whether it's OK to make a breaking change, etc.
    chivesrs
    @chivesrs
    for a PR marked with revision needed (#38280), what's the best way to get back the awaiting reviewer feedback, if you haven't pushed any new commits?
    dale tan
    @hellatan
    Can anyone point me in the direction of typing custom express middleware where the req and res arguments have also been modified/amended from the original req and res objects? I've been having a tough time trying to figure this out unless if those types need to be updated to handle this scenario
    Gonzalo D'Elia
    @gndelia
    Hi everyone. I created a PR 12 days ago. I got the following labels on it: Merge:Express - Owner approved - Popular Package and "Where Is travis?". How can I solve the label from the last problem? Typescript bot told me to tag a specific user, who I tagged twice but he must be busy :( Except that, the PR has all their checks successful and has no conflicts with the base branch.
    As of the status in "pull requests status board", it appears under "Other" list, so I am unsure how to proceed
    the PR is #38680
    Michael Kriese
    @ViceIce
    Hi, i'm working on #37490. Now i found that a the package knockout.deferred.updateswhich dependes on the removed knockout is obsolete since knockout 3.4.0. Should i add a dependency to @types/knockout or should this package be removed?
    Andrew Branch
    @andrewbranch
    Hey @ViceIce, sorry for the delayed response. I think we should probably update knockout.deferred.updates since it’s currently broken (depending on what versions of things exist in users’ node_modules) if I understand correctly.
    Michael Kriese
    @ViceIce
    Ok