Contentful Personalization & Analytics
    Preparing search index...
    • Type guard that checks whether the given value is a Contentful Entry, passing through the specified skeleton, chain modifiers, and locale.

      Type Parameters

      • S extends EntrySkeletonType

        The entry skeleton type.

      • M extends ChainModifiers = ChainModifiers

        The chain modifiers type. Defaults to ChainModifiers.

      • L extends string = string

        The locale code type. Defaults to LocaleCode.

      Parameters

      • entry: Entry | undefined

        The value to test.

      Returns entry is Entry<S, M, L>

      true if the object conforms to CtflEntry and can be treated as a typed Entry, otherwise false.

      const entry = await client.getEntry('my-entry-id');
      if (isEntry<MySkeleton>(entry)) {
      console.log(entry.fields.myField);
      }