opral / inlang-message-sdk

0 stars 0 forks source link

Fix jsdoc comment: createNewProject() projectSettings is not optional #36

Closed jldec closed 1 month ago

jldec commented 2 months ago

Context

https://github.com/opral/monorepo/blob/main/inlang/source-code/sdk/src/createNewProject.ts#L13

Proposal

samuelstroschein commented 2 months ago

I propose to not use JSDoc. We use typescript. You can change the comments

from

/**
 * Creates a new project in the given directory.
 * The directory must be an absolute path, must not exist, and must end with {name}.inlang
 * Uses defaultProjectSettings unless projectSettings are provided.
 *
 * @param projectPath - Absolute path to the [name].inlang directory
 * @param repo - An instance of a lix repo as returned by `openRepository`
 * @param projectSettings - Optional project settings to use for the new project.
 */
export async function createNewProject(args: {
    projectPath: string
    repo: Repository
    projectSettings: ProjectSettings
}): Promise<void> {

to

/**
 * Creates a new project in the given directory.
 * The directory must be an absolute path, must not exist, and must end with {name}.inlang
 * Uses defaultProjectSettings unless projectSettings are provided.
 */
export async function createNewProject(args: {
    /**
    * Absolute path to the [name].inlang directory
    */
    projectPath: string
    /**
    * An instance of a lix repo as returned by `openRepository`
    */
    repo: Repository
    /**
    * Optional project settings to use for the new project.
    */
    projectSettings: ProjectSettings
}): Promise<void> {
jldec commented 2 months ago

agree 💯