nx/docs/generated/devkit/CreateNodesFunction.md
Craigory Coppola f918a72307
feat(core): add standard way to pass plugin options (#19589)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-10-16 18:24:11 -04:00

34 lines
1.9 KiB
Markdown

# Type alias: CreateNodesFunction<T\>
Ƭ **CreateNodesFunction**<`T`\>: (`projectConfigurationFile`: `string`, `options`: `T` \| `undefined`, `context`: [`CreateNodesContext`](../../devkit/documents/CreateNodesContext)) => { `externalNodes?`: `Record`<`string`, [`ProjectGraphExternalNode`](../../devkit/documents/ProjectGraphExternalNode)\> ; `projects?`: `Record`<`string`, [`ProjectConfiguration`](../../devkit/documents/ProjectConfiguration)\> }
#### Type parameters
| Name | Type |
| :--- | :---------------------------------------------------------------------- |
| `T` | extends `Record`<`string`, `unknown`\> = `Record`<`string`, `unknown`\> |
#### Type declaration
▸ (`projectConfigurationFile`, `options`, `context`): `Object`
A function which parses a configuration file into a set of nodes.
Used for creating nodes for the [ProjectGraph](../../devkit/documents/ProjectGraph)
##### Parameters
| Name | Type |
| :------------------------- | :---------------------------------------------------------------- |
| `projectConfigurationFile` | `string` |
| `options` | `T` \| `undefined` |
| `context` | [`CreateNodesContext`](../../devkit/documents/CreateNodesContext) |
##### Returns
`Object`
| Name | Type |
| :--------------- | :------------------------------------------------------------------------------------------------- |
| `externalNodes?` | `Record`<`string`, [`ProjectGraphExternalNode`](../../devkit/documents/ProjectGraphExternalNode)\> |
| `projects?` | `Record`<`string`, [`ProjectConfiguration`](../../devkit/documents/ProjectConfiguration)\> |