clock2022-11-01

Nuxt3とMSWで「The script has an unsupported MIME type ('text/html')」が出た

間違い

間違いは$ msw init src/static --savesrc/static)していたことだった。 Nuxt2のプロジェクトのひとつではsrc/static

clock2021-02-07

【Nuxt.js】storeでないモジュールを`@/store/`配下に置いてはいけない

【Nuxt.js】storeでないモジュールを@/store/配下に置いてはいけない。notice-at

問題と解決

clock2020-02-21

Firebase AuthenticationユーザーのdisplayNameは、Firestore rules上ではnameとして定義される

Firebase Authenticationユーザーを、次のように登録したとします。

import * as Firebase from 'firebase'

const auth = Firebase.auth()
const email = someEmail
const password = somePassword

try {
  const credential = await auth.createUserWithEmailAndPassword(email, password)
  const user = credential.user
  if (user === null) {
    throw new Error(
      `creating user for authentication was success, but nobody is logging in. something wrong! credential: ${credential}`
    )
  }

  await user.updateProfile({ displayName: 'Haskell' })  // !
  await user.sendEmailVerification()
} catch (e) {
  if (e instanceof Error && /The email address is already in use by another account./.test(e.message)) {
    throw new Error(`メールアドレス「${account.email}」は既に使用されています。`)
  }
  throw new Error(e)
}

clock2017-12-28

TypeScript2.6のnull合体演算子も||

 これは生JavaScriptやES2017と同じであると多分思う。

TypeScriptの||は(疑似記法的に)function ||(x: boolean, y: boolean): boolean

clock2015-08-19

TypeScriptでjQueryを扱う with tsd

TypeScriptでjQueryを扱う with tsd

jQueryだけでなく、angular…

clock2015-08-15

Ubuntu15.04にnodejsとtypescriptを入れた

Ubuntu15.04にnodejsとtypescriptを入れた

目的 : TypeScript…

筆者プロフィール

my-latest-logo

aiya000(あいや)

せつラボ 〜圏論の基本〜」 「せつラボ2~雲と天使と関手圏~」 「矢澤にこ先輩といっしょに代数!」を書いています!

強い静的型付けとテストを用いて、バグを防ぐのが好き。Haskell・TypeScript。