mirror of
https://github.com/actions/typescript-action.git
synced 2025-04-08 08:19:53 +00:00
Update typescript template to follow some conventions (#42)
* Update default project to follow conventions
This commit is contained in:
20
src/main.ts
20
src/main.ts
@ -1,19 +1,19 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as core from '@actions/core'
|
||||
import {wait} from './wait'
|
||||
|
||||
async function run() {
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
const ms = core.getInput('milliseconds');
|
||||
console.log(`Waiting ${ms} milliseconds ...`)
|
||||
const ms: string = core.getInput('milliseconds')
|
||||
core.debug(`Waiting ${ms} milliseconds ...`)
|
||||
|
||||
core.debug((new Date()).toTimeString())
|
||||
await wait(parseInt(ms, 10));
|
||||
core.debug((new Date()).toTimeString())
|
||||
core.debug(new Date().toTimeString())
|
||||
await wait(parseInt(ms, 10))
|
||||
core.debug(new Date().toTimeString())
|
||||
|
||||
core.setOutput('time', new Date().toTimeString());
|
||||
core.setOutput('time', new Date().toTimeString())
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
core.setFailed(error.message)
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
run()
|
||||
|
Reference in New Issue
Block a user