You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue comes in the context of recognizing assignments to properties on this or window as global declarations.
We need way to refer to the global type, e.g. declare var window: Window & global; for DOM.
We have a precedence in the declare global { .. } support.
Some options:
// use new `import("module")` syntax with `global` insteadvarwindow: Window&import(global);// or no operand at allvarnan: typeofimport().NAN;// import.meta?import.meta.global// C++ anyone?varx: global::NaN// call it `global` or just `Global`varx1: Global;varx1: typeofGlobal;varx1: Global.Array<number>varx1: Global["NaN"];varx1: typeofGlobal.NaN;
TC39 has been looking into a name for the value side of global https://github.com/tc39/proposal-global, the proposal is at stage 3.
The proposal has stalled on the choice of the variable name, global seems to be already in use.
@rbuckton contacted the proposal champion (@ljharb), and the proposal is still active. there are few names proposed at this point.
Conclusion, wait for TC39 to pick a name, and then use that in both type and value positions.
global
window
#19816global
proposal #12902Issue comes in the context of recognizing assignments to properties on
this
orwindow
as global declarations.We need way to refer to the global type, e.g.
declare var window: Window & global;
for DOM.We have a precedence in the
declare global { .. }
support.Some options:
TC39 has been looking into a name for the value side of global https://github.com/tc39/proposal-global, the proposal is at stage 3.
The proposal has stalled on the choice of the variable name,
global
seems to be already in use.@rbuckton contacted the proposal champion (@ljharb), and the proposal is still active. there are few names proposed at this point.
Conclusion, wait for TC39 to pick a name, and then use that in both type and value positions.
Resolving .json files
PR: Resolve the modue names with "modulename.json" to json files when doing node module resolution #22167
issue: In JS, importing JSON should not give an error #7071
Concerns:
no contextual type here, do we need a way to "impose" a type on the .json file?
taking the discussion offline until we address the concerns above
Allow
infer
types in expression type argument positionsPR: WIP - Allow infer types in expression type argument positions #22368
@weswigham, this is probably too much power, not clear what use cases require that.
the change is simple, relatively, thought
practically gives you associated types
We still need named type parameters, what to do when you wnat to specify the fifth type parameter and get everything inferred
we already have a proposal here, no need for another proposal
Array.isArray
andReadonlyArray
Array
andReadonlyArray
are two distinct types. we need to think about areadonly
modifier againVariadic types
bindCallback
in Unable to infer types from callback in bindCallback function for RxJS #22952 (comment)The text was updated successfully, but these errors were encountered: