Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tsconfig.json
- ======================
- {
- "files": [
- "hello.ts"
- ],
- "compilerOptions": {
- "moduleResolution": "node"
- }
- }
- package.json
- =====================
- {
- "name": "sandbox",
- "version": "0.0.0",
- "description": "Sandbox",
- "main": "app.js",
- "author": {
- "name": "0xCDCDCDCD"
- },
- "dependencies": {
- "@types/node": "^9.4.5"
- }
- }
- app.json
- =====================
- 'use strict';
- var hello = require('./hello');
- //import { hello } from 'hello';
- var world = new hello();
- hello.js
- ======================
- 'use strict';
- var stream = require('stream');
- var fs = require('fs');
- //import { stream } from 'fs';
- //import { fs } from 'fs';
- export class hello {
- world(): stream.Readable {
- return fs.createReadStream('app.js');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement