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

View file

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