Module: Rouge::Lexers::TypescriptCommon

Included in:
TSX, Typescript
Defined in:
lib/rouge/lexers/typescript/common.rb

Instance Method Summary collapse

Instance Method Details

#builtinsObject



27
28
29
30
31
32
33
34
# File 'lib/rouge/lexers/typescript/common.rb', line 27

def builtins
  @builtins ||= super + %w(
    Capitalize ConstructorParameters Exclude Extract InstanceType
    Lowercase NonNullable Omit OmitThisParameter Parameters
    Partial Pick Readonly Record Required
    ReturnType ThisParameterType ThisType Uncapitalize Uppercase
  )
end

#declarationsObject



14
15
16
17
18
# File 'lib/rouge/lexers/typescript/common.rb', line 14

def declarations
  @declarations ||= super + Set.new(%w(
    type abstract
  ))
end

#keywordsObject



7
8
9
10
11
12
# File 'lib/rouge/lexers/typescript/common.rb', line 7

def keywords
  @keywords ||= super + Set.new(%w(
    is namespace static private protected public
    implements readonly
  ))
end

#reservedObject



20
21
22
23
24
25
# File 'lib/rouge/lexers/typescript/common.rb', line 20

def reserved
  @reserved ||= super + Set.new(%w(
    string any void number namespace module
    declare default interface keyof
  ))
end