Skip to content

Commit

Permalink
Add missing excplicit property modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Feb 13, 2024
1 parent 7c4b292 commit 0e4a911
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/controller_definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export class ControllerDefinition {
readonly project: Project
readonly classDeclaration: ClassDeclaration

isTyped: boolean = false
anyDecorator: boolean = false
public isTyped: boolean = false
public anyDecorator: boolean = false

readonly errors: ParseError[] = []
readonly methods: Array<MethodDefinition> = []
Expand Down
3 changes: 0 additions & 3 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { Project } from "./project"

import type { ParserOptions } from "./types"

// TODO: Support decorator + reflect-metadata value definitions
// TODO: error or multiple classes

export class Parser {
readonly project: Project

Expand Down
1 change: 1 addition & 0 deletions src/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type { NodeModule } from "./types"
export class Project {
readonly projectPath: string
readonly controllerRootFallback = "app/javascript/controllers"

static readonly javascriptExtensions = ["js", "mjs", "cjs", "jsx"]
static readonly typescriptExtensions = ["ts", "mts", "tsx"]

Expand Down
1 change: 1 addition & 0 deletions src/util/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export function parseValueDecorator(controllerDefinition: ControllerDefinition,
const hasOneArgument = (decorator.expression.type === "CallExpression" && decorator.expression.arguments.length === 1)

if (isIdentifier || !hasOneArgument) {
// TODO: Support decorator + reflect-metadata value definitions
throw new Error("We dont support reflected types yet")
}

Expand Down

0 comments on commit 0e4a911

Please sign in to comment.