Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 21b6d29

Browse files
TeamopCaerusKaru
authored andcommitted
fix(flex-offset): correct type when using with 'strictNullChecks' (#929)
1 parent d322ea7 commit 21b6d29

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/apps/demo-app/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"moduleResolution": "node",
88
"emitDecoratorMetadata": true,
99
"experimentalDecorators": true,
10+
"strictNullChecks": true,
1011
"target": "es5",
1112
"typeRoots": [
1213
"node_modules/@types"
@@ -18,4 +19,4 @@
1819
"module": "es2015",
1920
"baseUrl": "./"
2021
}
21-
}
22+
}

src/lib/flex/flex-offset/flex-offset.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ export class FlexOffsetStyleBuilder extends StyleBuilder {
4141
offset = offset + '%';
4242
}
4343
const horizontalLayoutKey = parent.isRtl ? 'margin-right' : 'margin-left';
44-
const styles = isFlowHorizontal(parent.layout) ? {[horizontalLayoutKey]: `${offset}`} :
45-
{'margin-top': `${offset}`};
44+
const styles: StyleDefinition = isFlowHorizontal(parent.layout) ?
45+
{[horizontalLayoutKey]: `${offset}`} : {'margin-top': `${offset}`};
4646

4747
return styles;
4848
}

0 commit comments

Comments
 (0)