Skip to content

Commit

Permalink
fixed(#3): omit static properties from model
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgobich committed Nov 13, 2024
1 parent c958d40 commit 568ce82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/file_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export default class FileService {
let isInBlock: boolean = false
const definitions = classLines.filter((line) => {
const propertyMatch = line.match(/^(declare |public |get |[0-9A-z])+/)
const isDefinition = propertyMatch && !isInBlock
const isStatic = line.startsWith('static ')
const isDefinition = propertyMatch && !isStatic && !isInBlock

if (line.endsWith('{')) isInBlock = true
if (line.startsWith('}') && isInBlock) isInBlock = false
Expand Down

0 comments on commit 568ce82

Please sign in to comment.