Skip to content

Commit 09c222d

Browse files
committed
noteplayer: add simple function
1 parent 199497c commit 09c222d

File tree

4 files changed

+28
-13
lines changed

4 files changed

+28
-13
lines changed

dist/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
declare function getAudioContext(): AudioContext;
2+
3+
export { getAudioContext };

dist/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// src/index.ts
2+
function getAudioContext() {
3+
const audioCtx = new AudioContext();
4+
return audioCtx;
5+
}
6+
export {
7+
getAudioContext
8+
};

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export function getAudioContext() {
2+
const audioCtx = new AudioContext();
3+
return audioCtx;
4+
}

tsconfig.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"compilerOptions": {
3-
"strict":true,
4-
"lib": ["ESNext"],
5-
"module": "esnext",
6-
"target": "esnext",
7-
"moduleDetection": "force",
8-
"outDir": "dist",
9-
"skipLibCheck": true,
10-
"sourceMap": true,
11-
},
12-
"include": ["src"],
13-
"exclude": ["node_modules","dist"],
14-
}
2+
"compilerOptions": {
3+
"strict": true,
4+
"lib": ["ESNext", "DOM"],
5+
"module": "esnext",
6+
"target": "esnext",
7+
"moduleDetection": "force",
8+
"outDir": "dist",
9+
"skipLibCheck": true,
10+
"sourceMap": true
11+
},
12+
"include": ["src"],
13+
"exclude": ["node_modules", "dist"]
14+
}

0 commit comments

Comments
 (0)