google / google/closure-compiler

Make TemplatizedType and TempateType no longer extend ProxyObjectType

Open
#2,994 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

`TemplatizedType` and `TemplateType` should not extend `ProxyObjectType`. It causes all sorts of pain for equivalence and the hash code contract, and is unnecessary. `JSType` already has a `TemplateTypeMap` baked into it. We should simply model all `InstanceObjectType`s as templatized, possibly with zero keys. `TemplateType` should not be treated as unknown, but rather as a unique type (with possibly an upper bound - see bounded generics discussions), so proxy is inappropriate there, too.

This leaves proxy as only relevant for `NamedType`, so these could be collapsed into a single type.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.