| 17 | } |
| 18 | |
| 19 | function isCloneMember(propertyDeclaration: ts.PropertyDeclaration) { |
| 20 | if (ts.isPrivateIdentifier(propertyDeclaration.name)){ |
| 21 | return false; |
| 22 | } |
| 23 | |
| 24 | if (propertyDeclaration.modifiers) { |
| 25 | if ( |
| 26 | propertyDeclaration.modifiers.find( |
| 27 | m => m.kind === ts.SyntaxKind.StaticKeyword || m.kind === ts.SyntaxKind.ReadonlyKeyword |
| 28 | ) |
| 29 | ) { |
| 30 | return false; |
| 31 | } |
| 32 | |
| 33 | if (!propertyDeclaration.modifiers.find(m => m.kind === ts.SyntaxKind.PublicKeyword)) { |
| 34 | return false; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | if (ts.getJSDocTags(propertyDeclaration).find(t => t.tagName.text === 'clone_ignore')) { |
| 39 | return false; |
| 40 | } |
| 41 | |
| 42 | return true; |
| 43 | } |
| 44 | |
| 45 | function generateClonePropertyStatements( |
| 46 | prop: ts.PropertyDeclaration, |