Selected Quarterly Financial Data (Unaudited) - Impact of adoption (Details) - USD ($)
$ / shares in Units, $ in Thousands
3 Months Ended 12 Months Ended
Dec. 31, 2018
Sep. 30, 2018
Jun. 30, 2018
Mar. 31, 2018
Dec. 31, 2017
Sep. 30, 2017
Jun. 30, 2017
Mar. 31, 2017
Dec. 31, 2018
Dec. 31, 2017
Dec. 31, 2016
Operating expenses:                      
Research and development                 $ 51,769 $ 21,226 $ 8,403
General and administrative                 39,894 22,038 2,449
Total operating expenses $ 29,122 $ 27,554 $ 20,384 $ 14,603 $ 17,473 $ 11,975 $ 9,033 $ 4,783 91,663 43,264 10,852
Loss from operations (29,122) (27,554) (20,384) (14,603) (17,473) (11,975) (9,033) (4,783) (91,663) (43,264) (10,852)
Net loss attributable to common stockholders $ (27,183) $ (26,362) $ (21,239) $ (14,411) $ (17,517) $ (11,919) $ (9,834) $ (5,233) $ (89,195) $ (44,503) $ (11,764)
Net loss per share attributable to common stockholders, basic and diluted $ (0.35) $ (0.42) $ (2.43) $ (1.72) $ (2.07) $ (1.48) $ (1.25) $ (0.68) $ (2.27) $ (5.55) $ (1.63)
Comprehensive loss:                      
Net loss                 $ (89,195) $ (43,847) $ (11,016)
Other comprehensive loss:                      
Unrealized losses on investments, net of tax of $0                 (29)    
Comprehensive loss                 $ (89,224) $ (43,847) $ (11,016)
ASU 2018-07                      
Operating expenses:                      
Research and development     $ 11,361 $ 9,506              
General and administrative     9,023 5,097              
Total operating expenses     20,384 14,603              
Loss from operations     (20,384) (14,603)              
Net loss attributable to common stockholders     $ (21,239) $ (14,411)              
Net loss per share attributable to common stockholders, basic and diluted     $ (2.43) $ (1.72)              
As previously reported | ASU 2018-07                      
Operating expenses:                      
Research and development     $ 11,965 $ 9,650              
General and administrative     16,279 5,797              
Total operating expenses     28,244 15,447              
Loss from operations     (28,244) (15,447)              
Net loss attributable to common stockholders     $ (29,099) $ (15,255)              
Net loss per share attributable to common stockholders, basic and diluted     $ (3.33) $ (1.83)