fix(ivy): support multiple exportAs (#27996)
Allows for multiple, comma-separated `exportAs` names, similarly to `ViewEngine`. These changes fix FW-708. PR Close #27996
This commit is contained in:

committed by
Andrew Kushnir

parent
b78351cc7e
commit
9277142d54
@ -117,9 +117,7 @@ function baseDirectiveFields(
|
||||
definitionMap.set('outputs', conditionallyCreateMapObjectLiteral(meta.outputs));
|
||||
|
||||
if (meta.exportAs !== null) {
|
||||
// TODO: handle multiple exportAs values (currently only the first is taken).
|
||||
const [exportAs] = meta.exportAs;
|
||||
definitionMap.set('exportAs', o.literal(exportAs));
|
||||
definitionMap.set('exportAs', o.literalArr(meta.exportAs.map(e => o.literal(e))));
|
||||
}
|
||||
|
||||
return {definitionMap, statements: result.statements};
|
||||
@ -614,7 +612,6 @@ function createTypeForDef(meta: R3DirectiveMetadata, typeBase: o.ExternalReferen
|
||||
return o.expressionType(o.importExpr(typeBase, [
|
||||
typeWithParameters(meta.type, meta.typeArgumentCount),
|
||||
stringAsType(selectorForType),
|
||||
// TODO: handle multiple exportAs values (currently only the first is taken).
|
||||
meta.exportAs !== null ? stringArrayAsType(meta.exportAs) : o.NONE_TYPE,
|
||||
stringMapAsType(meta.inputs),
|
||||
stringMapAsType(meta.outputs),
|
||||
|
Reference in New Issue
Block a user