---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [discovery](../index.md) / DetectionPattern

# Interface: DetectionPattern

Defined in: [packages/b2c-tooling-sdk/src/discovery/types.ts:57](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/discovery/types.ts#L57)

Detection pattern definition.

## Properties

### detect()

> **detect**: (`workspacePath`, `context?`) => `Promise`\<`boolean`\>

Defined in: [packages/b2c-tooling-sdk/src/discovery/types.ts:63](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/discovery/types.ts#L63)

Detection function

#### Parameters

##### workspacePath

`string`

##### context?

[`DetectionContext`](DetectionContext.md)

#### Returns

`Promise`\<`boolean`\>

***

### name

> **name**: `string`

Defined in: [packages/b2c-tooling-sdk/src/discovery/types.ts:59](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/discovery/types.ts#L59)

Unique pattern identifier

***

### projectType

> **projectType**: [`ProjectType`](../type-aliases/ProjectType.md)

Defined in: [packages/b2c-tooling-sdk/src/discovery/types.ts:61](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/discovery/types.ts#L61)

Project type this pattern detects
