persona-community-5/.pnpm-store/v3/files/1e/b0d344b4b84a1800ce0914771e4e721f55920fd7760e5a1c9aba45ebbfbd40ab04fe011218726d1385dfbc47bd48642df83e7a5ca783318a9fb57f683e180c
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

30 lines
1.2 KiB
Plaintext

import type CJSImportProcessor from "../CJSImportProcessor";
import type { Options } from "../index";
import type TokenProcessor from "../TokenProcessor";
import type RootTransformer from "./RootTransformer";
import Transformer from "./Transformer";
/**
* Implementation of babel-plugin-transform-react-display-name, which adds a
* display name to usages of React.createClass and createReactClass.
*/
export default class ReactDisplayNameTransformer extends Transformer {
readonly rootTransformer: RootTransformer;
readonly tokens: TokenProcessor;
readonly importProcessor: CJSImportProcessor | null;
readonly options: Options;
constructor(rootTransformer: RootTransformer, tokens: TokenProcessor, importProcessor: CJSImportProcessor | null, options: Options);
process(): boolean;
/**
* This is called with the token position at the open-paren.
*/
private tryProcessCreateClassCall;
private findDisplayName;
private getDisplayNameFromFilename;
/**
* We only want to add a display name when this is a function call containing
* one argument, which is an object literal without `displayName` as an
* existing key.
*/
private classNeedsDisplayName;
}