type NestedOmit<T, K extends keyof T> = { [P in keyof Omit<T, K>]: T[P] extends Array<infer R> ? K extends keyof R ? Array<NestedOmit<R, K>> : Array<R> : K extends keyof T[P] ? NestedOmit<T[P], K> : T[P] }; 例えばレシピとその材料を表す以下のinterfaceがあったとき interface Recipe { id: number; name: strin</t[p],></r></nestedomit<r,></infer></t,></t,>…
定期的に処理を実行したいときがありますね。GAEはcronの設定ができます。 cron設定 アプリケーションのルートディレクトリにcron.yamlファイルを作成します。中身はこんな感じ // cron.yaml cron: - description: "ゴミ出し通知" url: /cron schedule: ever…
emotion-themingを利用して、テーマ切り替え機能を実装します。Twitterのと一緒です。ボタン押して、toggleできるものを目指します。 Install とりあえず npx create-react-app dark-mode --typescript emotion yarn add @emotion/core @emotion/styled emot…
インストール Express, Typescript, webpackをインストール yarn add express yarn add -D @types/express typescript ts-loader webpack webpack-cli ファイルの変更を検知してnode再起動してくれる nodemon をインストール yarn add -D nodemon Webpackの…
いつもなんとなくでググって出てくるものをコピペしてたので、自分で構成できるよう、調べた。 Webpack? webpack is a static module bundler for modern JavaScript applications. https://webpack.js.org/concepts/ module bundler? モジュールをまとめ…
いままで技術系のアウトプットを(公開されているところで)したことがなかったので、今日から始める。 毎日は難しいかもしれないが、技術的につまずいたこと、調べたことはどんどん残していく。