「TypeScript」に関連するページの一覧
-
TypeScript - 'true'や'false'の文字列をboolean型に変換する
単純にキャストすると常にtrueとなるため、期待通りに動作しません。 -
TypeScript - Date型の比較方法
Date型 は "==演算子" や "===演算子" では判定できません。 -
TypeScript - ひらがなをカタカナ、カタカナをひらがなに変換する
ひらがなとカタカナを相互変換する関数のサンプルです。 -
TypeScript - 文字列に変数を埋め込む
テンプレートリテラルを使用します。文字列を バッククォート(`) で囲い、変数を埋め込みたい箇所に ${変数名} とします。 -
TypeScript - 連想配列の要素数を取得する
連想配列 に length や count メソッドは無いため、Object.keys を利用します。 -
TypeScript - 配列に値を追加する(先頭・末尾・位置指定)
配列の先頭に追加するには unshift、末尾に追加するには push、位置指定で追加するには splice メソッドを使用します。 -
TypeScript - 配列の要素数を取得する
配列に追加されているアイテム数を取得するには length プロパティを使用します。
-
TypeScript(ESLint) - Strings must use singlequote.
TypeScript(ESLint)で発生するエラーの原因と解決方法 (ルール名 quotes) -
TypeScript(ESLint) - Type number trivially inferred from a number literal, remove type annotation.
TypeScript(ESLint)で発生するエラーの原因と解決方法 -
Vue - 配列をクリアする
配列をクリアするには splice(0)メソッドを使用します。ref 配列の場合は value.splice(0) です。 -
[TypeScript][tslint] != should be !== (triple-equals)
比較演算子は'!='ではなく、'!=='を使用します。 -
[TypeScript][tslint] " should be ' (quotemark)
文字列はダブルクォーテーションマークではなく、シングルクォーテーションマークで囲みます。 -
[TypeScript][tslint] == should be === (triple-equals)
比較演算子は'=='ではなく、'==='を使用します。 -
[TypeScript][tslint] Calls to 'console.xxx' are not allowed. (no-console)
console.xxxの使用は禁止されています。 xxxには "log" "error" 等のメソッド名 が入ります。 -
[TypeScript][tslint] Consecutive blank lines are forbidden (no-consecutive-blank-lines)
連続した空行があります。 -
[TypeScript][tslint] Declaration of XXXX not allowed after declaration of XXXX. Instead, this should come XXXX. (member-ordering)
クラスまたはインターフェースメンバの定義順が誤っています。 XXXX には「public static method」や「private instance fields」などが入ります。 -
[TypeScript][tslint] Duplicate variable: '変数名' (no-duplicate-variable)
同じ変数名が定義されています。 -
[TypeScript][tslint] JSX elements with no children must be self-closing (jsx-self-close)
子要素のないJSXエレメントは終了タグは使用せずに自身で閉じます。 -
[TypeScript][tslint] Missing semicolon (semicolon)
構文の末尾にセミコロン(;)がありません。 -
[TypeScript][tslint] Properties should be separated by semicolons (semicolon)
プロパティの区切りがセミコロン(;)ではありません。 -
[TypeScript][tslint] [tslint] block is empty (no-empty)
空のブロックです。 -
[TypeScript][tslint] ` should be ' (quotemark)
変数の埋め込みがない場合はバッククオート(テンプレート文字列)ではなく、クォーテーションマーク(文字列リテラル)を使用します。 -
[TypeScript][tslint] comment must start with a space (comment-format)
コメントの先頭にスペースがありません。 -
[TypeScript][tslint] file should end with a newline (eofline)
ファイルの終わりが改行ではありません。 -
[TypeScript][tslint] interface name must not have an "I" prefix (interface-name)
インターフェース名のプレフィックス(接頭詞)に 'I' は使用できません。 -
[TypeScript][tslint] interface name must start with a capitalized I (interface-name)
インターフェース名の先頭(プレフィックス)が 'I' ではありません。 -
[TypeScript][tslint] object access via string literals is disallowed (no-string-literal)
文字列リテラルを使用したオブジェクトアクセスは禁止されています。