BVB Source Codes

prettier Show lex.js Source code

Return Download prettier: download lex.js Source code - Download prettier Source code - Type:.js
  1. function switch_scope(x: mixed) {
  2.   let a = "";
  3.   let b = "";
  4.   switch (x) {
  5.     case "foo":
  6.       let a;
  7.       a = 0; // doesn't add lower bound to outer a
  8.       b = 0;
  9.   }
  10.   (a : string); // OK
  11.   (b : string); // error: number ~> string
  12. }
  13.  
  14. function try_scope_finally() {
  15.   let a;
  16.   let b;
  17.   try {
  18.     a = "";
  19.     b = "";
  20.   } finally {
  21.     let a;
  22.     a = 0; // doesn't add lower bound to outer a
  23.     b = 0;
  24.   }
  25.   (a : string); // ok
  26.   (b : string); // error: number ~> string
  27. }
  28.  
  29. function for_scope() {
  30.   let a = "";
  31.   let b = "";
  32.   for (let a;;) {
  33.     a = 0; // doesn't add lower bound to outer a
  34.     b = 0;
  35.   }
  36.   (a : string);
  37.   (b : string); // error: number ~> string
  38. }
  39.  
  40. function for_in_scope(o: Object) {
  41.   let a = 0;
  42.   let b = 0;
  43.   for (let a in o) {
  44.     a = ""; // doesn't add lower bound to outer a
  45.     b = "";
  46.   }
  47.   (a : number);
  48.   (b : number); // error: string ~> number
  49. }
  50.  
  51. function for_of_scope(xs: number[]) {
  52.   let a = "";
  53.   let b = "";
  54.   for (let a of xs) {
  55.     a = 0; // doesn't add lower bound to outer a
  56.     b = 0;
  57.   }
  58.   (a : string);
  59.   (b : string); // error: number ~> string
  60. }
  61.  
downloadlex.js Source code - Download prettier Source code
Related Source Codes/Software:
storybook - 2017-06-07
ionicons - The premium icon font for Ionic ... 2017-06-07
AsyncDisplayKit - Smooth asynchronous user interfaces for iOS apps. ... 2017-06-07
lottie-android - Render After Effects animations natively on Androi... 2017-06-07
parse-server - Parse-compatible API server module for Node/Expres... 2017-06-07
inferno - An extremely fast, React-like JavaScript library f... 2017-06-08
guetzli - Perceptual JPEG encoder 2017-06-08
cs-video-courses - List of Computer Science courses with video lectur... 2017-06-08
interviews - Everything you need to know to get the job. 2017-06-08
prepack - Prepack is a partial evaluator for JavaScript. Pre... 2017-06-08
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top