1 | import CJSImportProcessor from "../CJSImportProcessor";
|
2 | import { Options } from "../index";
|
3 | import TokenProcessor from "../TokenProcessor";
|
4 | import RootTransformer from "./RootTransformer";
|
5 | import Transformer from "./Transformer";
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export default class ReactDisplayNameTransformer extends Transformer {
|
11 | readonly rootTransformer: RootTransformer;
|
12 | readonly tokens: TokenProcessor;
|
13 | readonly importProcessor: CJSImportProcessor | null;
|
14 | readonly options: Options;
|
15 | constructor(rootTransformer: RootTransformer, tokens: TokenProcessor, importProcessor: CJSImportProcessor | null, options: Options);
|
16 | process(): boolean;
|
17 | /**
|
18 | * This is called with the token position at the open-paren.
|
19 | */
|
20 | private tryProcessCreateClassCall;
|
21 | private findDisplayName;
|
22 | private getDisplayNameFromFilename;
|
23 | /**
|
24 | * We only want to add a display name when this is a function call containing
|
25 | * one argument, which is an object literal without `displayName` as an
|
26 | * existing key.
|
27 | */
|
28 | private classNeedsDisplayName;
|
29 | }
|