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
The current type of pkg.name can be undefined, but it's unclear how common that is. I have to use pkg.name! everywhere. This is also true for other types like pkg.version
Current vs Expected Behavior
Current:
/** The base name of the entry point (eg. org.foo.Bar.App) */exportconstname: string|undefined;
Expected:
/** The base name of the entry point (eg. org.foo.Bar.App) */exportconstname: string;
Example
pkg.name
References
Documentation:
Source Code:
Related Issues:
GJS Version: 1.80.2
Additional Context
This affects other GJS types/classes
This is a regression from a previous version
This blocks other functionality
The text was updated successfully, but these errors were encountered:
@vixalien As far as I know pkg.name and pkg.version are only defined if pkg.init() was called before. Accordingly, they can be undefined and using ! is a valid way to indicate that you are sure that it is defined.
The same applies to gettext, for which pkg.initGettext(); must be called first
Sure, it's just a bit inconvenient to always add the !
Funnily enough though, pkg will not always be defined either, so that also needs to be nullable, or, if you can bear with me:
there should be a way to include a file that will mean that developers are sure pkg.name will be defined. Having them as nullable really makes it harder.
Description
The current type of
pkg.name
can be undefined, but it's unclear how common that is. I have to usepkg.name!
everywhere. This is also true for other types likepkg.version
Current vs Expected Behavior
Current:
Expected:
Example
References
Additional Context
The text was updated successfully, but these errors were encountered: