Advertisement
Guest User

Untitled

a guest
Feb 12th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tsconfig.json
  2. ======================
  3.  
  4. {
  5.   "files": [
  6.     "hello.ts"
  7.   ],
  8.   "compilerOptions": {
  9.     "moduleResolution": "node"
  10.   }
  11. }
  12.  
  13. package.json
  14. =====================
  15.  
  16. {
  17.   "name": "sandbox",
  18.   "version": "0.0.0",
  19.   "description": "Sandbox",
  20.   "main": "app.js",
  21.   "author": {
  22.     "name": "0xCDCDCDCD"
  23.   },
  24.   "dependencies": {
  25.     "@types/node": "^9.4.5"
  26.   }
  27. }
  28.  
  29. app.json
  30. =====================
  31. 'use strict';
  32. var hello = require('./hello');
  33. //import { hello } from 'hello';
  34.  
  35. var world = new hello();
  36.  
  37.  
  38.  
  39. hello.js
  40. ======================
  41.  
  42. 'use strict';
  43.  
  44. var stream = require('stream');
  45. var fs = require('fs');
  46.  
  47. //import { stream } from 'fs';
  48. //import { fs } from 'fs';
  49.  
  50. export class hello {
  51.     world(): stream.Readable {
  52.         return fs.createReadStream('app.js');
  53.     }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement