-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable TS in main, fiori (#6064)
The PR introduces the following changes: **project build** - rework the project build to always prepare `base` and then `main`, `fiori` (currently done in parallel) so that Typescript finds all dependencies when running on components from `main`, `fiori`. **base** package - several "base" types refactored to pure Enum whenever possible - see `ValueState`, `CalendarType`, etc. - type `PopupState` removed as not used - `UI5ElementMetadata` handles the pure Enum case (see UI5ElementMetadata#validateSingleProperty) **main** package - package enabled to use TS - `Label`, `Title` and `Icon` are now in written Typescript - All types are in TS **fiori** package - package enabled to use TS
- Loading branch information
Showing
97 changed files
with
2,004 additions
and
1,892 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
import CalendarType, { CalendarTypes } from "../types/CalendarType.js"; | ||
import CalendarType from "../types/CalendarType.js"; | ||
import { getCalendarType as getConfiguredCalendarType } from "../InitialConfiguration.js"; | ||
|
||
let calendarType: CalendarTypes; | ||
let calendarType: CalendarType | undefined; | ||
|
||
/** | ||
* Returns the configured or default calendar type. | ||
* @returns { String } the effective calendar type | ||
* @public | ||
* @returns { CalendarType } the effective calendar type | ||
*/ | ||
const getCalendarType = (): CalendarTypes => { | ||
const getCalendarType = (): CalendarType => { | ||
if (calendarType === undefined) { | ||
calendarType = getConfiguredCalendarType() as CalendarTypes; | ||
calendarType = getConfiguredCalendarType(); | ||
} | ||
|
||
if (CalendarType.isValid(calendarType)) { | ||
if (calendarType && calendarType in CalendarType) { | ||
return calendarType; | ||
} | ||
|
||
return CalendarTypes.Gregorian; | ||
return CalendarType.Gregorian; | ||
}; | ||
|
||
export { getCalendarType }; // eslint-disable-line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,3 +93,7 @@ export { | |
getI18nBundle, | ||
registerCustomI18nBundleGetter, | ||
}; | ||
|
||
export type { | ||
I18nText, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.