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
We could add .ts as an extension to the project:
rails_stats/lib/rails_stats/code_statistics_calculator.rb
Lines 7 to 32 in 3aa647a
Some projects use Typescript instead of vanilla JS.
Requested by @arielj