Commit 9aeb344 1 parent cd1e14c commit 9aeb344 Copy full SHA for 9aeb344
File tree 7 files changed +15
-4
lines changed
tests/specs/references/exportAssignment/default
7 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,10 @@ type FSharpAttribute =
179
179
/// Generates <c>[<ImportAll(moduleName)>]</c> attribute.
180
180
/// </summary>
181
181
| ImportAll of moduleName : string
182
+ /// <summary>
183
+ /// Generates <c>[<ImportDefault(moduleName)>]</c> attribute.
184
+ /// </summary>
185
+ | ImportDefault of moduleName : string
182
186
| Erase
183
187
| AllowNullLiteral
184
188
| Obsolete of string option
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ let private attributeToText (fsharpAttribute: FSharpAttribute) =
103
103
| FSharpAttribute.EmitMacroConstructor className ->
104
104
$" [<Emit(\" new $0.{className}($1...)\" )>]"
105
105
| FSharpAttribute.ImportAll module_ -> $" [<ImportAll(\" {module_}\" )>]"
106
+ | FSharpAttribute.ImportDefault module_ ->
107
+ $" [<ImportDefault(\" {module_}\" )>]"
106
108
| FSharpAttribute.EmitIndexer -> " [<EmitIndexer>]"
107
109
| FSharpAttribute.Global -> " [<Global>]"
108
110
| FSharpAttribute.ParamObject -> " [<ParamObject>]"
Original file line number Diff line number Diff line change @@ -477,7 +477,7 @@ let private transformExports
477
477
sanitizeNameAndPushScope glueType.Name context
478
478
479
479
{
480
- Attributes = [ FSharpAttribute.ImportAll " module" ]
480
+ Attributes = [ FSharpAttribute.ImportDefault " module" ]
481
481
Name = name
482
482
OriginalName = glueType.Name
483
483
Parameters = []
Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ type FSharpASTViewer =
47
47
ASTViewer.renderKeyValue " From" from
48
48
]
49
49
50
+ | FSharpAttribute.ImportDefault from ->
51
+ ASTViewer.renderNode " ImportDefault" [
52
+ ASTViewer.renderKeyValue " From" from
53
+ ]
54
+
50
55
| FSharpAttribute.Erase -> ASTViewer.renderValueOnly " Erase"
51
56
52
57
| FSharpAttribute.AllowNullLiteral ->
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ open System
6
6
7
7
[<Erase>]
8
8
type Exports =
9
- [<ImportAll ( " module" ) >]
9
+ [<ImportDefault ( " module" ) >]
10
10
static member inline ChalkInstance : ChalkInstance = nativeOnly
11
11
12
12
[<AllowNullLiteral>]
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ open System
6
6
7
7
[<Erase>]
8
8
type Exports =
9
- [<ImportAll ( " module" ) >]
9
+ [<ImportDefault ( " module" ) >]
10
10
static member inline chalk : ChalkInstance = nativeOnly
11
11
12
12
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ open System
6
6
7
7
[<Erase>]
8
8
type Exports =
9
- [<ImportAll ( " module" ) >]
9
+ [<ImportDefault ( " module" ) >]
10
10
static member inline version : string = nativeOnly
11
11
12
12
(***)
You can’t perform that action at this time.
0 commit comments