Skip to content

Commit

Permalink
docs(core): improve typing (nrwl#27731)
Browse files Browse the repository at this point in the history
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
  • Loading branch information
juliangsibecas and leosvelperez authored Sep 3, 2024
1 parent 3b0fd38 commit c30415e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/shared/plugins/tooling-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ To create an inferred task, we need to export a `createNodesV2` function from th

```ts {% fileName="src/index.ts" %}
import {
CreateNodesContextV2,
CreateNodesV2,
TargetConfiguration,
createNodesFromFiles,
joinPathFragments,
readJsonFile,
} from '@nx/devkit';
import { readdirSync, readFileSync } from 'fs';
import { dirname, join, resolve } from 'path';
Expand Down Expand Up @@ -103,7 +103,11 @@ export const createNodesV2: CreateNodesV2<AstroPluginOptions> = [
},
];

async function createNodesInternal(configFilePath, options, context) {
async function createNodesInternal(
configFilePath: string,
options: AstroPluginOptions,
context: CreateNodesContextV2
) {
const projectRoot = dirname(configFilePath);

// Do not create a project if package.json or project.json isn't there.
Expand Down

0 comments on commit c30415e

Please sign in to comment.