update test sample
This commit is contained in:
@@ -1 +1,3 @@
|
||||
console.log('heeee');
|
||||
|
||||
|
||||
export { default as sample } from "./sample"
|
||||
|
||||
11
src/sample.ts
Normal file
11
src/sample.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
const power = (n? : number) : number | undefined => {
|
||||
if( typeof n === "undefined" || n === null){
|
||||
return undefined
|
||||
}
|
||||
if(typeof n !== "number"){
|
||||
return undefined
|
||||
}
|
||||
return Math.pow(n, 2)
|
||||
}
|
||||
|
||||
export default power
|
||||
Reference in New Issue
Block a user