diff --git a/example.ts b/example.ts new file mode 100644 index 0000000..98c6421 --- /dev/null +++ b/example.ts @@ -0,0 +1 @@ +export const example = () => 'Hello from example.ts!' diff --git a/index.ts b/index.ts index 6355e91..5831269 100644 --- a/index.ts +++ b/index.ts @@ -1,5 +1,6 @@ import type * as core from '@actions/core' import type * as github from '@actions/github' +import { example } from './example.ts' type GitHubScriptContext = { core: typeof core @@ -15,7 +16,7 @@ export const main = async ({ core, context, github }: GitHubScriptContext) => { owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, - body: 'Hello from TypeScript!' + body: example() }) } } diff --git a/tsconfig.json b/tsconfig.json index 4a2e7cd..0c3d15d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,8 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": ["@tsconfig/node24/tsconfig.json"] + "extends": ["@tsconfig/node24/tsconfig.json"], + "compilerOptions": { + "allowImportingTsExtensions": true, + "noEmit": true + } } \ No newline at end of file