New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 772603 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

JS Externs generator: isInstanceOf not considered

Project Member Reported by dbeam@chromium.org, Oct 7 2017

Issue description

in chrome.declarativeContent, there's a type

[
  {
    "namespace": "declarativeContent",
    "types": [
      {
        "id": "ImageDataType",
        "isInstanceOf": "ImageData",
        "additionalProperties": { "type": "any" },
      },

and is later referenced:

      {
        "id": "SetIcon",
        "type": "object",
        "properties": {
          "imageData": {
            "choices": [
              { "$ref": "ImageDataType" },
              {
                "type": "object",
                "additionalProperties": { "type": "any" }
              }
            ],

which is confusing the externs generator (and my brain and probably developers).

I added a few tweaks to check on instance_of in the externs generation, but it wasn't quite working and we probably need to do better $ref handling in general, I'd guess?

Either way, this was motivated by this Github PR:
https://github.com/google/closure-compiler/pull/2527#issuecomment-318757538
 
Project Member

Comment 2 by sheriffbot@chromium.org, Oct 8

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment