Skip to main content

Recently started to learn Figma Plugin where I could not figure not how to import a sample.d.ts file in code.ts


example: I had created a file called sample.d.ts which contains a function


function testing() { console.log('Hello') } export {}

Adding the following code in code.ts


///


import {sample} from ‘./sample’


sample.testing()


I see following error in the console

figma_app.min.js.br:5 Syntax error on line 13: Unexpected token

import { testing } from “./Sample”;

This topic was automatically closed after 30 days. New replies are no longer allowed.