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
Comment 1 by dbeam@chromium.org
, Oct 7 2017