Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions packages/quickstart/steps/01/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ We specify the compiler options as follow:
```json
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": [
"node",
"@types/openui5"
Expand All @@ -200,25 +200,21 @@ We specify the compiler options as follow:

Let's go through the compiler options specified in the file:

- `"target": "es2022"`: The `target` parameter sets the JavaScript language level that the TypeScript code should be compiled down to. We set it to ES2022, which means the generated JavaScript code will be compatible with ECMAScript 2022.
- `"target": "es2023"`: The `target` parameter sets the JavaScript language level that the TypeScript code should be compiled down to. We set it to `es2023`, which means the generated JavaScript code is compatible with ECMAScript 2023.

- `"module": "es2022"`: The `module` parameter specifies the module code generation for the compiled JavaScript. We configured it to ES2022, which means the generated JavaScript will use ECMAScript modules.

- `"moduleResolution": "node"`: The `moduleResolution` parameter specifies how module dependencies should be resolved. We set it to "node", which means the compiler will use Node.js-style module resolution.
- `"types": [ "node", "@types/openui5"]`: The `types` parameter defines the types used for TypeScript code. We configure this parameter to use the built-in Node.js types and the OpenUI5 types delivered by the `@types/openui5` package.

- `"skipLibCheck": true`: When the `skipLibCheck` parameter is set to `true`, it tells the compiler to skip type checking of declaration files (`.d.ts` files) that are part of external libraries. This can improve compilation speed.

- `"allowJs": true`: The `allwJs` parameter allows JavaScript files to be included in the TypeScript project. This option enables TypeScript to compile JavaScript code along with TypeScript code.

- `"strict": true`: When set to "true" the `strict` parameter enables a wide range of type checking behavior that results in more type-safe programs. It includes settings like `noImplicitAny`, `noImplicitThis`, `alwaysStrict` and others.

- `"strictPropertyInitialization": false`: The `strictPropertyInitialization` parameter is a specific type of strict check that ensures that each instance property of a class gets initialized in the constructor body, or by a property initializer. By setting this to false, it disables strict checking of uninitialized class properties. This means that class properties can be left uninitialized or assigned the value `undefined` without causing a compiler error.

- `"rootDir": "webapp"`: The `rootDir` paraemter specifies the root directory of the TypeScript source files. The compiler will consider this directory as the starting point for resolving file paths. We set it to our `webapp` folder.
- `"rootDir": "./webapp"`: The `rootDir` parameter specifies the root directory of the TypeScript source files. The compiler considers this directory as the starting point for resolving file paths. We set it to our `webapp` folder.

- `"baseUrl": "./"`: The `baseUrl` parameter is used to resolve non-relative module names. We specified that non-relative module names are resolved relative to the location of the `tsconfig.json` file.
- `"paths": { "ui5/quickstart/*": ["./webapp/**/*"] }`: The `path` paramter specifies path mappings for module resolution. It allows you to define custom module paths that map to specific directories or files. In this case, it maps the module path `ui5/quickstart/*`.

- `"paths": { "ui5/quickstart/*": ["webapp/*"] }`: The `path` paramter specifies path mappings for module resolution. It allows you to define custom module paths that map to specific directories or files. In this case, it maps the module path `ui5/quickstart/*`
- `"include": [ "./webapp/**/*" ]`: Specifies an array of filenames or patterns to include in TypeScript compilation.

***

Expand Down
2 changes: 1 addition & 1 deletion packages/quickstart/steps/01/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": [
"node",
"@types/openui5"
Expand Down
2 changes: 1 addition & 1 deletion packages/quickstart/steps/02/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": [
"node",
"@types/openui5"
Expand Down
2 changes: 1 addition & 1 deletion packages/quickstart/steps/03/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": [
"node",
"@types/openui5"
Expand Down
16 changes: 6 additions & 10 deletions packages/walkthrough/steps/02/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ We specify the compiler options as follow:
```json
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand All @@ -90,25 +90,21 @@ We specify the compiler options as follow:

Let's go through the compiler options specified in the file:

- `"target": "es2022"`: The `target` parameter sets the JavaScript language level that the TypeScript code should be compiled down to. We set it to ES2022, which means the generated JavaScript code will be compatible with ECMAScript 2022.
- `"target": "es2023"`: The `target` parameter sets the JavaScript language level that the TypeScript code should be compiled down to. We set it to `es2023`, which means the generated JavaScript code is compatible with ECMAScript 2023.

- `"module": "es2022"`: The `module` parameter specifies the module code generation for the compiled JavaScript. We configured it to ES2022, which means the generated JavaScript will use ECMAScript modules.

- `"moduleResolution": "node"`: The `moduleResolution` parameter specifies how module dependencies should be resolved. We set it to "node", which means the compiler will use Node.js-style module resolution.
- `"types": [ "node", "@types/openui5"]`: The `types` parameter defines the types used for TypeScript code. We configure this parameter to use the built-in Node.js types and the OpenUI5 types delivered by the `@types/openui5` package.

- `"skipLibCheck": true`: When the `skipLibCheck` parameter is set to `true`, it tells the compiler to skip type checking of declaration files (`.d.ts` files) that are part of external libraries. This can improve compilation speed.

- `"allowJs": true`: The `allwJs` parameter allows JavaScript files to be included in the TypeScript project. This option enables TypeScript to compile JavaScript code along with TypeScript code.

- `"strict": true`: When set to "true" the `strict` parameter enables a wide range of type checking behavior that results in more type-safe programs. It includes settings like `noImplicitAny`, `noImplicitThis`, `alwaysStrict` and others.

- `"strictPropertyInitialization": false`: The `strictPropertyInitialization` parameter is a specific type of strict check that ensures that each instance property of a class gets initialized in the constructor body, or by a property initializer. By setting this to false, it disables strict checking of uninitialized class properties. This means that class properties can be left uninitialized or assigned the value `undefined` without causing a compiler error.

- `"rootDir": "webapp"`: The `rootDir` paraemter specifies the root directory of the TypeScript source files. The compiler will consider this directory as the starting point for resolving file paths. We set it to our `webapp` folder.
- `"rootDir": "./webapp"`: The `rootDir` parameter specifies the root directory of the TypeScript source files. The compiler considers this directory as the starting point for resolving file paths. We set it to our `webapp` folder.

- `"baseUrl": "./"`: The `baseUrl` parameter is used to resolve non-relative module names. We specified that non-relative module names are resolved relative to the location of the `tsconfig.json` file.
- `"paths": { "ui5/walkthrough/*": ["./webapp/*"] }`: The `path` paramter specifies path mappings for module resolution. It allows you to define custom module paths that map to specific directories or files. In this case, it maps the module path `ui5/walkthrough/*`.

- `"paths": { "ui5/walkthrough/*": ["./webapp/*"] }`: The `path` paramter specifies path mappings for module resolution. It allows you to define custom module paths that map to specific directories or files. In this case, it maps the module path `ui5/walkthrough/*`
- `"include": [ "./webapp/**/*" ]`: Specifies an array of filenames or patterns to include in TypeScript compilation.

***

Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/02/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/03/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/04/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/05/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/06/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/07/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export default class AppController extends Controller {
}
};
const dataModel = new JSONModel(data);
// because of "strict" mode in tsconfig.json a null check is required for this.getView()

this.getView()?.setModel(dataModel);
}

onShowHello(): void {
MessageToast.show("Hello World");
}
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/08/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class AppController extends Controller {
}
};
const dataModel = new JSONModel(data);
// because of "strict" mode in tsconfig.json a null check is required for this.getView()

this.getView()?.setModel(dataModel);

// set i18n model on view
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/09/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/10/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/11/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/12/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/13/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/14/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/15/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/16/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/17/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/18/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/19/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/20/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/21/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/22/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/23/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/24/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/25/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/26/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/27/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/28/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/29/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/30/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/31/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/32/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/33/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/34/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/walkthrough/steps/35/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2025",
"target": "es2023",
"types": ["node", "@types/openui5"],
"skipLibCheck": true,
"allowJs": true,
Expand Down
Loading