CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended 12 Months Ended
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Dec. 31, 2018
Cash flows from operating activities:        
Net loss   $ (71,971) $ (35,650)  
Adjustments to reconcile net loss to net cash used in operating activities:        
Stock-based compensation expense   20,082 8,515  
Depreciation and amortization expense   1,446 502  
Change in fair value of preferred stock warrant liability $ 1,718   1,761  
Accretion of discount on investments   (1,215) (120)  
Loss on disposal of property and equipment   119    
Non-cash interest expense   114 21  
Changes in operating assets and liabilities:        
Prepaid expenses and other current assets   (1,142) (265)  
Operating lease, right-of-use-asset   2,052    
Accounts payable   (4,741) 3,033  
Accrued expenses and other current liabilities   2,612 1,434  
Deferred rent     (18)  
Operating lease liabilities   (67)    
Net cash used in operating activities   (52,711) (20,787)  
Cash flows from investing activities:        
Purchases of property, plant and equipment   (17,415) (1,458)  
Purchases of investments   (176,899) (78,425)  
Sales and maturities of investments   54,174 13,710  
Net cash used in investing activities   (140,140) (66,173)  
Cash flows from financing activities:        
Proceeds from issuance of convertible preferred stock, net of issuance costs     100,986  
Payments of initial public offering costs     (715)  
Proceeds from repayment of promissory note     245  
Proceeds from borrowings under loan and security agreement   25,000    
Proceeds from issuance of common stock upon exercise of stock options   1,371 18  
Net cash provided by financing activities   26,371 100,534  
Net increase (decrease) in cash, cash equivalents and restricted cash   (166,480) 13,574  
Cash, cash equivalents and restricted cash at beginning of period   309,421 104,572 $ 104,572
Cash, cash equivalents and restricted cash at end of period $ 118,146 142,941 118,146 $ 309,421
Supplemental cash flow information:        
Cash paid for interest, net of interest capitalized   1,033    
Cash paid for leases   1,084    
Supplemental disclosure of non-cash investing and financing information:        
Lease assets obtained in exchange for new operating lease liabilities   27,944    
Purchases of property, plant and equipment included in accounts payable or accrued expenses   $ 4,739 850  
Amounts capitalized under build-to-suit lease transaction     16,918  
Deferred offering costs and issuance costs included in accounts payable or accrued expenses     $ 1,769