Of course @ruilviana is correct. First of all "WiFi.h" is not for an ESP8266.
After installing ESPAsyncWebServer.h and ESPAsyncTCP.h and including these libraries and the correct Wifi library like this :
// Import required libraries
#include <ESP8266WiFi.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
The code compiles (be it with a warning for not using 'const' in front of you ssid char. Don't include your actual Wifi credentials in a post ! )