Elon Musk’s Twitter profile is seen on a smartphone placed on printed Twitter logos in this picture illustration taken April 28, 2022.

Dado Ruvic | Reuters

Twitter was sued by former employees who say they were not given enough notice under federal and California law that they had lost their jobs amid ongoing mass layoffs.

The class-action lawsuit was filed in San Francisco federal court Thursday by five current or former Twitter employees, including Emmanuel Cornet, a software engineer known for his satirical cartoons critiquing Silicon Valley, who was fired Tuesday, according to the complaint.

Twitter informed employees Thursday evening, days after Tesla and SpaceX CEO Elon Musk took control of the company, that it would begin laying off staff members, according to communications obtained by NBC News. In the email, Twitter said staffers will receive a notice about their employment in their work email if they still have a job, or their personal email accounts if their “employment is impacted.”

Twitter employees are expecting the company to cut 50% of its workforce, or roughly 3,700 employees.

The federal Worker Adjustment and Retraining Notification (WARN) Act requires employers to provide advance notice, generally within 60 days, of mass layoffs or plant closings.

“Plaintiffs file this action seeking to ensure that Twitter comply with the law and provide the requisite notice or severance payment in connection with the anticipated layoffs,” the complaint states.

The lawsuit asks the court to issue an order requiring Twitter to obey the WARN Act. It also seeks to prevent Twitter from soliciting employees to sign documents that could give up their right to participate in litigation.

Representatives from Twitter didn’t immediately respond to a request for comment.

Musk in a tweet Friday, said: “Regarding Twitter’s reduction in force, unfortunately there is no choice when the company is losing over $4M/day. Everyone exited was offered 3 months of severance, which is 50% more than legally required.”

CNBC has not confirmed this with former Twitter employees.

A spokesperson for California’s employment department said Twitter has not filed any WARN notices with the agency this year. 

WATCH: Advertisers back out of Twitter following Musk takeover as government looks into deal