File tree 1 file changed +14
-2
lines changed
packages/@angular/cli/commands
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -102,13 +102,20 @@ export default Command.extend({
102
102
ui : this . ui ,
103
103
project : this . project
104
104
} ) ;
105
+ const collectionName = this . getCollectionName ( rawArgs ) ;
105
106
106
107
return getOptionsTask . run ( {
107
108
schematicName,
108
- collectionName : this . getCollectionName ( rawArgs )
109
+ collectionName
109
110
} )
110
111
. then ( ( availableOptions : SchematicAvailableOptions ) => {
112
+ let anonymousOptions : string [ ] = [ ] ;
113
+ if ( collectionName === '@schematics/angular' && schematicName === 'interface' ) {
114
+ anonymousOptions = [ '<type>' ] ;
115
+ }
116
+
111
117
this . registerOptions ( {
118
+ anonymousOptions : anonymousOptions ,
112
119
availableOptions : availableOptions
113
120
} ) ;
114
121
} ) ;
@@ -143,11 +150,16 @@ export default Command.extend({
143
150
ui : this . ui ,
144
151
project : this . project
145
152
} ) ;
153
+ const collectionName = this . getCollectionName ( rawArgs ) ;
154
+
155
+ if ( collectionName === '@schematics/angular' && schematicName === 'interface' && rawArgs [ 2 ] ) {
156
+ commandOptions . type = rawArgs [ 2 ] ;
157
+ }
146
158
147
159
return schematicRunTask . run ( {
148
160
taskOptions : commandOptions ,
149
161
workingDir : cwd ,
150
- collectionName : this . getCollectionName ( rawArgs ) ,
162
+ collectionName,
151
163
schematicName
152
164
} ) ;
153
165
} ,
You can’t perform that action at this time.
0 commit comments