Created
December 15, 2017 06:09
-
-
Save hach-que/800e3ba291f1c42b628bdc0a39732bbe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../../node_modules/@types/jquery/index.d.ts" /> | |
interface PageData { | |
message: string; | |
} | |
$(function() { | |
let data = JSON.parse($("#page-data").text()) as PageData; | |
alert(data.message); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment