Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
fib-typify
Advanced tools
just write fibjs with typescript : )
fib-typify
allows you write fibjs with typescript in compilation or in runtime. It depends on original typescript stable version. As typescript is written with nodejs, it's not restricted in nodejs runtime: you can also compile typescript in browser or ANY other pure Javascript runtime. That is, you can use it in fibjs also.
fib-typify
's core is jstransformer-typescript (which is one jstransformer aimed to typescript) like, but this core is only valid in fibjs rather than pure javascript
NOTE All TSCompilerOptions
is just typescript's compilerOptions
compileRaw: (tsRaw: string, tsCompilerOptions: TSCompilerOptions) => string
compile tsRaw
to javascript.
compileRawToFile: (tsRaw: string, targetpath: string, tsCompilerOptions: TSCompilerOptions) => void
compile tsRaw
to javascript, then write to targetpath
compileRawToSandbox: (tsRaw: string, sboxOpts: any, tsCompilerOptions: TSCompilerOptions) => any
compile tsRaw
to javascript, then read it as sandbox
compileFile: (filepath?: string, tsCompilerOptions: TSCompilerOptions) => string
compile content in filepath
to javascript.
compileFileTo: (srcpath?: string, targetpath: string, tsCompilerOptions: TSCompilerOptions) => void
compile content in filepath
to javascript, then write to targetpath
compileRawToFile: (filepath?: string, tsCompilerOptions: TSCompilerOptions) => string
compile content in filepath
to javascript, then read it as sandbox
compileDirectoryTo: (baseDir: string, distDir: string, compileDirToOpts: any) => void
Param | Type | Required/Default |
---|---|---|
baseDir | string | Y / - |
distDir | string | Y / - |
compileDirToOpts | compileDirToOpts | N / - |
compile files in directory baseDir
recursively to distDir
, view options in view compileDirToOpts
Field | Type | Required/Default | Explanation |
---|---|---|---|
compilerOptions | boolean | Y / false | typescript's compilerOptions |
fileglobsToCopy | Array, '*' | N / ['*.js', '*.jsc', '*.json'] | whitelist for extensions of globnames to copy when recursive walk to one |
includeLeveledGlobs | string | string[] | N / ['*', '!node_modules', '!.ts'] |
filterFileName | (filename: string): boolean | N / - | whether compile File, file would be compiled if returning true |
notice compileDirToOpts.extsToCopy
is depreacated, if you pass it,compileDirToOpts.fileglobsToCopy
get invalid.
High -> Low:
*.d.ts
for fibjs yet. I will support generating fibjs.d.ts
when compilation.compileDirectoryTo
recursive
fileglobsToCopy
with higher priorty than extsToCopy
If you wanna contribute to this package, just learn about fibjs first, then fork this repo :)
FAQs
just write fibjs with typescript : )
The npm package fib-typify receives a total of 8 weekly downloads. As such, fib-typify popularity was classified as not popular.
We found that fib-typify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.