Skip to content

Typescript error when using require('emoji-regex') #102

Open
@rabarrota

Description

@rabarrota

I'm getting the following Intellisense error when using require('emoji-regex')

This expression is not callable.
  Type 'typeof import("emoji-regex")' has no call signatures.ts(2349)

Some context for how I'm using this:

const emojiRegex = require('emoji-regex');

...

const sanitizedText = text.replace(emojiRegex(), '');

This package works fine this way when actually being used. It just always shows this Typescript error.

Screen Shot 2022-10-07 at 11 15 46

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions