2022-11-01
Nuxt3とMSWで「The script has an unsupported MIME type ('text/html')」が出た
結
間違い
間違いは$ msw init src/static --save
(src/static
)していたことだった。
Nuxt2のプロジェクトのひとつではsrc/static
…
2021-02-07
【Nuxt.js】storeでないモジュールを`@/store/`配下に置いてはいけない
【Nuxt.js】storeでないモジュールを@/store/
配下に置いてはいけない。notice-at
問題と解決
…2020-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)
}
…
2019-07-04
NativeScriptの型不安全なObservableを型安全にする
2017-12-28
TypeScript2.6のnull合体演算子も||
これは生JavaScriptやES2017と同じであると多分思う。
TypeScriptの||
は(疑似記法的に)function ||(x: boolean, y: boolean): boolean
…