エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
How to define a regex-matched string type in Typescript?
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
How to define a regex-matched string type in Typescript?
Is it possible to define an interface which has some information on the format of a string? Take ... Is it possible to define an interface which has some information on the format of a string? Take the following example: interface timeMarkers{ markerTime: string[] }; an example would be: { markerTime: ["0:00","1:30", "1:48"] } My question: Is there a way to define the type for markerTime such that that the string value must always match this regex, instead of declaring it as simply string[] and g