-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(prettier-plugin-pkg): better or stricter types support
- Loading branch information
Showing
6 changed files
with
57 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,52 @@ | ||
import { ObjectExpression, ObjectProperty, StringLiteral } from '@babel/types' | ||
import { | ||
ArrayExpression as _ArrayExpression, | ||
ObjectExpression as _ObjectExpression, | ||
ObjectProperty as _ObjectProperty, | ||
StringLiteral, | ||
} from '@babel/types' | ||
|
||
export interface StringMapperProperty extends ObjectProperty { | ||
export interface StringMapperProperty extends _ObjectProperty { | ||
key: { | ||
value: string | ||
} | ||
value: StringMapperPropertyValue | ||
value: StringMapperExpression | ||
} | ||
|
||
export interface StringMapperPropertyValue extends ObjectExpression { | ||
export interface StringMapperExpression extends _ObjectExpression { | ||
properties: StringMapperProperty[] | ||
} | ||
|
||
export interface StringArrayProperty extends ObjectProperty { | ||
export interface StringArrayProperty extends _ObjectProperty { | ||
key: { | ||
value: string | ||
} | ||
value: StringArrayExpression | ||
} | ||
|
||
export interface StringArrayExpression extends _ArrayExpression { | ||
elements: StringLiteral[] | ||
} | ||
|
||
export interface ObjectProperty extends _ObjectProperty { | ||
key: { | ||
value: string | ||
} | ||
value: | ||
| ArrayExpression | ||
| ObjectExpression | ||
| StringArrayExpression | ||
| StringMapperExpression | ||
} | ||
|
||
export interface ObjectExpression extends _ObjectExpression { | ||
properties: ObjectProperty[] | ||
} | ||
|
||
export interface ArrayExpression extends _ArrayExpression { | ||
elements: Array< | ||
| ArrayExpression | ||
| ObjectExpression | ||
| StringArrayExpression | ||
| StringMapperExpression | ||
> | ||
} |