We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93ca9c8 commit a00bf9eCopy full SHA for a00bf9e
1 file changed
packages/babel-core/src/config/item.js
@@ -1,5 +1,7 @@
1
// @flow
2
3
+/*:: declare var invariant; */
4
+
5
import type { PluginTarget, PluginOptions } from "./validation/options";
6
7
import path from "path";
@@ -40,7 +42,8 @@ export function createConfigItem(
40
42
}
41
43
44
export function getItemDescriptor(item: mixed): UnloadedDescriptor | void {
- if (item?.[CONFIG_ITEM_BRAND]) {
45
+ if ((item: any)?.[CONFIG_ITEM_BRAND]) {
46
+ /*:: invariant(item instanceof ConfigItem) */
47
return item._descriptor;
48
49
@@ -70,6 +73,7 @@ class ConfigItem {
70
73
/**
71
74
* Used to detect ConfigItem instances from other Babel instances.
72
75
*/
76
+ // $FlowIgnore
77
[CONFIG_ITEM_BRAND] = true;
78
79
0 commit comments