Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Typescript files #26

Open
etagwerker opened this issue Dec 19, 2024 · 0 comments
Open

Add support for Typescript files #26

etagwerker opened this issue Dec 19, 2024 · 0 comments
Labels
good-first-issue If you want to start contributing, this is a good place to start : )

Comments

@etagwerker
Copy link
Member

We could add .ts as an extension to the project:

PATTERNS = {
rb: {
line_comment: /^\s*#/,
begin_block_comment: /^=begin/,
end_block_comment: /^=end/,
class: /^\s*class\s+[_A-Z]/,
method: /^\s*def\s+[_a-z]/,
},
js: {
line_comment: %r{^\s*//},
begin_block_comment: %r{^\s*/\*},
end_block_comment: %r{\*/},
method: /function(\s+[_a-zA-Z][\da-zA-Z]*)?\s*\(/,
},
coffee: {
line_comment: /^\s*#/,
begin_block_comment: /^\s*###/,
end_block_comment: /^\s*###/,
class: /^\s*class\s+[_A-Z]/,
method: /[-=]>/,
},
feature: {
class: /^\s*Feature:/,
method: /^\s*Scenario:/,
}
}

Some projects use Typescript instead of vanilla JS.

Requested by @arielj

@etagwerker etagwerker added the good-first-issue If you want to start contributing, this is a good place to start : ) label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue If you want to start contributing, this is a good place to start : )
Projects
None yet
Development

No branches or pull requests

1 participant