---
id: 699b5b7cb68b6d35afca61b7
title: Step 4
challengeType: 1
dashedName: step-4
---

# --description--

While it is possible to continue to add properties like this to the `profile` object, it would be nice to restrict the types of properties that should be allowed. It would be better to define the shape of the `profile` object beforehand.

In prior lessons, you learned how to work with object types like this:

```ts
const composer: { 
  name: string; 
  instrument: string; 
  isActive: boolean; 
} = {
  name: "Ludwig van Beethoven",
  instrument: "Piano",
  isActive: false
};
```

In this example, `composer` is an object with an inline object type. This object has three required properties of `name`, `instrument` and `isActive`. The first two properties must be of type `string` and `isActive` must be of type `boolean`.

Update your existing `profile` object to include an inline object type. `username` should be typed to a `string`, `age` should be typed to a `number` and `isLoggedIn` should be typed to a `boolean`. 

# --hints--

Your `profile` object should have an inline object type with a `username` property set to `string`.

```js
const explorer = await __helpers.Explorer(code);
const { profile } = explorer.variables;
const prop = { name: "username", type: "string" };
assert.isTrue(profile.annotation.hasTypeProps(prop));
```

Your `profile` object should have an inline object type with an `age` property set to `number`.

```js
const explorer = await __helpers.Explorer(code);
const { profile } = explorer.variables;
const prop = { name: "age", type: "number" };
assert.isTrue(profile.annotation.hasTypeProps(prop));
```

Your `profile` object should have an inline object type with an `isLoggedIn` property set to `boolean`.

```js
const explorer = await __helpers.Explorer(code);
const { profile } = explorer.variables;
const prop = { name: "isLoggedIn", type: "boolean" };
assert.isTrue(profile.annotation.hasTypeProps(prop));
```

# --seed--

## --seed-contents--

```ts
--fcc-editable-region--
const profile = {
--fcc-editable-region--
  username: "codeLearner",
  age: 25,
  isLoggedIn: false,
  mood: null
}

console.log(profile);
```
