Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
TypeError() コンストラクターは TypeError オブジェクトを生成します。
メモ: TypeError() は new があってもなくても呼び出すことができます。どちらも新しい TypeError インスタンスを作成します。
人間が読むためのエラーの説明です。
options 省略可次のプロパティを持つオブジェクトです。
cause 省略可エラーの具体的な原因を示すプロパティ。 より具体的または有用なエラーメッセージでエラーを捕捉し再スローする場合、このプロパティを使用して元のエラーを渡すことができます。
fileName 省略可例外が発生したコードを含むファイルの名前です。
lineNumber 省略可例外が発生したコードの行番号です。
| ECMAScript® 2027 Language Specification # sec-nativeerror-constructors |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2026年3月17日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.