From c97c7897686ac4dc2828537d6a017f3c99f7d905 Mon Sep 17 00:00:00 2001 From: Brandon Mills Date: Sun, 6 Nov 2022 04:14:02 -0500 Subject: [PATCH] docs: Add missing no-new-native-nonconstructor docs code fence (#16503) --- docs/src/rules/no-new-native-nonconstructor.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/rules/no-new-native-nonconstructor.md b/docs/src/rules/no-new-native-nonconstructor.md index 18a73a22bf9..c9b75679a1e 100644 --- a/docs/src/rules/no-new-native-nonconstructor.md +++ b/docs/src/rules/no-new-native-nonconstructor.md @@ -19,6 +19,7 @@ let foo = new Symbol("foo"); // throws a TypeError let result = new BigInt(9007199254740991); +``` Both `new Symbol` and `new BigInt` throw a type error because they are functions and not classes. It is easy to make this mistake by assuming the uppercase letters indicate classes.