Giter VIP home page Giter VIP logo

ts-ecosystem's People

Contributors

dependabot[bot] avatar mickl avatar underfisk avatar wonderpanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rigobcastro

ts-ecosystem's Issues

update @types/convict to allow nullable option

The current @types/convict version does not allow you to specify the nullable option for config values.

i.e.

type ConfigOptions {
  valueA: string
}

export default createProfiguration<ConfigOptions>({
  valueA: {
    format: String,
    env: 'SOME_CONFIG_VALUE',
    default: null,
    nullable: true // typescript will complain because v5.2.0 @types/convict definition does not define this property
});

The convict version on the package is ^6.0.0 which would be 6.2.4 if downloaded from npm, but @types/convict is 5.2.0 which should be updated to 6.1.1

Error: "Type instantiation is excessively deep and possibly infinite"

The following works:

const appName = config.get('app.name');
// appName is now type string

But everywhere where a type is required TypeScript throws an error:

const appName: string = config.get('app.name');
// Error: Type instantiation is excessively deep and possibly infinite.

I am currently on Typescript 4.0.5

Why duplicate types with an interface?

A convict Config object will yield the appropriate type with:

const configType = ReturnType<Config['getProperties']>

Is there some additional reason to manually define an interface for the config? If there is, could the additional type restriction of the interface be merged with the above to reduce duplication?

intellisense

HI

is it possible to add typing to the config object?

for now, I implemented the sample example and its not working

which typing config. will not complete to "get" and also fir the properties

Add @types/convict to readme

It might be noted in the readme that it is requried to install @types/convict to have intellisense and typechecking.

Use `dotenv-expand`

Would be great to use dotenv-exapand which makes it possible to work with variables in env files:

MONGO_PORT=27017
MONGO_URL=mongodb://localhost:${MONGO_PORT}

Maintainance / Looking for maintainers?

Hi thanks for developing this package. Just a quick couple of questions.

Is this module still maintained? It would be good to keep it update to with convict and any security updates.

Also could it be moved into the main golevelup/nestjs repo or is there a reason it lives in this repo?

Thanks again

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.