> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# validateCodeScorer

***

# Function: validateCodeScorer()

```ts theme={null}
function validateCodeScorer(
  codeContent: string,
  scoreableNodeTypes: (
    | "agent"
    | "llm"
    | "retriever"
    | "tool"
    | "workflow"
    | "trace"
    | "session"
  )[],
  timeoutMs?: number,
  pollIntervalMs?: number,
  requiredScorers?: string[],
): Promise<ValidateRegisteredScorerResult>;
```

Defined in: [src/utils/scorers.ts](https://github.com/rungalileo/galileo-js/blob/main/src/utils/scorers.ts)

Validates code scorer content and waits for the result.

## Parameters

### codeContent

`string`

The Python code content to validate. Must include a function named scorer\_fn with a return type annotation.

### scoreableNodeTypes

(`"agent"` | `"llm"` | `"retriever"` | `"tool"` | `"workflow"` | `"trace"` | `"session"`)\[]

The node types that this scorer can score.

### timeoutMs?

`number`

(Optional) Maximum time to wait for validation in milliseconds.

### pollIntervalMs?

`number`

(Optional) Interval between polling attempts in milliseconds.

### requiredScorers?

`string`\[]

## Returns

`Promise`\<[`ValidateRegisteredScorerResult`](/sdk-api/typescript/reference/types/interfaces/ValidateRegisteredScorerResult)>

A promise that resolves to the validation result.
