Skip to content

"instanceof": "Function" inside "anyOf" getting converted to [k: string]: any #164

Open
@TheLarkInn

Description

@TheLarkInn

Before:

   {
    "target": {
      "description": "Environment to build for",
      "anyOf": [
        {
          "enum": [
            "web",
            "webworker",
            "node",
            "async-node",
            "node-webkit",
            "electron-main",
            "electron-renderer"
          ]
        },
        {
          "instanceof": "Function"
        }
      ]
    },
  }

converts (i believe improperly to):

	/**
	 * Environment to build for
	 */
	target?:
		| (
				| "web"
				| "webworker"
				| "node"
				| "async-node"
				| "node-webkit"
				| "electron-main"
				| "electron-renderer")
		| {
				[k: string]: any;
		  };

I identified this throughout this PR for webpack/webpack#7232

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions