# Salesforce SDK for Node.js Functions

:::note
Any use of the Service is subject to the applicable Services Terms provided at [Agreements and Terms](https://www.salesforce.com/company/legal/agreements/).
:::

Use the Salesforce SDK for Node.js Functions to develop Functions in TypeScript.

## Use the Salesforce SDK for Node.js Functions

See [Set Up Your Development Environment](/docs/platform/functions/guide/set-up.md#install-the-salesforce-sdk-for-node.js-functions).

## Example Function

This JSON is a sample package.json file.

```json
{
  "name": "nodejs-example-function",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "yahoo-stock-prices": "^1.1.0"
  }
}
```

This code is a sample index.js file.

```javascript
import { getCurrentData } from "yahoo-stock-prices";

export default async function (event, context, logger) {
  logger.info("I'm logging stuff!");
  return getCurrentData("CRM");
}
```

## Interfaces

- [Context](/docs/platform/functions/guide/context.md)
- [DataApi](/docs/platform/functions/guide/dataapi.md)
- [InvocationEvent](/docs/platform/functions/guide/invocationevent.md)
- [Logger](/docs/platform/functions/guide/logger.md)
- [Org](/docs/platform/functions/guide/org.md)
- [RecordModificationResult](/docs/platform/functions/guide/recordmodificationresult.md)
- [RecordQueryResult](/docs/platform/functions/guide/recordqueryresult.md)
- [UnitOfWork](/docs/platform/functions/guide/unitofwork.md)
- [User](/docs/platform/functions/guide/user.md)

## Type Aliases

- [RecordForCreate](/docs/platform/functions/guide/modules.md#recordforcreate)
- [RecordForUpdate](/docs/platform/functions/guide/modules.md#recordforupdate)
- [ReferenceId](/docs/platform/functions/guide/modules.md#referenceid)
- [SalesforceFunction](/docs/platform/functions/guide/modules.md#salesforcefunction)
