<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [PropsWithType](./x-components.propswithtype.md)

## PropsWithType type

Extracts the name of the properties of an object that match a type.

**Signature:**

```typescript
export type PropsWithType<SomeObject, TargetItem> = keyof SomeObject & keyof SubObject<SomeObject, TargetItem>;
```
**References:** [SubObject](./x-components.subobject.md)

## Example


```typescript
  interface Person {
    name: string,
    surname: string,
    age: number
  }

 type StringPersonProperties = PropsWithType<Person, string>; // "name" | "surname";
```

