fix(typescript): strip abstract keyword from properties in .d.ts
Fixes angular2/src/alt_router/metadata/metadata.d.ts Closes #8339
This commit is contained in:
parent
f114d6c560
commit
a84c2d7fee
|
@ -152,7 +152,10 @@ module.exports = function makeNodeTree(projects, destinationPath) {
|
||||||
compiledTree = replace(compiledTree, {
|
compiledTree = replace(compiledTree, {
|
||||||
files: ['**/*.d.ts'],
|
files: ['**/*.d.ts'],
|
||||||
patterns: [
|
patterns: [
|
||||||
|
// all readonly keywords
|
||||||
{match: /^(\s*(static\s+|private\s+)*)readonly\s+/mg, replacement: "$1"},
|
{match: /^(\s*(static\s+|private\s+)*)readonly\s+/mg, replacement: "$1"},
|
||||||
|
// abstract properties (but not methods or classes)
|
||||||
|
{match: /^(\s+)abstract\s+([^\(\n]*$)/mg, replacement: "$1$2"},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue