<types namespace="_alamode">
  <import from="restream" ns="_restream" name="ReplaceableInterface"/>
  <import from="restream/src/lib/markers" ns="_restream" name="Marker"/>

  <record name="Import">
    <prop type="{ from: string, to: string }" opt name="replacement">
      How to replace the imported module name.
    </prop>
    <prop boolean name="esCheck" default="false">
      Whether to always perform es check and add `if (__esModule)` clause.
    </prop>
    <prop type="{ packages: !Array<string>, path: string }" name="stdlib" opt>
      Rearranges imports to require them from the compiled standard library from the given path. The default imports will become named.
    </prop>
    <prop type="!Array<string>" opt name="alamodeModules">
      The list of modules that should not be checked for the `__esModule` export, i.e., knowing that they have been compiled with ÀLaMode, or are traditional CommonJS modules.
    </prop>
    <prop boolean name="skipLookup" default="false">
      If the module is not in the `alamodeModules`, its _package.json_ will be inspected to see if it exports the `alamode` property that would mean it does not have to have `esCheck`.
    </prop>
  </record>

  <record name="Jsx">
    <prop boolean name="prop2class" default="false">
      Convert properties that start with a capital letter to class names.
    </prop>
    <prop type="string|!Array<string>" opt name="classNames">
      Paths to class names maps. Properties that are found in those maps, will be converted into a class name.
      Example:
      ```json
      {
        "container": true,
        "row": true
      }
      ```
    </prop>
    <prop type="string|!Array<string>" opt name="renameMaps">
      Paths to rename maps. All classes found in the maps will be renamed according to the rule.
      Example:
      ```json
      {
        "row": "bt-a",
        "Image": "pu-i"
      }
      ```
    </prop>
  </record>

  <record name="CSS">
    <prop type="!Object<string, string>" opt name="classNames">
      A map of CSS paths to their class names, which will be exported from the generated CSS.
    </prop>
  </record>

  <record extends="_alamode.HookConfig" name="Config" desc="The configuration set via the .alamoderc file.">
    <prop opt type="!_alamode.Import" name="import">
      Config for import transforms.
    </prop>
    <prop opt type="!_alamode.CSS" name="css">
      Config for the inlined CSS.
    </prop>
    <prop opt type="!_alamode.Jsx" name="jsx">
      JSX configuration.
    </prop>
  </record>

  <type interface name="ÀLaMode" extends="_restream.ReplaceableInterface" desc="ÀLaMode instances extend the _Replaceable_ to process input data according to the rules." >
    <prop type="{literals: _restream.Marker, strings: _restream.Marker, comments: _restream.Marker, inlineComments: _restream.Marker, escapes: _restream.Marker, regexes: _restream.Marker, regexGroups: _restream.Marker}" name="markers">
      Initialised markers.
    </prop>
    <prop name="config" type="!_alamode.Config">
      The configuration object.
    </prop>
    <prop name="file" string>
      The current file being processed.
    </prop>
    <prop name="noSourceMaps" boolean default="false">
      Whether the source maps are disabled, and whitespace does not need to be added for `module.exports`.
    </prop>
    <prop name="stopProcessing" boolean default="false">
      Debug mode.
    </prop>
    <prop name="async" boolean>
      Whether the stream is running in async mode, that is, not the require hook.
    </prop>
    <prop name="renameOnly" boolean default="false">
      Only remap imports' locations, without transpiling into require.
    </prop>
  </type>
  <type name="ÀLaModeReplacer" type="function(this: _alamode.ÀLaMode, ...string): string" desc="A sync replacement function with ÀLaMode as its `this` context.">
  </type>
</types>