Skip to content

Provide type definitions for the JS configuration files. #3042

Open
@binyamin

Description

@binyamin

Continuing avajs/typescript#15 (comment)
cc @novemberborn


Summary

When a user configures AVA with JavaScript, it would be useful to have type definition. Users might consume these through JSDoc comments, or through a typed wrapper function.

Details

A wrapper function would be defined like this:

/**
 *
 * Configure AVA, with intellisense
 *
 * @param {Config} config - A configuration object
 * @returns {Config}
 */
export const defineConfig = (config) => config;

The function would be used like this:

import { defineConfig } from 'ava/config';

export default defineConfig({
  // ...
})

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions