Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Commit bdebc15

Browse files
committed
fix: move getDisplayName to named export
1 parent 52d883f commit bdebc15

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/getDisplayName.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const cachedDisplayNames: WeakMap<JSX, string> = new WeakMap();
88
* @param fallbackName {string} The alias, or fallback name to use when the name cannot be derived.
99
* @link https://github.com/facebook/react-devtools/blob/master/backend/getDisplayName.js
1010
*/
11-
export default function getDisplayName(type: JSX, fallbackName: string = 'Unknown'): string {
11+
export function getDisplayName(type: JSX, fallbackName: string = 'Unknown'): string {
1212
if (type === undefined) {
1313
// something is terrible wrong with this JSX element
1414
throw new Error(`Something is wrong with this element "${type}" with fallback "${fallbackName}"`)

lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference path="./index.d.ts" />
22

3-
import getDisplayName from './getDisplayName';
3+
import {getDisplayName} from './getDisplayName';
44

55
// having weak reference to styles prevents garbage collection
66
// and "losing" styles when the next test starts

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"test": "cypress run",
99
"percy:test": "percy exec -- cypress run",
10-
"build": "webpack -d",
10+
"build": "webpack -d && npm run transpile",
1111
"cy:open": "cypress open",
1212
"transpile": "tsc",
1313
"watch": "tsc -w",

0 commit comments

Comments
 (0)