adrianhajdin / collaborative-editor

Learn how to build any collaborative application by building LiveDocs, an improved Google Docs that manages millions of collaborators in real-time.
https://jsm-live-docs.vercel.app
421 stars 113 forks source link

Issue with subsets at layout.js #6

Open ghost opened 4 months ago

ghost commented 4 months ago

If you issue with subsets such as:

"Type 'string[]' is not assignable to type '("cyrillic" | "cyrillic-ext" | "greek" | "greek-ext" | "latin" | "latin-ext" | "vietnamese")[]'.
  Type 'string' is not assignable to type '"cyrillic" | "cyrillic-ext" | "greek" | "greek-ext" | "latin" | "latin-e"

make sure to add: as const to subset for example:

const fontSans = FontSans({
  subsets: ["greek"] as const,
  variable: "--font-sans",
})