Summary of Significant Accounting Policies - Recently Adopted Accounting Pronouncements (Details) - USD ($)
3 Months Ended 6 Months Ended
Jan. 01, 2018
Jun. 30, 2019
Mar. 31, 2019
Jun. 30, 2018
Mar. 31, 2018
Jun. 30, 2019
Jun. 30, 2018
Jan. 01, 2019
Dec. 31, 2018
Dec. 31, 2017
Recently Adopted Accounting Pronouncements                    
Additional paid-in capital   $ 564,527,000       $ 564,527,000     $ 543,040,000 $ 17,277,000
Accumulated deficit   (221,253,000)       (221,253,000)   $ (149,282,000) (150,082,000) (60,979,000)
Change in fair value of the unvested awards $ 100,000                  
Operating expenses:                    
Research and development   27,518,000   $ 11,361,000   48,389,000 $ 20,867,000      
General and administrative   13,767,000   9,023,000   27,302,000 14,120,000      
Total operating expenses   41,285,000   20,384,000   75,691,000 34,987,000      
Loss from operations   $ (41,285,000)   $ (20,384,000)   $ (75,691,000) $ (34,987,000)      
Net loss per share, basic and diluted   $ (0.50)   $ (2.43)   $ (0.92) $ (4.17)      
Comprehensive loss:                    
Net loss   $ (39,390,000) $ (32,581,000) $ (21,239,000) $ (14,411,000) $ (71,971,000) $ (35,650,000)      
Other comprehensive income (loss):                    
Unrealized gains (losses) on investments, net of tax of $0   209,000   18,000   319,000 (27,000)      
Comprehensive loss   (39,181,000)   (21,221,000)   (71,652,000) (35,677,000)      
Financial impact on the Company’s condensed consolidated balance sheet upon the adoption of ASUs and the cumulative effect adjustment                    
Operating lease, right-of-use-asset   27,643,000       27,643,000   1,751,000    
Property, plant and equipment, net   41,898,000       41,898,000   17,654,000 62,796,000  
Deferred rent                 143,000  
Accrued expenses and other current liabilities               7,667,000 12,118,000  
Lease liability, net of current portion                 41,441,000  
Operating lease liabilities, current portion   5,076,000       5,076,000   616,000 4,502,000  
Operating lease liabilities, net of current portion   23,137,000       23,137,000   1,226,000 41,441,000  
StockholdersEquity   343,644,000 371,636,000 (70,709,000) $ (55,526,000) 343,644,000 (70,709,000)   393,008,000 (43,687,000)
Accumulated deficit   $ (221,253,000)       (221,253,000)   (149,282,000) $ (150,082,000) $ (60,979,000)
Non-employees                    
Assumptions used to determine the fair value of outstanding awards granted                    
Weighted average grant-date fair value (per share) $ 5.88                  
Risk-free interest rate 2.30%                  
Expected volatility 74.00%                  
Expected term (in years) 6 years 1 month 6 days                  
Common stock value $ 6.28                  
Restricted Common Stock | Non-employees                    
Assumptions used to determine the fair value of outstanding awards granted                    
Number of outstanding options 4,767,014                  
Stock options | Non-employees                    
Assumptions used to determine the fair value of outstanding awards granted                    
Number of outstanding options 330,917                  
ASU 2018-07                    
Recently Adopted Accounting Pronouncements                    
Additional paid-in capital $ 17,185,000                  
Accumulated deficit (60,887,000)                  
Operating expenses:                    
Research and development       11,361,000     20,867,000      
General and administrative       9,023,000     14,120,000      
Total operating expenses       20,384,000     34,987,000      
Loss from operations       (20,384,000)     (34,987,000)      
Net loss attributable to common stockholders       $ (21,239,000)     $ (35,650,000)      
Net loss per share, basic and diluted       $ (2.43)     $ (4.17)      
Comprehensive loss:                    
Net loss       $ (21,239,000)     $ (35,650,000)      
Other comprehensive income (loss):                    
Unrealized gains (losses) on investments, net of tax of $0       18,000     (27,000)      
Comprehensive loss       (21,221,000)     $ (35,677,000)      
Financial impact on the Company’s condensed consolidated balance sheet upon the adoption of ASUs and the cumulative effect adjustment                    
Accumulated deficit (60,887,000)                  
ASU 2018-07 | As previously reported                    
Operating expenses:                    
Research and development       11,965,000   21,615,000        
General and administrative       16,279,000   22,076,000        
Total operating expenses       28,244,000   43,691,000        
Loss from operations       (28,244,000)   (43,691,000)        
Net loss attributable to common stockholders       $ (29,099,000)   $ (44,354,000)        
Net loss per share, basic and diluted       $ (3.33)   $ (5.19)        
Comprehensive loss:                    
Net loss       $ (29,099,000)   $ (44,354,000)        
Other comprehensive income (loss):                    
Unrealized gains (losses) on investments, net of tax of $0       18,000   (27,000)        
Comprehensive loss       $ (29,081,000)   $ (44,381,000)        
ASU 2016-02                    
Recently Adopted Accounting Pronouncements                    
Change in fair value of the unvested awards     $ 800,000              
ASU 2016-02 | Adjustments                    
Recently Adopted Accounting Pronouncements                    
Accumulated deficit               800,000    
Financial impact on the Company’s condensed consolidated balance sheet upon the adoption of ASUs and the cumulative effect adjustment                    
Operating lease, right-of-use-asset               1,751,000    
Property, plant and equipment, net               (45,142,000)    
Deferred rent               (143,000)    
Accrued expenses and other current liabilities               (4,451,000)    
Lease liability, net of current portion               (41,441,000)    
Operating lease liabilities, current portion               616,000    
Operating lease liabilities, net of current portion               1,226,000    
Accumulated deficit               $ 800,000    
Adjustments for New Accounting Principle, Early Adoption | ASU 2018-07                    
Recently Adopted Accounting Pronouncements                    
Additional paid-in capital (92,000)                  
Accumulated deficit 92,000                  
Financial impact on the Company’s condensed consolidated balance sheet upon the adoption of ASUs and the cumulative effect adjustment                    
Accumulated deficit $ 92,000