refactor(frontend): give local variable to explicit type annotation to avoid TS7043 (#12495)

* refactor: give local variable to explicit type annotation to avoid TS7043

* chore: fix lint error
This commit is contained in:
Kisaragi 2023-11-30 14:46:16 +09:00 committed by GitHub
parent 28cb0fc70b
commit 47a10f6a6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ export default function(props: MfmProps) {
case 'fn': {
// TODO: CSSを文字列で組み立てていくと token.props.args.~~~ 経由でCSSインジェクションできるのでよしなにやる
let style;
let style: string | undefined;
switch (token.props.name) {
case 'tada': {
const speed = validTime(token.props.args.speed) ?? '1s';
@ -268,7 +268,7 @@ export default function(props: MfmProps) {
]);
}
}
if (style == null) {
if (style === undefined) {
return h('span', {}, ['$[', token.props.name, ' ', ...genEl(token.children, scale), ']']);
} else {
return h('span', {