Coder Social home page Coder Social logo

Comments (7)

WoH avatar WoH commented on May 10, 2024

This was a bug in the old implementation, but we should support this.

from tsoa.

hpx7 avatar hpx7 commented on May 10, 2024

@WoH I'm happy to try and contribute support for this, would you be able to provide any guidance for how this should be done?

from tsoa.

WoH avatar WoH commented on May 10, 2024

This should result in:

{
  "type": "object",
  "properties": {
  },
  "additionalProperties": false
}

Right?

from tsoa.

hpx7 avatar hpx7 commented on May 10, 2024

This is what it generates on 5.1.1:

	"Record_string.never_": {
		"properties": {},
		"type": "object",
		"description": "Construct a type with a set of properties K of type T"
	},

from tsoa.

WoH avatar WoH commented on May 10, 2024

Since we are now trying to descend into the indexed type in a Mapped Type, we need to probably try to check if the indexType is the never type and handle that separately:
https://github.com/lukeautry/tsoa/blob/master/packages/cli/src/metadataGeneration/typeResolver.ts#L242

from tsoa.

hpx7 avatar hpx7 commented on May 10, 2024

Thanks for the tip, I created #1537

from tsoa.

WoH avatar WoH commented on May 10, 2024

Resolved in v6.0.1

from tsoa.

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.